Compare commits
1 Commits
v2.8.4-rc2
...
WX_2_8_4
Author | SHA1 | Date | |
---|---|---|---|
|
50c46e10bb |
1
aclocal.m4
vendored
@@ -11,6 +11,7 @@
|
|||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
m4_include([build/aclocal/bakefile-dllar.m4])
|
||||||
m4_include([build/aclocal/bakefile-lang.m4])
|
m4_include([build/aclocal/bakefile-lang.m4])
|
||||||
m4_include([build/aclocal/bakefile.m4])
|
m4_include([build/aclocal/bakefile.m4])
|
||||||
m4_include([build/aclocal/cppunit.m4])
|
m4_include([build/aclocal/cppunit.m4])
|
||||||
|
483
build/aclocal/bakefile-dllar.m4
Normal file
@@ -0,0 +1,483 @@
|
|||||||
|
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_DLLAR_SH],
|
||||||
|
[
|
||||||
|
dnl ===================== dllar.sh begins here =====================
|
||||||
|
dnl (Created by merge-scripts.py from dllar.sh
|
||||||
|
dnl file do not edit here!)
|
||||||
|
D='$'
|
||||||
|
cat <<EOF >dllar.sh
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# dllar - a tool to build both a .dll and an .a file
|
||||||
|
# from a set of object (.o) files for EMX/OS2.
|
||||||
|
#
|
||||||
|
# Written by Andrew Zabolotny, bit@freya.etu.ru
|
||||||
|
# Ported to Unix like shell by Stefan Neis, Stefan.Neis@t-online.de
|
||||||
|
#
|
||||||
|
# This script will accept a set of files on the command line.
|
||||||
|
# All the public symbols from the .o files will be exported into
|
||||||
|
# a .DEF file, then linker will be run (through gcc) against them to
|
||||||
|
# build a shared library consisting of all given .o files. All libraries
|
||||||
|
# (.a) will be first decompressed into component .o files then act as
|
||||||
|
# described above. You can optionally give a description (-d "description")
|
||||||
|
# which will be put into .DLL. To see the list of accepted options (as well
|
||||||
|
# as command-line format) simply run this program without options. The .DLL
|
||||||
|
# is built to be imported by name (there is no guarantee that new versions
|
||||||
|
# of the library you build will have same ordinals for same symbols).
|
||||||
|
#
|
||||||
|
# dllar 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.
|
||||||
|
#
|
||||||
|
# dllar 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 dllar; see the file COPYING. If not, write to the Free
|
||||||
|
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
|
# To successfuly run this program you will need:
|
||||||
|
# - Current drive should have LFN support (HPFS, ext2, network, etc)
|
||||||
|
# (Sometimes dllar generates filenames which won't fit 8.3 scheme)
|
||||||
|
# - gcc
|
||||||
|
# (used to build the .dll)
|
||||||
|
# - emxexp
|
||||||
|
# (used to create .def file from .o files)
|
||||||
|
# - emximp
|
||||||
|
# (used to create .a file from .def file)
|
||||||
|
# - GNU text utilites (cat, sort, uniq)
|
||||||
|
# used to process emxexp output
|
||||||
|
# - GNU file utilities (mv, rm)
|
||||||
|
# - GNU sed
|
||||||
|
# - lxlite (optional, see flag below)
|
||||||
|
# (used for general .dll cleanup)
|
||||||
|
#
|
||||||
|
|
||||||
|
flag_USE_LXLITE=1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# helper functions
|
||||||
|
# basnam, variant of basename, which does _not_ remove the path, _iff_
|
||||||
|
# second argument (suffix to remove) is given
|
||||||
|
basnam(){
|
||||||
|
case ${D}# in
|
||||||
|
1)
|
||||||
|
echo ${D}1 | sed 's/.*\\///' | sed 's/.*\\\\//'
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
echo ${D}1 | sed 's/'${D}2'${D}//'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "error in basnam ${D}*"
|
||||||
|
exit 8
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup temporary files and output
|
||||||
|
CleanUp() {
|
||||||
|
cd ${D}curDir
|
||||||
|
for i in ${D}inputFiles ; do
|
||||||
|
case ${D}i in
|
||||||
|
*!)
|
||||||
|
rm -rf \`basnam ${D}i !\`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Kill result in case of failure as there is just to many stupid make/nmake
|
||||||
|
# things out there which doesn't do this.
|
||||||
|
if @<:@ ${D}# -eq 0 @:>@; then
|
||||||
|
rm -f ${D}arcFile ${D}arcFile2 ${D}defFile ${D}dllFile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print usage and exit script with rc=1.
|
||||||
|
PrintHelp() {
|
||||||
|
echo 'Usage: dllar.sh @<:@-o@<:@utput@:>@ output_file@:>@ @<:@-i@<:@mport@:>@ importlib_name@:>@'
|
||||||
|
echo ' @<:@-name-mangler-script script.sh@:>@'
|
||||||
|
echo ' @<:@-d@<:@escription@:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:@lags@:>@ "CFLAGS"@:>@'
|
||||||
|
echo ' @<:@-ord@<:@inals@:>@@:>@ -ex@<:@clude@:>@ "symbol(s)"'
|
||||||
|
echo ' @<:@-libf@<:@lags@:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:@dll@:>@@:>@ @<:@-nolxl@<:@ite@:>@@:>@'
|
||||||
|
echo ' @<:@*.o@:>@ @<:@*.a@:>@'
|
||||||
|
echo '*> "output_file" should have no extension.'
|
||||||
|
echo ' If it has the .o, .a or .dll extension, it is automatically removed.'
|
||||||
|
echo ' The import library name is derived from this and is set to "name".a,'
|
||||||
|
echo ' unless overridden by -import'
|
||||||
|
echo '*> "importlib_name" should have no extension.'
|
||||||
|
echo ' If it has the .o, or .a extension, it is automatically removed.'
|
||||||
|
echo ' This name is used as the import library name and may be longer and'
|
||||||
|
echo ' more descriptive than the DLL name which has to follow the old '
|
||||||
|
echo ' 8.3 convention of FAT.'
|
||||||
|
echo '*> "script.sh may be given to override the output_file name by a'
|
||||||
|
echo ' different name. It is mainly useful if the regular make process'
|
||||||
|
echo ' of some package does not take into account OS/2 restriction of'
|
||||||
|
echo ' DLL name lengths. It takes the importlib name as input and is'
|
||||||
|
echo ' supposed to procude a shorter name as output. The script should'
|
||||||
|
echo ' expect to get importlib_name without extension and should produce'
|
||||||
|
echo ' a (max.) 8 letter name without extension.'
|
||||||
|
echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)'
|
||||||
|
echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
|
||||||
|
echo ' These flags will be put at the start of GCC command line.'
|
||||||
|
echo '*> -ord@<:@inals@:>@ tells dllar to export entries by ordinals. Be careful.'
|
||||||
|
echo '*> -ex@<:@clude@:>@ defines symbols which will not be exported. You can define'
|
||||||
|
echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
|
||||||
|
echo ' If the last character of a symbol is "*", all symbols beginning'
|
||||||
|
echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).'
|
||||||
|
echo '*> -libf@<:@lags@:>@ can be used to add INITGLOBAL/INITINSTANCE and/or'
|
||||||
|
echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
|
||||||
|
echo '*> -nocrt@<:@dll@:>@ switch will disable linking the library against emx''s'
|
||||||
|
echo ' C runtime DLLs.'
|
||||||
|
echo '*> -nolxl@<:@ite@:>@ switch will disable running lxlite on the resulting DLL.'
|
||||||
|
echo '*> All other switches (for example -L./ or -lmylib) will be passed'
|
||||||
|
echo ' unchanged to GCC at the end of command line.'
|
||||||
|
echo '*> If you create a DLL from a library and you do not specify -o,'
|
||||||
|
echo ' the basename for DLL and import library will be set to library name,'
|
||||||
|
echo ' the initial library will be renamed to 'name'_s.a (_s for static)'
|
||||||
|
echo ' i.e. "dllar gcc.a" will create gcc.dll and gcc.a, and the initial'
|
||||||
|
echo ' library will be renamed into gcc_s.a.'
|
||||||
|
echo '--------'
|
||||||
|
echo 'Example:'
|
||||||
|
echo ' dllar -o gcc290.dll libgcc.a -d "GNU C runtime library" -ord'
|
||||||
|
echo ' -ex "__main __ctordtor*" -libf "INITINSTANCE TERMINSTANCE"'
|
||||||
|
CleanUp
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Execute a command.
|
||||||
|
# If exit code of the commnad <> 0 CleanUp() is called and we'll exit the script.
|
||||||
|
# @Uses Whatever CleanUp() uses.
|
||||||
|
doCommand() {
|
||||||
|
echo "${D}*"
|
||||||
|
eval ${D}*
|
||||||
|
rcCmd=${D}?
|
||||||
|
|
||||||
|
if @<:@ ${D}rcCmd -ne 0 @:>@; then
|
||||||
|
echo "command failed, exit code="${D}rcCmd
|
||||||
|
CleanUp
|
||||||
|
exit ${D}rcCmd
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# main routine
|
||||||
|
# setup globals
|
||||||
|
cmdLine=${D}*
|
||||||
|
outFile=""
|
||||||
|
outimpFile=""
|
||||||
|
inputFiles=""
|
||||||
|
renameScript=""
|
||||||
|
description=""
|
||||||
|
CC=gcc.exe
|
||||||
|
CFLAGS="-s -Zcrtdll"
|
||||||
|
EXTRA_CFLAGS=""
|
||||||
|
EXPORT_BY_ORDINALS=0
|
||||||
|
exclude_symbols=""
|
||||||
|
library_flags=""
|
||||||
|
curDir=\`pwd\`
|
||||||
|
curDirS=curDir
|
||||||
|
case ${D}curDirS in
|
||||||
|
*/)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
curDirS=${D}{curDirS}"/"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Parse commandline
|
||||||
|
libsToLink=0
|
||||||
|
omfLinking=0
|
||||||
|
while @<:@ ${D}1 @:>@; do
|
||||||
|
case ${D}1 in
|
||||||
|
-ord*)
|
||||||
|
EXPORT_BY_ORDINALS=1;
|
||||||
|
;;
|
||||||
|
-o*)
|
||||||
|
shift
|
||||||
|
outFile=${D}1
|
||||||
|
;;
|
||||||
|
-i*)
|
||||||
|
shift
|
||||||
|
outimpFile=${D}1
|
||||||
|
;;
|
||||||
|
-name-mangler-script)
|
||||||
|
shift
|
||||||
|
renameScript=${D}1
|
||||||
|
;;
|
||||||
|
-d*)
|
||||||
|
shift
|
||||||
|
description=${D}1
|
||||||
|
;;
|
||||||
|
-f*)
|
||||||
|
shift
|
||||||
|
CFLAGS=${D}1
|
||||||
|
;;
|
||||||
|
-c*)
|
||||||
|
shift
|
||||||
|
CC=${D}1
|
||||||
|
;;
|
||||||
|
-h*)
|
||||||
|
PrintHelp
|
||||||
|
;;
|
||||||
|
-ex*)
|
||||||
|
shift
|
||||||
|
exclude_symbols=${D}{exclude_symbols}${D}1" "
|
||||||
|
;;
|
||||||
|
-libf*)
|
||||||
|
shift
|
||||||
|
library_flags=${D}{library_flags}${D}1" "
|
||||||
|
;;
|
||||||
|
-nocrt*)
|
||||||
|
CFLAGS="-s"
|
||||||
|
;;
|
||||||
|
-nolxl*)
|
||||||
|
flag_USE_LXLITE=0
|
||||||
|
;;
|
||||||
|
-* | /*)
|
||||||
|
case ${D}1 in
|
||||||
|
-L* | -l*)
|
||||||
|
libsToLink=1
|
||||||
|
;;
|
||||||
|
-Zomf)
|
||||||
|
omfLinking=1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
|
||||||
|
;;
|
||||||
|
*.dll)
|
||||||
|
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
|
||||||
|
if @<:@ ${D}omfLinking -eq 1 @:>@; then
|
||||||
|
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
|
||||||
|
else
|
||||||
|
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
found=0;
|
||||||
|
if @<:@ ${D}libsToLink -ne 0 @:>@; then
|
||||||
|
EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
|
||||||
|
else
|
||||||
|
for file in ${D}1 ; do
|
||||||
|
if @<:@ -f ${D}file @:>@; then
|
||||||
|
inputFiles="${D}{inputFiles} ${D}file"
|
||||||
|
found=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if @<:@ ${D}found -eq 0 @:>@; then
|
||||||
|
echo "ERROR: No file(s) found: "${D}1
|
||||||
|
exit 8
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done # iterate cmdline words
|
||||||
|
|
||||||
|
#
|
||||||
|
if @<:@ -z "${D}inputFiles" @:>@; then
|
||||||
|
echo "dllar: no input files"
|
||||||
|
PrintHelp
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Now extract all .o files from .a files
|
||||||
|
newInputFiles=""
|
||||||
|
for file in ${D}inputFiles ; do
|
||||||
|
case ${D}file in
|
||||||
|
*.a | *.lib)
|
||||||
|
case ${D}file in
|
||||||
|
*.a)
|
||||||
|
suffix=".a"
|
||||||
|
AR="ar"
|
||||||
|
;;
|
||||||
|
*.lib)
|
||||||
|
suffix=".lib"
|
||||||
|
AR="emxomfar"
|
||||||
|
EXTRA_CFLAGS="${D}EXTRA_CFLAGS -Zomf"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
dirname=\`basnam ${D}file ${D}suffix\`"_%"
|
||||||
|
mkdir ${D}dirname
|
||||||
|
if @<:@ ${D}? -ne 0 @:>@; then
|
||||||
|
echo "Failed to create subdirectory ./${D}dirname"
|
||||||
|
CleanUp
|
||||||
|
exit 8;
|
||||||
|
fi
|
||||||
|
# Append '!' to indicate archive
|
||||||
|
newInputFiles="${D}newInputFiles ${D}{dirname}!"
|
||||||
|
doCommand "cd ${D}dirname; ${D}AR x ../${D}file"
|
||||||
|
cd ${D}curDir
|
||||||
|
found=0;
|
||||||
|
for subfile in ${D}dirname/*.o* ; do
|
||||||
|
if @<:@ -f ${D}subfile @:>@; then
|
||||||
|
found=1
|
||||||
|
if @<:@ -s ${D}subfile @:>@; then
|
||||||
|
# FIXME: This should be: is file size > 32 byte, _not_ > 0!
|
||||||
|
newInputFiles="${D}newInputFiles ${D}subfile"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if @<:@ ${D}found -eq 0 @:>@; then
|
||||||
|
echo "WARNING: there are no files in archive \\'${D}file\\'"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
newInputFiles="${D}{newInputFiles} ${D}file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
inputFiles="${D}newInputFiles"
|
||||||
|
|
||||||
|
# Output filename(s).
|
||||||
|
do_backup=0;
|
||||||
|
if @<:@ -z ${D}outFile @:>@; then
|
||||||
|
do_backup=1;
|
||||||
|
set outFile ${D}inputFiles; outFile=${D}2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If it is an archive, remove the '!' and the '_%' suffixes
|
||||||
|
case ${D}outFile in
|
||||||
|
*_%!)
|
||||||
|
outFile=\`basnam ${D}outFile _%!\`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case ${D}outFile in
|
||||||
|
*.dll)
|
||||||
|
outFile=\`basnam ${D}outFile .dll\`
|
||||||
|
;;
|
||||||
|
*.DLL)
|
||||||
|
outFile=\`basnam ${D}outFile .DLL\`
|
||||||
|
;;
|
||||||
|
*.o)
|
||||||
|
outFile=\`basnam ${D}outFile .o\`
|
||||||
|
;;
|
||||||
|
*.obj)
|
||||||
|
outFile=\`basnam ${D}outFile .obj\`
|
||||||
|
;;
|
||||||
|
*.a)
|
||||||
|
outFile=\`basnam ${D}outFile .a\`
|
||||||
|
;;
|
||||||
|
*.lib)
|
||||||
|
outFile=\`basnam ${D}outFile .lib\`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case ${D}outimpFile in
|
||||||
|
*.a)
|
||||||
|
outimpFile=\`basnam ${D}outimpFile .a\`
|
||||||
|
;;
|
||||||
|
*.lib)
|
||||||
|
outimpFile=\`basnam ${D}outimpFile .lib\`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if @<:@ -z ${D}outimpFile @:>@; then
|
||||||
|
outimpFile=${D}outFile
|
||||||
|
fi
|
||||||
|
defFile="${D}{outFile}.def"
|
||||||
|
arcFile="${D}{outimpFile}.a"
|
||||||
|
arcFile2="${D}{outimpFile}.lib"
|
||||||
|
|
||||||
|
#create ${D}dllFile as something matching 8.3 restrictions,
|
||||||
|
if @<:@ -z ${D}renameScript @:>@ ; then
|
||||||
|
dllFile="${D}outFile"
|
||||||
|
else
|
||||||
|
dllFile=\`${D}renameScript ${D}outimpFile\`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if @<:@ ${D}do_backup -ne 0 @:>@ ; then
|
||||||
|
if @<:@ -f ${D}arcFile @:>@ ; then
|
||||||
|
doCommand "mv ${D}arcFile ${D}{outFile}_s.a"
|
||||||
|
fi
|
||||||
|
if @<:@ -f ${D}arcFile2 @:>@ ; then
|
||||||
|
doCommand "mv ${D}arcFile2 ${D}{outFile}_s.lib"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extract public symbols from all the object files.
|
||||||
|
tmpdefFile=${D}{defFile}_%
|
||||||
|
rm -f ${D}tmpdefFile
|
||||||
|
for file in ${D}inputFiles ; do
|
||||||
|
case ${D}file in
|
||||||
|
*!)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
doCommand "emxexp -u ${D}file >> ${D}tmpdefFile"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Create the def file.
|
||||||
|
rm -f ${D}defFile
|
||||||
|
echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
|
||||||
|
dllFile="${D}{dllFile}.dll"
|
||||||
|
if @<:@ ! -z ${D}description @:>@; then
|
||||||
|
echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile
|
||||||
|
fi
|
||||||
|
echo "EXPORTS" >> ${D}defFile
|
||||||
|
|
||||||
|
doCommand "cat ${D}tmpdefFile | sort.exe | uniq.exe > ${D}{tmpdefFile}%"
|
||||||
|
grep -v "^ *;" < ${D}{tmpdefFile}% | grep -v "^ *${D}" >${D}tmpdefFile
|
||||||
|
|
||||||
|
# Checks if the export is ok or not.
|
||||||
|
for word in ${D}exclude_symbols; do
|
||||||
|
grep -v ${D}word < ${D}tmpdefFile >${D}{tmpdefFile}%
|
||||||
|
mv ${D}{tmpdefFile}% ${D}tmpdefFile
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
|
||||||
|
sed "=" < ${D}tmpdefFile | \\
|
||||||
|
sed '
|
||||||
|
N
|
||||||
|
: loop
|
||||||
|
s/^\\(@<:@0-9@:>@\\+\\)\\(@<:@^;@:>@*\\)\\(;.*\\)\\?/\\2 @\\1 NONAME/
|
||||||
|
t loop
|
||||||
|
' > ${D}{tmpdefFile}%
|
||||||
|
grep -v "^ *${D}" < ${D}{tmpdefFile}% > ${D}tmpdefFile
|
||||||
|
else
|
||||||
|
rm -f ${D}{tmpdefFile}%
|
||||||
|
fi
|
||||||
|
cat ${D}tmpdefFile >> ${D}defFile
|
||||||
|
rm -f ${D}tmpdefFile
|
||||||
|
|
||||||
|
# Do linking, create implib, and apply lxlite.
|
||||||
|
gccCmdl="";
|
||||||
|
for file in ${D}inputFiles ; do
|
||||||
|
case ${D}file in
|
||||||
|
*!)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
gccCmdl="${D}gccCmdl ${D}file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
doCommand "${D}CC ${D}CFLAGS -Zdll -o ${D}dllFile ${D}defFile ${D}gccCmdl ${D}EXTRA_CFLAGS"
|
||||||
|
touch "${D}{outFile}.dll"
|
||||||
|
|
||||||
|
doCommand "emximp -o ${D}arcFile ${D}defFile"
|
||||||
|
if @<:@ ${D}flag_USE_LXLITE -ne 0 @:>@; then
|
||||||
|
add_flags="";
|
||||||
|
if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
|
||||||
|
add_flags="-ynd"
|
||||||
|
fi
|
||||||
|
doCommand "lxlite -cs -t: -mrn -mln ${D}add_flags ${D}dllFile"
|
||||||
|
fi
|
||||||
|
doCommand "emxomf -s -l ${D}arcFile"
|
||||||
|
|
||||||
|
# Successful exit.
|
||||||
|
CleanUp 1
|
||||||
|
exit 0
|
||||||
|
EOF
|
||||||
|
dnl ===================== dllar.sh ends here =====================
|
||||||
|
])
|
@@ -1,6 +1,30 @@
|
|||||||
dnl ---------------------------------------------------------------------------
|
dnl
|
||||||
|
dnl This file is part of Bakefile (http://bakefile.sourceforge.net)
|
||||||
|
dnl
|
||||||
|
dnl Copyright (C) 2003-2007 Vaclav Slavik, David Elliott and others
|
||||||
|
dnl
|
||||||
|
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
dnl copy of this software and associated documentation files (the "Software"),
|
||||||
|
dnl to deal in the Software without restriction, including without limitation
|
||||||
|
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
dnl and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
dnl Software is furnished to do so, subject to the following conditions:
|
||||||
|
dnl
|
||||||
|
dnl The above copyright notice and this permission notice shall be included in
|
||||||
|
dnl all copies or substantial portions of the Software.
|
||||||
|
dnl
|
||||||
|
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
dnl DEALINGS IN THE SOFTWARE.
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
dnl
|
||||||
dnl Compiler detection macros by David Elliott
|
dnl Compiler detection macros by David Elliott
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl
|
||||||
|
|
||||||
|
|
||||||
dnl ===========================================================================
|
dnl ===========================================================================
|
||||||
@@ -89,12 +113,12 @@ AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER],
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
AC_LANG_POP($2)
|
||||||
if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3" = "xyes"; then
|
if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3" = "xyes"; then
|
||||||
:; $4
|
:; $4
|
||||||
else
|
else
|
||||||
:; $5
|
:; $5
|
||||||
fi
|
fi
|
||||||
AC_LANG_POP($2)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl recent versions of SGI mipsPro compiler define _SGI_COMPILER_VERSION
|
dnl recent versions of SGI mipsPro compiler define _SGI_COMPILER_VERSION
|
||||||
|
@@ -1,9 +1,36 @@
|
|||||||
dnl ---------------------------------------------------------------------------
|
dnl
|
||||||
|
dnl This file is part of Bakefile (http://bakefile.sourceforge.net)
|
||||||
|
dnl
|
||||||
|
dnl Copyright (C) 2003-2007 Vaclav Slavik and others
|
||||||
|
dnl
|
||||||
|
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
dnl copy of this software and associated documentation files (the "Software"),
|
||||||
|
dnl to deal in the Software without restriction, including without limitation
|
||||||
|
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
dnl and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
dnl Software is furnished to do so, subject to the following conditions:
|
||||||
|
dnl
|
||||||
|
dnl The above copyright notice and this permission notice shall be included in
|
||||||
|
dnl all copies or substantial portions of the Software.
|
||||||
|
dnl
|
||||||
|
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
dnl DEALINGS IN THE SOFTWARE.
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
dnl
|
||||||
dnl Support macros for makefiles generated by BAKEFILE.
|
dnl Support macros for makefiles generated by BAKEFILE.
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl
|
||||||
|
|
||||||
|
|
||||||
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Lots of compiler & linker detection code contained here was taken from
|
dnl Lots of compiler & linker detection code contained here was taken from
|
||||||
dnl wxWindows configure.in script (see http://www.wxwindows.org)
|
dnl wxWidgets configure.in script (see http://www.wxwidgets.org)
|
||||||
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +126,8 @@ AC_DEFUN([AC_BAKEFILE_PLATFORM],
|
|||||||
PLATFORM_BEOS=1
|
PLATFORM_BEOS=1
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM])
|
dnl wxWidgets-specific: allow unknown Unix systems
|
||||||
|
dnl AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@@ -431,8 +459,7 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD],
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
dnl wxWidgets-specific: allow unknown Unix systems
|
AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
|
||||||
dnl AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test "x$PIC_FLAG" != "x" ; then
|
if test "x$PIC_FLAG" != "x" ; then
|
||||||
@@ -601,9 +628,14 @@ AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF],
|
|||||||
dnl Sun C++ compiler requires special way of creating static libs;
|
dnl Sun C++ compiler requires special way of creating static libs;
|
||||||
dnl see here for more details:
|
dnl see here for more details:
|
||||||
dnl https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1229751&group_id=9863
|
dnl https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1229751&group_id=9863
|
||||||
AR=${AR:-"$CXX"}
|
AR=$CXX
|
||||||
|
AROPTIONS="-xar -o"
|
||||||
|
AC_SUBST(AR)
|
||||||
|
elif test "x$SGICC" = "xyes"; then
|
||||||
|
dnl Almost the same as above for SGI mipsPro compiler
|
||||||
|
AR=$CXX
|
||||||
|
AROPTIONS="-ar -o"
|
||||||
AC_SUBST(AR)
|
AC_SUBST(AR)
|
||||||
AROPTIONS=${AROPTIONS:-"-xar -o"}
|
|
||||||
else
|
else
|
||||||
AC_CHECK_TOOL(AR, ar, ar)
|
AC_CHECK_TOOL(AR, ar, ar)
|
||||||
AROPTIONS=rcu
|
AROPTIONS=rcu
|
||||||
@@ -792,7 +824,7 @@ AC_DEFUN([AC_BAKEFILE],
|
|||||||
AC_BAKEFILE_DEPS
|
AC_BAKEFILE_DEPS
|
||||||
AC_BAKEFILE_RES_COMPILERS
|
AC_BAKEFILE_RES_COMPILERS
|
||||||
|
|
||||||
BAKEFILE_BAKEFILE_M4_VERSION="0.2.1"
|
BAKEFILE_BAKEFILE_M4_VERSION="0.2.2"
|
||||||
|
|
||||||
dnl includes autoconf_inc.m4:
|
dnl includes autoconf_inc.m4:
|
||||||
$1
|
$1
|
||||||
@@ -811,490 +843,6 @@ dnl ---------------------------------------------------------------------------
|
|||||||
dnl Embedded copies of helper scripts follow:
|
dnl Embedded copies of helper scripts follow:
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_DLLAR_SH],
|
|
||||||
[
|
|
||||||
dnl ===================== dllar.sh begins here =====================
|
|
||||||
dnl (Created by merge-scripts.py from dllar.sh
|
|
||||||
dnl file do not edit here!)
|
|
||||||
D='$'
|
|
||||||
cat <<EOF >dllar.sh
|
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# dllar - a tool to build both a .dll and an .a file
|
|
||||||
# from a set of object (.o) files for EMX/OS2.
|
|
||||||
#
|
|
||||||
# Written by Andrew Zabolotny, bit@freya.etu.ru
|
|
||||||
# Ported to Unix like shell by Stefan Neis, Stefan.Neis@t-online.de
|
|
||||||
#
|
|
||||||
# This script will accept a set of files on the command line.
|
|
||||||
# All the public symbols from the .o files will be exported into
|
|
||||||
# a .DEF file, then linker will be run (through gcc) against them to
|
|
||||||
# build a shared library consisting of all given .o files. All libraries
|
|
||||||
# (.a) will be first decompressed into component .o files then act as
|
|
||||||
# described above. You can optionally give a description (-d "description")
|
|
||||||
# which will be put into .DLL. To see the list of accepted options (as well
|
|
||||||
# as command-line format) simply run this program without options. The .DLL
|
|
||||||
# is built to be imported by name (there is no guarantee that new versions
|
|
||||||
# of the library you build will have same ordinals for same symbols).
|
|
||||||
#
|
|
||||||
# dllar 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.
|
|
||||||
#
|
|
||||||
# dllar 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 dllar; see the file COPYING. If not, write to the Free
|
|
||||||
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
||||||
# 02111-1307, USA.
|
|
||||||
|
|
||||||
# To successfuly run this program you will need:
|
|
||||||
# - Current drive should have LFN support (HPFS, ext2, network, etc)
|
|
||||||
# (Sometimes dllar generates filenames which won't fit 8.3 scheme)
|
|
||||||
# - gcc
|
|
||||||
# (used to build the .dll)
|
|
||||||
# - emxexp
|
|
||||||
# (used to create .def file from .o files)
|
|
||||||
# - emximp
|
|
||||||
# (used to create .a file from .def file)
|
|
||||||
# - GNU text utilites (cat, sort, uniq)
|
|
||||||
# used to process emxexp output
|
|
||||||
# - GNU file utilities (mv, rm)
|
|
||||||
# - GNU sed
|
|
||||||
# - lxlite (optional, see flag below)
|
|
||||||
# (used for general .dll cleanup)
|
|
||||||
#
|
|
||||||
|
|
||||||
flag_USE_LXLITE=1;
|
|
||||||
|
|
||||||
#
|
|
||||||
# helper functions
|
|
||||||
# basnam, variant of basename, which does _not_ remove the path, _iff_
|
|
||||||
# second argument (suffix to remove) is given
|
|
||||||
basnam(){
|
|
||||||
case ${D}# in
|
|
||||||
1)
|
|
||||||
echo ${D}1 | sed 's/.*\\///' | sed 's/.*\\\\//'
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
echo ${D}1 | sed 's/'${D}2'${D}//'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "error in basnam ${D}*"
|
|
||||||
exit 8
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Cleanup temporary files and output
|
|
||||||
CleanUp() {
|
|
||||||
cd ${D}curDir
|
|
||||||
for i in ${D}inputFiles ; do
|
|
||||||
case ${D}i in
|
|
||||||
*!)
|
|
||||||
rm -rf \`basnam ${D}i !\`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Kill result in case of failure as there is just to many stupid make/nmake
|
|
||||||
# things out there which doesn't do this.
|
|
||||||
if @<:@ ${D}# -eq 0 @:>@; then
|
|
||||||
rm -f ${D}arcFile ${D}arcFile2 ${D}defFile ${D}dllFile
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Print usage and exit script with rc=1.
|
|
||||||
PrintHelp() {
|
|
||||||
echo 'Usage: dllar.sh @<:@-o@<:@utput@:>@ output_file@:>@ @<:@-i@<:@mport@:>@ importlib_name@:>@'
|
|
||||||
echo ' @<:@-name-mangler-script script.sh@:>@'
|
|
||||||
echo ' @<:@-d@<:@escription@:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:@lags@:>@ "CFLAGS"@:>@'
|
|
||||||
echo ' @<:@-ord@<:@inals@:>@@:>@ -ex@<:@clude@:>@ "symbol(s)"'
|
|
||||||
echo ' @<:@-libf@<:@lags@:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:@dll@:>@@:>@ @<:@-nolxl@<:@ite@:>@@:>@'
|
|
||||||
echo ' @<:@*.o@:>@ @<:@*.a@:>@'
|
|
||||||
echo '*> "output_file" should have no extension.'
|
|
||||||
echo ' If it has the .o, .a or .dll extension, it is automatically removed.'
|
|
||||||
echo ' The import library name is derived from this and is set to "name".a,'
|
|
||||||
echo ' unless overridden by -import'
|
|
||||||
echo '*> "importlib_name" should have no extension.'
|
|
||||||
echo ' If it has the .o, or .a extension, it is automatically removed.'
|
|
||||||
echo ' This name is used as the import library name and may be longer and'
|
|
||||||
echo ' more descriptive than the DLL name which has to follow the old '
|
|
||||||
echo ' 8.3 convention of FAT.'
|
|
||||||
echo '*> "script.sh may be given to override the output_file name by a'
|
|
||||||
echo ' different name. It is mainly useful if the regular make process'
|
|
||||||
echo ' of some package does not take into account OS/2 restriction of'
|
|
||||||
echo ' DLL name lengths. It takes the importlib name as input and is'
|
|
||||||
echo ' supposed to procude a shorter name as output. The script should'
|
|
||||||
echo ' expect to get importlib_name without extension and should produce'
|
|
||||||
echo ' a (max.) 8 letter name without extension.'
|
|
||||||
echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)'
|
|
||||||
echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
|
|
||||||
echo ' These flags will be put at the start of GCC command line.'
|
|
||||||
echo '*> -ord@<:@inals@:>@ tells dllar to export entries by ordinals. Be careful.'
|
|
||||||
echo '*> -ex@<:@clude@:>@ defines symbols which will not be exported. You can define'
|
|
||||||
echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
|
|
||||||
echo ' If the last character of a symbol is "*", all symbols beginning'
|
|
||||||
echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).'
|
|
||||||
echo '*> -libf@<:@lags@:>@ can be used to add INITGLOBAL/INITINSTANCE and/or'
|
|
||||||
echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
|
|
||||||
echo '*> -nocrt@<:@dll@:>@ switch will disable linking the library against emx''s'
|
|
||||||
echo ' C runtime DLLs.'
|
|
||||||
echo '*> -nolxl@<:@ite@:>@ switch will disable running lxlite on the resulting DLL.'
|
|
||||||
echo '*> All other switches (for example -L./ or -lmylib) will be passed'
|
|
||||||
echo ' unchanged to GCC at the end of command line.'
|
|
||||||
echo '*> If you create a DLL from a library and you do not specify -o,'
|
|
||||||
echo ' the basename for DLL and import library will be set to library name,'
|
|
||||||
echo ' the initial library will be renamed to 'name'_s.a (_s for static)'
|
|
||||||
echo ' i.e. "dllar gcc.a" will create gcc.dll and gcc.a, and the initial'
|
|
||||||
echo ' library will be renamed into gcc_s.a.'
|
|
||||||
echo '--------'
|
|
||||||
echo 'Example:'
|
|
||||||
echo ' dllar -o gcc290.dll libgcc.a -d "GNU C runtime library" -ord'
|
|
||||||
echo ' -ex "__main __ctordtor*" -libf "INITINSTANCE TERMINSTANCE"'
|
|
||||||
CleanUp
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Execute a command.
|
|
||||||
# If exit code of the commnad <> 0 CleanUp() is called and we'll exit the script.
|
|
||||||
# @Uses Whatever CleanUp() uses.
|
|
||||||
doCommand() {
|
|
||||||
echo "${D}*"
|
|
||||||
eval ${D}*
|
|
||||||
rcCmd=${D}?
|
|
||||||
|
|
||||||
if @<:@ ${D}rcCmd -ne 0 @:>@; then
|
|
||||||
echo "command failed, exit code="${D}rcCmd
|
|
||||||
CleanUp
|
|
||||||
exit ${D}rcCmd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# main routine
|
|
||||||
# setup globals
|
|
||||||
cmdLine=${D}*
|
|
||||||
outFile=""
|
|
||||||
outimpFile=""
|
|
||||||
inputFiles=""
|
|
||||||
renameScript=""
|
|
||||||
description=""
|
|
||||||
CC=gcc.exe
|
|
||||||
CFLAGS="-s -Zcrtdll"
|
|
||||||
EXTRA_CFLAGS=""
|
|
||||||
EXPORT_BY_ORDINALS=0
|
|
||||||
exclude_symbols=""
|
|
||||||
library_flags=""
|
|
||||||
curDir=\`pwd\`
|
|
||||||
curDirS=curDir
|
|
||||||
case ${D}curDirS in
|
|
||||||
*/)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
curDirS=${D}{curDirS}"/"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
# Parse commandline
|
|
||||||
libsToLink=0
|
|
||||||
omfLinking=0
|
|
||||||
while @<:@ ${D}1 @:>@; do
|
|
||||||
case ${D}1 in
|
|
||||||
-ord*)
|
|
||||||
EXPORT_BY_ORDINALS=1;
|
|
||||||
;;
|
|
||||||
-o*)
|
|
||||||
shift
|
|
||||||
outFile=${D}1
|
|
||||||
;;
|
|
||||||
-i*)
|
|
||||||
shift
|
|
||||||
outimpFile=${D}1
|
|
||||||
;;
|
|
||||||
-name-mangler-script)
|
|
||||||
shift
|
|
||||||
renameScript=${D}1
|
|
||||||
;;
|
|
||||||
-d*)
|
|
||||||
shift
|
|
||||||
description=${D}1
|
|
||||||
;;
|
|
||||||
-f*)
|
|
||||||
shift
|
|
||||||
CFLAGS=${D}1
|
|
||||||
;;
|
|
||||||
-c*)
|
|
||||||
shift
|
|
||||||
CC=${D}1
|
|
||||||
;;
|
|
||||||
-h*)
|
|
||||||
PrintHelp
|
|
||||||
;;
|
|
||||||
-ex*)
|
|
||||||
shift
|
|
||||||
exclude_symbols=${D}{exclude_symbols}${D}1" "
|
|
||||||
;;
|
|
||||||
-libf*)
|
|
||||||
shift
|
|
||||||
library_flags=${D}{library_flags}${D}1" "
|
|
||||||
;;
|
|
||||||
-nocrt*)
|
|
||||||
CFLAGS="-s"
|
|
||||||
;;
|
|
||||||
-nolxl*)
|
|
||||||
flag_USE_LXLITE=0
|
|
||||||
;;
|
|
||||||
-* | /*)
|
|
||||||
case ${D}1 in
|
|
||||||
-L* | -l*)
|
|
||||||
libsToLink=1
|
|
||||||
;;
|
|
||||||
-Zomf)
|
|
||||||
omfLinking=1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
|
|
||||||
;;
|
|
||||||
*.dll)
|
|
||||||
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
|
|
||||||
if @<:@ ${D}omfLinking -eq 1 @:>@; then
|
|
||||||
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
|
|
||||||
else
|
|
||||||
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
found=0;
|
|
||||||
if @<:@ ${D}libsToLink -ne 0 @:>@; then
|
|
||||||
EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
|
|
||||||
else
|
|
||||||
for file in ${D}1 ; do
|
|
||||||
if @<:@ -f ${D}file @:>@; then
|
|
||||||
inputFiles="${D}{inputFiles} ${D}file"
|
|
||||||
found=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if @<:@ ${D}found -eq 0 @:>@; then
|
|
||||||
echo "ERROR: No file(s) found: "${D}1
|
|
||||||
exit 8
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done # iterate cmdline words
|
|
||||||
|
|
||||||
#
|
|
||||||
if @<:@ -z "${D}inputFiles" @:>@; then
|
|
||||||
echo "dllar: no input files"
|
|
||||||
PrintHelp
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Now extract all .o files from .a files
|
|
||||||
newInputFiles=""
|
|
||||||
for file in ${D}inputFiles ; do
|
|
||||||
case ${D}file in
|
|
||||||
*.a | *.lib)
|
|
||||||
case ${D}file in
|
|
||||||
*.a)
|
|
||||||
suffix=".a"
|
|
||||||
AR="ar"
|
|
||||||
;;
|
|
||||||
*.lib)
|
|
||||||
suffix=".lib"
|
|
||||||
AR="emxomfar"
|
|
||||||
EXTRA_CFLAGS="${D}EXTRA_CFLAGS -Zomf"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
dirname=\`basnam ${D}file ${D}suffix\`"_%"
|
|
||||||
mkdir ${D}dirname
|
|
||||||
if @<:@ ${D}? -ne 0 @:>@; then
|
|
||||||
echo "Failed to create subdirectory ./${D}dirname"
|
|
||||||
CleanUp
|
|
||||||
exit 8;
|
|
||||||
fi
|
|
||||||
# Append '!' to indicate archive
|
|
||||||
newInputFiles="${D}newInputFiles ${D}{dirname}!"
|
|
||||||
doCommand "cd ${D}dirname; ${D}AR x ../${D}file"
|
|
||||||
cd ${D}curDir
|
|
||||||
found=0;
|
|
||||||
for subfile in ${D}dirname/*.o* ; do
|
|
||||||
if @<:@ -f ${D}subfile @:>@; then
|
|
||||||
found=1
|
|
||||||
if @<:@ -s ${D}subfile @:>@; then
|
|
||||||
# FIXME: This should be: is file size > 32 byte, _not_ > 0!
|
|
||||||
newInputFiles="${D}newInputFiles ${D}subfile"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if @<:@ ${D}found -eq 0 @:>@; then
|
|
||||||
echo "WARNING: there are no files in archive \\'${D}file\\'"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
newInputFiles="${D}{newInputFiles} ${D}file"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
inputFiles="${D}newInputFiles"
|
|
||||||
|
|
||||||
# Output filename(s).
|
|
||||||
do_backup=0;
|
|
||||||
if @<:@ -z ${D}outFile @:>@; then
|
|
||||||
do_backup=1;
|
|
||||||
set outFile ${D}inputFiles; outFile=${D}2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If it is an archive, remove the '!' and the '_%' suffixes
|
|
||||||
case ${D}outFile in
|
|
||||||
*_%!)
|
|
||||||
outFile=\`basnam ${D}outFile _%!\`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case ${D}outFile in
|
|
||||||
*.dll)
|
|
||||||
outFile=\`basnam ${D}outFile .dll\`
|
|
||||||
;;
|
|
||||||
*.DLL)
|
|
||||||
outFile=\`basnam ${D}outFile .DLL\`
|
|
||||||
;;
|
|
||||||
*.o)
|
|
||||||
outFile=\`basnam ${D}outFile .o\`
|
|
||||||
;;
|
|
||||||
*.obj)
|
|
||||||
outFile=\`basnam ${D}outFile .obj\`
|
|
||||||
;;
|
|
||||||
*.a)
|
|
||||||
outFile=\`basnam ${D}outFile .a\`
|
|
||||||
;;
|
|
||||||
*.lib)
|
|
||||||
outFile=\`basnam ${D}outFile .lib\`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case ${D}outimpFile in
|
|
||||||
*.a)
|
|
||||||
outimpFile=\`basnam ${D}outimpFile .a\`
|
|
||||||
;;
|
|
||||||
*.lib)
|
|
||||||
outimpFile=\`basnam ${D}outimpFile .lib\`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if @<:@ -z ${D}outimpFile @:>@; then
|
|
||||||
outimpFile=${D}outFile
|
|
||||||
fi
|
|
||||||
defFile="${D}{outFile}.def"
|
|
||||||
arcFile="${D}{outimpFile}.a"
|
|
||||||
arcFile2="${D}{outimpFile}.lib"
|
|
||||||
|
|
||||||
#create ${D}dllFile as something matching 8.3 restrictions,
|
|
||||||
if @<:@ -z ${D}renameScript @:>@ ; then
|
|
||||||
dllFile="${D}outFile"
|
|
||||||
else
|
|
||||||
dllFile=\`${D}renameScript ${D}outimpFile\`
|
|
||||||
fi
|
|
||||||
|
|
||||||
if @<:@ ${D}do_backup -ne 0 @:>@ ; then
|
|
||||||
if @<:@ -f ${D}arcFile @:>@ ; then
|
|
||||||
doCommand "mv ${D}arcFile ${D}{outFile}_s.a"
|
|
||||||
fi
|
|
||||||
if @<:@ -f ${D}arcFile2 @:>@ ; then
|
|
||||||
doCommand "mv ${D}arcFile2 ${D}{outFile}_s.lib"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Extract public symbols from all the object files.
|
|
||||||
tmpdefFile=${D}{defFile}_%
|
|
||||||
rm -f ${D}tmpdefFile
|
|
||||||
for file in ${D}inputFiles ; do
|
|
||||||
case ${D}file in
|
|
||||||
*!)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
doCommand "emxexp -u ${D}file >> ${D}tmpdefFile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Create the def file.
|
|
||||||
rm -f ${D}defFile
|
|
||||||
echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
|
|
||||||
dllFile="${D}{dllFile}.dll"
|
|
||||||
if @<:@ ! -z ${D}description @:>@; then
|
|
||||||
echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile
|
|
||||||
fi
|
|
||||||
echo "EXPORTS" >> ${D}defFile
|
|
||||||
|
|
||||||
doCommand "cat ${D}tmpdefFile | sort.exe | uniq.exe > ${D}{tmpdefFile}%"
|
|
||||||
grep -v "^ *;" < ${D}{tmpdefFile}% | grep -v "^ *${D}" >${D}tmpdefFile
|
|
||||||
|
|
||||||
# Checks if the export is ok or not.
|
|
||||||
for word in ${D}exclude_symbols; do
|
|
||||||
grep -v ${D}word < ${D}tmpdefFile >${D}{tmpdefFile}%
|
|
||||||
mv ${D}{tmpdefFile}% ${D}tmpdefFile
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
|
|
||||||
sed "=" < ${D}tmpdefFile | \\
|
|
||||||
sed '
|
|
||||||
N
|
|
||||||
: loop
|
|
||||||
s/^\\(@<:@0-9@:>@\\+\\)\\(@<:@^;@:>@*\\)\\(;.*\\)\\?/\\2 @\\1 NONAME/
|
|
||||||
t loop
|
|
||||||
' > ${D}{tmpdefFile}%
|
|
||||||
grep -v "^ *${D}" < ${D}{tmpdefFile}% > ${D}tmpdefFile
|
|
||||||
else
|
|
||||||
rm -f ${D}{tmpdefFile}%
|
|
||||||
fi
|
|
||||||
cat ${D}tmpdefFile >> ${D}defFile
|
|
||||||
rm -f ${D}tmpdefFile
|
|
||||||
|
|
||||||
# Do linking, create implib, and apply lxlite.
|
|
||||||
gccCmdl="";
|
|
||||||
for file in ${D}inputFiles ; do
|
|
||||||
case ${D}file in
|
|
||||||
*!)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
gccCmdl="${D}gccCmdl ${D}file"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
doCommand "${D}CC ${D}CFLAGS -Zdll -o ${D}dllFile ${D}defFile ${D}gccCmdl ${D}EXTRA_CFLAGS"
|
|
||||||
touch "${D}{outFile}.dll"
|
|
||||||
|
|
||||||
doCommand "emximp -o ${D}arcFile ${D}defFile"
|
|
||||||
if @<:@ ${D}flag_USE_LXLITE -ne 0 @:>@; then
|
|
||||||
add_flags="";
|
|
||||||
if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
|
|
||||||
add_flags="-ynd"
|
|
||||||
fi
|
|
||||||
doCommand "lxlite -cs -t: -mrn -mln ${D}add_flags ${D}dllFile"
|
|
||||||
fi
|
|
||||||
doCommand "emxomf -s -l ${D}arcFile"
|
|
||||||
|
|
||||||
# Successful exit.
|
|
||||||
CleanUp 1
|
|
||||||
exit 0
|
|
||||||
EOF
|
|
||||||
dnl ===================== dllar.sh ends here =====================
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_DEPS],
|
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_DEPS],
|
||||||
[
|
[
|
||||||
dnl ===================== bk-deps begins here =====================
|
dnl ===================== bk-deps begins here =====================
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
rem Uncomment the next line to set the version; used also in wxWidgets.iss
|
rem Uncomment the next line to set the version; used also in wxWidgets.iss
|
||||||
SET WXW_VER=2.8.4-rc2
|
SET WXW_VER=2.8.4
|
||||||
|
|
||||||
|
|
||||||
if (%WXW_VER%)==() SET WXW_VER=CVS
|
if (%WXW_VER%)==() SET WXW_VER=CVS
|
||||||
@@ -59,7 +59,7 @@ mkdir %WXWIN%\docs\pdf
|
|||||||
mkdir %WXWIN%\docs\htmlhelp
|
mkdir %WXWIN%\docs\htmlhelp
|
||||||
mkdir %WXWIN%\docs\htb
|
mkdir %WXWIN%\docs\htb
|
||||||
echo starting word >> c:\temp.log
|
echo starting word >> c:\temp.log
|
||||||
start /WAIT winword /mwx_ps
|
start /WAIT winword /mwx28_ps
|
||||||
|
|
||||||
|
|
||||||
echo cvs doc up part 2 >> c:\temp.log
|
echo cvs doc up part 2 >> c:\temp.log
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
' laserjet ps driver
|
' laserjet ps driver
|
||||||
' Note that the output dir and hardcoded printer must exist
|
' Note that the output dir and hardcoded printer must exist
|
||||||
|
|
||||||
Sub wx_ps()
|
Sub wx28_ps()
|
||||||
swxWIN = Environ("WXWIN")
|
swxWIN = Environ("WXWIN")
|
||||||
do_ps swxWIN & "\docs\pdf\", "wx"
|
do_ps swxWIN & "\docs\pdf\", "wx"
|
||||||
do_ps swxWIN & "\contrib\docs\latex\svg", "svg"
|
do_ps swxWIN & "\contrib\docs\latex\svg", "svg"
|
||||||
@@ -15,28 +15,4 @@ Sub wx_ps()
|
|||||||
bye_bye
|
bye_bye
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub do_ps(mydir, myfile)
|
|
||||||
' wx_ps Macro
|
|
||||||
' Macro recorded 04/05/2005 by cje2
|
|
||||||
'
|
|
||||||
sDAILYIN = Environ("DAILY") & "\in\"
|
|
||||||
ChangeFileOpenDirectory mydir
|
|
||||||
Documents.Open FileName:=myfile & ".rtf", ConfirmConversions:=False, ReadOnly:= _
|
|
||||||
False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
|
|
||||||
"", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
|
|
||||||
Format:=wdOpenFormatAuto
|
|
||||||
ActivePrinter = "\\biolpc22\laserjet"
|
|
||||||
ActiveDocument.Fields.Update
|
|
||||||
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
|
|
||||||
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
|
|
||||||
Collate:=True, Background:=False, PrintToFile:=True, PrintZoomColumn:=0, _
|
|
||||||
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0, _
|
|
||||||
OutputFileName:=sDAILYIN & myfile & ".ps", Append:=False
|
|
||||||
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub bye_bye()
|
|
||||||
|
|
||||||
Application.Quit SaveChanges:=wdDoNotSaveChanges
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
60
configure.in
@@ -2102,19 +2102,56 @@ if test "x$SUNCC" = xyes; then
|
|||||||
CFLAGS="-erroff=E_NO_EXPLICIT_TYPE_GIVEN $CFLAGS"
|
CFLAGS="-erroff=E_NO_EXPLICIT_TYPE_GIVEN $CFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl SGI mipsPro compiler gives this warning for "conversion from pointer to
|
dnl SGI mipsPro compiler version 7.4.4 and later (and maybe some earlier
|
||||||
dnl same-sized integral type" even when there is an explicit cast and as there
|
dnl versions too but it's known that 7.4 doesn't give this warning) gives this
|
||||||
dnl is no way to turn it off and there are hundreds of these warnings in wx
|
dnl warning for "conversion from pointer to same-sized integral type" even when
|
||||||
dnl sources, just turn it off for now
|
dnl there is an explicit cast and as there is no way to turn it off and there
|
||||||
|
dnl are hundreds of these warnings in wx sources, just turn it off for now
|
||||||
dnl
|
dnl
|
||||||
dnl a better long term solution would be to use #pragma set/reset woff in
|
dnl a better long term solution would be to use #pragma set/reset woff in
|
||||||
dnl wxPtrToUInt() and use it instead of casts elsewhere
|
dnl wxPtrToUInt() and use it instead of casts elsewhere
|
||||||
if test "x$SGICC" = "xyes"; then
|
if test "x$SGICC" = "xyes"; then
|
||||||
|
AC_CACHE_CHECK([if cc version is 7.4.4 or greater],
|
||||||
|
wx_cv_prog_sgicc744,
|
||||||
|
[
|
||||||
|
AC_TRY_COMPILE([],
|
||||||
|
[
|
||||||
|
#if _SGI_COMPILER_VERSION >= 744
|
||||||
|
chock me: mipsPro is 7.4.4 or later
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
wx_cv_prog_sgicc744=no,
|
||||||
|
wx_cv_prog_sgicc744=yes
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "x$wx_cv_prog_sgicc744" = "xyes"; then
|
||||||
CFLAGS="-woff 3970 $CFLAGS"
|
CFLAGS="-woff 3970 $CFLAGS"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if test "x$SGICXX" = "xyes"; then
|
if test "x$SGICXX" = "xyes"; then
|
||||||
|
AC_CACHE_CHECK([if CC version is 7.4.4 or greater],
|
||||||
|
wx_cv_prog_sgicxx744,
|
||||||
|
[
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
|
AC_TRY_COMPILE([],
|
||||||
|
[
|
||||||
|
#if _SGI_COMPILER_VERSION >= 744
|
||||||
|
chock me: mipsPro is 7.4.4 or later
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
wx_cv_prog_sgicxx744=no,
|
||||||
|
wx_cv_prog_sgicxx744=yes
|
||||||
|
)
|
||||||
|
AC_LANG_POP()
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "x$wx_cv_prog_sgicxx744" = "xyes"; then
|
||||||
CXXFLAGS="-woff 3970 $CXXFLAGS"
|
CXXFLAGS="-woff 3970 $CXXFLAGS"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl HP-UX c89/aCC compiler warnings
|
dnl HP-UX c89/aCC compiler warnings
|
||||||
if test "x$HPCC" = "xyes"; then
|
if test "x$HPCC" = "xyes"; then
|
||||||
@@ -2139,7 +2176,7 @@ if test "x$COMPAQCXX" = "xyes"; then
|
|||||||
dnl intconlosbit: "conversion to integral type of smaller size could lose
|
dnl intconlosbit: "conversion to integral type of smaller size could lose
|
||||||
dnl data" this is a useful warning but there are too many of
|
dnl data" this is a useful warning but there are too many of
|
||||||
dnl them for now
|
dnl them for now
|
||||||
CXXFLAGS="-w0 -msg_disable basclsnondto,unrimpret,intconlosbit"
|
CXXFLAGS="-w0 -msg_disable basclsnondto,unrimpret,intconlosbit $CXXFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl the next few tests are all for C++ features and so need to be done using
|
dnl the next few tests are all for C++ features and so need to be done using
|
||||||
@@ -4666,7 +4703,11 @@ if test "$wxUSE_FILE" = "yes"; then
|
|||||||
WX_CHECK_FUNCS(fsync)
|
WX_CHECK_FUNCS(fsync)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl at least under IRIX with mipsPro the C99 round() function is available when
|
||||||
|
dnl building using the C compiler but not when using C++ one
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
WX_CHECK_FUNCS(round,,,[#include <math.h>])
|
WX_CHECK_FUNCS(round,,,[#include <math.h>])
|
||||||
|
AC_LANG_POP()
|
||||||
|
|
||||||
dnl the following tests are for Unix(like) systems only
|
dnl the following tests are for Unix(like) systems only
|
||||||
if test "$TOOLKIT" != "MSW"; then
|
if test "$TOOLKIT" != "MSW"; then
|
||||||
@@ -7024,11 +7065,9 @@ if test "$wxUSE_TREECTRL" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_POPUPWIN" = "yes"; then
|
if test "$wxUSE_POPUPWIN" = "yes"; then
|
||||||
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 ; then
|
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_PM" = 1 \
|
||||||
AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled])
|
-o "$wxUSE_DFB" = 1; then
|
||||||
else
|
AC_MSG_WARN([Popup window not yet supported on this platform... disabled])
|
||||||
if test "$wxUSE_PM" = 1; then
|
|
||||||
AC_MSG_WARN([wxPopupWindow not yet supported under PM... disabled])
|
|
||||||
else
|
else
|
||||||
AC_DEFINE(wxUSE_POPUPWIN)
|
AC_DEFINE(wxUSE_POPUPWIN)
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup"
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup"
|
||||||
@@ -7036,7 +7075,6 @@ if test "$wxUSE_POPUPWIN" = "yes"; then
|
|||||||
USES_CONTROLS=1
|
USES_CONTROLS=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$wxUSE_DIALUP_MANAGER" = "yes"; then
|
if test "$wxUSE_DIALUP_MANAGER" = "yes"; then
|
||||||
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_MGL" = 1; then
|
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_MGL" = 1; then
|
||||||
|
19
debian/changelog
vendored
@@ -1,3 +1,22 @@
|
|||||||
|
wxwidgets2.8 (2.8.4.0-0) unstable; urgency=low
|
||||||
|
|
||||||
|
* Fix bug in wxFileConfig when recreating a group (Steven Van Ingelgem)
|
||||||
|
* Fix wxStringOutputStream::Write() in Unicode build when the argument
|
||||||
|
overlaps UTF-8 characters boundary
|
||||||
|
* Account for lines without newline at the end in wxExecute()
|
||||||
|
* Handle socket shutdown by the peer correctly in wxSocket (Tim Kosse)
|
||||||
|
* Allow status bar children in XRC (Edmunt Pienkowski)
|
||||||
|
* Fix memory leak in wxWizard when not using sizers for the page layout
|
||||||
|
* Fix infinite loop when adding a wxStaticText control to a toolbar
|
||||||
|
* Fix wxNO_BORDER style for wxRadioBox (David Hart)
|
||||||
|
* wxComboBox::SetValue() doesn't emit EVT_TEXT anymore
|
||||||
|
* Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr)
|
||||||
|
* Added wxString::char_str(), wchar_str(), From8BitData(), To8BitData(),
|
||||||
|
FromUTF8(), ToUTF8() and utf8_str() methods for forward compatiblity
|
||||||
|
with wxWidgets 3
|
||||||
|
|
||||||
|
-- Vadim Zeitlin <vadim@wxwindows.org> May, 09 Wed 2007 23:10:01 +0200
|
||||||
|
|
||||||
wxwidgets2.8 (2.8.3.0-0) unstable; urgency=low
|
wxwidgets2.8 (2.8.3.0-0) unstable; urgency=low
|
||||||
|
|
||||||
* Added wxSizerFlags::Shaped(), FixedMinSize(), Top() and Bottom() methods.
|
* Added wxSizerFlags::Shaped(), FixedMinSize(), Top() and Bottom() methods.
|
||||||
|
2
debian/control.in
vendored
@@ -1,7 +1,7 @@
|
|||||||
Source: wxwidgets=V
|
Source: wxwidgets=V
|
||||||
Section: libs
|
Section: libs
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper (>=4.0), flex, bison, gettext, libgtk2.0-dev, =PY, =PY-dev, zlib1g-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libesd0-dev, libgnomeprintui2.2-dev, libgconf2-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev
|
Build-Depends: debhelper (>=4.0), flex, bison, gettext, libgtk2.0-dev, =PY, =PY-dev, zlib1g-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev, libsm-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libesd0-dev, libgnomeprintui2.2-dev, libgconf2-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev
|
||||||
Maintainer: wxWidgets dev-team <wx-dev@lists.wxwidgets.org>
|
Maintainer: wxWidgets dev-team <wx-dev@lists.wxwidgets.org>
|
||||||
Standards-Version: 3.6.2.1
|
Standards-Version: 3.6.2.1
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ getfilelist(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $port = "mgl" ] || [ $port = "all" ]; then
|
if [ $port = "mgl" ] || [ $port = "all" ]; then
|
||||||
filelist="$filelist mgl.rsp"
|
filelist="$filelist univ.rsp mgl.rsp"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $port = "dfb" ] || [ $port = "all" ]; then
|
if [ $port = "dfb" ] || [ $port = "all" ]; then
|
||||||
|
@@ -97,8 +97,9 @@ All:
|
|||||||
- Fix wxStringOutputStream::Write() in Unicode build when the argument
|
- Fix wxStringOutputStream::Write() in Unicode build when the argument
|
||||||
overlaps UTF-8 characters boundary
|
overlaps UTF-8 characters boundary
|
||||||
- Account for lines without newline at the end in wxExecute()
|
- Account for lines without newline at the end in wxExecute()
|
||||||
- Added wxString::char_str() and wchar_str() methods for forward
|
- Added wxString::char_str(), wchar_str(), From8BitData(), To8BitData(),
|
||||||
compatiblity with wxWidgets 3
|
FromUTF8(), ToUTF8() and utf8_str() methods for forward compatiblity
|
||||||
|
with wxWidgets 3
|
||||||
|
|
||||||
All (Unix):
|
All (Unix):
|
||||||
|
|
||||||
@@ -108,6 +109,8 @@ All (GUI):
|
|||||||
|
|
||||||
- Allow status bar children in XRC (Edmunt Pienkowski)
|
- Allow status bar children in XRC (Edmunt Pienkowski)
|
||||||
- Fix memory leak in wxWizard when not using sizers for the page layout
|
- Fix memory leak in wxWizard when not using sizers for the page layout
|
||||||
|
- Added wxListCtrl::SetItemPtrData()
|
||||||
|
- wxHTML: Apply table background colour between the cells too (Michael Hieke)
|
||||||
|
|
||||||
wxMSW:
|
wxMSW:
|
||||||
|
|
||||||
@@ -119,6 +122,7 @@ wxMSW:
|
|||||||
- Fixed bug in wxThread::Wait() in console applications introduced in 2.8.3
|
- Fixed bug in wxThread::Wait() in console applications introduced in 2.8.3
|
||||||
- Support right-aligned/centered owner drawn items in wxListCtrl (troelsk)
|
- Support right-aligned/centered owner drawn items in wxListCtrl (troelsk)
|
||||||
- Compilation fixed with WXWIN_COMPATIBILITY_2_6==0
|
- Compilation fixed with WXWIN_COMPATIBILITY_2_6==0
|
||||||
|
- Fix wxComboCtrl colours under Windows Vista (Kolya Kosenko)
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
@@ -126,6 +130,11 @@ wxGTK:
|
|||||||
- Fix wxNO_BORDER style for wxRadioBox (David Hart)
|
- Fix wxNO_BORDER style for wxRadioBox (David Hart)
|
||||||
- wxComboBox::SetValue() doesn't emit EVT_TEXT anymore
|
- wxComboBox::SetValue() doesn't emit EVT_TEXT anymore
|
||||||
- Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr)
|
- Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr)
|
||||||
|
- Fix support for wxFD_FILE_MUST_EXIST in wxFileDialog
|
||||||
|
- Fix support for setting orientation, paper size and collate
|
||||||
|
in GNOME print backend
|
||||||
|
- Support wxTEXT_ALIGNMENT_JUSTIFIED in wxTextCtrl if GTK+ version is at
|
||||||
|
least 2.11 (Mart Raudsepp).
|
||||||
|
|
||||||
wxMac:
|
wxMac:
|
||||||
|
|
||||||
|
@@ -943,6 +943,9 @@ from $0$ to {\it count}.
|
|||||||
|
|
||||||
Associates application-defined data with this item.
|
Associates application-defined data with this item.
|
||||||
|
|
||||||
|
Notice that this function cannot be used to associate pointers with the control
|
||||||
|
items, use \helpref{SetItemPtrData}{wxlistctrlsetitemptrdata} instead.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxListCtrl::SetItemFont}\label{wxlistctrlsetitemfont}
|
\membersection{wxListCtrl::SetItemFont}\label{wxlistctrlsetitemfont}
|
||||||
|
|
||||||
@@ -981,6 +984,18 @@ The image is an index into the image list associated with the list control.
|
|||||||
Sets the position of the item, in icon or small icon view. Windows only.
|
Sets the position of the item, in icon or small icon view. Windows only.
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxListCtrl::SetItemPtrData}\label{wxlistctrlsetitemptrdata}
|
||||||
|
|
||||||
|
\func{bool}{SetItemPtrData}{\param{long }{item}, \param{wxUIntPtr }{data}}
|
||||||
|
|
||||||
|
Associates application-defined data with this item. The \arg{data} parameter may
|
||||||
|
be either an integer or a pointer cast to the \texttt{wxUIntPtr} type which is
|
||||||
|
guaranteed to be large enough to be able to contain all integer types and
|
||||||
|
pointers.
|
||||||
|
|
||||||
|
\newsince{2.8.4}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxListCtrl::SetItemState}\label{wxlistctrlsetitemstate}
|
\membersection{wxListCtrl::SetItemState}\label{wxlistctrlsetitemstate}
|
||||||
|
|
||||||
\func{bool}{SetItemState}{\param{long }{item}, \param{long }{state}, \param{long }{stateMask}}
|
\func{bool}{SetItemState}{\param{long }{item}, \param{long }{state}, \param{long }{stateMask}}
|
||||||
|
@@ -90,7 +90,7 @@ Creates a new input stream on the specified URL. You can use all but seek
|
|||||||
functionality of wxStream. Seek isn't available on all streams. For example,
|
functionality of wxStream. Seek isn't available on all streams. For example,
|
||||||
HTTP or FTP streams don't deal with it.
|
HTTP or FTP streams don't deal with it.
|
||||||
|
|
||||||
Note that this method is somewhat depreciated, all future wxWidgets applications
|
Note that this method is somewhat deprecated, all future wxWidgets applications
|
||||||
should really use \helpref{wxFileSystem}{wxfilesystem} instead.
|
should really use \helpref{wxFileSystem}{wxfilesystem} instead.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@@ -749,6 +749,24 @@ Returns the number of occurrences of {\it ch} in the string.
|
|||||||
|
|
||||||
This is a wxWidgets 1.xx compatibility function; you should not use it in new code.
|
This is a wxWidgets 1.xx compatibility function; you should not use it in new code.
|
||||||
|
|
||||||
|
\membersection{wxString::From8BitData}\label{wxstringfrom8bitdata}
|
||||||
|
|
||||||
|
\func{static wxString }{From8BitData}{\param{const char*}{ buf}, \param{size\_t}{len}}
|
||||||
|
|
||||||
|
\func{static wxString }{From8BitData}{\param{const char*}{ buf}}
|
||||||
|
|
||||||
|
Converts given buffer of binary data from 8-bit string to wxString. In Unicode
|
||||||
|
build, the string is interpreted as being in ISO-8859-1 encoding. The version
|
||||||
|
without \arg{len} parameter takes NUL-terminated data.
|
||||||
|
|
||||||
|
This is a convenience method useful when storing binary data in wxString.
|
||||||
|
|
||||||
|
\newsince{2.8.4}
|
||||||
|
|
||||||
|
\wxheading{See also}
|
||||||
|
|
||||||
|
\helpref{To8BitData}{wxstringto8bitdata}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxString::FromAscii}\label{wxstringfromascii}
|
\membersection{wxString::FromAscii}\label{wxstringfromascii}
|
||||||
|
|
||||||
@@ -763,6 +781,19 @@ Use \helpref{wxString constructors}{wxstringconstruct} if you
|
|||||||
need to convert from another charset.
|
need to convert from another charset.
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxString::FromUTF8}\label{wxstringfromutf8}
|
||||||
|
|
||||||
|
\func{static wxString }{FromUTF8}{\param{const char*}{ s}}
|
||||||
|
|
||||||
|
\func{static wxString }{FromUTF8}{\param{const char*}{ s}, \param{size\_t}{ len}}
|
||||||
|
|
||||||
|
Converts C string encoded in UTF-8 to wxString.
|
||||||
|
|
||||||
|
Note that this method assumes that \arg{s} is a valid UTF-8 sequence and
|
||||||
|
doesn't do any validation in release builds, it's validity is only checked in
|
||||||
|
debug builds.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxString::GetChar}\label{wxstringgetchar}
|
\membersection{wxString::GetChar}\label{wxstringgetchar}
|
||||||
|
|
||||||
\constfunc{wxChar}{GetChar}{\param{size\_t}{ n}}
|
\constfunc{wxChar}{GetChar}{\param{size\_t}{ n}}
|
||||||
@@ -1122,16 +1153,34 @@ This is a wxWidgets 1.xx compatibility function, use \helpref{Mid}{wxstringmid}
|
|||||||
instead (but note that parameters have different meaning).
|
instead (but note that parameters have different meaning).
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxString::To8BitData}\label{wxstringto8bitdata}
|
||||||
|
|
||||||
|
\constfunc{const char*}{To8BitData}{\void}
|
||||||
|
|
||||||
|
Converts the string to an 8-bit string (ANSI builds only).
|
||||||
|
|
||||||
|
\constfunc{const wxCharBuffer}{To8BitData}{\void}
|
||||||
|
|
||||||
|
Converts the string to an 8-bit string in ISO-8859-1 encoding in the form of
|
||||||
|
a wxCharBuffer (Unicode builds only).
|
||||||
|
|
||||||
|
This is a convenience method useful when storing binary data in wxString.
|
||||||
|
|
||||||
|
\newsince{2.8.4}
|
||||||
|
|
||||||
|
\wxheading{See also}
|
||||||
|
|
||||||
|
\helpref{From8BitData}{wxstringfrom8bitdata}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxString::ToAscii}\label{wxstringtoascii}
|
\membersection{wxString::ToAscii}\label{wxstringtoascii}
|
||||||
|
|
||||||
\constfunc{const char*}{ToAscii}{\void}
|
\constfunc{const char*}{ToAscii}{\void}
|
||||||
|
|
||||||
Converts the string to an ASCII, 7-bit string (ANSI builds only).
|
|
||||||
|
|
||||||
\constfunc{const wxCharBuffer}{ToAscii}{\void}
|
\constfunc{const wxCharBuffer}{ToAscii}{\void}
|
||||||
|
|
||||||
Converts the string to an ASCII, 7-bit string in the form of
|
Converts the string to an ASCII, 7-bit string in the form of
|
||||||
a wxCharBuffer (Unicode builds only).
|
a wxCharBuffer (Unicode builds only) or a C string (ANSI builds).
|
||||||
|
|
||||||
Note that this conversion only works if the string contains only ASCII
|
Note that this conversion only works if the string contains only ASCII
|
||||||
characters. The \helpref{mb\_str}{wxstringmbstr} method provides more
|
characters. The \helpref{mb\_str}{wxstringmbstr} method provides more
|
||||||
@@ -1223,6 +1272,15 @@ bit integer numbers.
|
|||||||
Please see \helpref{ToLongLong}{wxstringtolonglong} for additional remarks.
|
Please see \helpref{ToLongLong}{wxstringtolonglong} for additional remarks.
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxString::ToUTF8}\label{wxstringtoutf8}
|
||||||
|
|
||||||
|
\constfunc{const wxCharBuffer}{ToUF8}{\void}
|
||||||
|
|
||||||
|
Same as \helpref{utf8\_str}{wxstringutf8str}.
|
||||||
|
|
||||||
|
\newsince{2.8.4}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxString::Trim}\label{wxstringtrim}
|
\membersection{wxString::Trim}\label{wxstringtrim}
|
||||||
|
|
||||||
\func{wxString\&}{Trim}{\param{bool}{ fromRight = true}}
|
\func{wxString\&}{Trim}{\param{bool}{ fromRight = true}}
|
||||||
@@ -1272,6 +1330,16 @@ The same as MakeUpper.
|
|||||||
This is a wxWidgets 1.xx compatibility function; you should not use it in new code.
|
This is a wxWidgets 1.xx compatibility function; you should not use it in new code.
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxString::utf8\_str}\label{wxstringutf8str}
|
||||||
|
|
||||||
|
\constfunc{const wxCharBuffer}{utf8\_str}{\void}
|
||||||
|
|
||||||
|
Converts the strings contents to UTF-8 and returns it as a temporary
|
||||||
|
wxCharBuffer object.
|
||||||
|
|
||||||
|
\newsince{2.8.4}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxString::wc\_str}\label{wxstringwcstr}
|
\membersection{wxString::wc\_str}\label{wxstringwcstr}
|
||||||
|
|
||||||
\constfunc{const wchar\_t*}{wc\_str}{\param{wxMBConv\&}{ conv}}
|
\constfunc{const wchar\_t*}{wc\_str}{\param{wxMBConv\&}{ conv}}
|
||||||
|
@@ -111,6 +111,7 @@ private: \
|
|||||||
chartype *m_str; \
|
chartype *m_str; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
// needed for wxString::char_str() and wchar_str()
|
// needed for wxString::char_str() and wchar_str()
|
||||||
#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
|
#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
|
||||||
class WXDLLIMPEXP_BASE classname : public baseclass \
|
class WXDLLIMPEXP_BASE classname : public baseclass \
|
||||||
@@ -121,14 +122,19 @@ public: \
|
|||||||
\
|
\
|
||||||
operator chartype*() { return this->data(); } \
|
operator chartype*() { return this->data(); } \
|
||||||
}
|
}
|
||||||
|
#endif // wxABI_VERSION >= 20804
|
||||||
|
|
||||||
DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
|
DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
|
DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_WCHAR_T
|
||||||
|
|
||||||
DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
|
DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
|
DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // wxUSE_WCHAR_T
|
#endif // wxUSE_WCHAR_T
|
||||||
|
|
||||||
|
@@ -1197,6 +1197,18 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* wxUSE_ZIPSTREAM */
|
#endif /* wxUSE_ZIPSTREAM */
|
||||||
|
|
||||||
|
#if wxUSE_TARSTREAM
|
||||||
|
/* wxTar doesn't currently compile without wchar_t */
|
||||||
|
# if !wxUSE_WCHAR_T
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error "wxTar requires wchar_t"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_TARSTREAM
|
||||||
|
# define wxUSE_TARSTREAM 0
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* wxUSE_TARSTREAM */
|
||||||
|
|
||||||
#if wxUSE_TARSTREAM
|
#if wxUSE_TARSTREAM
|
||||||
# if !wxUSE_ARCHIVE_STREAMS
|
# if !wxUSE_ARCHIVE_STREAMS
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
@@ -84,9 +84,9 @@ public:
|
|||||||
{
|
{
|
||||||
// we don't need to know sizeof(long) here because we assume that the three
|
// 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
|
// least significant bytes contain the R, G and B values
|
||||||
Set((ChannelType)colRGB,
|
Set((ChannelType)(0xFF & colRGB),
|
||||||
(ChannelType)(colRGB >> 8),
|
(ChannelType)(0xFF & (colRGB >> 8)),
|
||||||
(ChannelType)(colRGB >> 16));
|
(ChannelType)(0xFF & (colRGB >> 16)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -95,7 +95,14 @@ private:
|
|||||||
DECLARE_NO_ASSIGN_CLASS(wxConvAuto)
|
DECLARE_NO_ASSIGN_CLASS(wxConvAuto)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_WCHAR_T
|
#else // !wxUSE_WCHAR_T
|
||||||
|
|
||||||
|
// it doesn't matter how we define it in this case as it's unused anyhow, but
|
||||||
|
// do define it to allow the code using wxConvAuto() as default argument (this
|
||||||
|
// is done in many places) to compile
|
||||||
|
typedef wxMBConv wxConvAuto;
|
||||||
|
|
||||||
|
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||||
|
|
||||||
#endif // _WX_CONVAUTO_H_
|
#endif // _WX_CONVAUTO_H_
|
||||||
|
|
||||||
|
@@ -77,6 +77,9 @@ public:
|
|||||||
wxString GetItemText( long item ) const;
|
wxString GetItemText( long item ) const;
|
||||||
void SetItemText( long item, const wxString& str );
|
void SetItemText( long item, const wxString& str );
|
||||||
wxUIntPtr GetItemData( long item ) const;
|
wxUIntPtr GetItemData( long item ) const;
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
|
#endif // wxABI 2.8.4+
|
||||||
bool SetItemData(long item, long data);
|
bool SetItemData(long item, long data);
|
||||||
bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
|
bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
|
||||||
bool GetItemPosition( long item, wxPoint& pos ) const;
|
bool GetItemPosition( long item, wxPoint& pos ) const;
|
||||||
|
@@ -47,10 +47,12 @@ public:
|
|||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxSearchCtrlNameStr);
|
const wxString& name = wxSearchCtrlNameStr);
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
// get/set search button menu
|
// get/set search button menu
|
||||||
// --------------------------
|
// --------------------------
|
||||||
virtual void SetMenu( wxMenu* menu );
|
virtual void SetMenu( wxMenu* menu );
|
||||||
virtual wxMenu* GetMenu();
|
virtual wxMenu* GetMenu();
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
// get/set search options
|
// get/set search options
|
||||||
// ----------------------
|
// ----------------------
|
||||||
@@ -197,8 +199,10 @@ public:
|
|||||||
|
|
||||||
// search control generic only
|
// search control generic only
|
||||||
void SetSearchBitmap( const wxBitmap& bitmap );
|
void SetSearchBitmap( const wxBitmap& bitmap );
|
||||||
void SetSearchMenuBitmap( const wxBitmap& bitmap );
|
|
||||||
void SetCancelBitmap( const wxBitmap& bitmap );
|
void SetCancelBitmap( const wxBitmap& bitmap );
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
void SetSearchMenuBitmap( const wxBitmap& bitmap );
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void DoSetValue(const wxString& value, int flags = 0);
|
virtual void DoSetValue(const wxString& value, int flags = 0);
|
||||||
@@ -220,26 +224,45 @@ protected:
|
|||||||
void OnSetFocus( wxFocusEvent& event );
|
void OnSetFocus( wxFocusEvent& event );
|
||||||
void OnSize( wxSizeEvent& event );
|
void OnSize( wxSizeEvent& event );
|
||||||
|
|
||||||
|
bool HasMenu() const
|
||||||
|
{
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
return m_menu != NULL;
|
||||||
|
#else // !wxUSE_MENUS
|
||||||
|
return false;
|
||||||
|
#endif // wxUSE_MENUS/!wxUSE_MENUS
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class wxSearchButton;
|
friend class wxSearchButton;
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
void PopupSearchMenu();
|
void PopupSearchMenu();
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
// the subcontrols
|
// the subcontrols
|
||||||
wxSearchTextCtrl *m_text;
|
wxSearchTextCtrl *m_text;
|
||||||
wxSearchButton *m_searchButton;
|
wxSearchButton *m_searchButton;
|
||||||
wxSearchButton *m_cancelButton;
|
wxSearchButton *m_cancelButton;
|
||||||
|
#if wxUSE_MENUS
|
||||||
wxMenu *m_menu;
|
wxMenu *m_menu;
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
bool m_searchButtonVisible;
|
bool m_searchButtonVisible;
|
||||||
bool m_cancelButtonVisible;
|
bool m_cancelButtonVisible;
|
||||||
|
|
||||||
bool m_searchBitmapUser;
|
bool m_searchBitmapUser;
|
||||||
bool m_searchMenuBitmapUser;
|
|
||||||
bool m_cancelBitmapUser;
|
bool m_cancelBitmapUser;
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
bool m_searchMenuBitmapUser;
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
wxBitmap m_searchBitmap;
|
wxBitmap m_searchBitmap;
|
||||||
wxBitmap m_searchMenuBitmap;
|
|
||||||
wxBitmap m_cancelBitmap;
|
wxBitmap m_cancelBitmap;
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
wxBitmap m_searchMenuBitmap;
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxSearchCtrl)
|
DECLARE_DYNAMIC_CLASS(wxSearchCtrl)
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#define wxGTK_CONV_FONT(s, font) wxGTK_CONV((s))
|
#define wxGTK_CONV_FONT(s, font) wxGTK_CONV((s))
|
||||||
#define wxGTK_CONV_SYS(s) wxGTK_CONV((s))
|
#define wxGTK_CONV_SYS(s) wxGTK_CONV((s))
|
||||||
#define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX((s))
|
#define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX((s))
|
||||||
#else
|
#elif wxUSE_WCHAR_T
|
||||||
#include "wx/font.h"
|
#include "wx/font.h"
|
||||||
|
|
||||||
// convert the text in given encoding to UTF-8 used by wxGTK
|
// convert the text in given encoding to UTF-8 used by wxGTK
|
||||||
@@ -49,6 +49,12 @@
|
|||||||
#define wxGTK_CONV(s) wxGTK_CONV_FONT((s), m_font)
|
#define wxGTK_CONV(s) wxGTK_CONV_FONT((s), m_font)
|
||||||
#define wxGTK_CONV_SYS(s) wxConvertToGTK((s))
|
#define wxGTK_CONV_SYS(s) wxConvertToGTK((s))
|
||||||
#define wxGTK_CONV_BACK(s) wxConvLocal.cWC2WX(wxConvUTF8.cMB2WC((s)))
|
#define wxGTK_CONV_BACK(s) wxConvLocal.cWC2WX(wxConvUTF8.cMB2WC((s)))
|
||||||
|
#else // we're limited to ASCII
|
||||||
|
#define wxGTK_CONV_ENC(s, enc) (s)
|
||||||
|
#define wxGTK_CONV_FONT(s, font) (s)
|
||||||
|
#define wxGTK_CONV(s) (s)
|
||||||
|
#define wxGTK_CONV_SYS(s) (s)
|
||||||
|
#define wxGTK_CONV_BACK(s) (wxString(s))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Some deprecated GTK+ prototypes we still use often
|
// Some deprecated GTK+ prototypes we still use often
|
||||||
|
@@ -122,6 +122,9 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
|||||||
long GetItemData(long item) const ;
|
long GetItemData(long item) const ;
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
|
#endif // wxABI 2.8.4+
|
||||||
bool SetItemData(long item, long data);
|
bool SetItemData(long item, long data);
|
||||||
|
|
||||||
// Gets the item rectangle
|
// Gets the item rectangle
|
||||||
|
@@ -105,6 +105,7 @@ public:
|
|||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
bool MSWShouldPreProcessMessage(WXMSG *pMsg);
|
||||||
|
|
||||||
WXHWND GetEditHWND() const;
|
WXHWND GetEditHWND() const;
|
||||||
|
|
||||||
|
@@ -13,6 +13,8 @@
|
|||||||
#ifndef _WX_DRAGIMAG_H_
|
#ifndef _WX_DRAGIMAG_H_
|
||||||
#define _WX_DRAGIMAG_H_
|
#define _WX_DRAGIMAG_H_
|
||||||
|
|
||||||
|
#if wxUSE_DRAGIMAGE
|
||||||
|
|
||||||
#include "wx/bitmap.h"
|
#include "wx/bitmap.h"
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
@@ -267,5 +269,6 @@ private:
|
|||||||
DECLARE_NO_COPY_CLASS(wxDragImage)
|
DECLARE_NO_COPY_CLASS(wxDragImage)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // wxUSE_DRAGIMAGE
|
||||||
#endif
|
#endif
|
||||||
// _WX_DRAGIMAG_H_
|
// _WX_DRAGIMAG_H_
|
||||||
|
@@ -163,6 +163,9 @@ public:
|
|||||||
wxUIntPtr GetItemData(long item) const ;
|
wxUIntPtr GetItemData(long item) const ;
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
|
#endif // wxABI 2.8.4+
|
||||||
bool SetItemData(long item, long data);
|
bool SetItemData(long item, long data);
|
||||||
|
|
||||||
// Gets the item rectangle
|
// Gets the item rectangle
|
||||||
|
@@ -291,8 +291,10 @@ private:
|
|||||||
// true if the hash above is not empty
|
// true if the hash above is not empty
|
||||||
bool m_hasAnyAttr;
|
bool m_hasAnyAttr;
|
||||||
|
|
||||||
|
#if wxUSE_DRAGIMAGE
|
||||||
// used for dragging
|
// used for dragging
|
||||||
wxDragImage *m_dragImage;
|
wxDragImage *m_dragImage;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Virtual root item, if wxTR_HIDE_ROOT is set.
|
// Virtual root item, if wxTR_HIDE_ROOT is set.
|
||||||
void* m_pVirtualRoot;
|
void* m_pVirtualRoot;
|
||||||
|
@@ -53,8 +53,10 @@ public:
|
|||||||
virtual ~wxSearchCtrlBase() { }
|
virtual ~wxSearchCtrlBase() { }
|
||||||
|
|
||||||
// search control
|
// search control
|
||||||
|
#if wxUSE_MENUS
|
||||||
virtual void SetMenu(wxMenu *menu) = 0;
|
virtual void SetMenu(wxMenu *menu) = 0;
|
||||||
virtual wxMenu *GetMenu() = 0;
|
virtual wxMenu *GetMenu() = 0;
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
// get/set options
|
// get/set options
|
||||||
virtual void ShowSearchButton( bool show ) = 0;
|
virtual void ShowSearchButton( bool show ) = 0;
|
||||||
|
@@ -500,9 +500,13 @@ class WXDLLIMPEXP_BASE wxMBConv
|
|||||||
public:
|
public:
|
||||||
const char* cMB2WX(const char *psz) const { return psz; }
|
const char* cMB2WX(const char *psz) const { return psz; }
|
||||||
const char* cWX2MB(const char *psz) const { return psz; }
|
const char* cWX2MB(const char *psz) const { return psz; }
|
||||||
|
wxMBConv *Clone() const { return NULL; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define wxConvFile wxConvLocal
|
#define wxConvFile wxConvLocal
|
||||||
|
#define wxConvUI wxConvCurrent
|
||||||
|
|
||||||
|
typedef wxMBConv wxCSConv;
|
||||||
|
|
||||||
extern WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
|
extern WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
|
||||||
wxConvLocal,
|
wxConvLocal,
|
||||||
@@ -513,8 +517,7 @@ extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent;
|
|||||||
#define wxFNCONV(name) name
|
#define wxFNCONV(name) name
|
||||||
#define wxFNSTRINGCAST WXSTRINGCAST
|
#define wxFNSTRINGCAST WXSTRINGCAST
|
||||||
|
|
||||||
#endif
|
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||||
// wxUSE_WCHAR_T
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// macros for the most common conversions
|
// macros for the most common conversions
|
||||||
|
@@ -836,6 +836,7 @@ public:
|
|||||||
// identical to c_str(), for MFC compatibility
|
// identical to c_str(), for MFC compatibility
|
||||||
const wxChar* GetData() const { return c_str(); }
|
const wxChar* GetData() const { return c_str(); }
|
||||||
|
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
// conversion to *non-const* multibyte or widestring buffer; modifying
|
// conversion to *non-const* multibyte or widestring buffer; modifying
|
||||||
// returned buffer won't affect the string, these methods are only useful
|
// returned buffer won't affect the string, these methods are only useful
|
||||||
// for passing values to const-incorrect functions
|
// for passing values to const-incorrect functions
|
||||||
@@ -844,6 +845,7 @@ public:
|
|||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_WCHAR_T
|
||||||
wxWritableWCharBuffer wchar_str() const { return wc_str(wxConvLibc); }
|
wxWritableWCharBuffer wchar_str() const { return wc_str(wxConvLibc); }
|
||||||
#endif
|
#endif
|
||||||
|
#endif // wxABI_VERSION >= 20804
|
||||||
|
|
||||||
// conversion to/from plain (i.e. 7 bit) ASCII: this is useful for
|
// conversion to/from plain (i.e. 7 bit) ASCII: this is useful for
|
||||||
// converting numbers or strings which are certain not to contain special
|
// converting numbers or strings which are certain not to contain special
|
||||||
@@ -861,6 +863,49 @@ public:
|
|||||||
const char *ToAscii() const { return c_str(); }
|
const char *ToAscii() const { return c_str(); }
|
||||||
#endif // Unicode/!Unicode
|
#endif // Unicode/!Unicode
|
||||||
|
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
|
// conversion to/from UTF-8:
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
static wxString FromUTF8(const char *utf8)
|
||||||
|
{ return wxString(utf8, wxConvUTF8); }
|
||||||
|
static wxString FromUTF8(const char *utf8, size_t len)
|
||||||
|
{ return wxString(utf8, wxConvUTF8, len); }
|
||||||
|
const wxCharBuffer utf8_str() const { return mb_str(wxConvUTF8); }
|
||||||
|
const wxCharBuffer ToUTF8() const { return utf8_str(); }
|
||||||
|
#elif wxUSE_WCHAR_T // ANSI
|
||||||
|
static wxString FromUTF8(const char *utf8)
|
||||||
|
{ return wxString(wxConvUTF8.cMB2WC(utf8)); }
|
||||||
|
static wxString FromUTF8(const char *utf8, size_t len)
|
||||||
|
{
|
||||||
|
size_t wlen;
|
||||||
|
wxWCharBuffer buf(wxConvUTF8.cMB2WC(utf8, len == npos ? wxNO_LEN : len, &wlen));
|
||||||
|
return wxString(buf.data(), wxConvLibc, wlen);
|
||||||
|
}
|
||||||
|
const wxCharBuffer utf8_str() const
|
||||||
|
{ return wxConvUTF8.cWC2MB(wc_str(wxConvLibc)); }
|
||||||
|
const wxCharBuffer ToUTF8() const { return utf8_str(); }
|
||||||
|
#endif // Unicode/ANSI
|
||||||
|
#endif // wxABI_VERSION >= 20804
|
||||||
|
|
||||||
|
#if wxABI_VERSION >= 20804
|
||||||
|
// functions for storing binary data in wxString:
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
static wxString From8BitData(const char *data, size_t len)
|
||||||
|
{ return wxString(data, wxConvISO8859_1, len); }
|
||||||
|
// version for NUL-terminated data:
|
||||||
|
static wxString From8BitData(const char *data)
|
||||||
|
{ return wxString(data, wxConvISO8859_1); }
|
||||||
|
const wxCharBuffer To8BitData() const { return mb_str(wxConvISO8859_1); }
|
||||||
|
#else // ANSI
|
||||||
|
static wxString From8BitData(const char *data, size_t len)
|
||||||
|
{ return wxString(data, len); }
|
||||||
|
// version for NUL-terminated data:
|
||||||
|
static wxString From8BitData(const char *data)
|
||||||
|
{ return wxString(data); }
|
||||||
|
const char *To8BitData() const { return c_str(); }
|
||||||
|
#endif // Unicode/ANSI
|
||||||
|
#endif // wxABI_VERSION >= 20804
|
||||||
|
|
||||||
// conversions with (possible) format conversions: have to return a
|
// conversions with (possible) format conversions: have to return a
|
||||||
// buffer with temporary data
|
// buffer with temporary data
|
||||||
//
|
//
|
||||||
|
6749
locale/sk.po
Normal file
@@ -1,3 +1,7 @@
|
|||||||
|
type 'carb' {};
|
||||||
|
|
||||||
|
resource 'carb'(0) {};
|
||||||
|
|
||||||
data 'vers' (2) {
|
data 'vers' (2) {
|
||||||
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
|
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
|
||||||
$"6430"} ;
|
$"6430"} ;
|
||||||
|
@@ -2232,6 +2232,11 @@ public:
|
|||||||
m_tab_ctrl_height = 20;
|
m_tab_ctrl_height = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~wxTabFrame()
|
||||||
|
{
|
||||||
|
wxDELETE(m_tabs);
|
||||||
|
}
|
||||||
|
|
||||||
void SetTabCtrlHeight(int h)
|
void SetTabCtrlHeight(int h)
|
||||||
{
|
{
|
||||||
m_tab_ctrl_height = h;
|
m_tab_ctrl_height = h;
|
||||||
|
@@ -159,9 +159,11 @@ void wxAuiFloatingFrame::OnSize(wxSizeEvent& event)
|
|||||||
void wxAuiFloatingFrame::OnClose(wxCloseEvent& evt)
|
void wxAuiFloatingFrame::OnClose(wxCloseEvent& evt)
|
||||||
{
|
{
|
||||||
m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt);
|
m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt);
|
||||||
if (!evt.GetVeto())
|
if (!evt.GetVeto()) {
|
||||||
|
m_mgr.DetachPane(m_pane_window);
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
|
void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
|
||||||
{
|
{
|
||||||
|
@@ -511,6 +511,19 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
|
|||||||
|
|
||||||
wxAuiManager::~wxAuiManager()
|
wxAuiManager::~wxAuiManager()
|
||||||
{
|
{
|
||||||
|
// NOTE: It's possible that the windows have already been destroyed by the
|
||||||
|
// time this dtor is called, so this loop can result in memory access via
|
||||||
|
// invalid pointers, resulting in a crash. So it will be disabled while
|
||||||
|
// waiting for a better solution.
|
||||||
|
#if 0
|
||||||
|
for(size_t i = 0; i < m_panes.size(); i++ )
|
||||||
|
{
|
||||||
|
wxAuiPaneInfo& pinfo = m_panes[i];
|
||||||
|
if( pinfo.window && !pinfo.window->GetParent() )
|
||||||
|
delete pinfo.window;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
delete m_art;
|
delete m_art;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1028,9 +1028,10 @@ wxEvtHandler::~wxEvtHandler()
|
|||||||
|
|
||||||
if (m_dynamicEvents)
|
if (m_dynamicEvents)
|
||||||
{
|
{
|
||||||
wxList::iterator it = m_dynamicEvents->begin(),
|
for ( wxList::iterator it = m_dynamicEvents->begin(),
|
||||||
en = m_dynamicEvents->end();
|
end = m_dynamicEvents->end();
|
||||||
for (;it != en; ++it)
|
it != end;
|
||||||
|
++it )
|
||||||
{
|
{
|
||||||
#if WXWIN_COMPATIBILITY_EVENT_TYPES
|
#if WXWIN_COMPATIBILITY_EVENT_TYPES
|
||||||
wxEventTableEntry *entry = (wxEventTableEntry*)*it;
|
wxEventTableEntry *entry = (wxEventTableEntry*)*it;
|
||||||
|
@@ -41,11 +41,7 @@ struct wxRunningEventLoopCounter
|
|||||||
~wxRunningEventLoopCounter() { wxRunningEventLoopCount--; }
|
~wxRunningEventLoopCounter() { wxRunningEventLoopCount--; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#else // !__WXMSW__
|
#endif // __WXMSW__
|
||||||
|
|
||||||
struct wxRunningEventLoopCounter { };
|
|
||||||
|
|
||||||
#endif // __WXMSW__/!__WXMSW__
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// globals
|
// globals
|
||||||
@@ -76,7 +72,9 @@ int wxEventLoopManual::Run()
|
|||||||
// should undo
|
// should undo
|
||||||
wxEventLoopActivator activate(wx_static_cast(wxEventLoop *, this));
|
wxEventLoopActivator activate(wx_static_cast(wxEventLoop *, this));
|
||||||
|
|
||||||
|
#if defined(__WXMSW__) && wxUSE_THREADS
|
||||||
wxRunningEventLoopCounter evtLoopCounter;
|
wxRunningEventLoopCounter evtLoopCounter;
|
||||||
|
#endif // __WXMSW__
|
||||||
|
|
||||||
// we must ensure that OnExit() is called even if an exception is thrown
|
// we must ensure that OnExit() is called even if an exception is thrown
|
||||||
// from inside Dispatch() but we must call it from Exit() in normal
|
// from inside Dispatch() but we must call it from Exit() in normal
|
||||||
|
@@ -1304,7 +1304,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
|
|||||||
: new wxCSConv(msgIdCharset);
|
: new wxCSConv(msgIdCharset);
|
||||||
|
|
||||||
#elif wxUSE_FONTMAP
|
#elif wxUSE_FONTMAP
|
||||||
wxASSERT_MSG( msgIdCharset == NULL,
|
wxASSERT_MSG( msgIdCharset.empty(),
|
||||||
_T("non-ASCII msgid languages only supported if wxUSE_WCHAR_T=1") );
|
_T("non-ASCII msgid languages only supported if wxUSE_WCHAR_T=1") );
|
||||||
|
|
||||||
wxEncodingConverter converter;
|
wxEncodingConverter converter;
|
||||||
@@ -1430,6 +1430,7 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName,
|
|||||||
|
|
||||||
file.FillHash(m_messages, msgIdCharset, bConvertEncoding);
|
file.FillHash(m_messages, msgIdCharset, bConvertEncoding);
|
||||||
|
|
||||||
|
#if wxUSE_WCHAR_T
|
||||||
// we should use a conversion compatible with the message catalog encoding
|
// we should use a conversion compatible with the message catalog encoding
|
||||||
// in the GUI if we don't convert the strings to the current conversion but
|
// in the GUI if we don't convert the strings to the current conversion but
|
||||||
// as the encoding is global, only change it once, otherwise we could get
|
// as the encoding is global, only change it once, otherwise we could get
|
||||||
@@ -1445,6 +1446,7 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName,
|
|||||||
wxConvUI =
|
wxConvUI =
|
||||||
m_conv = new wxCSConv(file.GetCharset());
|
m_conv = new wxCSConv(file.GetCharset());
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_WCHAR_T
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -28,6 +28,10 @@
|
|||||||
|
|
||||||
#include "wx/sstream.h"
|
#include "wx/sstream.h"
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
#include "wx/hashmap.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// wxStringInputStream implementation
|
// wxStringInputStream implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
@@ -3692,4 +3692,6 @@ WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
|
|||||||
wxConvLocal,
|
wxConvLocal,
|
||||||
wxConvUTF8;
|
wxConvUTF8;
|
||||||
|
|
||||||
|
WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent = NULL;
|
||||||
|
|
||||||
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||||
|
@@ -1014,6 +1014,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
|
|||||||
|
|
||||||
ignoreChanges = true;
|
ignoreChanges = true;
|
||||||
|
|
||||||
|
#if wxUSE_CONFIG
|
||||||
if (wxConfig::Get(false))
|
if (wxConfig::Get(false))
|
||||||
{
|
{
|
||||||
wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ViewStyle"),
|
wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ViewStyle"),
|
||||||
@@ -1021,6 +1022,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
|
|||||||
wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ShowHidden"),
|
wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ShowHidden"),
|
||||||
&ms_lastShowHidden);
|
&ms_lastShowHidden);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((m_dir.empty()) || (m_dir == wxT(".")))
|
if ((m_dir.empty()) || (m_dir == wxT(".")))
|
||||||
{
|
{
|
||||||
@@ -1188,6 +1190,7 @@ wxGenericFileDialog::~wxGenericFileDialog()
|
|||||||
|
|
||||||
if (!m_bypassGenericImpl)
|
if (!m_bypassGenericImpl)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_CONFIG
|
||||||
if (wxConfig::Get(false))
|
if (wxConfig::Get(false))
|
||||||
{
|
{
|
||||||
wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ViewStyle"),
|
wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ViewStyle"),
|
||||||
@@ -1195,6 +1198,7 @@ wxGenericFileDialog::~wxGenericFileDialog()
|
|||||||
wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"),
|
wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"),
|
||||||
ms_lastShowHidden);
|
ms_lastShowHidden);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const int count = m_choice->GetCount();
|
const int count = m_choice->GetCount();
|
||||||
for ( int i = 0; i < count; i++ )
|
for ( int i = 0; i < count; i++ )
|
||||||
@@ -1471,6 +1475,7 @@ void wxGenericFileDialog::HandleAction( const wxString &fn )
|
|||||||
{
|
{
|
||||||
wxMessageBox(_("Please choose an existing file."), _("Error"),
|
wxMessageBox(_("Please choose an existing file."), _("Error"),
|
||||||
wxOK | wxICON_ERROR );
|
wxOK | wxICON_ERROR );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetPath( filename );
|
SetPath( filename );
|
||||||
|
@@ -5177,7 +5177,7 @@ wxUIntPtr wxGenericListCtrl::GetItemData( long item ) const
|
|||||||
return info.m_data;
|
return info.m_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGenericListCtrl::SetItemData( long item, long data )
|
bool wxGenericListCtrl::SetItemPtrData( long item, wxUIntPtr data )
|
||||||
{
|
{
|
||||||
wxListItem info;
|
wxListItem info;
|
||||||
info.m_mask = wxLIST_MASK_DATA;
|
info.m_mask = wxLIST_MASK_DATA;
|
||||||
@@ -5187,6 +5187,11 @@ bool wxGenericListCtrl::SetItemData( long item, long data )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxGenericListCtrl::SetItemData(long item, long data)
|
||||||
|
{
|
||||||
|
return SetItemPtrData(item, data);
|
||||||
|
}
|
||||||
|
|
||||||
wxRect wxGenericListCtrl::GetViewRect() const
|
wxRect wxGenericListCtrl::GetViewRect() const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetViewRect();
|
return m_mainWin->GetViewRect();
|
||||||
|
@@ -451,22 +451,6 @@ wxWindow *wxScrollHelper::GetTargetWindow() const
|
|||||||
return m_targetWindow;
|
return m_targetWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
|
||||||
static bool wxScrolledWindowHasChildren(wxWindow* win)
|
|
||||||
{
|
|
||||||
wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
|
|
||||||
while ( node )
|
|
||||||
{
|
|
||||||
wxWindow* child = node->GetData();
|
|
||||||
if ( !child->IsKindOf(CLASSINFO(wxScrollBar)) )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
node = node->GetNext();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// scrolling implementation itself
|
// scrolling implementation itself
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -228,11 +228,13 @@ protected:
|
|||||||
|
|
||||||
m_search->SetFocus();
|
m_search->SetFocus();
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
if ( m_eventType == wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN )
|
if ( m_eventType == wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN )
|
||||||
{
|
{
|
||||||
// this happens automatically, just like on Mac OS X
|
// this happens automatically, just like on Mac OS X
|
||||||
m_search->PopupSearchMenu();
|
m_search->PopupSearchMenu();
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent&)
|
void OnPaint(wxPaintEvent&)
|
||||||
@@ -294,17 +296,21 @@ wxSearchCtrl::wxSearchCtrl(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
void wxSearchCtrl::Init()
|
void wxSearchCtrl::Init()
|
||||||
{
|
{
|
||||||
m_text = 0;
|
m_text = NULL;
|
||||||
m_searchButton = 0;
|
m_searchButton = NULL;
|
||||||
m_cancelButton = 0;
|
m_cancelButton = NULL;
|
||||||
m_menu = 0;
|
#if wxUSE_MENUS
|
||||||
|
m_menu = NULL;
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
m_searchButtonVisible = true;
|
m_searchButtonVisible = true;
|
||||||
m_cancelButtonVisible = false;
|
m_cancelButtonVisible = false;
|
||||||
|
|
||||||
m_searchMenuBitmapUser = false;
|
|
||||||
m_searchBitmapUser = false;
|
m_searchBitmapUser = false;
|
||||||
m_cancelBitmapUser = false;
|
m_cancelBitmapUser = false;
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
m_searchMenuBitmapUser = false;
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
|
bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||||
@@ -352,11 +358,15 @@ wxSearchCtrl::~wxSearchCtrl()
|
|||||||
delete m_text;
|
delete m_text;
|
||||||
delete m_searchButton;
|
delete m_searchButton;
|
||||||
delete m_cancelButton;
|
delete m_cancelButton;
|
||||||
|
#if wxUSE_MENUS
|
||||||
delete m_menu;
|
delete m_menu;
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// search control specific interfaces
|
// search control specific interfaces
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
void wxSearchCtrl::SetMenu( wxMenu* menu )
|
void wxSearchCtrl::SetMenu( wxMenu* menu )
|
||||||
{
|
{
|
||||||
if ( menu == m_menu )
|
if ( menu == m_menu )
|
||||||
@@ -390,6 +400,8 @@ wxMenu* wxSearchCtrl::GetMenu()
|
|||||||
return m_menu;
|
return m_menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
void wxSearchCtrl::ShowSearchButton( bool show )
|
void wxSearchCtrl::ShowSearchButton( bool show )
|
||||||
{
|
{
|
||||||
if ( m_searchButtonVisible == show )
|
if ( m_searchButtonVisible == show )
|
||||||
@@ -452,7 +464,7 @@ wxSize wxSearchCtrl::DoGetBestSize() const
|
|||||||
wxSize sizeCancel(0,0);
|
wxSize sizeCancel(0,0);
|
||||||
int searchMargin = 0;
|
int searchMargin = 0;
|
||||||
int cancelMargin = 0;
|
int cancelMargin = 0;
|
||||||
if ( m_searchButtonVisible || m_menu )
|
if ( m_searchButtonVisible || HasMenu() )
|
||||||
{
|
{
|
||||||
sizeSearch = m_searchButton->GetBestSize();
|
sizeSearch = m_searchButton->GetBestSize();
|
||||||
searchMargin = MARGIN;
|
searchMargin = MARGIN;
|
||||||
@@ -495,7 +507,7 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
|
|||||||
wxSize sizeCancel(0,0);
|
wxSize sizeCancel(0,0);
|
||||||
int searchMargin = 0;
|
int searchMargin = 0;
|
||||||
int cancelMargin = 0;
|
int cancelMargin = 0;
|
||||||
if ( m_searchButtonVisible || m_menu )
|
if ( m_searchButtonVisible || HasMenu() )
|
||||||
{
|
{
|
||||||
sizeSearch = m_searchButton->GetBestSize();
|
sizeSearch = m_searchButton->GetBestSize();
|
||||||
searchMargin = MARGIN;
|
searchMargin = MARGIN;
|
||||||
@@ -505,7 +517,7 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
|
|||||||
sizeCancel = m_cancelButton->GetBestSize();
|
sizeCancel = m_cancelButton->GetBestSize();
|
||||||
cancelMargin = MARGIN;
|
cancelMargin = MARGIN;
|
||||||
}
|
}
|
||||||
m_searchButton->Show( m_searchButtonVisible || m_menu );
|
m_searchButton->Show( m_searchButtonVisible || HasMenu() );
|
||||||
m_cancelButton->Show( m_cancelButtonVisible );
|
m_cancelButton->Show( m_cancelButtonVisible );
|
||||||
|
|
||||||
if ( sizeSearch.x + sizeCancel.x > width )
|
if ( sizeSearch.x + sizeCancel.x > width )
|
||||||
@@ -803,7 +815,7 @@ void wxSearchCtrl::SetSearchBitmap( const wxBitmap& bitmap )
|
|||||||
m_searchBitmapUser = bitmap.Ok();
|
m_searchBitmapUser = bitmap.Ok();
|
||||||
if ( m_searchBitmapUser )
|
if ( m_searchBitmapUser )
|
||||||
{
|
{
|
||||||
if ( m_searchButton && !m_menu )
|
if ( m_searchButton && !HasMenu() )
|
||||||
{
|
{
|
||||||
m_searchButton->SetBitmapLabel( m_searchBitmap );
|
m_searchButton->SetBitmapLabel( m_searchBitmap );
|
||||||
}
|
}
|
||||||
@@ -815,6 +827,8 @@ void wxSearchCtrl::SetSearchBitmap( const wxBitmap& bitmap )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
void wxSearchCtrl::SetSearchMenuBitmap( const wxBitmap& bitmap )
|
void wxSearchCtrl::SetSearchMenuBitmap( const wxBitmap& bitmap )
|
||||||
{
|
{
|
||||||
m_searchMenuBitmap = bitmap;
|
m_searchMenuBitmap = bitmap;
|
||||||
@@ -833,6 +847,8 @@ void wxSearchCtrl::SetSearchMenuBitmap( const wxBitmap& bitmap )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
void wxSearchCtrl::SetCancelBitmap( const wxBitmap& bitmap )
|
void wxSearchCtrl::SetCancelBitmap( const wxBitmap& bitmap )
|
||||||
{
|
{
|
||||||
m_cancelBitmap = bitmap;
|
m_cancelBitmap = bitmap;
|
||||||
@@ -1114,7 +1130,7 @@ void wxSearchCtrl::RecalcBitmaps()
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
m_searchBitmap = RenderSearchBitmap(bitmapWidth,bitmapHeight,false);
|
m_searchBitmap = RenderSearchBitmap(bitmapWidth,bitmapHeight,false);
|
||||||
if ( !m_menu )
|
if ( !HasMenu() )
|
||||||
{
|
{
|
||||||
m_searchButton->SetBitmapLabel(m_searchBitmap);
|
m_searchButton->SetBitmapLabel(m_searchBitmap);
|
||||||
}
|
}
|
||||||
@@ -1122,6 +1138,7 @@ void wxSearchCtrl::RecalcBitmaps()
|
|||||||
// else this bitmap was set by user, don't alter
|
// else this bitmap was set by user, don't alter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
if ( !m_searchMenuBitmapUser )
|
if ( !m_searchMenuBitmapUser )
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
@@ -1138,6 +1155,7 @@ void wxSearchCtrl::RecalcBitmaps()
|
|||||||
}
|
}
|
||||||
// else this bitmap was set by user, don't alter
|
// else this bitmap was set by user, don't alter
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
if ( !m_cancelBitmapUser )
|
if ( !m_cancelBitmapUser )
|
||||||
{
|
{
|
||||||
@@ -1174,6 +1192,8 @@ void wxSearchCtrl::OnSize( wxSizeEvent& WXUNUSED(event) )
|
|||||||
LayoutControls(0, 0, width, height);
|
LayoutControls(0, 0, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MENUS
|
||||||
|
|
||||||
void wxSearchCtrl::PopupSearchMenu()
|
void wxSearchCtrl::PopupSearchMenu()
|
||||||
{
|
{
|
||||||
if ( m_menu )
|
if ( m_menu )
|
||||||
@@ -1183,6 +1203,8 @@ void wxSearchCtrl::PopupSearchMenu()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
#endif // !wxUSE_NATIVE_SEARCH_CONTROL
|
#endif // !wxUSE_NATIVE_SEARCH_CONTROL
|
||||||
|
|
||||||
#endif // wxUSE_SEARCHCTRL
|
#endif // wxUSE_SEARCHCTRL
|
||||||
|
@@ -448,8 +448,11 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
if (encName.empty())
|
if (encName.empty())
|
||||||
encName = _T("UTF-8");
|
encName = _T("UTF-8");
|
||||||
#endif // wxUSE_INTL
|
#endif // wxUSE_INTL
|
||||||
|
|
||||||
|
#if wxUSE_WCHAR_T
|
||||||
static wxConvBrokenFileNames fileconv(encName);
|
static wxConvBrokenFileNames fileconv(encName);
|
||||||
wxConvFileName = &fileconv;
|
wxConvFileName = &fileconv;
|
||||||
|
#endif // wxUSE_WCHAR_T
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
// gtk_init() wants UTF-8, not wchar_t, so convert
|
// gtk_init() wants UTF-8, not wchar_t, so convert
|
||||||
|
@@ -271,7 +271,7 @@ wxWindowDC::wxWindowDC()
|
|||||||
|
|
||||||
wxWindowDC::wxWindowDC( wxWindow *window )
|
wxWindowDC::wxWindowDC( wxWindow *window )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( window, wxT("DC needs a window") );
|
wxCHECK_RET( window, wxT("DC needs a window") );
|
||||||
|
|
||||||
m_penGC = (GdkGC *) NULL;
|
m_penGC = (GdkGC *) NULL;
|
||||||
m_brushGC = (GdkGC *) NULL;
|
m_brushGC = (GdkGC *) NULL;
|
||||||
@@ -2446,6 +2446,9 @@ wxPaintDC::wxPaintDC( wxWindow *win )
|
|||||||
: wxClientDC( win )
|
: wxClientDC( win )
|
||||||
{
|
{
|
||||||
#if USE_PAINT_REGION
|
#if USE_PAINT_REGION
|
||||||
|
if (!win) // the base class already asserted...
|
||||||
|
return;
|
||||||
|
|
||||||
if (!win->m_clipPaintRegion)
|
if (!win->m_clipPaintRegion)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -2479,7 +2482,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
|
|||||||
wxClientDC::wxClientDC( wxWindow *win )
|
wxClientDC::wxClientDC( wxWindow *win )
|
||||||
: wxWindowDC( win )
|
: wxWindowDC( win )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( win, _T("NULL window in wxClientDC::wxClientDC") );
|
if (!win) // the base class already asserted...
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef __WXUNIVERSAL__
|
#ifdef __WXUNIVERSAL__
|
||||||
wxPoint ptOrigin = win->GetClientAreaOrigin();
|
wxPoint ptOrigin = win->GetClientAreaOrigin();
|
||||||
|
@@ -65,6 +65,17 @@ static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (style & wxFD_FILE_MUST_EXIST)
|
||||||
|
{
|
||||||
|
if ( !g_file_test(filename, G_FILE_TEST_EXISTS) )
|
||||||
|
{
|
||||||
|
wxMessageDialog dlg( dialog, _("Please choose an existing file."),
|
||||||
|
_("Error"), wxOK| wxICON_ERROR);
|
||||||
|
dlg.ShowModal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// change to the directory where the user went if asked
|
// change to the directory where the user went if asked
|
||||||
if (style & wxFD_CHANGE_DIR)
|
if (style & wxFD_CHANGE_DIR)
|
||||||
{
|
{
|
||||||
|
@@ -148,6 +148,14 @@ public:
|
|||||||
(void), (), NULL )
|
(void), (), NULL )
|
||||||
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set,
|
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set,
|
||||||
(GnomePrintConfig *config, const guchar *key, const guchar *value), (config, key, value), false )
|
(GnomePrintConfig *config, const guchar *key, const guchar *value), (config, key, value), false )
|
||||||
|
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set_double,
|
||||||
|
(GnomePrintConfig *config, const guchar *key, gdouble value), (config, key, value), false )
|
||||||
|
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set_int,
|
||||||
|
(GnomePrintConfig *config, const guchar *key, gint value), (config, key, value), false )
|
||||||
|
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set_boolean,
|
||||||
|
(GnomePrintConfig *config, const guchar *key, gboolean value), (config, key, value), false )
|
||||||
|
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set_length,
|
||||||
|
(GnomePrintConfig *config, const guchar *key, gdouble value, const GnomePrintUnit *unit), (config, key, value, unit), false )
|
||||||
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_get_length,
|
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_get_length,
|
||||||
(GnomePrintConfig *config, const guchar *key, gdouble *val, const GnomePrintUnit **unit), (config, key, val, unit), false )
|
(GnomePrintConfig *config, const guchar *key, gdouble *val, const GnomePrintUnit **unit), (config, key, val, unit), false )
|
||||||
|
|
||||||
@@ -252,6 +260,10 @@ void wxGnomePrintLibrary::InitializeMethods()
|
|||||||
|
|
||||||
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_default, success )
|
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_default, success )
|
||||||
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_set, success )
|
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_set, success )
|
||||||
|
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_set_boolean, success )
|
||||||
|
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_set_double, success )
|
||||||
|
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_set_int, success )
|
||||||
|
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_set_length, success )
|
||||||
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_get_length, success )
|
wxDL_METHOD_LOAD( m_gnome_print_lib, gnome_print_config_get_length, success )
|
||||||
|
|
||||||
wxDL_METHOD_LOAD( m_gnome_printui_lib, gnome_print_dialog_new, success )
|
wxDL_METHOD_LOAD( m_gnome_printui_lib, gnome_print_dialog_new, success )
|
||||||
@@ -290,12 +302,93 @@ wxGnomePrintNativeData::~wxGnomePrintNativeData()
|
|||||||
bool wxGnomePrintNativeData::TransferTo( wxPrintData &data )
|
bool wxGnomePrintNativeData::TransferTo( wxPrintData &data )
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGnomePrintNativeData::TransferFrom( const wxPrintData &data )
|
bool wxGnomePrintNativeData::TransferFrom( const wxPrintData &data )
|
||||||
{
|
{
|
||||||
// TODO
|
if (data.GetOrientation() == wxLANDSCAPE)
|
||||||
|
{
|
||||||
|
gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAGE_ORIENTATION,
|
||||||
|
(guchar*)(char*)"R90" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAGE_ORIENTATION,
|
||||||
|
(guchar*)(char*)"R0" );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.GetCollate())
|
||||||
|
{
|
||||||
|
gs_lgp->gnome_print_config_set_boolean( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_COLLATE,
|
||||||
|
TRUE );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gs_lgp->gnome_print_config_set_boolean( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_COLLATE,
|
||||||
|
FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (data.GetPaperId())
|
||||||
|
{
|
||||||
|
case wxPAPER_A3: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"A3" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_A5: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"A5" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_B5: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"B5 (JIS)" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_LETTER: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Letter" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_LEGAL: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Legal" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_EXECUTIVE: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Executive" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_ENV_10: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Envelope #10" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_ENV_C5: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Envelope C5" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_ENV_C6: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Envelope C6" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_ENV_B5: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Envelope B5" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_ENV_MONARCH: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"Envelope Monarch" );
|
||||||
|
break;
|
||||||
|
case wxPAPER_NONE: break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
case wxPAPER_A4: gs_lgp->gnome_print_config_set( m_config,
|
||||||
|
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
|
||||||
|
(guchar*)(char*)"A4" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,6 +522,8 @@ void wxGnomePrintDialog::Init()
|
|||||||
{
|
{
|
||||||
wxPrintData data = m_printDialogData.GetPrintData();
|
wxPrintData data = m_printDialogData.GetPrintData();
|
||||||
|
|
||||||
|
data.ConvertToNative();
|
||||||
|
|
||||||
wxGnomePrintNativeData *native =
|
wxGnomePrintNativeData *native =
|
||||||
(wxGnomePrintNativeData*) data.GetNativeData();
|
(wxGnomePrintNativeData*) data.GetNativeData();
|
||||||
|
|
||||||
@@ -457,8 +552,6 @@ wxGnomePrintDialog::~wxGnomePrintDialog()
|
|||||||
|
|
||||||
int wxGnomePrintDialog::ShowModal()
|
int wxGnomePrintDialog::ShowModal()
|
||||||
{
|
{
|
||||||
// Transfer data from m_printDalogData to dialog here
|
|
||||||
|
|
||||||
int response = gtk_dialog_run (GTK_DIALOG (m_widget));
|
int response = gtk_dialog_run (GTK_DIALOG (m_widget));
|
||||||
|
|
||||||
if (response == GNOME_PRINT_DIALOG_RESPONSE_CANCEL)
|
if (response == GNOME_PRINT_DIALOG_RESPONSE_CANCEL)
|
||||||
@@ -536,6 +629,8 @@ wxGnomePageSetupDialog::wxGnomePageSetupDialog( wxWindow *parent,
|
|||||||
if (data)
|
if (data)
|
||||||
m_pageDialogData = *data;
|
m_pageDialogData = *data;
|
||||||
|
|
||||||
|
m_pageDialogData.GetPrintData().ConvertToNative();
|
||||||
|
|
||||||
wxGnomePrintNativeData *native =
|
wxGnomePrintNativeData *native =
|
||||||
(wxGnomePrintNativeData*) m_pageDialogData.GetPrintData().GetNativeData();
|
(wxGnomePrintNativeData*) m_pageDialogData.GetPrintData().GetNativeData();
|
||||||
|
|
||||||
|
@@ -144,7 +144,16 @@ static void wxGtkTextApplyTagsFromAttr(GtkWidget *text,
|
|||||||
case wxTEXT_ALIGNMENT_CENTER:
|
case wxTEXT_ALIGNMENT_CENTER:
|
||||||
align = GTK_JUSTIFY_CENTER;
|
align = GTK_JUSTIFY_CENTER;
|
||||||
break;
|
break;
|
||||||
// gtk+ doesn't support justify as of gtk+-2.7.4
|
// gtk+ doesn't support justify before gtk+-2.11.0 with pango-1.17 being available
|
||||||
|
// (but if new enough pango isn't available it's a mere gtk warning)
|
||||||
|
#if GTK_CHECK_VERSION(2,11,0)
|
||||||
|
case wxTEXT_ALIGNMENT_JUSTIFIED:
|
||||||
|
if (!gtk_check_version(2,11,0))
|
||||||
|
align = GTK_JUSTIFY_FILL;
|
||||||
|
else
|
||||||
|
align = GTK_JUSTIFY_LEFT;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
g_snprintf(buf, sizeof(buf), "WXALIGNMENT %d", align);
|
g_snprintf(buf, sizeof(buf), "WXALIGNMENT %d", align);
|
||||||
|
@@ -138,21 +138,25 @@ static void gtk_tree_entry_init (GTypeInstance* instance, gpointer g_class)
|
|||||||
static void gtk_tree_entry_string_transform_func(const GValue *src_value,
|
static void gtk_tree_entry_string_transform_func(const GValue *src_value,
|
||||||
GValue *dest_value)
|
GValue *dest_value)
|
||||||
{
|
{
|
||||||
|
GtkTreeEntry *entry;
|
||||||
|
|
||||||
/* Make sure src is a treeentry and dest can hold a string */
|
/* Make sure src is a treeentry and dest can hold a string */
|
||||||
g_assert(GTK_IS_TREE_ENTRY(src_value->data[0].v_pointer));
|
g_assert(GTK_IS_TREE_ENTRY(src_value->data[0].v_pointer));
|
||||||
g_assert(G_VALUE_HOLDS(dest_value, G_TYPE_STRING));
|
g_assert(G_VALUE_HOLDS(dest_value, G_TYPE_STRING));
|
||||||
|
|
||||||
/* TODO: Use strdup here or just pass it? */
|
/* TODO: Use strdup here or just pass it? */
|
||||||
GtkTreeEntry* entry = GTK_TREE_ENTRY(src_value->data[0].v_pointer);
|
entry = GTK_TREE_ENTRY(src_value->data[0].v_pointer);
|
||||||
|
|
||||||
g_value_set_string(dest_value, entry->label);
|
g_value_set_string(dest_value, entry->label);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gtk_tree_entry_dispose(GObject* obj)
|
static void gtk_tree_entry_dispose(GObject* obj)
|
||||||
{
|
{
|
||||||
|
GtkTreeEntry *entry;
|
||||||
|
|
||||||
g_assert(GTK_IS_TREE_ENTRY(obj));
|
g_assert(GTK_IS_TREE_ENTRY(obj));
|
||||||
|
|
||||||
GtkTreeEntry* entry = GTK_TREE_ENTRY(obj);
|
entry = GTK_TREE_ENTRY(obj);
|
||||||
|
|
||||||
/* free label if it exists */
|
/* free label if it exists */
|
||||||
if(entry->label)
|
if(entry->label)
|
||||||
|
@@ -10,6 +10,8 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#if wxUSE_CONFIG
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
@@ -123,3 +125,5 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
|
|||||||
}
|
}
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_CONFIG
|
||||||
|
@@ -1157,6 +1157,10 @@ gtk_wxwindow_commit_cb (GtkIMContext *context,
|
|||||||
wxFillOtherKeyEventFields(event,
|
wxFillOtherKeyEventFields(event,
|
||||||
window, window->m_imData->lastKeyEvent);
|
window, window->m_imData->lastKeyEvent);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
event.SetEventObject( window );
|
||||||
|
}
|
||||||
|
|
||||||
const wxWxCharBuffer data(wxGTK_CONV_BACK(str));
|
const wxWxCharBuffer data(wxGTK_CONV_BACK(str));
|
||||||
if( !data )
|
if( !data )
|
||||||
|
@@ -136,7 +136,11 @@ wxHtmlTableCell::wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& t
|
|||||||
|
|
||||||
/* scan params: */
|
/* scan params: */
|
||||||
if (tag.HasParam(wxT("BGCOLOR")))
|
if (tag.HasParam(wxT("BGCOLOR")))
|
||||||
|
{
|
||||||
tag.GetParamAsColour(wxT("BGCOLOR"), &m_tBkg);
|
tag.GetParamAsColour(wxT("BGCOLOR"), &m_tBkg);
|
||||||
|
if (m_tBkg.Ok())
|
||||||
|
SetBackgroundColour(m_tBkg);
|
||||||
|
}
|
||||||
if (tag.HasParam(wxT("VALIGN")))
|
if (tag.HasParam(wxT("VALIGN")))
|
||||||
m_tValign = tag.GetParam(wxT("VALIGN"));
|
m_tValign = tag.GetParam(wxT("VALIGN"));
|
||||||
else
|
else
|
||||||
|
@@ -258,6 +258,7 @@ wxClientDC::wxClientDC()
|
|||||||
wxClientDC::wxClientDC(wxWindow *window) :
|
wxClientDC::wxClientDC(wxWindow *window) :
|
||||||
wxWindowDC( window )
|
wxWindowDC( window )
|
||||||
{
|
{
|
||||||
|
wxCHECK_RET( window, _T("invalid window in wxClientDC") );
|
||||||
wxPoint origin = window->GetClientAreaOrigin() ;
|
wxPoint origin = window->GetClientAreaOrigin() ;
|
||||||
m_window->GetClientSize( &m_width , &m_height);
|
m_window->GetClientSize( &m_width , &m_height);
|
||||||
SetDeviceOrigin( origin.x, origin.y );
|
SetDeviceOrigin( origin.x, origin.y );
|
||||||
@@ -266,6 +267,7 @@ wxClientDC::wxClientDC(wxWindow *window) :
|
|||||||
#else
|
#else
|
||||||
wxClientDC::wxClientDC(wxWindow *window)
|
wxClientDC::wxClientDC(wxWindow *window)
|
||||||
{
|
{
|
||||||
|
wxCHECK_RET( window, _T("invalid window in wxClientDC") );
|
||||||
m_window = window ;
|
m_window = window ;
|
||||||
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
|
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
|
||||||
if (!rootwindow)
|
if (!rootwindow)
|
||||||
|
@@ -267,7 +267,7 @@ void wxFontRefData::MacFindFont()
|
|||||||
m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
|
m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
|
||||||
if ( m_macFontFamily == kInvalidFontFamily )
|
if ( m_macFontFamily == kInvalidFontFamily )
|
||||||
{
|
{
|
||||||
wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName );
|
wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName.c_str() );
|
||||||
m_macFontFamily = GetAppFont();
|
m_macFontFamily = GetAppFont();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -292,7 +292,7 @@ void wxFontRefData::MacFindFont()
|
|||||||
ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
|
ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
|
||||||
if ( atsfamily == (ATSFontFamilyRef) -1 )
|
if ( atsfamily == (ATSFontFamilyRef) -1 )
|
||||||
{
|
{
|
||||||
wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName );
|
wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName.c_str() );
|
||||||
m_macFontFamily = GetAppFont();
|
m_macFontFamily = GetAppFont();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -1326,7 +1326,7 @@ long wxListCtrl::GetItemData(long item) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool wxListCtrl::SetItemData(long item, long data)
|
bool wxListCtrl::SetItemPtrData(long item, wxUIntPtr data)
|
||||||
{
|
{
|
||||||
if (m_genericImpl)
|
if (m_genericImpl)
|
||||||
return m_genericImpl->SetItemData(item, data);
|
return m_genericImpl->SetItemData(item, data);
|
||||||
@@ -1340,6 +1340,11 @@ bool wxListCtrl::SetItemData(long item, long data)
|
|||||||
return SetItem(info);
|
return SetItem(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxListCtrl::SetItemData(long item, long data)
|
||||||
|
{
|
||||||
|
return SetItemPtrData(item, data);
|
||||||
|
}
|
||||||
|
|
||||||
wxRect wxListCtrl::GetViewRect() const
|
wxRect wxListCtrl::GetViewRect() const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !HasFlag(wxLC_REPORT | wxLC_LIST),
|
wxASSERT_MSG( !HasFlag(wxLC_REPORT | wxLC_LIST),
|
||||||
|
@@ -26,6 +26,8 @@
|
|||||||
// Use polling instead of Mach ports, which doesn't work on Intel
|
// Use polling instead of Mach ports, which doesn't work on Intel
|
||||||
// due to task_for_pid security issues.
|
// due to task_for_pid security issues.
|
||||||
|
|
||||||
|
// http://developer.apple.com/technotes/tn/tn2050.html
|
||||||
|
|
||||||
// What's a better test for Intel vs PPC?
|
// What's a better test for Intel vs PPC?
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
#define USE_POLLING 0
|
#define USE_POLLING 0
|
||||||
@@ -80,7 +82,7 @@ void* wxProcessTerminationThread::Entry()
|
|||||||
{
|
{
|
||||||
usleep(100);
|
usleep(100);
|
||||||
int status = 0;
|
int status = 0;
|
||||||
int rc = waitpid(abs(m_data->pid), & status, WNOHANG);
|
int rc = waitpid(abs(m_data->pid), & status, 0);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
{
|
{
|
||||||
if ((rc != -1) && WIFEXITED(status))
|
if ((rc != -1) && WIFEXITED(status))
|
||||||
|
@@ -58,7 +58,7 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
|||||||
// add everything remaining
|
// add everything remaining
|
||||||
msg << info.GetDescriptionAndCredits();
|
msg << info.GetDescriptionAndCredits();
|
||||||
|
|
||||||
wxMessageBox(msg, _T("About ") + name);
|
wxMessageBox(msg, _("About ") + name);
|
||||||
}
|
}
|
||||||
else // simple "native" version is not enough
|
else // simple "native" version is not enough
|
||||||
{
|
{
|
||||||
|
@@ -357,12 +357,33 @@ void wxButton::SetDefault()
|
|||||||
SetDefaultStyle(this, true);
|
SetDefaultStyle(this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// special version of wxGetTopLevelParent() which is safe to call when the
|
||||||
|
// parent is being destroyed: wxGetTopLevelParent() would just return NULL in
|
||||||
|
// this case because wxWindow version of IsTopLevel() is used when it's called
|
||||||
|
// during window destruction instead of wxTLW one, but we want to distinguish
|
||||||
|
// between these cases
|
||||||
|
static wxTopLevelWindow *GetTLWParentIfNotBeingDeleted(wxWindow *win)
|
||||||
|
{
|
||||||
|
for ( ; win; win = win->GetParent() )
|
||||||
|
{
|
||||||
|
if ( win->IsBeingDeleted() )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if ( win->IsTopLevel() )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxASSERT_MSG( win, _T("button without top level parent?") );
|
||||||
|
|
||||||
|
return wxDynamicCast(win, wxTopLevelWindow);
|
||||||
|
}
|
||||||
|
|
||||||
// set this button as being currently default
|
// set this button as being currently default
|
||||||
void wxButton::SetTmpDefault()
|
void wxButton::SetTmpDefault()
|
||||||
{
|
{
|
||||||
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
wxTopLevelWindow * const tlw = GetTLWParentIfNotBeingDeleted(GetParent());
|
||||||
|
if ( !tlw )
|
||||||
wxCHECK_RET( tlw, _T("button without top level window?") );
|
return;
|
||||||
|
|
||||||
wxWindow *winOldDefault = tlw->GetDefaultItem();
|
wxWindow *winOldDefault = tlw->GetDefaultItem();
|
||||||
tlw->SetTmpDefaultItem(this);
|
tlw->SetTmpDefaultItem(this);
|
||||||
@@ -374,9 +395,9 @@ void wxButton::SetTmpDefault()
|
|||||||
// unset this button as currently default, it may still stay permanent default
|
// unset this button as currently default, it may still stay permanent default
|
||||||
void wxButton::UnsetTmpDefault()
|
void wxButton::UnsetTmpDefault()
|
||||||
{
|
{
|
||||||
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
wxTopLevelWindow * const tlw = GetTLWParentIfNotBeingDeleted(GetParent());
|
||||||
|
if ( !tlw )
|
||||||
wxCHECK_RET( tlw, _T("button without top level window?") );
|
return;
|
||||||
|
|
||||||
tlw->SetTmpDefaultItem(NULL);
|
tlw->SetTmpDefaultItem(NULL);
|
||||||
|
|
||||||
|
@@ -161,22 +161,36 @@ wxComboCtrl::~wxComboCtrl()
|
|||||||
|
|
||||||
void wxComboCtrl::OnThemeChange()
|
void wxComboCtrl::OnThemeChange()
|
||||||
{
|
{
|
||||||
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
|
// there doesn't seem to be any way to get the text colour using themes
|
||||||
|
// API: TMT_TEXTCOLOR doesn't work neither for EDIT nor COMBOBOX
|
||||||
|
SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
||||||
|
|
||||||
|
wxUxThemeEngine * const theme = wxUxThemeEngine::GetIfActive();
|
||||||
if ( theme )
|
if ( theme )
|
||||||
{
|
{
|
||||||
wxUxThemeHandle hTheme(this, L"COMBOBOX");
|
// NB: use EDIT, not COMBOBOX (the latter works in XP but not Vista)
|
||||||
|
wxUxThemeHandle hTheme(this, L"EDIT");
|
||||||
COLORREF col;
|
COLORREF col;
|
||||||
theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_FILLCOLOR,&col);
|
HRESULT hr = theme->GetThemeColor
|
||||||
SetBackgroundColour(wxRGBToColour(col));
|
(
|
||||||
theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_TEXTCOLOR,&col);
|
hTheme,
|
||||||
SetForegroundColour(wxRGBToColour(col));
|
EP_EDITTEXT,
|
||||||
}
|
ETS_NORMAL,
|
||||||
else
|
TMT_FILLCOLOR,
|
||||||
|
&col
|
||||||
|
);
|
||||||
|
if ( SUCCEEDED(hr) )
|
||||||
{
|
{
|
||||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
SetBackgroundColour(wxRGBToColour(col));
|
||||||
SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
|
||||||
|
// skip the call below
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxLogApiError(_T("GetThemeColor(EDIT, ETS_NORMAL, TMT_FILLCOLOR)"), hr);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboCtrl::OnResize()
|
void wxComboCtrl::OnResize()
|
||||||
|
@@ -367,6 +367,30 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg)
|
||||||
|
{
|
||||||
|
// prevent command accelerators from stealing editing
|
||||||
|
// hotkeys when we have the focus
|
||||||
|
if (wxIsCtrlDown())
|
||||||
|
{
|
||||||
|
WPARAM vkey = pMsg->wParam;
|
||||||
|
|
||||||
|
switch (vkey)
|
||||||
|
{
|
||||||
|
case 'C':
|
||||||
|
case 'V':
|
||||||
|
case 'X':
|
||||||
|
case VK_INSERT:
|
||||||
|
case VK_DELETE:
|
||||||
|
case VK_HOME:
|
||||||
|
case VK_END:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxChoice::MSWShouldPreProcessMessage(pMsg);
|
||||||
|
}
|
||||||
|
|
||||||
WXHWND wxComboBox::GetEditHWND() const
|
WXHWND wxComboBox::GetEditHWND() const
|
||||||
{
|
{
|
||||||
// this function should not be called for wxCB_READONLY controls, it is
|
// this function should not be called for wxCB_READONLY controls, it is
|
||||||
|
@@ -798,7 +798,7 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
|||||||
if ( itemID == (UINT)-1 )
|
if ( itemID == (UINT)-1 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
long data = ListBox_GetItemData(GetHwnd(), pStruct->itemID);
|
LRESULT data = ListBox_GetItemData(GetHwnd(), pStruct->itemID);
|
||||||
|
|
||||||
wxCHECK( data && (data != LB_ERR), false );
|
wxCHECK( data && (data != LB_ERR), false );
|
||||||
|
|
||||||
|
@@ -948,7 +948,7 @@ wxUIntPtr wxListCtrl::GetItemData(long item) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool wxListCtrl::SetItemData(long item, long data)
|
bool wxListCtrl::SetItemPtrData(long item, wxUIntPtr data)
|
||||||
{
|
{
|
||||||
wxListItem info;
|
wxListItem info;
|
||||||
|
|
||||||
@@ -959,6 +959,11 @@ bool wxListCtrl::SetItemData(long item, long data)
|
|||||||
return SetItem(info);
|
return SetItem(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxListCtrl::SetItemData(long item, long data)
|
||||||
|
{
|
||||||
|
return SetItemPtrData(item, data);
|
||||||
|
}
|
||||||
|
|
||||||
wxRect wxListCtrl::GetViewRect() const
|
wxRect wxListCtrl::GetViewRect() const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !HasFlag(wxLC_REPORT | wxLC_LIST),
|
wxASSERT_MSG( !HasFlag(wxLC_REPORT | wxLC_LIST),
|
||||||
|
@@ -622,7 +622,9 @@ void wxTreeCtrl::Init()
|
|||||||
{
|
{
|
||||||
m_textCtrl = NULL;
|
m_textCtrl = NULL;
|
||||||
m_hasAnyAttr = false;
|
m_hasAnyAttr = false;
|
||||||
|
#if wxUSE_DRAGIMAGE
|
||||||
m_dragImage = NULL;
|
m_dragImage = NULL;
|
||||||
|
#endif
|
||||||
m_pVirtualRoot = NULL;
|
m_pVirtualRoot = NULL;
|
||||||
|
|
||||||
// initialize the global array of events now as it can't be done statically
|
// initialize the global array of events now as it can't be done statically
|
||||||
@@ -2198,6 +2200,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
}
|
}
|
||||||
#endif // __WXWINCE__
|
#endif // __WXWINCE__
|
||||||
|
|
||||||
|
#if wxUSE_DRAGIMAGE
|
||||||
if ( m_dragImage )
|
if ( m_dragImage )
|
||||||
{
|
{
|
||||||
m_dragImage->Move(wxPoint(x, y));
|
m_dragImage->Move(wxPoint(x, y));
|
||||||
@@ -2210,6 +2213,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
m_dragImage->Show();
|
m_dragImage->Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_DRAGIMAGE
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
@@ -2235,6 +2239,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
// fall through
|
// fall through
|
||||||
|
|
||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
|
#if wxUSE_DRAGIMAGE
|
||||||
if ( m_dragImage )
|
if ( m_dragImage )
|
||||||
{
|
{
|
||||||
m_dragImage->EndDrag();
|
m_dragImage->EndDrag();
|
||||||
@@ -2250,6 +2255,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
// are selected simultaneously which is quite weird
|
// are selected simultaneously which is quite weird
|
||||||
TreeView_SelectDropTarget(GetHwnd(), 0);
|
TreeView_SelectDropTarget(GetHwnd(), 0);
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_DRAGIMAGE
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2778,6 +2784,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
|
|
||||||
case TVN_BEGINDRAG:
|
case TVN_BEGINDRAG:
|
||||||
case TVN_BEGINRDRAG:
|
case TVN_BEGINRDRAG:
|
||||||
|
#if wxUSE_DRAGIMAGE
|
||||||
if ( event.IsAllowed() )
|
if ( event.IsAllowed() )
|
||||||
{
|
{
|
||||||
// normally this is impossible because the m_dragImage is
|
// normally this is impossible because the m_dragImage is
|
||||||
@@ -2788,6 +2795,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
m_dragImage->BeginDrag(wxPoint(0,0), this);
|
m_dragImage->BeginDrag(wxPoint(0,0), this);
|
||||||
m_dragImage->Show();
|
m_dragImage->Show();
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_DRAGIMAGE
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TVN_DELETEITEM:
|
case TVN_DELETEITEM:
|
||||||
|
@@ -152,7 +152,12 @@ protected:
|
|||||||
virtual bool OnRead(const wxMBConv& WXUNUSED(conv))
|
virtual bool OnRead(const wxMBConv& WXUNUSED(conv))
|
||||||
{
|
{
|
||||||
return wxTextFile::OnRead(
|
return wxTextFile::OnRead(
|
||||||
wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA));
|
#if wxUSE_WCHAR_T
|
||||||
|
wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA)
|
||||||
|
#else
|
||||||
|
wxMBConv()
|
||||||
|
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# This makefile was generated by
|
# This makefile was generated by
|
||||||
# Bakefile 0.2.1 (http://bakefile.sourceforge.net)
|
# Bakefile 0.2.2 (http://bakefile.sourceforge.net)
|
||||||
# Do not modify, all changes will be overwritten!
|
# Do not modify, all changes will be overwritten!
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -34,14 +34,14 @@ clean:
|
|||||||
(cd emulator/src && $(MAKE) clean)
|
(cd emulator/src && $(MAKE) clean)
|
||||||
(cd helpview/src && $(MAKE) clean)
|
(cd helpview/src && $(MAKE) clean)
|
||||||
(cd tex2rtf/src && $(MAKE) clean)
|
(cd tex2rtf/src && $(MAKE) clean)
|
||||||
(cd HelpGen && $(MAKE) clean)
|
(cd HelpGen/src && $(MAKE) clean)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
|
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
|
||||||
(cd emulator/src && $(MAKE) distclean)
|
(cd emulator/src && $(MAKE) distclean)
|
||||||
(cd helpview/src && $(MAKE) distclean)
|
(cd helpview/src && $(MAKE) distclean)
|
||||||
(cd tex2rtf/src && $(MAKE) distclean)
|
(cd tex2rtf/src && $(MAKE) distclean)
|
||||||
(cd HelpGen && $(MAKE) distclean)
|
(cd HelpGen/src && $(MAKE) distclean)
|
||||||
|
|
||||||
emulator:
|
emulator:
|
||||||
(cd emulator/src && $(MAKE) all)
|
(cd emulator/src && $(MAKE) all)
|
||||||
@@ -62,16 +62,16 @@ install-strip_tex2rtf:
|
|||||||
(cd tex2rtf/src && $(MAKE) install-strip)
|
(cd tex2rtf/src && $(MAKE) install-strip)
|
||||||
|
|
||||||
helpgen:
|
helpgen:
|
||||||
(cd HelpGen && $(MAKE) all)
|
(cd HelpGen/src && $(MAKE) all)
|
||||||
|
|
||||||
install_helpgen:
|
install_helpgen:
|
||||||
(cd HelpGen && $(MAKE) install)
|
(cd HelpGen/src && $(MAKE) install)
|
||||||
|
|
||||||
uninstall_helpgen:
|
uninstall_helpgen:
|
||||||
(cd HelpGen && $(MAKE) uninstall)
|
(cd HelpGen/src && $(MAKE) uninstall)
|
||||||
|
|
||||||
install-strip_helpgen:
|
install-strip_helpgen:
|
||||||
(cd HelpGen && $(MAKE) install-strip)
|
(cd HelpGen/src && $(MAKE) install-strip)
|
||||||
|
|
||||||
|
|
||||||
# Include dependency info, if present:
|
# Include dependency info, if present:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# This makefile was generated by
|
# This makefile was generated by
|
||||||
# Bakefile 0.2.1 (http://bakefile.sourceforge.net)
|
# Bakefile 0.2.2 (http://bakefile.sourceforge.net)
|
||||||
# Do not modify, all changes will be overwritten!
|
# Do not modify, all changes will be overwritten!
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ clean:
|
|||||||
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>tex2rtf.bat
|
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>tex2rtf.bat
|
||||||
call tex2rtf.bat
|
call tex2rtf.bat
|
||||||
@del tex2rtf.bat
|
@del tex2rtf.bat
|
||||||
@echo cd HelpGen >helpgen.bat
|
@echo cd HelpGen\src >helpgen.bat
|
||||||
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>helpgen.bat
|
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>helpgen.bat
|
||||||
call helpgen.bat
|
call helpgen.bat
|
||||||
@del helpgen.bat
|
@del helpgen.bat
|
||||||
@@ -85,7 +85,7 @@ tex2rtf:
|
|||||||
@del tex2rtf.bat
|
@del tex2rtf.bat
|
||||||
|
|
||||||
helpgen:
|
helpgen:
|
||||||
@echo cd HelpGen >helpgen.bat
|
@echo cd HelpGen\src >helpgen.bat
|
||||||
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >>helpgen.bat
|
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >>helpgen.bat
|
||||||
call helpgen.bat
|
call helpgen.bat
|
||||||
@del helpgen.bat
|
@del helpgen.bat
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# This makefile was generated by
|
# This makefile was generated by
|
||||||
# Bakefile 0.2.1 (http://bakefile.sourceforge.net)
|
# Bakefile 0.2.2 (http://bakefile.sourceforge.net)
|
||||||
# Do not modify, all changes will be overwritten!
|
# Do not modify, all changes will be overwritten!
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ clean:
|
|||||||
$(MAKE) -C emulator\src -f makefile.gcc $(MAKEARGS) clean
|
$(MAKE) -C emulator\src -f makefile.gcc $(MAKEARGS) clean
|
||||||
$(MAKE) -C helpview\src -f makefile.gcc $(MAKEARGS) clean
|
$(MAKE) -C helpview\src -f makefile.gcc $(MAKEARGS) clean
|
||||||
$(MAKE) -C tex2rtf\src -f makefile.gcc $(MAKEARGS) clean
|
$(MAKE) -C tex2rtf\src -f makefile.gcc $(MAKEARGS) clean
|
||||||
$(MAKE) -C HelpGen -f makefile.gcc $(MAKEARGS) clean
|
$(MAKE) -C HelpGen\src -f makefile.gcc $(MAKEARGS) clean
|
||||||
|
|
||||||
emulator:
|
emulator:
|
||||||
$(MAKE) -C emulator\src -f makefile.gcc $(MAKEARGS) all
|
$(MAKE) -C emulator\src -f makefile.gcc $(MAKEARGS) all
|
||||||
@@ -53,7 +53,7 @@ tex2rtf:
|
|||||||
$(MAKE) -C tex2rtf\src -f makefile.gcc $(MAKEARGS) all
|
$(MAKE) -C tex2rtf\src -f makefile.gcc $(MAKEARGS) all
|
||||||
|
|
||||||
helpgen:
|
helpgen:
|
||||||
$(MAKE) -C HelpGen -f makefile.gcc $(MAKEARGS) all
|
$(MAKE) -C HelpGen\src -f makefile.gcc $(MAKEARGS) all
|
||||||
|
|
||||||
.PHONY: all clean emulator helpview tex2rtf helpgen
|
.PHONY: all clean emulator helpview tex2rtf helpgen
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# This makefile was generated by
|
# This makefile was generated by
|
||||||
# Bakefile 0.2.1 (http://bakefile.sourceforge.net)
|
# Bakefile 0.2.2 (http://bakefile.sourceforge.net)
|
||||||
# Do not modify, all changes will be overwritten!
|
# Do not modify, all changes will be overwritten!
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -42,34 +42,34 @@ clean:
|
|||||||
-if exist .\*.pch del .\*.pch
|
-if exist .\*.pch del .\*.pch
|
||||||
cd emulator\src
|
cd emulator\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
cd helpview\src
|
cd helpview\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
cd tex2rtf\src
|
cd tex2rtf\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
cd HelpGen
|
cd HelpGen\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
$(MAKE) -f makefile.vc $(MAKEARGS) clean
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
|
|
||||||
sub_emulator:
|
sub_emulator:
|
||||||
cd emulator\src
|
cd emulator\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
|
|
||||||
sub_helpview:
|
sub_helpview:
|
||||||
cd helpview\src
|
cd helpview\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
|
|
||||||
sub_tex2rtf:
|
sub_tex2rtf:
|
||||||
cd tex2rtf\src
|
cd tex2rtf\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
|
|
||||||
sub_helpgen:
|
sub_helpgen:
|
||||||
cd HelpGen
|
cd HelpGen\src
|
||||||
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
$(MAKE) -f makefile.vc $(MAKEARGS) all
|
||||||
cd $(MAKEDIR)
|
cd "$(MAKEDIR)"
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# =========================================================================
|
# =========================================================================
|
||||||
# This makefile was generated by
|
# This makefile was generated by
|
||||||
# Bakefile 0.2.1 (http://bakefile.sourceforge.net)
|
# Bakefile 0.2.2 (http://bakefile.sourceforge.net)
|
||||||
# Do not modify, all changes will be overwritten!
|
# Do not modify, all changes will be overwritten!
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ clean : .SYMBOLIC
|
|||||||
cd tex2rtf\src
|
cd tex2rtf\src
|
||||||
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
|
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
|
||||||
cd $(WATCOM_CWD)
|
cd $(WATCOM_CWD)
|
||||||
cd HelpGen
|
cd HelpGen\src
|
||||||
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
|
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
|
||||||
cd $(WATCOM_CWD)
|
cd $(WATCOM_CWD)
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ tex2rtf : .SYMBOLIC
|
|||||||
cd $(WATCOM_CWD)
|
cd $(WATCOM_CWD)
|
||||||
|
|
||||||
helpgen : .SYMBOLIC
|
helpgen : .SYMBOLIC
|
||||||
cd HelpGen
|
cd HelpGen\src
|
||||||
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) all
|
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) all
|
||||||
cd $(WATCOM_CWD)
|
cd $(WATCOM_CWD)
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
</subproject>
|
</subproject>
|
||||||
|
|
||||||
<subproject id="helpgen" template="sub">
|
<subproject id="helpgen" template="sub">
|
||||||
<dir>HelpGen</dir>
|
<dir>HelpGen/src</dir>
|
||||||
<installable>yes</installable>
|
<installable>yes</installable>
|
||||||
</subproject>
|
</subproject>
|
||||||
|
|
||||||
|
@@ -27,6 +27,10 @@
|
|||||||
# public symbols added in 2.8.4 (please keep in alphabetical order):
|
# public symbols added in 2.8.4 (please keep in alphabetical order):
|
||||||
@WX_VERSION_TAG@.4 {
|
@WX_VERSION_TAG@.4 {
|
||||||
global:
|
global:
|
||||||
|
*wxListCtrl*SetItemPtrData*;
|
||||||
|
# wxString::To/From8BitData()
|
||||||
|
*wxString*To8BitData*;
|
||||||
|
*wxString*From8BitData*;
|
||||||
# wxString::[w]char_str()
|
# wxString::[w]char_str()
|
||||||
*wxString*char_str*;
|
*wxString*char_str*;
|
||||||
# wxWritable[W]CharBuffer
|
# wxWritable[W]CharBuffer
|
||||||
|
@@ -598,6 +598,7 @@ protected:
|
|||||||
wxTreeListItem *m_shiftItem; // item, where the shift key was pressed
|
wxTreeListItem *m_shiftItem; // item, where the shift key was pressed
|
||||||
wxTreeListItem *m_editItem; // item, which is currently edited
|
wxTreeListItem *m_editItem; // item, which is currently edited
|
||||||
wxTreeListItem *m_selectItem; // current selected item, not with wxTR_MULTIPLE
|
wxTreeListItem *m_selectItem; // current selected item, not with wxTR_MULTIPLE
|
||||||
|
wxTreeListItem *m_select_me;
|
||||||
|
|
||||||
int m_curColumn;
|
int m_curColumn;
|
||||||
|
|
||||||
@@ -922,6 +923,29 @@ private:
|
|||||||
// implementation
|
// implementation
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// internal helpers
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// check if the given item is under another one
|
||||||
|
static bool IsDescendantOf(const wxTreeListItem *parent, const wxTreeListItem *item)
|
||||||
|
{
|
||||||
|
while ( item )
|
||||||
|
{
|
||||||
|
if ( item == parent )
|
||||||
|
{
|
||||||
|
// item is a descendant of parent
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
item = item->GetItemParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// wxTreeListRenameTimer (internal)
|
// wxTreeListRenameTimer (internal)
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -1789,6 +1813,7 @@ void wxTreeListMainWindow::Init() {
|
|||||||
m_shiftItem = (wxTreeListItem*)NULL;
|
m_shiftItem = (wxTreeListItem*)NULL;
|
||||||
m_editItem = (wxTreeListItem*)NULL;
|
m_editItem = (wxTreeListItem*)NULL;
|
||||||
m_selectItem = (wxTreeListItem*)NULL;
|
m_selectItem = (wxTreeListItem*)NULL;
|
||||||
|
m_select_me = (wxTreeListItem*)NULL;
|
||||||
|
|
||||||
m_curColumn = -1; // no current column
|
m_curColumn = -1; // no current column
|
||||||
|
|
||||||
@@ -2418,6 +2443,27 @@ void wxTreeListMainWindow::Delete (const wxTreeItemId& itemId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxTreeListItem *parent = item->GetItemParent();
|
wxTreeListItem *parent = item->GetItemParent();
|
||||||
|
|
||||||
|
|
||||||
|
// m_select_me records whether we need to select
|
||||||
|
// a different item, in idle time.
|
||||||
|
if ( m_select_me && IsDescendantOf(item, m_select_me) )
|
||||||
|
{
|
||||||
|
m_select_me = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( IsDescendantOf(item, m_curItem) )
|
||||||
|
{
|
||||||
|
// Don't silently change the selection:
|
||||||
|
// do it properly in idle time, so event
|
||||||
|
// handlers get called.
|
||||||
|
|
||||||
|
// m_current = parent;
|
||||||
|
m_curItem = NULL;
|
||||||
|
m_select_me = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove the item from the tree
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parent->GetChildren().Remove (item); // remove by value
|
parent->GetChildren().Remove (item); // remove by value
|
||||||
}
|
}
|
||||||
@@ -2426,6 +2472,10 @@ void wxTreeListMainWindow::Delete (const wxTreeItemId& itemId) {
|
|||||||
SendDeleteEvent (item);
|
SendDeleteEvent (item);
|
||||||
if (m_selectItem == item) m_selectItem = (wxTreeListItem*)NULL;
|
if (m_selectItem == item) m_selectItem = (wxTreeListItem*)NULL;
|
||||||
item->DeleteChildren (this);
|
item->DeleteChildren (this);
|
||||||
|
|
||||||
|
if (item == m_select_me)
|
||||||
|
m_select_me = NULL;
|
||||||
|
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2660,7 +2710,6 @@ void wxTreeListMainWindow::SelectItem (const wxTreeItemId& itemId,
|
|||||||
if (unselect_others) {
|
if (unselect_others) {
|
||||||
m_selectItem = (item->IsSelected())? item: (wxTreeListItem*)NULL;
|
m_selectItem = (item->IsSelected())? item: (wxTreeListItem*)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// send event to user code
|
// send event to user code
|
||||||
@@ -3627,7 +3676,6 @@ void wxTreeListMainWindow::OnChar (wxKeyEvent &event) {
|
|||||||
m_curItem = (wxTreeListItem*)newItem.m_pItem; // make the new item the current item
|
m_curItem = (wxTreeListItem*)newItem.m_pItem; // make the new item the current item
|
||||||
RefreshLine (oldItem);
|
RefreshLine (oldItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTreeItemId wxTreeListMainWindow::HitTest (const wxPoint& point, int& flags, int& column) {
|
wxTreeItemId wxTreeListMainWindow::HitTest (const wxPoint& point, int& flags, int& column) {
|
||||||
@@ -3969,9 +4017,23 @@ void wxTreeListMainWindow::OnIdle (wxIdleEvent &WXUNUSED(event)) {
|
|||||||
* we actually redraw the tree when everything is over */
|
* we actually redraw the tree when everything is over */
|
||||||
|
|
||||||
if (!m_dirty) return;
|
if (!m_dirty) return;
|
||||||
|
|
||||||
m_dirty = false;
|
m_dirty = false;
|
||||||
|
|
||||||
|
// Check if we need to select the root item
|
||||||
|
// because nothing else has been selected.
|
||||||
|
// Delaying it means that we can invoke event handlers
|
||||||
|
// as required, when a first item is selected.
|
||||||
|
if (!m_owner->HasFlag(wxTR_MULTIPLE) && !m_owner->GetSelection().IsOk())
|
||||||
|
{
|
||||||
|
if (m_select_me)
|
||||||
|
m_owner->SelectItem(m_select_me);
|
||||||
|
else if (m_owner->GetRootItem().IsOk())
|
||||||
|
m_owner->SelectItem(m_owner->GetRootItem());
|
||||||
|
m_select_me = NULL;
|
||||||
|
m_curItem = (wxTreeListItem*)m_owner->GetSelection().m_pItem;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
CalculatePositions();
|
CalculatePositions();
|
||||||
Refresh();
|
Refresh();
|
||||||
AdjustMyScrollbars();
|
AdjustMyScrollbars();
|
||||||
|
@@ -395,7 +395,7 @@ class PyAUIFrame(wx.Frame):
|
|||||||
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_TextContent)
|
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_TextContent)
|
||||||
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_SizeReportContent)
|
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_SizeReportContent)
|
||||||
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_HTMLContent)
|
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_HTMLContent)
|
||||||
self.Bind(wx.EVT_MENU, self.OnClose, id=wx.ID_EXIT)
|
self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT)
|
||||||
self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About)
|
self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About)
|
||||||
|
|
||||||
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentHint)
|
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentHint)
|
||||||
@@ -431,12 +431,13 @@ class PyAUIFrame(wx.Frame):
|
|||||||
|
|
||||||
|
|
||||||
def OnClose(self, event):
|
def OnClose(self, event):
|
||||||
|
|
||||||
self._mgr.UnInit()
|
self._mgr.UnInit()
|
||||||
|
del self._mgr
|
||||||
self.Destroy()
|
self.Destroy()
|
||||||
|
|
||||||
event.Skip()
|
|
||||||
|
|
||||||
|
def OnExit(self, event):
|
||||||
|
self.Close()
|
||||||
|
|
||||||
def OnAbout(self, event):
|
def OnAbout(self, event):
|
||||||
|
|
||||||
|
@@ -19,7 +19,8 @@ class TestPanel(wx.Panel):
|
|||||||
title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
|
title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
|
||||||
title.SetForegroundColour("blue")
|
title.SetForegroundColour("blue")
|
||||||
|
|
||||||
self.cp = cp = wx.CollapsiblePane(self, label=label1)
|
self.cp = cp = wx.CollapsiblePane(self, label=label1,
|
||||||
|
style=wx.CP_DEFAULT_STYLE|wx.CP_NO_TLW_RESIZE)
|
||||||
self.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED, self.OnPaneChanged, cp)
|
self.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED, self.OnPaneChanged, cp)
|
||||||
self.MakePaneContent(cp.GetPane())
|
self.MakePaneContent(cp.GetPane())
|
||||||
|
|
||||||
|
@@ -136,19 +136,11 @@ class DragCanvas(wx.ScrolledWindow):
|
|||||||
return shape
|
return shape
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Remove a shape from the display
|
|
||||||
def EraseShape(self, shape, dc):
|
|
||||||
r = shape.GetRect()
|
|
||||||
dc.SetClippingRect(r)
|
|
||||||
self.TileBackground(dc)
|
|
||||||
self.DrawShapes(dc)
|
|
||||||
dc.DestroyClippingRegion()
|
|
||||||
|
|
||||||
# Clears the background, then redraws it. If the DC is passed, then
|
# Clears the background, then redraws it. If the DC is passed, then
|
||||||
# we only do so in the area so designated. Otherwise, it's the whole thing.
|
# we only do so in the area so designated. Otherwise, it's the whole thing.
|
||||||
def OnEraseBackground(self, evt):
|
def OnEraseBackground(self, evt):
|
||||||
dc = evt.GetDC()
|
dc = evt.GetDC()
|
||||||
|
|
||||||
if not dc:
|
if not dc:
|
||||||
dc = wx.ClientDC(self)
|
dc = wx.ClientDC(self)
|
||||||
rect = self.GetUpdateRegion().GetBox()
|
rect = self.GetUpdateRegion().GetBox()
|
||||||
@@ -231,11 +223,11 @@ class DragCanvas(wx.ScrolledWindow):
|
|||||||
if dx <= tolerance and dy <= tolerance:
|
if dx <= tolerance and dy <= tolerance:
|
||||||
return
|
return
|
||||||
|
|
||||||
# erase the shape since it will be drawn independently now
|
# refresh the area of the window where the shape was so it
|
||||||
dc = wx.ClientDC(self)
|
# will get erased.
|
||||||
self.dragShape.shown = False
|
self.dragShape.shown = False
|
||||||
self.EraseShape(self.dragShape, dc)
|
self.RefreshRect(self.dragShape.GetRect(), True)
|
||||||
|
self.Update()
|
||||||
|
|
||||||
if self.dragShape.text:
|
if self.dragShape.text:
|
||||||
self.dragImage = wx.DragString(self.dragShape.text,
|
self.dragImage = wx.DragString(self.dragShape.text,
|
||||||
|
@@ -19,9 +19,11 @@
|
|||||||
# * Annoying switching between tabs and resulting flicker
|
# * Annoying switching between tabs and resulting flicker
|
||||||
# how to replace a page in the notebook without deleting/adding?
|
# how to replace a page in the notebook without deleting/adding?
|
||||||
# Where is SetPage!? tried freeze...tried reparent of dummy panel....
|
# Where is SetPage!? tried freeze...tried reparent of dummy panel....
|
||||||
|
# AG: It looks like this issue is fixed by Freeze()ing and Thaw()ing the
|
||||||
|
# main frame and not the notebook
|
||||||
|
|
||||||
# TODO List:
|
# TODO List:
|
||||||
# * UI design more prefessional
|
# * UI design more professional (is the new version more professional?)
|
||||||
# * save file positions (new field in demoModules) (@ LoadDemoSource)
|
# * save file positions (new field in demoModules) (@ LoadDemoSource)
|
||||||
# * Update main overview
|
# * Update main overview
|
||||||
|
|
||||||
@@ -30,6 +32,7 @@
|
|||||||
import sys, os, time, traceback, types
|
import sys, os, time, traceback, types
|
||||||
|
|
||||||
import wx # This module uses the new wx namespace
|
import wx # This module uses the new wx namespace
|
||||||
|
import wx.aui
|
||||||
import wx.html
|
import wx.html
|
||||||
|
|
||||||
import images
|
import images
|
||||||
@@ -43,6 +46,15 @@ import images
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
USE_CUSTOMTREECTRL = False
|
||||||
|
ALLOW_AUI_FLOATING = False
|
||||||
|
DEFAULT_PERSPECTIVE = "Default Perspective"
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
_demoPngs = ["overview", "recent", "frame", "dialog", "moredialog", "core",
|
||||||
|
"book", "customcontrol", "morecontrols", "layout", "process", "clipboard",
|
||||||
|
"images", "miscellaneous"]
|
||||||
|
|
||||||
_treeList = [
|
_treeList = [
|
||||||
# new stuff
|
# new stuff
|
||||||
@@ -655,7 +667,9 @@ class DemoCodePanel(wx.Panel):
|
|||||||
def ActiveModuleChanged(self):
|
def ActiveModuleChanged(self):
|
||||||
self.LoadDemoSource(self.demoModules.GetSource())
|
self.LoadDemoSource(self.demoModules.GetSource())
|
||||||
self.UpdateControlState()
|
self.UpdateControlState()
|
||||||
|
self.mainFrame.Freeze()
|
||||||
self.ReloadDemo()
|
self.ReloadDemo()
|
||||||
|
self.mainFrame.Thaw()
|
||||||
|
|
||||||
|
|
||||||
def LoadDemoSource(self, source):
|
def LoadDemoSource(self, source):
|
||||||
@@ -731,7 +745,7 @@ class DemoCodePanel(wx.Panel):
|
|||||||
os.makedirs(GetModifiedDirectory())
|
os.makedirs(GetModifiedDirectory())
|
||||||
if not os.path.exists(GetModifiedDirectory()):
|
if not os.path.exists(GetModifiedDirectory()):
|
||||||
wx.LogMessage("BUG: Created demo directory but it still doesn't exist")
|
wx.LogMessage("BUG: Created demo directory but it still doesn't exist")
|
||||||
raise AssetionError
|
raise AssertionError
|
||||||
except:
|
except:
|
||||||
wx.LogMessage("Error creating demo directory: %s" % GetModifiedDirectory())
|
wx.LogMessage("Error creating demo directory: %s" % GetModifiedDirectory())
|
||||||
return
|
return
|
||||||
@@ -750,24 +764,37 @@ class DemoCodePanel(wx.Panel):
|
|||||||
self.demoModules.LoadFromFile(modModified, modifiedFilename)
|
self.demoModules.LoadFromFile(modModified, modifiedFilename)
|
||||||
self.ActiveModuleChanged()
|
self.ActiveModuleChanged()
|
||||||
|
|
||||||
|
self.mainFrame.SetTreeModified(True)
|
||||||
|
|
||||||
|
|
||||||
def OnRestore(self, event): # Handles the "Delete Modified" button
|
def OnRestore(self, event): # Handles the "Delete Modified" button
|
||||||
modifiedFilename = GetModifiedFilename(self.demoModules.name)
|
modifiedFilename = GetModifiedFilename(self.demoModules.name)
|
||||||
self.demoModules.Delete(modModified)
|
self.demoModules.Delete(modModified)
|
||||||
os.unlink(modifiedFilename) # Delete the modified copy
|
os.unlink(modifiedFilename) # Delete the modified copy
|
||||||
busy = wx.BusyInfo("Reloading demo module...")
|
busy = wx.BusyInfo("Reloading demo module...")
|
||||||
|
|
||||||
self.ActiveModuleChanged()
|
self.ActiveModuleChanged()
|
||||||
|
|
||||||
|
self.mainFrame.SetTreeModified(False)
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
def opj(path):
|
def opj(path):
|
||||||
"""Convert paths to the platform-specific separator"""
|
"""Convert paths to the platform-specific separator"""
|
||||||
str = apply(os.path.join, tuple(path.split('/')))
|
st = apply(os.path.join, tuple(path.split('/')))
|
||||||
# HACK: on Linux, a leading / gets lost...
|
# HACK: on Linux, a leading / gets lost...
|
||||||
if path.startswith('/'):
|
if path.startswith('/'):
|
||||||
str = '/' + str
|
st = '/' + st
|
||||||
return str
|
return st
|
||||||
|
|
||||||
|
|
||||||
|
def GetDataDir():
|
||||||
|
"""
|
||||||
|
Return the standard location on this platform for application data
|
||||||
|
"""
|
||||||
|
sp = wx.StandardPaths.Get()
|
||||||
|
return sp.GetUserDataDir()
|
||||||
|
|
||||||
|
|
||||||
def GetModifiedDirectory():
|
def GetModifiedDirectory():
|
||||||
@@ -775,7 +802,7 @@ def GetModifiedDirectory():
|
|||||||
Returns the directory where modified versions of the demo files
|
Returns the directory where modified versions of the demo files
|
||||||
are stored
|
are stored
|
||||||
"""
|
"""
|
||||||
return opj(wx.GetHomeDir() + "/.wxPyDemo/modified/")
|
return os.path.join(GetDataDir(), "modified")
|
||||||
|
|
||||||
|
|
||||||
def GetModifiedFilename(name):
|
def GetModifiedFilename(name):
|
||||||
@@ -784,7 +811,7 @@ def GetModifiedFilename(name):
|
|||||||
"""
|
"""
|
||||||
if not name.endswith(".py"):
|
if not name.endswith(".py"):
|
||||||
name = name + ".py"
|
name = name + ".py"
|
||||||
return GetModifiedDirectory() + name
|
return os.path.join(GetModifiedDirectory(), name)
|
||||||
|
|
||||||
|
|
||||||
def GetOriginalFilename(name):
|
def GetOriginalFilename(name):
|
||||||
@@ -804,6 +831,25 @@ def DoesModifiedExist(name):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def GetConfig():
|
||||||
|
if not os.path.exists(GetDataDir()):
|
||||||
|
os.makedirs(GetDataDir())
|
||||||
|
|
||||||
|
config = wx.FileConfig(
|
||||||
|
localFilename=os.path.join(GetDataDir(), "options"))
|
||||||
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
def SearchDemo(name, keyword):
|
||||||
|
""" Returns whether a demo contains the search keyword or not. """
|
||||||
|
fid = open(GetOriginalFilename(name), "rt")
|
||||||
|
fullText = fid.read()
|
||||||
|
fid.close()
|
||||||
|
if fullText.find(keyword) >= 0:
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
class ModuleDictWrapper:
|
class ModuleDictWrapper:
|
||||||
@@ -1156,11 +1202,14 @@ class wxPythonDemo(wx.Frame):
|
|||||||
overviewText = "wxPython Overview"
|
overviewText = "wxPython Overview"
|
||||||
|
|
||||||
def __init__(self, parent, title):
|
def __init__(self, parent, title):
|
||||||
wx.Frame.__init__(self, parent, -1, title, size = (950, 720),
|
wx.Frame.__init__(self, parent, -1, title, size = (970, 720),
|
||||||
style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
|
style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
|
||||||
|
|
||||||
self.SetMinSize((640,480))
|
self.SetMinSize((640,480))
|
||||||
|
|
||||||
|
self.mgr = wx.aui.AuiManager()
|
||||||
|
self.mgr.SetManagedWindow(self)
|
||||||
|
|
||||||
self.loaded = False
|
self.loaded = False
|
||||||
self.cwd = os.getcwd()
|
self.cwd = os.getcwd()
|
||||||
self.curOverview = ""
|
self.curOverview = ""
|
||||||
@@ -1178,8 +1227,6 @@ class wxPythonDemo(wx.Frame):
|
|||||||
except:
|
except:
|
||||||
self.tbicon = None
|
self.tbicon = None
|
||||||
|
|
||||||
wx.CallAfter(self.ShowTip)
|
|
||||||
|
|
||||||
self.otherWin = None
|
self.otherWin = None
|
||||||
self.Bind(wx.EVT_IDLE, self.OnIdle)
|
self.Bind(wx.EVT_IDLE, self.OnIdle)
|
||||||
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
|
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
|
||||||
@@ -1189,119 +1236,67 @@ class wxPythonDemo(wx.Frame):
|
|||||||
self.Centre(wx.BOTH)
|
self.Centre(wx.BOTH)
|
||||||
self.CreateStatusBar(1, wx.ST_SIZEGRIP)
|
self.CreateStatusBar(1, wx.ST_SIZEGRIP)
|
||||||
|
|
||||||
splitter = wx.SplitterWindow(self, -1, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D)
|
self.dying = False
|
||||||
splitter2 = wx.SplitterWindow(splitter, -1, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D)
|
self.skipLoad = False
|
||||||
|
|
||||||
def EmptyHandler(evt): pass
|
def EmptyHandler(evt): pass
|
||||||
#splitter.Bind(wx.EVT_ERASE_BACKGROUND, EmptyHandler)
|
|
||||||
#splitter2.Bind(wx.EVT_ERASE_BACKGROUND, EmptyHandler)
|
|
||||||
|
|
||||||
# Prevent TreeCtrl from displaying all items after destruction when True
|
self.ReadConfigurationFile()
|
||||||
self.dying = False
|
|
||||||
|
|
||||||
# Create a Notebook
|
# Create a Notebook
|
||||||
self.nb = wx.Notebook(splitter2, -1, style=wx.CLIP_CHILDREN)
|
self.nb = wx.Notebook(self, -1, style=wx.CLIP_CHILDREN)
|
||||||
|
imgList = wx.ImageList(16, 16)
|
||||||
|
for png in ["overview", "code", "demo"]:
|
||||||
|
bmp = images.catalog[png].getBitmap()
|
||||||
|
imgList.Add(bmp)
|
||||||
|
self.nb.AssignImageList(imgList)
|
||||||
|
|
||||||
# Make a File menu
|
self.BuildMenuBar()
|
||||||
self.mainmenu = wx.MenuBar()
|
|
||||||
menu = wx.Menu()
|
|
||||||
item = menu.Append(-1, '&Redirect Output',
|
|
||||||
'Redirect print statements to a window',
|
|
||||||
wx.ITEM_CHECK)
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnToggleRedirect, item)
|
|
||||||
|
|
||||||
exitItem = menu.Append(-1, 'E&xit\tCtrl-Q', 'Get the heck outta here!')
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnFileExit, exitItem)
|
|
||||||
wx.App.SetMacExitMenuItemId(exitItem.GetId())
|
|
||||||
self.mainmenu.Append(menu, '&File')
|
|
||||||
|
|
||||||
# Make a Demo menu
|
|
||||||
menu = wx.Menu()
|
|
||||||
for item in _treeList[:-1]:
|
|
||||||
submenu = wx.Menu()
|
|
||||||
for childItem in item[1]:
|
|
||||||
mi = submenu.Append(-1, childItem)
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnDemoMenu, mi)
|
|
||||||
menu.AppendMenu(wx.NewId(), item[0], submenu)
|
|
||||||
self.mainmenu.Append(menu, '&Demo')
|
|
||||||
|
|
||||||
|
|
||||||
# Make a Help menu
|
|
||||||
menu = wx.Menu()
|
|
||||||
findItem = menu.Append(-1, '&Find\tCtrl-F', 'Find in the Demo Code')
|
|
||||||
findnextItem = menu.Append(-1, 'Find &Next\tF3', 'Find Next')
|
|
||||||
menu.AppendSeparator()
|
|
||||||
|
|
||||||
shellItem = menu.Append(-1, 'Open Py&Shell Window\tF5',
|
|
||||||
'An interactive interpreter window with the demo app and frame objects in the namesapce')
|
|
||||||
inspToolItem = menu.Append(-1, 'Open &Widget Inspector\tF6',
|
|
||||||
'A tool that lets you browse the live widgets and sizers in an application')
|
|
||||||
menu.AppendSeparator()
|
|
||||||
helpItem = menu.Append(-1, '&About wxPython Demo', 'wxPython RULES!!!')
|
|
||||||
wx.App.SetMacAboutMenuItemId(helpItem.GetId())
|
|
||||||
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnOpenShellWindow, shellItem)
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, inspToolItem)
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnHelpAbout, helpItem)
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnHelpFind, findItem)
|
|
||||||
self.Bind(wx.EVT_MENU, self.OnFindNext, findnextItem)
|
|
||||||
self.Bind(wx.EVT_FIND, self.OnFind)
|
|
||||||
self.Bind(wx.EVT_FIND_NEXT, self.OnFind)
|
|
||||||
self.Bind(wx.EVT_FIND_CLOSE, self.OnFindClose)
|
|
||||||
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateFindItems, findItem)
|
|
||||||
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateFindItems, findnextItem)
|
|
||||||
self.mainmenu.Append(menu, '&Help')
|
|
||||||
self.SetMenuBar(self.mainmenu)
|
|
||||||
|
|
||||||
self.finddata = wx.FindReplaceData()
|
self.finddata = wx.FindReplaceData()
|
||||||
self.finddata.SetFlags(wx.FR_DOWN)
|
self.finddata.SetFlags(wx.FR_DOWN)
|
||||||
|
|
||||||
if False:
|
|
||||||
# This is another way to set Accelerators, in addition to
|
|
||||||
# using the '\t<key>' syntax in the menu items.
|
|
||||||
aTable = wx.AcceleratorTable([(wx.ACCEL_ALT, ord('X'), exitItem.GetId()),
|
|
||||||
(wx.ACCEL_CTRL, ord('H'), helpItem.GetId()),
|
|
||||||
(wx.ACCEL_CTRL, ord('F'), findItem.GetId()),
|
|
||||||
(wx.ACCEL_NORMAL, wx.WXK_F3, findnextItem.GetId()),
|
|
||||||
(wx.ACCEL_NORMAL, wx.WXK_F9, shellItem.GetId()),
|
|
||||||
])
|
|
||||||
self.SetAcceleratorTable(aTable)
|
|
||||||
|
|
||||||
|
|
||||||
# Create a TreeCtrl
|
# Create a TreeCtrl
|
||||||
tID = wx.NewId()
|
leftPanel = wx.Panel(self, style=wx.TAB_TRAVERSAL|wx.CLIP_CHILDREN)
|
||||||
leftPanel = wx.Panel(splitter)
|
self.treeMap = {}
|
||||||
|
self.searchItems = {}
|
||||||
|
|
||||||
self.filter = wx.SearchCtrl(leftPanel)
|
self.tree = wxPythonDemoTree(leftPanel)
|
||||||
|
|
||||||
|
self.filter = wx.SearchCtrl(leftPanel, style=wx.TE_PROCESS_ENTER)
|
||||||
self.filter.ShowCancelButton(True)
|
self.filter.ShowCancelButton(True)
|
||||||
self.filter.Bind(wx.EVT_TEXT, self.RecreateTree)
|
self.filter.Bind(wx.EVT_TEXT, self.RecreateTree)
|
||||||
self.filter.Bind(wx.EVT_SEARCHCTRL_CANCEL_BTN,
|
self.filter.Bind(wx.EVT_SEARCHCTRL_CANCEL_BTN,
|
||||||
lambda e: self.filter.SetValue(''))
|
lambda e: self.filter.SetValue(''))
|
||||||
|
self.filter.Bind(wx.EVT_TEXT_ENTER, self.OnSearch)
|
||||||
|
|
||||||
self.treeMap = {}
|
searchMenu = wx.Menu()
|
||||||
self.tree = wx.TreeCtrl(leftPanel, tID, style =
|
item = searchMenu.AppendRadioItem(-1, "Sample Name")
|
||||||
wx.TR_DEFAULT_STYLE #| wx.TR_HAS_VARIABLE_ROW_HEIGHT
|
self.Bind(wx.EVT_MENU, self.OnSearchMenu, item)
|
||||||
)
|
item = searchMenu.AppendRadioItem(-1, "Sample Content")
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnSearchMenu, item)
|
||||||
|
self.filter.SetMenu(searchMenu)
|
||||||
|
|
||||||
self.root = self.tree.AddRoot("wxPython Overview")
|
|
||||||
self.RecreateTree()
|
self.RecreateTree()
|
||||||
self.tree.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnItemExpanded, id=tID)
|
self.tree.SetExpansionState(self.expansionState)
|
||||||
self.tree.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnItemCollapsed, id=tID)
|
self.tree.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnItemExpanded)
|
||||||
self.tree.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged, id=tID)
|
self.tree.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnItemCollapsed)
|
||||||
|
self.tree.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged)
|
||||||
self.tree.Bind(wx.EVT_LEFT_DOWN, self.OnTreeLeftDown)
|
self.tree.Bind(wx.EVT_LEFT_DOWN, self.OnTreeLeftDown)
|
||||||
|
|
||||||
# Set up a wx.html.HtmlWindow on the Overview Notebook page
|
# Set up a wx.html.HtmlWindow on the Overview Notebook page
|
||||||
# we put it in a panel first because there seems to be a
|
# we put it in a panel first because there seems to be a
|
||||||
# refresh bug of some sort (wxGTK) when it is directly in
|
# refresh bug of some sort (wxGTK) when it is directly in
|
||||||
# the notebook...
|
# the notebook...
|
||||||
|
|
||||||
if 0: # the old way
|
if 0: # the old way
|
||||||
self.ovr = wx.html.HtmlWindow(self.nb, -1, size=(400, 400))
|
self.ovr = wx.html.HtmlWindow(self.nb, -1, size=(400, 400))
|
||||||
self.nb.AddPage(self.ovr, self.overviewText)
|
self.nb.AddPage(self.ovr, self.overviewText, imageId=0)
|
||||||
|
|
||||||
else: # hopefully I can remove this hacky code soon, see SF bug #216861
|
else: # hopefully I can remove this hacky code soon, see SF bug #216861
|
||||||
panel = wx.Panel(self.nb, -1, style=wx.CLIP_CHILDREN)
|
panel = wx.Panel(self.nb, -1, style=wx.CLIP_CHILDREN)
|
||||||
self.ovr = wx.html.HtmlWindow(panel, -1, size=(400, 400))
|
self.ovr = wx.html.HtmlWindow(panel, -1, size=(400, 400))
|
||||||
self.nb.AddPage(panel, self.overviewText)
|
self.nb.AddPage(panel, self.overviewText, imageId=0)
|
||||||
|
|
||||||
def OnOvrSize(evt, ovr=self.ovr):
|
def OnOvrSize(evt, ovr=self.ovr):
|
||||||
ovr.SetSize(evt.GetSize())
|
ovr.SetSize(evt.GetSize())
|
||||||
@@ -1314,7 +1309,7 @@ class wxPythonDemo(wx.Frame):
|
|||||||
|
|
||||||
|
|
||||||
# Set up a log window
|
# Set up a log window
|
||||||
self.log = wx.TextCtrl(splitter2, -1,
|
self.log = wx.TextCtrl(self, -1,
|
||||||
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL)
|
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL)
|
||||||
if wx.Platform == "__WXMAC__":
|
if wx.Platform == "__WXMAC__":
|
||||||
self.log.MacCheckSpelling(False)
|
self.log.MacCheckSpelling(False)
|
||||||
@@ -1329,30 +1324,15 @@ class wxPythonDemo(wx.Frame):
|
|||||||
#wx.Log_SetActiveTarget(wx.LogStderr())
|
#wx.Log_SetActiveTarget(wx.LogStderr())
|
||||||
#wx.Log_SetTraceMask(wx.TraceMessages)
|
#wx.Log_SetTraceMask(wx.TraceMessages)
|
||||||
|
|
||||||
|
|
||||||
self.Bind(wx.EVT_ACTIVATE, self.OnActivate)
|
self.Bind(wx.EVT_ACTIVATE, self.OnActivate)
|
||||||
wx.GetApp().Bind(wx.EVT_ACTIVATE_APP, self.OnAppActivate)
|
wx.GetApp().Bind(wx.EVT_ACTIVATE_APP, self.OnAppActivate)
|
||||||
|
|
||||||
# add the windows to the splitter and split it.
|
# add the windows to the splitter and split it.
|
||||||
splitter2.SplitHorizontally(self.nb, self.log, -160)
|
|
||||||
leftBox = wx.BoxSizer(wx.VERTICAL)
|
leftBox = wx.BoxSizer(wx.VERTICAL)
|
||||||
leftBox.Add(self.tree, 1, wx.EXPAND)
|
leftBox.Add(self.tree, 1, wx.EXPAND)
|
||||||
leftBox.Add(wx.StaticText(leftPanel, label = "Filter Demos:"), 0, wx.TOP|wx.LEFT, 5)
|
leftBox.Add(wx.StaticText(leftPanel, label = "Filter Demos:"), 0, wx.TOP|wx.LEFT, 5)
|
||||||
leftBox.Add(self.filter, 0, wx.EXPAND|wx.ALL, 5)
|
leftBox.Add(self.filter, 0, wx.EXPAND|wx.ALL, 5)
|
||||||
leftPanel.SetSizer(leftBox)
|
leftPanel.SetSizer(leftBox)
|
||||||
splitter.SplitVertically(leftPanel, splitter2, 220)
|
|
||||||
|
|
||||||
splitter.SetMinimumPaneSize(120)
|
|
||||||
splitter2.SetMinimumPaneSize(60)
|
|
||||||
|
|
||||||
# Make the splitter on the right expand the top window when resized
|
|
||||||
def SplitterOnSize(evt):
|
|
||||||
splitter = evt.GetEventObject()
|
|
||||||
sz = splitter.GetSize()
|
|
||||||
splitter.SetSashPosition(sz.height - 160, False)
|
|
||||||
evt.Skip()
|
|
||||||
|
|
||||||
splitter2.Bind(wx.EVT_SIZE, SplitterOnSize)
|
|
||||||
|
|
||||||
# select initial items
|
# select initial items
|
||||||
self.nb.SetSelection(0)
|
self.nb.SetSelection(0)
|
||||||
@@ -1372,31 +1352,288 @@ class wxPythonDemo(wx.Frame):
|
|||||||
self.tree.SelectItem(selectedDemo)
|
self.tree.SelectItem(selectedDemo)
|
||||||
self.tree.EnsureVisible(selectedDemo)
|
self.tree.EnsureVisible(selectedDemo)
|
||||||
|
|
||||||
|
# Use the aui manager to set up everything
|
||||||
|
self.mgr.AddPane(self.nb, wx.aui.AuiPaneInfo().CenterPane().Name("Notebook"))
|
||||||
|
self.mgr.AddPane(leftPanel,
|
||||||
|
wx.aui.AuiPaneInfo().
|
||||||
|
Left().Layer(2).BestSize((240, -1)).
|
||||||
|
MinSize((160, -1)).
|
||||||
|
Floatable(ALLOW_AUI_FLOATING).FloatingSize((240, 700)).
|
||||||
|
Caption("wxPython Demos").
|
||||||
|
CloseButton(False).
|
||||||
|
Name("DemoTree"))
|
||||||
|
self.mgr.AddPane(self.log,
|
||||||
|
wx.aui.AuiPaneInfo().
|
||||||
|
Bottom().BestSize((-1, 150)).
|
||||||
|
MinSize((-1, 60)).
|
||||||
|
Floatable(ALLOW_AUI_FLOATING).FloatingSize((500, 160)).
|
||||||
|
Caption("Demo Log Messages").
|
||||||
|
CloseButton(False).
|
||||||
|
Name("LogWindow"))
|
||||||
|
|
||||||
|
self.auiConfigurations[DEFAULT_PERSPECTIVE] = self.mgr.SavePerspective()
|
||||||
|
self.mgr.Update()
|
||||||
|
|
||||||
|
self.mgr.SetFlags(self.mgr.GetFlags() ^ wx.aui.AUI_MGR_TRANSPARENT_DRAG)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def ReadConfigurationFile(self):
|
||||||
|
|
||||||
|
self.auiConfigurations = {}
|
||||||
|
self.expansionState = [0, 1]
|
||||||
|
|
||||||
|
config = GetConfig()
|
||||||
|
val = config.Read('ExpansionState')
|
||||||
|
if val:
|
||||||
|
self.expansionState = eval(val)
|
||||||
|
|
||||||
|
val = config.Read('AUIPerspectives')
|
||||||
|
if val:
|
||||||
|
self.auiConfigurations = eval(val)
|
||||||
|
|
||||||
|
|
||||||
|
def BuildMenuBar(self):
|
||||||
|
|
||||||
|
# Make a File menu
|
||||||
|
self.mainmenu = wx.MenuBar()
|
||||||
|
menu = wx.Menu()
|
||||||
|
item = menu.Append(-1, '&Redirect Output',
|
||||||
|
'Redirect print statements to a window',
|
||||||
|
wx.ITEM_CHECK)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnToggleRedirect, item)
|
||||||
|
|
||||||
|
exitItem = wx.MenuItem(menu, -1, 'E&xit\tCtrl-Q', 'Get the heck outta here!')
|
||||||
|
exitItem.SetBitmap(images.catalog['exit'].getBitmap())
|
||||||
|
menu.AppendItem(exitItem)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnFileExit, exitItem)
|
||||||
|
wx.App.SetMacExitMenuItemId(exitItem.GetId())
|
||||||
|
self.mainmenu.Append(menu, '&File')
|
||||||
|
|
||||||
|
# Make a Demo menu
|
||||||
|
menu = wx.Menu()
|
||||||
|
for indx, item in enumerate(_treeList[:-1]):
|
||||||
|
menuItem = wx.MenuItem(menu, -1, item[0])
|
||||||
|
submenu = wx.Menu()
|
||||||
|
for childItem in item[1]:
|
||||||
|
mi = submenu.Append(-1, childItem)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnDemoMenu, mi)
|
||||||
|
menuItem.SetBitmap(images.catalog[_demoPngs[indx+1]].getBitmap())
|
||||||
|
menuItem.SetSubMenu(submenu)
|
||||||
|
menu.AppendItem(menuItem)
|
||||||
|
self.mainmenu.Append(menu, '&Demo')
|
||||||
|
|
||||||
|
# Make an Option menu
|
||||||
|
# If we've turned off floatable panels then this menu is not needed
|
||||||
|
if ALLOW_AUI_FLOATING:
|
||||||
|
menu = wx.Menu()
|
||||||
|
auiPerspectives = self.auiConfigurations.keys()
|
||||||
|
auiPerspectives.sort()
|
||||||
|
perspectivesMenu = wx.Menu()
|
||||||
|
item = wx.MenuItem(perspectivesMenu, -1, DEFAULT_PERSPECTIVE, "Load startup default perspective", wx.ITEM_RADIO)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnAUIPerspectives, item)
|
||||||
|
perspectivesMenu.AppendItem(item)
|
||||||
|
for indx, key in enumerate(auiPerspectives):
|
||||||
|
if key == DEFAULT_PERSPECTIVE:
|
||||||
|
continue
|
||||||
|
item = wx.MenuItem(perspectivesMenu, -1, key, "Load user perspective %d"%indx, wx.ITEM_RADIO)
|
||||||
|
perspectivesMenu.AppendItem(item)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnAUIPerspectives, item)
|
||||||
|
|
||||||
|
menu.AppendMenu(wx.ID_ANY, "&AUI Perspectives", perspectivesMenu)
|
||||||
|
self.perspectives_menu = perspectivesMenu
|
||||||
|
|
||||||
|
item = wx.MenuItem(menu, -1, 'Save Perspective', 'Save AUI perspective')
|
||||||
|
item.SetBitmap(images.catalog['saveperspective'].getBitmap())
|
||||||
|
menu.AppendItem(item)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnSavePerspective, item)
|
||||||
|
|
||||||
|
item = wx.MenuItem(menu, -1, 'Delete Perspective', 'Delete AUI perspective')
|
||||||
|
item.SetBitmap(images.catalog['deleteperspective'].getBitmap())
|
||||||
|
menu.AppendItem(item)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnDeletePerspective, item)
|
||||||
|
|
||||||
|
menu.AppendSeparator()
|
||||||
|
|
||||||
|
item = wx.MenuItem(menu, -1, 'Restore Tree Expansion', 'Restore the initial tree expansion state')
|
||||||
|
item.SetBitmap(images.catalog['expansion'].getBitmap())
|
||||||
|
menu.AppendItem(item)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnTreeExpansion, item)
|
||||||
|
|
||||||
|
self.mainmenu.Append(menu, '&Options')
|
||||||
|
|
||||||
|
# Make a Help menu
|
||||||
|
menu = wx.Menu()
|
||||||
|
findItem = wx.MenuItem(menu, -1, '&Find\tCtrl-F', 'Find in the Demo Code')
|
||||||
|
findItem.SetBitmap(images.catalog['find'].getBitmap())
|
||||||
|
findNextItem = wx.MenuItem(menu, -1, 'Find &Next\tF3', 'Find Next')
|
||||||
|
findNextItem.SetBitmap(images.catalog['findnext'].getBitmap())
|
||||||
|
menu.AppendItem(findItem)
|
||||||
|
menu.AppendItem(findNextItem)
|
||||||
|
menu.AppendSeparator()
|
||||||
|
|
||||||
|
shellItem = wx.MenuItem(menu, -1, 'Open Py&Shell Window\tF5',
|
||||||
|
'An interactive interpreter window with the demo app and frame objects in the namesapce')
|
||||||
|
shellItem.SetBitmap(images.catalog['pyshell'].getBitmap())
|
||||||
|
menu.AppendItem(shellItem)
|
||||||
|
inspToolItem = wx.MenuItem(menu, -1, 'Open &Widget Inspector\tF6',
|
||||||
|
'A tool that lets you browse the live widgets and sizers in an application')
|
||||||
|
inspToolItem.SetBitmap(images.catalog['inspect'].getBitmap())
|
||||||
|
menu.AppendItem(inspToolItem)
|
||||||
|
menu.AppendSeparator()
|
||||||
|
helpItem = menu.Append(-1, '&About wxPython Demo', 'wxPython RULES!!!')
|
||||||
|
wx.App.SetMacAboutMenuItemId(helpItem.GetId())
|
||||||
|
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnOpenShellWindow, shellItem)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, inspToolItem)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnHelpAbout, helpItem)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnHelpFind, findItem)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnFindNext, findNextItem)
|
||||||
|
self.Bind(wx.EVT_FIND, self.OnFind)
|
||||||
|
self.Bind(wx.EVT_FIND_NEXT, self.OnFind)
|
||||||
|
self.Bind(wx.EVT_FIND_CLOSE, self.OnFindClose)
|
||||||
|
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateFindItems, findItem)
|
||||||
|
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateFindItems, findNextItem)
|
||||||
|
self.mainmenu.Append(menu, '&Help')
|
||||||
|
self.SetMenuBar(self.mainmenu)
|
||||||
|
|
||||||
|
if False:
|
||||||
|
# This is another way to set Accelerators, in addition to
|
||||||
|
# using the '\t<key>' syntax in the menu items.
|
||||||
|
aTable = wx.AcceleratorTable([(wx.ACCEL_ALT, ord('X'), exitItem.GetId()),
|
||||||
|
(wx.ACCEL_CTRL, ord('H'), helpItem.GetId()),
|
||||||
|
(wx.ACCEL_CTRL, ord('F'), findItem.GetId()),
|
||||||
|
(wx.ACCEL_NORMAL, wx.WXK_F3, findnextItem.GetId()),
|
||||||
|
(wx.ACCEL_NORMAL, wx.WXK_F9, shellItem.GetId()),
|
||||||
|
])
|
||||||
|
self.SetAcceleratorTable(aTable)
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
|
|
||||||
def RecreateTree(self, evt=None):
|
def RecreateTree(self, evt=None):
|
||||||
|
# Catch the search type (name or content)
|
||||||
|
searchMenu = self.filter.GetMenu().GetMenuItems()
|
||||||
|
fullSearch = searchMenu[1].IsChecked()
|
||||||
|
|
||||||
|
if evt:
|
||||||
|
if fullSearch:
|
||||||
|
# Do not`scan all the demo files for every char
|
||||||
|
# the user input, use wx.EVT_TEXT_ENTER instead
|
||||||
|
return
|
||||||
|
|
||||||
|
expansionState = self.tree.GetExpansionState()
|
||||||
|
|
||||||
|
current = None
|
||||||
|
item = self.tree.GetSelection()
|
||||||
|
if item:
|
||||||
|
prnt = self.tree.GetItemParent(item)
|
||||||
|
if prnt:
|
||||||
|
current = (self.tree.GetItemText(item),
|
||||||
|
self.tree.GetItemText(prnt))
|
||||||
|
|
||||||
self.tree.Freeze()
|
self.tree.Freeze()
|
||||||
self.tree.DeleteAllItems()
|
self.tree.DeleteAllItems()
|
||||||
self.root = self.tree.AddRoot("wxPython Overview")
|
self.root = self.tree.AddRoot("wxPython Overview")
|
||||||
|
self.tree.SetItemImage(self.root, 0)
|
||||||
|
self.tree.SetItemPyData(self.root, 0)
|
||||||
|
|
||||||
|
treeFont = self.tree.GetFont()
|
||||||
|
catFont = self.tree.GetFont()
|
||||||
|
|
||||||
|
# The old native treectrl on MSW has a bug where it doesn't
|
||||||
|
# draw all of the text for an item if the font is larger than
|
||||||
|
# the default. It seems to be clipping the item's label as if
|
||||||
|
# it was the size of the same label in the default font.
|
||||||
|
if 'wxMSW' not in wx.PlatformInfo or wx.GetApp().GetComCtl32Version() >= 600:
|
||||||
|
treeFont.SetPointSize(treeFont.GetPointSize()+2)
|
||||||
|
treeFont.SetWeight(wx.BOLD)
|
||||||
|
catFont.SetWeight(wx.BOLD)
|
||||||
|
|
||||||
|
self.tree.SetItemFont(self.root, treeFont)
|
||||||
|
|
||||||
firstChild = None
|
firstChild = None
|
||||||
|
selectItem = None
|
||||||
filter = self.filter.GetValue()
|
filter = self.filter.GetValue()
|
||||||
|
count = 0
|
||||||
|
|
||||||
for category, items in _treeList:
|
for category, items in _treeList:
|
||||||
|
count += 1
|
||||||
if filter:
|
if filter:
|
||||||
|
if fullSearch:
|
||||||
|
items = self.searchItems[category]
|
||||||
|
else:
|
||||||
items = [item for item in items if filter.lower() in item.lower()]
|
items = [item for item in items if filter.lower() in item.lower()]
|
||||||
if items:
|
if items:
|
||||||
child = self.tree.AppendItem(self.root, category)
|
child = self.tree.AppendItem(self.root, category, image=count)
|
||||||
|
self.tree.SetItemFont(child, catFont)
|
||||||
|
self.tree.SetItemPyData(child, count)
|
||||||
if not firstChild: firstChild = child
|
if not firstChild: firstChild = child
|
||||||
for childItem in items:
|
for childItem in items:
|
||||||
theDemo = self.tree.AppendItem(child, childItem)
|
image = count
|
||||||
|
if DoesModifiedExist(childItem):
|
||||||
|
image = len(_demoPngs)
|
||||||
|
theDemo = self.tree.AppendItem(child, childItem, image=image)
|
||||||
|
self.tree.SetItemPyData(theDemo, count)
|
||||||
self.treeMap[childItem] = theDemo
|
self.treeMap[childItem] = theDemo
|
||||||
|
if current and (childItem, category) == current:
|
||||||
|
selectItem = theDemo
|
||||||
|
|
||||||
|
|
||||||
self.tree.Expand(self.root)
|
self.tree.Expand(self.root)
|
||||||
if firstChild:
|
if firstChild:
|
||||||
self.tree.Expand(firstChild)
|
self.tree.Expand(firstChild)
|
||||||
if filter:
|
if filter:
|
||||||
self.tree.ExpandAll()
|
self.tree.ExpandAll()
|
||||||
|
elif expansionState:
|
||||||
|
self.tree.SetExpansionState(expansionState)
|
||||||
|
if selectItem:
|
||||||
|
self.skipLoad = True
|
||||||
|
self.tree.SelectItem(selectItem)
|
||||||
|
self.skipLoad = False
|
||||||
|
|
||||||
self.tree.Thaw()
|
self.tree.Thaw()
|
||||||
|
self.searchItems = {}
|
||||||
|
|
||||||
|
|
||||||
|
def OnSearchMenu(self, event):
|
||||||
|
|
||||||
|
# Catch the search type (name or content)
|
||||||
|
searchMenu = self.filter.GetMenu().GetMenuItems()
|
||||||
|
fullSearch = searchMenu[1].IsChecked()
|
||||||
|
|
||||||
|
if fullSearch:
|
||||||
|
self.OnSearch()
|
||||||
|
else:
|
||||||
|
self.RecreateTree()
|
||||||
|
|
||||||
|
|
||||||
|
def OnSearch(self, event=None):
|
||||||
|
|
||||||
|
value = self.filter.GetValue()
|
||||||
|
if not value:
|
||||||
|
self.RecreateTree()
|
||||||
|
return
|
||||||
|
|
||||||
|
wx.BeginBusyCursor()
|
||||||
|
|
||||||
|
for category, items in _treeList:
|
||||||
|
self.searchItems[category] = []
|
||||||
|
for childItem in items:
|
||||||
|
if SearchDemo(childItem, value):
|
||||||
|
self.searchItems[category].append(childItem)
|
||||||
|
|
||||||
|
wx.EndBusyCursor()
|
||||||
|
self.RecreateTree()
|
||||||
|
|
||||||
|
|
||||||
|
def SetTreeModified(self, modified):
|
||||||
|
item = self.tree.GetSelection()
|
||||||
|
if modified:
|
||||||
|
image = len(_demoPngs)
|
||||||
|
else:
|
||||||
|
image = self.tree.GetItemPyData(item)
|
||||||
|
self.tree.SetItemImage(item, image)
|
||||||
|
|
||||||
|
|
||||||
def WriteText(self, text):
|
def WriteText(self, text):
|
||||||
if text[-1:] == '\n':
|
if text[-1:] == '\n':
|
||||||
@@ -1429,7 +1666,7 @@ class wxPythonDemo(wx.Frame):
|
|||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def OnSelChanged(self, event):
|
def OnSelChanged(self, event):
|
||||||
if self.dying or not self.loaded:
|
if self.dying or not self.loaded or self.skipLoad:
|
||||||
return
|
return
|
||||||
|
|
||||||
item = event.GetItem()
|
item = event.GetItem()
|
||||||
@@ -1440,6 +1677,7 @@ class wxPythonDemo(wx.Frame):
|
|||||||
def LoadDemo(self, demoName):
|
def LoadDemo(self, demoName):
|
||||||
try:
|
try:
|
||||||
wx.BeginBusyCursor()
|
wx.BeginBusyCursor()
|
||||||
|
self.Freeze()
|
||||||
|
|
||||||
os.chdir(self.cwd)
|
os.chdir(self.cwd)
|
||||||
self.ShutdownDemoModule()
|
self.ShutdownDemoModule()
|
||||||
@@ -1457,13 +1695,13 @@ class wxPythonDemo(wx.Frame):
|
|||||||
wx.LogMessage("Loading demo %s.py..." % demoName)
|
wx.LogMessage("Loading demo %s.py..." % demoName)
|
||||||
self.demoModules = DemoModules(demoName)
|
self.demoModules = DemoModules(demoName)
|
||||||
self.LoadDemoSource()
|
self.LoadDemoSource()
|
||||||
self.tree.Refresh()
|
|
||||||
else:
|
else:
|
||||||
self.SetOverview("wxPython", mainOverview)
|
self.SetOverview("wxPython", mainOverview)
|
||||||
self.codePage = None
|
self.codePage = None
|
||||||
self.UpdateNotebook(0)
|
self.UpdateNotebook(0)
|
||||||
finally:
|
finally:
|
||||||
wx.EndBusyCursor()
|
wx.EndBusyCursor()
|
||||||
|
self.Thaw()
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def LoadDemoSource(self):
|
def LoadDemoSource(self):
|
||||||
@@ -1494,6 +1732,10 @@ class wxPythonDemo(wx.Frame):
|
|||||||
self.demoPage = DemoErrorPanel(self.nb, self.codePage,
|
self.demoPage = DemoErrorPanel(self.nb, self.codePage,
|
||||||
DemoError(sys.exc_info()), self)
|
DemoError(sys.exc_info()), self)
|
||||||
|
|
||||||
|
bg = self.nb.GetThemeBackgroundColour()
|
||||||
|
if bg:
|
||||||
|
self.demoPage.SetBackgroundColour(bg)
|
||||||
|
|
||||||
assert self.demoPage is not None, "runTest must return a window!"
|
assert self.demoPage is not None, "runTest must return a window!"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@@ -1504,7 +1746,7 @@ class wxPythonDemo(wx.Frame):
|
|||||||
self.SetOverview(self.demoModules.name + " Overview", overviewText)
|
self.SetOverview(self.demoModules.name + " Overview", overviewText)
|
||||||
|
|
||||||
if self.firstTime:
|
if self.firstTime:
|
||||||
# cahnge to the demo page the first time a module is run
|
# change to the demo page the first time a module is run
|
||||||
self.UpdateNotebook(2)
|
self.UpdateNotebook(2)
|
||||||
self.firstTime = False
|
self.firstTime = False
|
||||||
else:
|
else:
|
||||||
@@ -1524,6 +1766,7 @@ class wxPythonDemo(wx.Frame):
|
|||||||
def UpdateNotebook(self, select = -1):
|
def UpdateNotebook(self, select = -1):
|
||||||
nb = self.nb
|
nb = self.nb
|
||||||
debug = False
|
debug = False
|
||||||
|
self.Freeze()
|
||||||
|
|
||||||
def UpdatePage(page, pageText):
|
def UpdatePage(page, pageText):
|
||||||
pageExists = False
|
pageExists = False
|
||||||
@@ -1537,15 +1780,13 @@ class wxPythonDemo(wx.Frame):
|
|||||||
if page:
|
if page:
|
||||||
if not pageExists:
|
if not pageExists:
|
||||||
# Add a new page
|
# Add a new page
|
||||||
nb.AddPage(page, pageText)
|
nb.AddPage(page, pageText, imageId=nb.GetPageCount())
|
||||||
if debug: wx.LogMessage("DBG: ADDED %s" % pageText)
|
if debug: wx.LogMessage("DBG: ADDED %s" % pageText)
|
||||||
else:
|
else:
|
||||||
if nb.GetPage(pagePos) != page:
|
if nb.GetPage(pagePos) != page:
|
||||||
# Reload an existing page
|
# Reload an existing page
|
||||||
nb.Freeze()
|
|
||||||
nb.DeletePage(pagePos)
|
nb.DeletePage(pagePos)
|
||||||
nb.InsertPage(pagePos, page, pageText)
|
nb.InsertPage(pagePos, page, pageText, imageId=pagePos)
|
||||||
nb.Thaw()
|
|
||||||
if debug: wx.LogMessage("DBG: RELOADED %s" % pageText)
|
if debug: wx.LogMessage("DBG: RELOADED %s" % pageText)
|
||||||
else:
|
else:
|
||||||
# Excellent! No redraw/flicker
|
# Excellent! No redraw/flicker
|
||||||
@@ -1566,6 +1807,8 @@ class wxPythonDemo(wx.Frame):
|
|||||||
if select >= 0 and select < nb.GetPageCount():
|
if select >= 0 and select < nb.GetPageCount():
|
||||||
nb.SetSelection(select)
|
nb.SetSelection(select)
|
||||||
|
|
||||||
|
self.Thaw()
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def SetOverview(self, name, text):
|
def SetOverview(self, name, text):
|
||||||
self.curOverview = text
|
self.curOverview = text
|
||||||
@@ -1591,6 +1834,70 @@ class wxPythonDemo(wx.Frame):
|
|||||||
app.RestoreStdio()
|
app.RestoreStdio()
|
||||||
print "Print statements and other standard output will now be sent to the usual location."
|
print "Print statements and other standard output will now be sent to the usual location."
|
||||||
|
|
||||||
|
|
||||||
|
def OnAUIPerspectives(self, event):
|
||||||
|
perspective = self.perspectives_menu.GetLabel(event.GetId())
|
||||||
|
self.mgr.LoadPerspective(self.auiConfigurations[perspective])
|
||||||
|
self.mgr.Update()
|
||||||
|
|
||||||
|
|
||||||
|
def OnSavePerspective(self, event):
|
||||||
|
dlg = wx.TextEntryDialog(self, "Enter a name for the new perspective:", "AUI Configuration")
|
||||||
|
|
||||||
|
dlg.SetValue(("Perspective %d")%(len(self.auiConfigurations)+1))
|
||||||
|
if dlg.ShowModal() != wx.ID_OK:
|
||||||
|
return
|
||||||
|
|
||||||
|
perspectiveName = dlg.GetValue()
|
||||||
|
menuItems = self.perspectives_menu.GetMenuItems()
|
||||||
|
for item in menuItems:
|
||||||
|
if item.GetLabel() == perspectiveName:
|
||||||
|
wx.MessageBox("The selected perspective name:\n\n%s\n\nAlready exists."%perspectiveName,
|
||||||
|
"Error", style=wx.ICON_ERROR)
|
||||||
|
return
|
||||||
|
|
||||||
|
item = wx.MenuItem(self.perspectives_menu, -1, dlg.GetValue(),
|
||||||
|
"Load user perspective %d"%(len(self.auiConfigurations)+1),
|
||||||
|
wx.ITEM_RADIO)
|
||||||
|
self.Bind(wx.EVT_MENU, self.OnAUIPerspectives, item)
|
||||||
|
self.perspectives_menu.AppendItem(item)
|
||||||
|
item.Check(True)
|
||||||
|
self.auiConfigurations.update({dlg.GetValue(): self.mgr.SavePerspective()})
|
||||||
|
|
||||||
|
|
||||||
|
def OnDeletePerspective(self, event):
|
||||||
|
menuItems = self.perspectives_menu.GetMenuItems()[1:]
|
||||||
|
lst = []
|
||||||
|
loadDefault = False
|
||||||
|
|
||||||
|
for item in menuItems:
|
||||||
|
lst.append(item.GetLabel())
|
||||||
|
|
||||||
|
dlg = wx.MultiChoiceDialog(self,
|
||||||
|
"Please select the perspectives\nyou would like to delete:",
|
||||||
|
"Delete AUI Perspectives", lst)
|
||||||
|
|
||||||
|
if dlg.ShowModal() == wx.ID_OK:
|
||||||
|
selections = dlg.GetSelections()
|
||||||
|
strings = [lst[x] for x in selections]
|
||||||
|
for sel in strings:
|
||||||
|
self.auiConfigurations.pop(sel)
|
||||||
|
item = menuItems[lst.index(sel)]
|
||||||
|
if item.IsChecked():
|
||||||
|
loadDefault = True
|
||||||
|
self.perspectives_menu.GetMenuItems()[0].Check(True)
|
||||||
|
self.perspectives_menu.DeleteItem(item)
|
||||||
|
lst.remove(sel)
|
||||||
|
|
||||||
|
if loadDefault:
|
||||||
|
self.mgr.LoadPerspective(self.auiConfigurations[DEFAULT_PERSPECTIVE])
|
||||||
|
self.mgr.Update()
|
||||||
|
|
||||||
|
|
||||||
|
def OnTreeExpansion(self, event):
|
||||||
|
self.tree.SetExpansionState(self.expansionState)
|
||||||
|
|
||||||
|
|
||||||
def OnHelpAbout(self, event):
|
def OnHelpAbout(self, event):
|
||||||
from About import MyAboutBox
|
from About import MyAboutBox
|
||||||
about = MyAboutBox(self)
|
about = MyAboutBox(self)
|
||||||
@@ -1710,6 +2017,12 @@ class wxPythonDemo(wx.Frame):
|
|||||||
self.mainmenu = None
|
self.mainmenu = None
|
||||||
if self.tbicon is not None:
|
if self.tbicon is not None:
|
||||||
self.tbicon.Destroy()
|
self.tbicon.Destroy()
|
||||||
|
|
||||||
|
config = GetConfig()
|
||||||
|
config.Write('ExpansionState', str(self.tree.GetExpansionState()))
|
||||||
|
config.Write('AUIPerspectives', str(self.auiConfigurations))
|
||||||
|
config.Flush()
|
||||||
|
|
||||||
self.Destroy()
|
self.Destroy()
|
||||||
|
|
||||||
|
|
||||||
@@ -1723,18 +2036,20 @@ class wxPythonDemo(wx.Frame):
|
|||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def ShowTip(self):
|
def ShowTip(self):
|
||||||
try:
|
config = GetConfig()
|
||||||
showTipText = open(opj("data/showTips")).read()
|
showTipText = config.Read("tips")
|
||||||
|
if showTipText:
|
||||||
showTip, index = eval(showTipText)
|
showTip, index = eval(showTipText)
|
||||||
except IOError:
|
else:
|
||||||
showTip, index = (1, 0)
|
showTip, index = (1, 0)
|
||||||
|
|
||||||
if showTip:
|
if showTip:
|
||||||
tp = wx.CreateFileTipProvider(opj("data/tips.txt"), index)
|
tp = wx.CreateFileTipProvider(opj("data/tips.txt"), index)
|
||||||
##tp = MyTP(0)
|
##tp = MyTP(0)
|
||||||
showTip = wx.ShowTip(self, tp)
|
showTip = wx.ShowTip(self, tp)
|
||||||
index = tp.GetCurrentTip()
|
index = tp.GetCurrentTip()
|
||||||
open(opj("data/showTips"), "w").write(str( (showTip, index) ))
|
config.Write("tips", str( (showTip, index) ))
|
||||||
|
config.Flush()
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def OnDemoMenu(self, event):
|
def OnDemoMenu(self, event):
|
||||||
@@ -1799,8 +2114,54 @@ class MySplashScreen(wx.SplashScreen):
|
|||||||
frame.Show()
|
frame.Show()
|
||||||
if self.fc.IsRunning():
|
if self.fc.IsRunning():
|
||||||
self.Raise()
|
self.Raise()
|
||||||
|
wx.CallAfter(frame.ShowTip)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
from wx.lib.mixins.treemixin import ExpansionState
|
||||||
|
if USE_CUSTOMTREECTRL:
|
||||||
|
import wx.lib.customtreectrl as CT
|
||||||
|
TreeBaseClass = CT.CustomTreeCtrl
|
||||||
|
else:
|
||||||
|
TreeBaseClass = wx.TreeCtrl
|
||||||
|
|
||||||
|
|
||||||
|
class wxPythonDemoTree(ExpansionState, TreeBaseClass):
|
||||||
|
def __init__(self, parent):
|
||||||
|
TreeBaseClass.__init__(self, parent, style=wx.TR_DEFAULT_STYLE|
|
||||||
|
wx.TR_HAS_VARIABLE_ROW_HEIGHT)
|
||||||
|
self.BuildTreeImageList()
|
||||||
|
if USE_CUSTOMTREECTRL:
|
||||||
|
self.SetSpacing(10)
|
||||||
|
self.SetWindowStyle(self.GetWindowStyle() & ~wx.TR_LINES_AT_ROOT)
|
||||||
|
|
||||||
|
def AppendItem(self, parent, text, image=-1, wnd=None):
|
||||||
|
if USE_CUSTOMTREECTRL:
|
||||||
|
item = TreeBaseClass.AppendItem(self, parent, text, image=image, wnd=wnd)
|
||||||
|
else:
|
||||||
|
item = TreeBaseClass.AppendItem(self, parent, text, image=image)
|
||||||
|
return item
|
||||||
|
|
||||||
|
def BuildTreeImageList(self):
|
||||||
|
imgList = wx.ImageList(16, 16)
|
||||||
|
for png in _demoPngs:
|
||||||
|
imgList.Add(images.catalog[png].getBitmap())
|
||||||
|
|
||||||
|
# add the image for modified demos.
|
||||||
|
imgList.Add(images.catalog["custom"].getBitmap())
|
||||||
|
|
||||||
|
self.AssignImageList(imgList)
|
||||||
|
|
||||||
|
|
||||||
|
def GetItemIdentity(self, item):
|
||||||
|
return self.GetPyData(item)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
class MyApp(wx.App):
|
class MyApp(wx.App):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
"""
|
"""
|
||||||
@@ -1809,6 +2170,7 @@ class MyApp(wx.App):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
wx.SystemOptions.SetOptionInt("mac.window-plain-transition", 1)
|
wx.SystemOptions.SetOptionInt("mac.window-plain-transition", 1)
|
||||||
|
self.SetAppName("wxPyDemo")
|
||||||
|
|
||||||
# For debugging
|
# For debugging
|
||||||
#self.SetAssertMode(wx.PYAPP_ASSERT_DIALOG)
|
#self.SetAssertMode(wx.PYAPP_ASSERT_DIALOG)
|
||||||
|
@@ -211,7 +211,8 @@ class MyEvtHandler(ogl.ShapeEvtHandler):
|
|||||||
|
|
||||||
if shape.Selected():
|
if shape.Selected():
|
||||||
shape.Select(False, dc)
|
shape.Select(False, dc)
|
||||||
canvas.Redraw(dc)
|
#canvas.Redraw(dc)
|
||||||
|
canvas.Refresh(False)
|
||||||
else:
|
else:
|
||||||
redraw = False
|
redraw = False
|
||||||
shapeList = canvas.GetDiagram().GetShapeList()
|
shapeList = canvas.GetDiagram().GetShapeList()
|
||||||
@@ -230,7 +231,8 @@ class MyEvtHandler(ogl.ShapeEvtHandler):
|
|||||||
for s in toUnselect:
|
for s in toUnselect:
|
||||||
s.Select(False, dc)
|
s.Select(False, dc)
|
||||||
|
|
||||||
canvas.Redraw(dc)
|
##canvas.Redraw(dc)
|
||||||
|
canvas.Refresh(False)
|
||||||
|
|
||||||
self.UpdateStatusBar(shape)
|
self.UpdateStatusBar(shape)
|
||||||
|
|
||||||
@@ -251,9 +253,11 @@ class MyEvtHandler(ogl.ShapeEvtHandler):
|
|||||||
|
|
||||||
|
|
||||||
def OnMovePost(self, dc, x, y, oldX, oldY, display):
|
def OnMovePost(self, dc, x, y, oldX, oldY, display):
|
||||||
|
shape = self.GetShape()
|
||||||
ogl.ShapeEvtHandler.OnMovePost(self, dc, x, y, oldX, oldY, display)
|
ogl.ShapeEvtHandler.OnMovePost(self, dc, x, y, oldX, oldY, display)
|
||||||
self.UpdateStatusBar(self.GetShape())
|
self.UpdateStatusBar(shape)
|
||||||
|
if "wxMac" in wx.PlatformInfo:
|
||||||
|
shape.GetCanvas().Refresh(False)
|
||||||
|
|
||||||
def OnRightClick(self, *dontcare):
|
def OnRightClick(self, *dontcare):
|
||||||
self.log.WriteText("%s\n" % self.GetShape())
|
self.log.WriteText("%s\n" % self.GetShape())
|
||||||
@@ -334,8 +338,8 @@ class TestWindow(ogl.ShapeCanvas):
|
|||||||
s.SetBitmap(bmp)
|
s.SetBitmap(bmp)
|
||||||
self.MyAddShape(s, 225, 130, None, None, "Bitmap")
|
self.MyAddShape(s, 225, 130, None, None, "Bitmap")
|
||||||
|
|
||||||
dc = wx.ClientDC(self)
|
#dc = wx.ClientDC(self)
|
||||||
self.PrepareDC(dc)
|
#self.PrepareDC(dc)
|
||||||
|
|
||||||
for x in range(len(self.shapes)):
|
for x in range(len(self.shapes)):
|
||||||
fromShape = self.shapes[x]
|
fromShape = self.shapes[x]
|
||||||
|
@@ -30,8 +30,9 @@ class TestTreeCtrlPanel(wx.Panel):
|
|||||||
tID = wx.NewId()
|
tID = wx.NewId()
|
||||||
|
|
||||||
self.tree = MyTreeCtrl(self, tID, wx.DefaultPosition, wx.DefaultSize,
|
self.tree = MyTreeCtrl(self, tID, wx.DefaultPosition, wx.DefaultSize,
|
||||||
wx.TR_HAS_BUTTONS
|
wx.TR_DEFAULT_STYLE
|
||||||
| wx.TR_EDIT_LABELS
|
#wx.TR_HAS_BUTTONS
|
||||||
|
#| wx.TR_EDIT_LABELS
|
||||||
#| wx.TR_MULTIPLE
|
#| wx.TR_MULTIPLE
|
||||||
#| wx.TR_HIDE_ROOT
|
#| wx.TR_HIDE_ROOT
|
||||||
, self.log)
|
, self.log)
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
import wx, wx.lib.customtreectrl, wx.gizmos
|
import wx, wx.lib.customtreectrl, wx.gizmos
|
||||||
|
try:
|
||||||
import treemixin
|
import treemixin
|
||||||
|
except ImportError:
|
||||||
|
from wx.lib.mixins import treemixin
|
||||||
|
|
||||||
|
overview = treemixin.__doc__
|
||||||
|
|
||||||
class TreeModel(object):
|
class TreeModel(object):
|
||||||
''' TreeModel holds the domain objects that are shown in the different
|
''' TreeModel holds the domain objects that are shown in the different
|
||||||
|
BIN
wxPython/demo/bmp_source/book.png
Normal file
After Width: | Height: | Size: 622 B |
BIN
wxPython/demo/bmp_source/clipboard.png
Normal file
After Width: | Height: | Size: 693 B |
BIN
wxPython/demo/bmp_source/code.png
Normal file
After Width: | Height: | Size: 868 B |
BIN
wxPython/demo/bmp_source/core.png
Normal file
After Width: | Height: | Size: 807 B |
BIN
wxPython/demo/bmp_source/custom.png
Normal file
After Width: | Height: | Size: 833 B |
BIN
wxPython/demo/bmp_source/customcontrol.png
Executable file
After Width: | Height: | Size: 701 B |
BIN
wxPython/demo/bmp_source/deleteperspective.png
Normal file
After Width: | Height: | Size: 892 B |
BIN
wxPython/demo/bmp_source/demo.png
Normal file
After Width: | Height: | Size: 817 B |
BIN
wxPython/demo/bmp_source/dialog.png
Normal file
After Width: | Height: | Size: 237 B |
BIN
wxPython/demo/bmp_source/exit.png
Normal file
After Width: | Height: | Size: 995 B |
BIN
wxPython/demo/bmp_source/expansion.png
Normal file
After Width: | Height: | Size: 894 B |
BIN
wxPython/demo/bmp_source/find.png
Normal file
After Width: | Height: | Size: 985 B |
BIN
wxPython/demo/bmp_source/findnext.png
Normal file
After Width: | Height: | Size: 811 B |
BIN
wxPython/demo/bmp_source/frame.png
Normal file
After Width: | Height: | Size: 199 B |
BIN
wxPython/demo/bmp_source/images.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
wxPython/demo/bmp_source/inspect.png
Normal file
After Width: | Height: | Size: 766 B |
BIN
wxPython/demo/bmp_source/layout.png
Normal file
After Width: | Height: | Size: 519 B |
BIN
wxPython/demo/bmp_source/miscellaneous.png
Normal file
After Width: | Height: | Size: 716 B |
BIN
wxPython/demo/bmp_source/modifiedexists.png
Normal file
After Width: | Height: | Size: 440 B |