Merged wxPython 2.4.x to the 2.5 branch (Finally!!!)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
@@ -2,8 +2,12 @@
|
|||||||
.emacs.desktop
|
.emacs.desktop
|
||||||
.gdb_history
|
.gdb_history
|
||||||
MANIFEST
|
MANIFEST
|
||||||
|
_build_dmg
|
||||||
_build_rpm
|
_build_rpm
|
||||||
build
|
build
|
||||||
|
build-gtk
|
||||||
|
build-gtk2
|
||||||
|
build-gtk2.unicode
|
||||||
build-pkg
|
build-pkg
|
||||||
build-pkg-debug
|
build-pkg-debug
|
||||||
build.local
|
build.local
|
||||||
|
@@ -1,57 +1,32 @@
|
|||||||
Building wxPython on Mac OS X
|
Building wxPython on Mac OS X
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
NOTE: OS X support is HIGHLY EXPERIMENTAL at this time. Most things
|
|
||||||
are working now, but a few still don't. I know about most of
|
|
||||||
them and am addressing them as I have time. If you have any
|
|
||||||
ideas about a fix for the stuff that's still broken then
|
|
||||||
please persue them and send the fixes to me.
|
|
||||||
|
|
||||||
|
These are the steps I have used for building wxPython on Mac OS X 10.x
|
||||||
These are the steps I have used for building wxPython on Mac OS X 10.1
|
|
||||||
with the Apple Developer Tools, a.k.a the Darwin version. I assume
|
with the Apple Developer Tools, a.k.a the Darwin version. I assume
|
||||||
that you know your way around a command line and that you know how to
|
that you know your way around a command line and that you know how to
|
||||||
get things from various CVS repositories as needed.
|
get things from various CVS repositories as needed.
|
||||||
|
|
||||||
|
|
||||||
1. Python 2.2 is required. There is a disk image with an installer
|
1. "MacPython-OSX" 2.3 is required. There is a disk image with an
|
||||||
package in the wxPython Sourceforge download area, in this group:
|
installer package in the wxPython Sourceforge download area, in
|
||||||
|
this group:
|
||||||
|
|
||||||
http://sourceforge.net/project/showfiles.php?group_id=10718&release_id=84730
|
http://sourceforge.net/project/showfiles.php?group_id=10718&release_id=84730
|
||||||
|
|
||||||
If, for some reason you need to build your own Python, get the
|
If, for some reason you need to build your own Python, get the
|
||||||
source from www.python.org and follow the instructions in the
|
source from www.python.org and follow the instructions in the
|
||||||
Mac/OSX/README file to build and install Python.app and the
|
Mac/OSX/README file to build and install the Python.framework and
|
||||||
Python.framework.
|
Python tools.
|
||||||
|
|
||||||
If you build your own Python then you may want to make a symlink or
|
|
||||||
two in /usr/local/bin so that this version of Python can be found
|
|
||||||
from the command line. For example:
|
|
||||||
|
|
||||||
cd /usr/local/bin
|
|
||||||
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.2/bin/python2.2 python2.2
|
|
||||||
sudo ln -s python2.2 python
|
|
||||||
|
|
||||||
Also, if you create a /usr/local/bin/pythonw script like the
|
|
||||||
following then you can run Python GUI apps (like wxPython) directly
|
|
||||||
from the command line:
|
|
||||||
|
|
||||||
#!/bin/sh
|
|
||||||
exec /Applications/Python.app/Contents/MacOS/python $@
|
|
||||||
|
|
||||||
Be sure to give this script execute permissions:
|
|
||||||
|
|
||||||
sudo chmod +x /usr/local/bin/pythonw
|
|
||||||
|
|
||||||
If you would like to make a MachoPython installer from what you
|
|
||||||
built then you may want to look at the scripts I use to do it
|
|
||||||
located in wxPython/distrib/mac/buildPython.
|
|
||||||
|
|
||||||
One last thing, make sure that /usr/local/bin is in your PATH
|
One last thing, make sure that /usr/local/bin is in your PATH
|
||||||
environment variable.
|
environment variable since that is where the new python and pythonw
|
||||||
|
commands will be located.
|
||||||
|
|
||||||
|
|
||||||
2. In a wxWindows CVS tree make a build directory.
|
2. In a wxWindows CVS tree make a build directory. (You can also use
|
||||||
|
a CVS snapshot located in http://wxwindows.org/snapshots/ or the
|
||||||
|
released wxPythonSrc-*.tr.gz archive.)
|
||||||
|
|
||||||
cd ~/proj/wxWindows # or wherever you put it
|
cd ~/proj/wxWindows # or wherever you put it
|
||||||
mkdir build
|
mkdir build
|
||||||
@@ -69,7 +44,14 @@ get things from various CVS repositories as needed.
|
|||||||
5. Build and install wxPython.
|
5. Build and install wxPython.
|
||||||
|
|
||||||
cd ../wxPython
|
cd ../wxPython
|
||||||
python setup.py IN_CVS_TREE=1 build install
|
python setup.py build install
|
||||||
|
|
||||||
|
If you would like to install to someplace besides the Python
|
||||||
|
site-packages directory (such as to your home directory) then you
|
||||||
|
can add "--root=<path>" after the "install" command. To use
|
||||||
|
wxPython like this you'll need to ensure that the directory
|
||||||
|
containing wxPyrthon is contained in in the PYTHONPATH environment
|
||||||
|
variable.
|
||||||
|
|
||||||
6. Test. Just navigate in the Finder to the demo directory and double
|
6. Test. Just navigate in the Finder to the demo directory and double
|
||||||
click demo.py, or simple.py, or whatever you want to run. Or from
|
click demo.py, or simple.py, or whatever you want to run. Or from
|
||||||
|
@@ -1,23 +1,27 @@
|
|||||||
Building wxPython on Unix or Unix-like Systems
|
Building wxPython on Unix or Unix-like Systems
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
The basic steps for building wxPython for Unix or Unix-like systems
|
NOTE: You should probably look at the ../ README.1st.txt file for
|
||||||
are:
|
directions for how to build wxPython the "new way." This files
|
||||||
|
describes the "old way" to build on unix-like systems. The difference
|
||||||
|
is very simple: The new way uses a private copy of wxGTK while the
|
||||||
|
old way uses either an existing wxGTK that may be installed and used
|
||||||
|
by other apps, or you can build a wxGTK that will be accissible by
|
||||||
|
other apps.
|
||||||
|
|
||||||
1. Compile and/or install glib and gtk+
|
|
||||||
2. Compile and/or install wxGTK
|
|
||||||
3. Compile and install wxPython
|
|
||||||
|
|
||||||
We'll go into more detail of each of these steps below, but first a
|
NOTE 2: I use a tool called SWIG (http://www.swig.org) to help
|
||||||
few bits of background information on tools.
|
generate the C++ sources used in the wxPython extension module.
|
||||||
|
However you don't need to have SWIG unless you want to modify the *.i
|
||||||
|
files. I've made several modifications to and older version of SWIG
|
||||||
|
that are specific to wxPython's needs and so the modified sources are
|
||||||
|
included in the wx CVS at .../wxPython/wxSWIG. But because of the
|
||||||
|
size and since most people won't need it my SWIG is not included in
|
||||||
|
the wxPythonSrc tarball. You'll need to get it from CVS or a CVS
|
||||||
|
snapshot.
|
||||||
|
|
||||||
I use a tool called SWIG (http://www.swig.org) to help generate the
|
If you need to modify the *.i files for wxPython then you will need to
|
||||||
C++ sources used in the wxPython extension module. However you don't
|
build wxswig. Change to the .../wxPython/wxSWIG directory and run:
|
||||||
need to have SWIG unless you want to modify the *.i files. I've made
|
|
||||||
several modifications to SWIG specific to wxPython's needs and so the
|
|
||||||
modified sources are included in the wx CVS at .../wxPython/wxSWIG.
|
|
||||||
If you need to modify the *.i files for wxPython then change to this
|
|
||||||
directory and run:
|
|
||||||
|
|
||||||
configure
|
configure
|
||||||
make
|
make
|
||||||
@@ -46,29 +50,13 @@ A. First of all, check and see if you've already got glib/gtk+ on your
|
|||||||
|
|
||||||
gtk-config --version
|
gtk-config --version
|
||||||
|
|
||||||
If you have version 1.2.5 or better then you're all set. You can
|
If you have version 1.2.7 or better then you're all set. Otherwise
|
||||||
skip to step #2.
|
either get the pacakges for your unix distribution and install them
|
||||||
|
or get the sources from www.gtk.org and build and install them.
|
||||||
|
|
||||||
B. If your system has a binary package mechanism, (RPMs, debs,
|
The best version to get is the latest 1.2.x release as the
|
||||||
whatever...) check and see if binaries for glib abd gtk+ are
|
wxWindows support for GTK 2.x is still beta-level. (Most tings
|
||||||
available. Be sure to get the runtime library package as well as
|
work great though, and it looks real nice.)
|
||||||
the development package, if they are separate. Install them with
|
|
||||||
your package tool, and skip to step #2.
|
|
||||||
|
|
||||||
C. If all else fails, you can get the source code for glib and gtk+ at
|
|
||||||
http://www.gtk.org/. Fetch the latest of each in the 1.2.x
|
|
||||||
series. Compile and install each of them like this:
|
|
||||||
|
|
||||||
gzip -d [package].tar.gz | tar xvf -
|
|
||||||
cd [package]
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
|
|
||||||
The last step will probably have to be done as root. Also, if your
|
|
||||||
system needs anything done to update the dynamic loader for shared
|
|
||||||
libraries, (such as running ldconfig on Linux) then do it after
|
|
||||||
each library is installed.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -77,30 +65,40 @@ C. If all else fails, you can get the source code for glib and gtk+ at
|
|||||||
|
|
||||||
A. You can find the sources and RPMs for wxGTK at
|
A. You can find the sources and RPMs for wxGTK at
|
||||||
http://wxwindows.org/, just follow the download links from the
|
http://wxwindows.org/, just follow the download links from the
|
||||||
nevigation panel. You can also check out a current snapshot of the
|
navigation panel.
|
||||||
sources from the CVS server. (Some information about annonymous
|
|
||||||
CVS access is at http://wxwindows.org/cvs.htm.) The advantage of
|
Source code for wxGTK is now included with the wxPythonSrc tarball,
|
||||||
using CVS is that you can easily update as soon as the developers
|
and is the recommended way to get released wxGTK source code if you
|
||||||
check in new sources or fixes. The advantage of using a released
|
plan on building both.
|
||||||
version is that it usually has had more thorough testing done. You
|
|
||||||
can decide which method is best for you.
|
You can also check out a current snapshot of the sources from the
|
||||||
|
CVS server. (Some information about annonymous CVS access is at
|
||||||
|
http://wxwindows.org/cvs.htm.) The advantage of using CVS is that
|
||||||
|
you can easily update as soon as the developers check in new
|
||||||
|
sources or fixes. The advantage of using a released version is
|
||||||
|
that it usually has had more thorough testing done. You can decide
|
||||||
|
which method is best for you.
|
||||||
|
|
||||||
|
|
||||||
B. You'll usually want to use a version of wxGTK that has the same
|
B. You'll usually want to use a version of wxGTK that has the same
|
||||||
version number as the wxPython sources you are using. (Another
|
version number as the wxPython sources you are using. (Another
|
||||||
advantage of using CVS is that you'll get both at the same time.)
|
advantage of using wxPythonSrc or CVS is that you'll get both at
|
||||||
|
the same time.)
|
||||||
|
|
||||||
|
|
||||||
C. If using the RPMs be sure to get both the wxGTK and wxGTK-devel
|
C. If using the RPMs be sure to get both the wxGTK and wxGTK-devel
|
||||||
RPMs (at a minimum) and then install them as root.
|
RPMs (at a minimum) and then install them as root.
|
||||||
|
|
||||||
rpm -Uhv wxGTK-2.2.2-0.i386.rpm wxGTK-devel-2.2.2-0.i386.rpm
|
rpm -Uhv wxGTK-2.2.2-0.i386.rpm wxGTK-devel-2.2.2-0.i386.rpm
|
||||||
|
|
||||||
|
|
||||||
D. If using the sources (either from the tarball or from CVS) then
|
D. If using the sources (either from the tarball or from CVS) then
|
||||||
configure it like this:
|
configure it like this:
|
||||||
|
|
||||||
cd wxWindows # or whatever your top-level directory is called
|
cd wxWindows # or whatever your top-level directory is called
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
../configure --with-gtk
|
../configure --with-gtk --enable-geometry
|
||||||
|
|
||||||
There are gobs and gobs of options for the configure script, run
|
There are gobs and gobs of options for the configure script, run
|
||||||
../configure --help to see them all. I'll describe some that I find
|
../configure --help to see them all. I'll describe some that I find
|
||||||
@@ -118,32 +116,9 @@ D. If using the sources (either from the tarball or from CVS) then
|
|||||||
special debugging code in wxWindows by defining the __WXDEBUG__
|
special debugging code in wxWindows by defining the __WXDEBUG__
|
||||||
macro. You'll get some extra asserts, failure logging, etc.
|
macro. You'll get some extra asserts, failure logging, etc.
|
||||||
|
|
||||||
To make a static library and not make a shared library, use the
|
If you are using GTK 2.x then you'll want to add --enable-gtk2 and
|
||||||
--disable-shared and --enable-static flags.
|
probably also --enable-unicode.
|
||||||
|
|
||||||
NOTE: There is a potential type mismatch between Python and wxGTK.
|
|
||||||
This happens if Python defines some flags that turn on 64-bit file
|
|
||||||
offset support and wxGTK does not. This causes some basic types,
|
|
||||||
like off_t, to be typedef'd differently causing the C++ method
|
|
||||||
signatures to be incompatible and giving link errors at runtime.
|
|
||||||
If you get errors upon running a wxPython script that looks
|
|
||||||
something like this:
|
|
||||||
|
|
||||||
SeekI_13wxInputStream10wxSeekMode: referenced symbol not found
|
|
||||||
|
|
||||||
then that is probably the issue. This can be fixed in the current
|
|
||||||
code by predefining these flags before wxGTK's configure is run,
|
|
||||||
for example:
|
|
||||||
|
|
||||||
export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_LARGEFILE_SUPPORT"
|
|
||||||
export CXXFLAGS=$CFLAGS
|
|
||||||
../configure --with-gtk --with-opengl --enable-debug
|
|
||||||
|
|
||||||
In the 2.3.3 final release there will be a real configure flag for
|
|
||||||
it, and it should be enabled by default. You will be able to use
|
|
||||||
--enable-largefile or --disable-largefile to control it. If you
|
|
||||||
still get this or a similar error with 2.3.3 then try disabling
|
|
||||||
largefile support in wxGTK.
|
|
||||||
|
|
||||||
E. Now just compile and install. You need to use GNU make, so if your
|
E. Now just compile and install. You need to use GNU make, so if your
|
||||||
system has something else get GNU make and build and install it and
|
system has something else get GNU make and build and install it and
|
||||||
@@ -156,6 +131,7 @@ E. Now just compile and install. You need to use GNU make, so if your
|
|||||||
system needs anything done to update the dynamic loader for shared
|
system needs anything done to update the dynamic loader for shared
|
||||||
libraries, (such as running ldconfig on Linux) then do it now.
|
libraries, (such as running ldconfig on Linux) then do it now.
|
||||||
|
|
||||||
|
|
||||||
F. You can test your build by changing to one of the directories under
|
F. You can test your build by changing to one of the directories under
|
||||||
build/samples or build/demos, running make and then running the
|
build/samples or build/demos, running make and then running the
|
||||||
executable that is built.
|
executable that is built.
|
||||||
@@ -167,33 +143,24 @@ F. You can test your build by changing to one of the directories under
|
|||||||
|
|
||||||
A. You have the same options (and same advantages/disadvantages) for
|
A. You have the same options (and same advantages/disadvantages) for
|
||||||
getting the wxPython source, either a released snapshot or from
|
getting the wxPython source, either a released snapshot or from
|
||||||
CVS. The released version file is named wxPython-[version].tar.gz
|
CVS. The released version file is named wxPythonSrc-[version].tar.gz
|
||||||
and is available at http://wxpython.org/download.php. If you want
|
and is available at http://wxpython.org/download.php. If you want
|
||||||
to use CVS you'll find wxPython in the wxWindows CVS tree (see
|
to use CVS you'll find wxPython in the wxWindows CVS tree (see
|
||||||
above) in the wxWindows/wxPython directory.
|
above) in the wxWindows/wxPython directory.
|
||||||
|
|
||||||
B. As mentioned previouslly, wxPython is built with the standard
|
|
||||||
Python Distutils tool. If you are using Python 2.0 or later you
|
B. wxPython is built with the standard Python Distutils tool and
|
||||||
are all set, otherwise you need to download and install Distutils
|
currently includes it's own snapshot of the latest version of
|
||||||
1.0 from http://www.python.org/sigs/distutils-sig/.
|
distutils which can also be used with previous versions of Python
|
||||||
|
|
||||||
On Unix systems Distutils figures out what commands and flags to
|
On Unix systems Distutils figures out what commands and flags to
|
||||||
use for the compiler and linker by looking in the Makefile that was
|
use for the compiler and linker by looking in the Makefile that was
|
||||||
used to build Python itself. Most of the time this works okay. If
|
used to build Python itself. Most of the time this works okay. If
|
||||||
it doesn't, there doesn't seem to be a way to override the values
|
it doesn't, there doesn't seem to be a way to override the values
|
||||||
that Distutils uses without hacking either Distutils itself, or
|
that Distutils uses without hacking either Distutils itself, or
|
||||||
Python's Makefile. (Complain to the distutils-sig about this
|
Python's Makefile. (NOTE: This has been changed with the
|
||||||
please.) For example, on a Solaris system I had to edit
|
distutilsincluded with Python 2.3 but I havn't yet looked into how
|
||||||
/usr/local/lib/python1.5/config/Makefile and replace
|
best to utilize this in wxPython...)
|
||||||
|
|
||||||
LDSHARED=ld -G
|
|
||||||
|
|
||||||
with
|
|
||||||
|
|
||||||
LDSHARED=gcc -G
|
|
||||||
|
|
||||||
This particular problem has been fixed in Python 1.6 and beyond,
|
|
||||||
but there may be similar issues on other platforms.
|
|
||||||
|
|
||||||
While we're on the subject of how Python was built... Since
|
While we're on the subject of how Python was built... Since
|
||||||
wxPython is a C++ extension some platforms and/or compilers will
|
wxPython is a C++ extension some platforms and/or compilers will
|
||||||
@@ -215,13 +182,14 @@ B. As mentioned previouslly, wxPython is built with the standard
|
|||||||
make install
|
make install
|
||||||
|
|
||||||
I recently built Python 2.1.3 and Python 2.2.1 on Solaris and did
|
I recently built Python 2.1.3 and Python 2.2.1 on Solaris and did
|
||||||
not have to resort to this workaround so apparently thigns are
|
not have to resort to this workaround so apparently things are
|
||||||
getting better there. I will leave this note here though in case
|
getting better there. I will leave this note here though in case
|
||||||
there are similar issues elsewhere. However I did run into a
|
there are similar issues elsewhere. However I did run into a
|
||||||
Python build issue that affects the wxPython build when attempting
|
Python build issue that affects the wxPython build when attempting
|
||||||
to use SunCC instead of GNU gcc. See the note below titled
|
to use SunCC instead of GNU gcc. See the note below titled
|
||||||
"Building with non-GNU compilers" if you are interested.
|
"Building with non-GNU compilers" if you are interested.
|
||||||
|
|
||||||
|
|
||||||
C. Change to the root wxPython directory and look at the setup.py
|
C. Change to the root wxPython directory and look at the setup.py
|
||||||
file. This is the script that configures and defines all the
|
file. This is the script that configures and defines all the
|
||||||
information that Distutils needs to build wxPython. There are some
|
information that Distutils needs to build wxPython. There are some
|
||||||
@@ -248,18 +216,7 @@ C. Change to the root wxPython directory and look at the setup.py
|
|||||||
will be executed to regenerate the wrapper C++
|
will be executed to regenerate the wrapper C++
|
||||||
and shadow python files.
|
and shadow python files.
|
||||||
|
|
||||||
IN_CVS_TREE If you are using the CVS version of the
|
etc.
|
||||||
wxWindows and wxPython sources then you will
|
|
||||||
need to set this flag to non-zero. This is
|
|
||||||
needed because some source files from the
|
|
||||||
wxWindows tree are copied to be under the
|
|
||||||
wxPython tree in order to keep Distutils happy.
|
|
||||||
With this flag set then setup.py will
|
|
||||||
automatically keep these copied sources up to
|
|
||||||
date if the original version is ever updated.
|
|
||||||
If you are using the tar.gz version of the
|
|
||||||
Python sources then these copied sources are
|
|
||||||
already present in your source tree.
|
|
||||||
|
|
||||||
|
|
||||||
D. To build and install wxPython you simply need to execute the
|
D. To build and install wxPython you simply need to execute the
|
||||||
@@ -269,15 +226,32 @@ D. To build and install wxPython you simply need to execute the
|
|||||||
site-packages directory you may need to be root to run the install
|
site-packages directory you may need to be root to run the install
|
||||||
command.
|
command.
|
||||||
|
|
||||||
python setup.py build
|
python setup.py build install
|
||||||
python setup.py install
|
|
||||||
|
If you need to change any of the build flags that can also be done
|
||||||
|
on the setup.py command line, like this:
|
||||||
|
|
||||||
|
python setup.py BUILD_GLCANVAS=0 build install
|
||||||
|
|
||||||
|
If you are using GTK 2.x then you'll want to add these flags:
|
||||||
|
|
||||||
|
python setup.py WXPORT=gtk2 UNICODE=1 build install
|
||||||
|
|
||||||
|
If you would like to install to someplace besides the Python
|
||||||
|
site-packages directory (such as to your home directory) then you
|
||||||
|
can add "--root=<path>" after the "install" command. To use
|
||||||
|
wxPython like this you'll need to ensure that the directory
|
||||||
|
containing wxPyrthon is contained in in the PYTHONPATH environment
|
||||||
|
variable.
|
||||||
|
|
||||||
|
|
||||||
E. At this point you should be able to change into the wxPython/demo
|
E. At this point you should be able to change into the wxPython/demo
|
||||||
directory and run the demo:
|
directory and run the demo:
|
||||||
|
|
||||||
python demo.py
|
python demo.py
|
||||||
|
|
||||||
F. If you would like to make a test build that doesn't overwrite the
|
|
||||||
|
F. If you would like to make a test build that doesn't overwrite any
|
||||||
installed version of wxPython you can do so with this command
|
installed version of wxPython you can do so with this command
|
||||||
instead of the install command above:
|
instead of the install command above:
|
||||||
|
|
||||||
@@ -360,5 +334,7 @@ before running configure, like this in bash:
|
|||||||
After making and installing Python with this configuration you should
|
After making and installing Python with this configuration you should
|
||||||
be able to build wxPython as described in the steps above.
|
be able to build wxPython as described in the steps above.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
robin@alldunn.com
|
robin@alldunn.com
|
||||||
|
@@ -8,10 +8,9 @@ your sources from and what your desired end result is, there are
|
|||||||
several permutations of those steps. At a high level the basic steps
|
several permutations of those steps. At a high level the basic steps
|
||||||
are:
|
are:
|
||||||
|
|
||||||
1. Get the wxWindows sources
|
1. Get the sources
|
||||||
2. Build the wxWindows DLL
|
2. Build the wxWindows DLL
|
||||||
3. Get the wxPython sources
|
3. Build and Install wxPython
|
||||||
4. Build and Install wxPython
|
|
||||||
|
|
||||||
We'll go into more detail of each of these steps below, but first a
|
We'll go into more detail of each of these steps below, but first a
|
||||||
few bits of background information on tools.
|
few bits of background information on tools.
|
||||||
@@ -21,6 +20,10 @@ C++ sources used in the wxPython extension module. However you don't
|
|||||||
need to have SWIG unless you want to modify the *.i files. I've made
|
need to have SWIG unless you want to modify the *.i files. I've made
|
||||||
several modifications to SWIG specific to wxPython's needs and so the
|
several modifications to SWIG specific to wxPython's needs and so the
|
||||||
modified sources are included in the wx CVS at.../wxPython/wxSWIG.
|
modified sources are included in the wx CVS at.../wxPython/wxSWIG.
|
||||||
|
But because of the size and since most people won't need it my SWIG is
|
||||||
|
not included in the wxPythonSrc tarball. You'll need to get it from
|
||||||
|
CVS or a CVS snapshot.
|
||||||
|
|
||||||
If you need to modify the *.i files for wxPython then change to this
|
If you need to modify the *.i files for wxPython then change to this
|
||||||
directory and run:
|
directory and run:
|
||||||
|
|
||||||
@@ -42,6 +45,7 @@ If anybody wants to try it I'll take any required patches for the
|
|||||||
setup script and for these instructions.
|
setup script and for these instructions.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UNICODE
|
UNICODE
|
||||||
-------
|
-------
|
||||||
|
|
||||||
@@ -69,44 +73,44 @@ And now on to the fun stuff...
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
1. Get the wxWindows sources
|
1. Get the sources
|
||||||
----------------------------
|
------------------
|
||||||
|
|
||||||
A. There are a few possible ways to get sources for wxWindows. You
|
A. You can either use a tarball with the released version of the
|
||||||
can download a released version from http://wxwindows.org/ or you
|
source code for wxWindows/wxPython, or you can get current
|
||||||
can get current development sources from the CVS server. (Some
|
development sources from the CVS repository. (Some information
|
||||||
information about annonymous CVS access is at the
|
about annonymous CVS access is at the http://wxwindows.org/cvs.htm
|
||||||
http://wxwindows.org/cvs.htm site.) The advantage of using CVS is
|
site.) The advantage of using CVS is that you can easily update as
|
||||||
that you can easily update as soon as the developers check in new
|
soon as the developers check in new sources or fixes. The
|
||||||
sources or fixes. The advantage of using a released version is
|
advantage of using a released version is that it usually has had
|
||||||
that it usually has had more thorough testing done. You can decide
|
more thorough testing done. You can decide which method is best
|
||||||
which method is best for you.
|
for you. The released version file is named
|
||||||
|
wxPythonSrc-[version].tar.gz and is available from the wxPython
|
||||||
|
website at http://wxpython.org/download.php. You can use WinZip to
|
||||||
|
unpack it if you don't have tar and gzip.
|
||||||
|
|
||||||
B. You'll usually want to use wxWindows sources that have the same
|
|
||||||
version number as the wxPython sources you are using. (Another
|
|
||||||
advantage of using CVS is that you'll get both at the same time.)
|
|
||||||
|
|
||||||
C. Once you get the sources be sure to put them in a path without a
|
B. Once you get the sources be sure to put them in a path without a
|
||||||
space in it (i.e., NOT c:\Program Files\wx) and set an environment
|
space in it (i.e., NOT c:\Program Files\wx) and set an environment
|
||||||
variable named WXWIN to this directory. For example:
|
variable named WXWIN to the top level directory. For example:
|
||||||
|
|
||||||
mkdir \wx2
|
set WXWIN=c:\wx\wxPythonSrc-2.4.0.4
|
||||||
cd \wx2
|
|
||||||
unzip wxMSW-2.2.2.zip
|
|
||||||
set WXWIN=c:\wx2
|
|
||||||
|
|
||||||
You'll probably want to add that last line to your autoexec.bat or
|
You'll probably want to add that line to your autoexec.bat or
|
||||||
System Properties depending on the type of system you are on.
|
System Properties depending on the type of system you are on.
|
||||||
|
|
||||||
D. Change to the wx2\include\wx\msw directory and copy setup0.h to
|
|
||||||
|
C. Change to the %WXWIN%\include\wx\msw directory and copy setup0.h to
|
||||||
setup.h and then edit setup.h. This is how you control which parts
|
setup.h and then edit setup.h. This is how you control which parts
|
||||||
of wxWindows are compiled into or left out of the build, simply by
|
of wxWindows are compiled into or left out of the build, simply by
|
||||||
turning options on or off. I have the following differences from
|
turning options on or off. I have the following differences from
|
||||||
the default setup0.h in my setup.h, but you can experiment with
|
the default setup0.h in my setup.h, but you can experiment with
|
||||||
other settings if you like:
|
other settings if you like:
|
||||||
|
|
||||||
|
|
||||||
WXWIN_COMPATIBILITY_2_2 0
|
WXWIN_COMPATIBILITY_2_2 0
|
||||||
wxDIALOG_UNIT_COMPATIBILITY 0
|
wxDIALOG_UNIT_COMPATIBILITY 0
|
||||||
|
wxUSE_DEBUG_CONTEXT 1
|
||||||
wxUSE_MEMORY_TRACING 1
|
wxUSE_MEMORY_TRACING 1
|
||||||
wxUSE_CMDLINE_PARSER 0
|
wxUSE_CMDLINE_PARSER 0
|
||||||
wxUSE_FSVOLUME 0
|
wxUSE_FSVOLUME 0
|
||||||
@@ -134,6 +138,7 @@ A. Although MSVC project files are provided I always use the makefiles
|
|||||||
Python, (and I make sure they stay that way.) You would have to
|
Python, (and I make sure they stay that way.) You would have to
|
||||||
edit the project files a bit to make it work otherwise.
|
edit the project files a bit to make it work otherwise.
|
||||||
|
|
||||||
|
|
||||||
B. There are three different types of wxWindows DLLs that can be
|
B. There are three different types of wxWindows DLLs that can be
|
||||||
produced by the VC makefile simply by providing a flag on the nmake
|
produced by the VC makefile simply by providing a flag on the nmake
|
||||||
command-line, I call the three types DEBUG, FINAL, and HYBRID.
|
command-line, I call the three types DEBUG, FINAL, and HYBRID.
|
||||||
@@ -157,43 +162,41 @@ B. There are three different types of wxWindows DLLs that can be
|
|||||||
wxmsw[version].dll. This DLL is compiled with optimizations
|
wxmsw[version].dll. This DLL is compiled with optimizations
|
||||||
turned on and without debugging information and without
|
turned on and without debugging information and without
|
||||||
__WXDEBUG__. The /MD flag is used which means that you
|
__WXDEBUG__. The /MD flag is used which means that you
|
||||||
can use this version with the standard python.exe. This
|
can use this version with the standard python.exe.
|
||||||
is the version that I use when making the binary installer
|
|
||||||
for win32.
|
|
||||||
|
|
||||||
HYBRID Specified with "FINAL=hybrid" and produces a DLL named
|
HYBRID Specified with "FINAL=hybrid" and produces a DLL named
|
||||||
wxmsw[version]h.dll. This DLL is almost the same as the
|
wxmsw[version]h.dll. This DLL is almost the same as the
|
||||||
DEBUG version except the /MD flag is used which means that
|
FINAL version except the __WXDEBUG__ is used which means
|
||||||
you can use the standard python.exe but you still get the
|
that you will get extra runtime assertions and validations
|
||||||
debugging info and the __WXDEBUG__ code enabled. With the
|
from wxWindows. If any of these fail then they are turned
|
||||||
debugger you can trace through the the code for the
|
into a Python exception that you can catch and deal with
|
||||||
wxPython extension and the wxWindows DLL, but not the
|
in your code. This is the version that I use when making
|
||||||
Python interpreter. You might use this version when you
|
the binary installer for win32.
|
||||||
want to deploy a wxPython app with the __WXDEBUG__ code
|
|
||||||
enabled. I use this mode most of the time during
|
|
||||||
development simply because it's easier than having to
|
|
||||||
remember to type python_d all the time.
|
|
||||||
|
|
||||||
Since different DLL names and object file directories are used you
|
Since different DLL names and object file directories are used you
|
||||||
can build all three types if you like.
|
can build all three types if you like.
|
||||||
|
|
||||||
C. Change to the wx2\src\msw directory and type the following command,
|
|
||||||
|
C. Change to the %WXWIN%\src\msw directory and type the following command,
|
||||||
using the value for FINAL that you want:
|
using the value for FINAL that you want:
|
||||||
|
|
||||||
nmake -f makefile.vc dll pch FINAL=hybrid
|
nmake -f makefile.vc dll FINAL=hybrid
|
||||||
|
|
||||||
Your machine will then crunch away for possibly a long time,
|
Your machine will then crunch away for possibly a long time,
|
||||||
depending on your hardware, and when it's done you should have a
|
depending on your hardware, and when it's done you should have a
|
||||||
DLL and some library files in \wx2\lib.
|
DLL and some library files in %WXWIN%\lib.
|
||||||
|
|
||||||
D. You'll either need to add \wx2\lib to the PATH or copy the DLL file
|
|
||||||
to a directory already on the PATH so the DLL can be found at
|
D. You'll either need to add %WXWIN%\lib to the PATH or copy the DLL
|
||||||
|
file to a directory already on the PATH so the DLL can be found at
|
||||||
runtime. Another option is to copy the DLL to the directory that
|
runtime. Another option is to copy the DLL to the directory that
|
||||||
the wxPython pacakge is installed to, for example,
|
the wxPython pacakge is installed to, for example,
|
||||||
c:\Python22\lib\site-packages\wxPython.
|
c:\Python22\lib\site-packages\wxPython.
|
||||||
|
|
||||||
|
|
||||||
E. You can test your build by changing to one of the directories under
|
E. You can test your build by changing to one of the directories under
|
||||||
\wx2\samples or \wx2\demos and typing (using the right FINAL flag):
|
%WXWIN%\samples or %WXWIN\demos and typing (using the right FINAL flag):
|
||||||
|
|
||||||
nmake -f makefile.vc FINAL=hybrid WXUSINGDLL=1
|
nmake -f makefile.vc FINAL=hybrid WXUSINGDLL=1
|
||||||
|
|
||||||
@@ -201,20 +204,8 @@ E. You can test your build by changing to one of the directories under
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
3. Get the wxPython sources
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
A. You have the same options (and same advantages/disadvantages) for
|
3. Build and Install wxPython
|
||||||
getting the wxPython source, either a released snapshot or from
|
|
||||||
CVS. The released version file is named wxPython-[version].tar.gz
|
|
||||||
and is available at http://wxpython.org/download.php. You can use
|
|
||||||
WinZip to unpack it if you don't have tar and gzip. If you want to
|
|
||||||
use CVS you'll find wxPython in the wxWindows CVS tree (see above)
|
|
||||||
in the wxWindows/wxPython directory.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4. Build and Install wxPython
|
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
A. As mentioned previouslly, wxPython is built with the standard
|
A. As mentioned previouslly, wxPython is built with the standard
|
||||||
@@ -222,6 +213,7 @@ A. As mentioned previouslly, wxPython is built with the standard
|
|||||||
are all set, otherwise you need to download and install Distutils
|
are all set, otherwise you need to download and install Distutils
|
||||||
1.0 from http://www.python.org/sigs/distutils-sig/.
|
1.0 from http://www.python.org/sigs/distutils-sig/.
|
||||||
|
|
||||||
|
|
||||||
B. Change to the root wxPython directory and look at the setup.py
|
B. Change to the root wxPython directory and look at the setup.py
|
||||||
file. This is the script that configures and defines all the
|
file. This is the script that configures and defines all the
|
||||||
information that Distutils needs to build wxPython. There are some
|
information that Distutils needs to build wxPython. There are some
|
||||||
@@ -246,18 +238,7 @@ B. Change to the root wxPython directory and look at the setup.py
|
|||||||
will be executed to regenerate the wrapper C++
|
will be executed to regenerate the wrapper C++
|
||||||
and shadow python files.
|
and shadow python files.
|
||||||
|
|
||||||
IN_CVS_TREE If you are using the CVS version of the
|
etc.
|
||||||
wxWindows and wxPython sources then you will
|
|
||||||
need to set this flag to non-zero. This is
|
|
||||||
needed because some source files from the
|
|
||||||
wxWindows tree are copied to be under the
|
|
||||||
wxPython tree in order to keep Distutils happy.
|
|
||||||
With this flag set then setup.py will
|
|
||||||
automatically keep these copied sources up to
|
|
||||||
date if the original version is ever updated.
|
|
||||||
If you are using the tar.gz version of the
|
|
||||||
Python sources then these copied sources are
|
|
||||||
already present in your source tree.
|
|
||||||
|
|
||||||
|
|
||||||
C. To build and install wxPython you simply need to execute the
|
C. To build and install wxPython you simply need to execute the
|
||||||
@@ -280,12 +261,20 @@ C. To build and install wxPython you simply need to execute the
|
|||||||
commented out. Just search for "GX-" and uncomment it so it is put
|
commented out. Just search for "GX-" and uncomment it so it is put
|
||||||
into the cflags list.
|
into the cflags list.
|
||||||
|
|
||||||
|
If you would like to install to someplace besides the Python
|
||||||
|
site-packages directory (such as to your home directory) then you
|
||||||
|
can add "--root=<path>" after the "install" command. To use
|
||||||
|
wxPython like this you'll need to ensure that the directory
|
||||||
|
containing wxPyrthon is contained in in the PYTHONPATH environment
|
||||||
|
variable.
|
||||||
|
|
||||||
|
|
||||||
D. At this point you should be able to change into the wxPython\demo
|
D. At this point you should be able to change into the wxPython\demo
|
||||||
directory and run the demo:
|
directory and run the demo:
|
||||||
|
|
||||||
python demo.py
|
python demo.py
|
||||||
|
|
||||||
|
|
||||||
E. If you would like to make a test build that doesn't overwrite the
|
E. If you would like to make a test build that doesn't overwrite the
|
||||||
installed version of wxPython you can do so with one of these
|
installed version of wxPython you can do so with one of these
|
||||||
commands instead of the install command above:
|
commands instead of the install command above:
|
||||||
@@ -301,8 +290,8 @@ E. If you would like to make a test build that doesn't overwrite the
|
|||||||
To run using this test version just add the base wxPython source
|
To run using this test version just add the base wxPython source
|
||||||
directory to the PYTHONPATH:
|
directory to the PYTHONPATH:
|
||||||
|
|
||||||
set PYTHONPATH=c:\wx2\wxPython
|
set PYTHONPATH=%WXDIR%\wxPython
|
||||||
cd c:\wx2\wxPython\demo
|
cd %WXDIR%\wxPython\demo
|
||||||
python demo.py
|
python demo.py
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,8 +2,239 @@ CHANGES.txt for wxPython
|
|||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
2.3.3
|
?????
|
||||||
-----
|
-------
|
||||||
|
|
||||||
|
Added wxScrolledPanel from Wil Sadkin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.4.0.7
|
||||||
|
-------
|
||||||
|
Gave up on generating a warning upon the use of the old true/false or
|
||||||
|
TRUE/FALSE values.
|
||||||
|
|
||||||
|
Fixed wxGenericTreeCtrl (used on wxGTK and wxMac for wxTreeCtrl) so
|
||||||
|
that it can successfully handle lots of nodes instead of overflowing
|
||||||
|
when the virtual height of the widget overflowed a 16-bit value.
|
||||||
|
|
||||||
|
Fixed the typemap that converts strings to wxColours to also accept
|
||||||
|
unicode.
|
||||||
|
|
||||||
|
Fixed problem where the wrong class name could sometimes be used for
|
||||||
|
OOR.
|
||||||
|
|
||||||
|
Fixed an interpreter lock problem in the __eq__ and __ne__ methods in
|
||||||
|
wxSize and etc.
|
||||||
|
|
||||||
|
Updated PyCrust to version 0.9
|
||||||
|
|
||||||
|
Instead of always logging C++ assertions, added wxPYAPP_ASSERT_LOG
|
||||||
|
flag to turn it on. In most cases turning it into an exception (the
|
||||||
|
default behavior) is enough. See below in the 2.3.4.1 notes for more
|
||||||
|
details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.4.0.6 (a.k.a. the I'm so stupid release)
|
||||||
|
-------
|
||||||
|
The new deprecation class for the old true/false symbols can now be
|
||||||
|
returned from OnInit. And I promise to be sure I am testing what I
|
||||||
|
think I am testing in the future...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.4.0.5 (a.k.a. the blame it on Kevin release)
|
||||||
|
-------
|
||||||
|
A few little but annoying bug fixes.
|
||||||
|
|
||||||
|
Updated pycolourchooser.
|
||||||
|
|
||||||
|
Updated to 0.9b of PyCrust.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.4.0.4
|
||||||
|
-------
|
||||||
|
Added missing wxRect methods
|
||||||
|
|
||||||
|
Add OOR support for wxApp objects too.
|
||||||
|
|
||||||
|
Added wxCursorFromImage, which works on wxMSW and wxGTK so far.
|
||||||
|
|
||||||
|
All platforms now send EVT_DESTROY_WINDOW. Be warned that at the time
|
||||||
|
the event is sent the window is in the process of being deconstructed,
|
||||||
|
and so calling some (most?) methods of the window itself may cause
|
||||||
|
problems.
|
||||||
|
|
||||||
|
Fixed SF Bug #689481, a method in the OGL wrappers was using the wrong
|
||||||
|
return type.
|
||||||
|
|
||||||
|
Fixed SF Bug #689958, an endless loop in printout.py.
|
||||||
|
|
||||||
|
Added EVT_WINDOW_CREATE_ID and EVT_WINDOW_DESTROY_ID so these events
|
||||||
|
can be associated with a specific window ID and more easily caught by
|
||||||
|
the parent window.
|
||||||
|
|
||||||
|
Fixed copy-paste error in wxListCtrl.GetFirstSelected.
|
||||||
|
|
||||||
|
Added missing Init method (and an overloading wrapper) to wxLocale
|
||||||
|
wrapper.
|
||||||
|
|
||||||
|
Added a wxBitmap.SetMaskColour convenience method.
|
||||||
|
|
||||||
|
Changed how the dynamic event tables (used for all Python wx classes,
|
||||||
|
C++ wx classes typically use static event tables) are searched such
|
||||||
|
that they behave from a Python perspective more like the static tables
|
||||||
|
in C++. Namely that if there are identical event bindings in a base
|
||||||
|
Python class and a derived Python class that the one in the derived
|
||||||
|
class will be found first and that if Skip is called that the one in
|
||||||
|
the base class will still be found instead of skipping directly to the
|
||||||
|
static stable in the C++ class.
|
||||||
|
|
||||||
|
Switched to using True/False in the wxPython lib and demo instead of
|
||||||
|
true/false or TRUE/FALSE to prepare for the new boolean type and
|
||||||
|
constants being added to Python. Added code to wx.py to test for the
|
||||||
|
existence of the new constants and to create suitable values if not
|
||||||
|
present.
|
||||||
|
|
||||||
|
Added some static wxApp functions that help with integration with the
|
||||||
|
Mac UI. They are no-ops on other platforms so it doesn't hurt to
|
||||||
|
always call them. The functions are:
|
||||||
|
|
||||||
|
wxApp_GetMacDefaultEncodingIsPC
|
||||||
|
wxApp_GetMacSupportPCMenuShortcuts
|
||||||
|
wxApp_GetMacAboutMenuItemId
|
||||||
|
wxApp_GetMacPreferencesMenuItemId
|
||||||
|
wxApp_GetMacExitMenuItemId
|
||||||
|
wxApp_GetMacHelpMenuTitleName
|
||||||
|
wxApp_SetMacDefaultEncodingIsPC
|
||||||
|
wxApp_SetMacSupportPCMenuShortcuts
|
||||||
|
wxApp_SetMacAboutMenuItemId
|
||||||
|
wxApp_SetMacPreferencesMenuItemId
|
||||||
|
wxApp_SetMacExitMenuItemId
|
||||||
|
wxApp_SetMacHelpMenuTitleName
|
||||||
|
|
||||||
|
Refactored, enhanced and added capabilities for the DrawXXXList
|
||||||
|
functions, inspired by code from Chris Barker.
|
||||||
|
|
||||||
|
The wxWindows .mo language catalog files are now installed in a
|
||||||
|
subdirectory of the wxPython package dir on MSW since that platform
|
||||||
|
doesn't have a standard place for them.
|
||||||
|
|
||||||
|
Added missing deselect methods for wxGrid.
|
||||||
|
|
||||||
|
Fixed typemaps for wxGridCellCoordsArray.
|
||||||
|
|
||||||
|
Updated to the 0.9a version of PyCrust
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.4.0.2
|
||||||
|
-------
|
||||||
|
Several bug fixes.
|
||||||
|
|
||||||
|
Added wxIntCtrl from Will Sadkin.
|
||||||
|
|
||||||
|
Added wxPyColourChooser by Michael Gilfix.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.4.0.1
|
||||||
|
-------
|
||||||
|
No major new features since 2.3.4.2, mostly bug fixes and minor
|
||||||
|
enhancements.
|
||||||
|
|
||||||
|
Added function wrappers for the common dialogs from Kevin Altis. See
|
||||||
|
wxPython/lib/dialogs.py for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.3.4.2
|
||||||
|
-------
|
||||||
|
Various bug fixes.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.3.4.1
|
||||||
|
-------
|
||||||
|
Updated XRCed and wxTimeCtrl contribs.
|
||||||
|
|
||||||
|
Show a couple new wxGrid features in the demo.
|
||||||
|
|
||||||
|
Several bug fixes in wxWindows.
|
||||||
|
|
||||||
|
Added wxHtmlFilter.
|
||||||
|
|
||||||
|
wxASSERT and related C++ runtime diagnostics are now converted to
|
||||||
|
Python exceptions. When an assert happens a wxPyAssertionError
|
||||||
|
(which derives from AssertionError) exception is created and when
|
||||||
|
control returns back to the Python code that invoked the C++ API it
|
||||||
|
will be raised. The same exception restrictions are in place as
|
||||||
|
before, namely that exceptions can't cross from one Python layer
|
||||||
|
through C++ to another Python layer. That simply means that if you
|
||||||
|
want to catch wxPyAssertionError or any other exception that you need
|
||||||
|
to do it before control returns to C++ at the end of your event
|
||||||
|
handler or callback code. There is some test code in demo/wxButton.py
|
||||||
|
you can use to play with this new feature.
|
||||||
|
|
||||||
|
Added some methods to wxApp (SetAssertMode and GetAssertMode) that let
|
||||||
|
you control how C++ assertions are processed. Valid modes are:
|
||||||
|
wxPYAPP_ASSERT_SUPPRESS, wxPYAPP_ASSERT_EXCEPTION, and
|
||||||
|
wxPYAPP_ASSERT_DIALOG. Using _SUPPRESS will give you behavior like
|
||||||
|
the old "final" builds and the assert will be ignored, _EXCEPTION is
|
||||||
|
the new default described above, and _DIALOG is like the default in
|
||||||
|
2.3.3.1 and prior "hybrid" builds. You can also combine _EXCEPTION
|
||||||
|
and _DIALOG if you wish, although I don't know why you would.
|
||||||
|
|
||||||
|
You can now overload OnInitGui, OnExit and OnAssert in your classes
|
||||||
|
derived from wxApp.
|
||||||
|
|
||||||
|
Added GetSelectedCells, GetSelectionBlockTopLeft,
|
||||||
|
GetSelectionBlockBottomRight, GetSelectedRows, GetSelectedCols nethods
|
||||||
|
to wxGrid.
|
||||||
|
|
||||||
|
Added Python == and != operators for some basic classes
|
||||||
|
|
||||||
|
Fixed the Python wrappers for wxInputStream so they no longer block
|
||||||
|
when reading from a wxProcess on wxGTK. They now work more or less as
|
||||||
|
they did before 2.3.3.1 but the dual meaning of eof() has been
|
||||||
|
removed. There is now a CanRead() method that lets you know if there
|
||||||
|
is data waiting to be read from the pipe.
|
||||||
|
|
||||||
|
Fixed method name clash in wxIEHtmlWin, renamed Refresh to RefreshPage.
|
||||||
|
|
||||||
|
Added Throbber from Cliff Wells to the library and the demo.
|
||||||
|
|
||||||
|
Windows installer prompts to uninstall old version first.
|
||||||
|
|
||||||
|
Added wxPython.lib.evtmgr by Robb Shecter, which is an easier, more
|
||||||
|
"Pythonic" and more OO method of registering handlers for wxWindows
|
||||||
|
events using the Publish/Subscribe pattern.
|
||||||
|
|
||||||
|
Added wxPython.lib.popupctl by Gerrit van Dyk which is a combobox-like
|
||||||
|
gizmo for poping up arbitrary controls. It is currently using
|
||||||
|
wxDialog because of some issues with wxPopupWindow...
|
||||||
|
|
||||||
|
Added wxPython.lib.gridmovers by Gerrit van Dyk which facilitates the
|
||||||
|
dragging of columns and/or rows in a wxGrid.
|
||||||
|
|
||||||
|
Added wxPython.lib.multisash by Gerrit van Dyk which is a nice
|
||||||
|
implementation of allowing the user to split a window any number of
|
||||||
|
times either horizontally or vertically, and to close the split off
|
||||||
|
windows when desired.
|
||||||
|
|
||||||
|
Added helpviewer tool that displays HTML books similarly to how MS
|
||||||
|
HTMLHelp viewer does. Changed how the wxPythonDocs tarball is built
|
||||||
|
and added a script to launch the doc viewer.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2.3.3.1
|
||||||
|
-------
|
||||||
Added wxSplashScreen.
|
Added wxSplashScreen.
|
||||||
|
|
||||||
Added wxGenericDirCtrl.
|
Added wxGenericDirCtrl.
|
||||||
@@ -174,6 +405,9 @@ Added wxXmlResourceHandler which allows you to create custom handlers
|
|||||||
for nonstandard class types in XRC resources. See the demo for an
|
for nonstandard class types in XRC resources. See the demo for an
|
||||||
example.
|
example.
|
||||||
|
|
||||||
|
Added wxPython.lib.mixins.rubberband module from Robb Shecter.
|
||||||
|
|
||||||
|
Added wxTimeCtrl from Will Sadkin.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -205,8 +439,8 @@ Added XRCed to the wxPython Tools directory, contributed by Roman
|
|||||||
Rolinsky.
|
Rolinsky.
|
||||||
|
|
||||||
Added a new "constructor" to most of the window classes that calls the
|
Added a new "constructor" to most of the window classes that calls the
|
||||||
default C++ contructor, (the one with no parameters) and also added the
|
default C++ constructor, (the one with no parameters) and also added the
|
||||||
coresponding Create(...) method. This allows you to do a 2-step
|
corresponding Create(...) method. This allows you to do a 2-step
|
||||||
creation of windows which is sometimes required for doing things such
|
creation of windows which is sometimes required for doing things such
|
||||||
as setting extended style flags before the window is created, or for
|
as setting extended style flags before the window is created, or for
|
||||||
passing the object to the XRC resource system to be created from the
|
passing the object to the XRC resource system to be created from the
|
||||||
@@ -742,7 +976,7 @@ methods look like this:
|
|||||||
toggle=FALSE)
|
toggle=FALSE)
|
||||||
|
|
||||||
|
|
||||||
There are also coresponding InsertTool and InsertSimpleTool methods
|
There are also corresponding InsertTool and InsertSimpleTool methods
|
||||||
that additionally take an integer position as the first parameter.
|
that additionally take an integer position as the first parameter.
|
||||||
|
|
||||||
Added a wrapper for the new PCX and TIFF ImageHandlers.
|
Added a wrapper for the new PCX and TIFF ImageHandlers.
|
||||||
|
@@ -44,11 +44,6 @@ include samples/doodle/*.txt
|
|||||||
include samples/doodle/*.py
|
include samples/doodle/*.py
|
||||||
include samples/doodle/*.iss
|
include samples/doodle/*.iss
|
||||||
include samples/doodle/sample.ddl
|
include samples/doodle/sample.ddl
|
||||||
include samples/stxview/*.txt
|
|
||||||
include samples/stxview/*.py
|
|
||||||
include samples/stxview/*.stx
|
|
||||||
include samples/stxview/StructuredText/*.py
|
|
||||||
include samples/stxview/StructuredText/*.txt
|
|
||||||
include samples/wxProject/*.txt
|
include samples/wxProject/*.txt
|
||||||
include samples/wxProject/*.py
|
include samples/wxProject/*.py
|
||||||
include samples/StyleEditor/*.py
|
include samples/StyleEditor/*.py
|
||||||
|
@@ -3,58 +3,34 @@ wxPython README
|
|||||||
|
|
||||||
Welcome to the wonderful world of wxPython!
|
Welcome to the wonderful world of wxPython!
|
||||||
|
|
||||||
Once you have installed the wxPython extension module, you can try it
|
So where do you go from here? The best thing to do is to run the demo
|
||||||
out by going to the [install dir]\wxPython\demo directory and typing:
|
and use its source code to help you learn how to use wxPython. Most
|
||||||
|
of the classes available are demonstrated there, and you can view the
|
||||||
|
sources directly in the demo so it is designed to help you learn. If
|
||||||
|
you are on Windows or OS X then you can run the demo just by double
|
||||||
|
clicking it's icon. If you are on Linux/Unix then change to the
|
||||||
|
directory containing the demo and type:
|
||||||
|
|
||||||
python demo.py
|
python demo.py
|
||||||
|
|
||||||
There are also some other sample files there for you to play with and
|
There are also some sample mini applications available for you to run
|
||||||
learn from.
|
and to play with as a learning exercise.
|
||||||
|
|
||||||
If you selected to install the documentation then point your browser
|
The next thing you should do is join the wxPython-users maillist where
|
||||||
to [install dir]\wxPython\docs\index.htm and you will then be looking
|
you can interact with a community of other users and developers who
|
||||||
at the docs for wxWindows. For the most part you can use the C++ docs
|
are willing to help you learn, answer questions and solve problems.
|
||||||
as most classes and methods are used identically. Where there are
|
To join the mail list just send an email message to the following
|
||||||
differences they are documented with a "wxPython Note."
|
address from the account you want to receive the mail messages from
|
||||||
|
the list:
|
||||||
|
|
||||||
On Win32 systems the binary self-installer creates a program group on
|
wxPython-users-subscribe@lists.wxwindows.org
|
||||||
the Start Menu that contains a link to running the demo and a link to
|
|
||||||
the help file. To help you save disk space I'm now using Microsoft's
|
|
||||||
HTML Help format. If your system doesn't know what to do with the help
|
|
||||||
file, you can install the HTML Help Viewer as part of IE 4+, NT
|
|
||||||
Service Pack 4+, or the HTML Workshop at
|
|
||||||
|
|
||||||
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
|
There is also a good set of class reference documentation available
|
||||||
|
for wxPython, but currently it is geared for the C++ user. This may
|
||||||
For some features, the latest common controls library from microsoft
|
be a little daunting at first, but with a little practice you'll
|
||||||
is required. You can get this by installing IE 5.0 or Office 2000.
|
easily be able to "translate" from the C++ shown there to Python. Not
|
||||||
You can also get it independently from here:
|
all classes documented are available in Python, but most of the GUI
|
||||||
|
related classes are.
|
||||||
http://download.microsoft.com/download/platformsdk/Comctl32/5.80.2614.3600/W9XNT4/EN-US/50comupd.exe
|
|
||||||
|
|
||||||
Windows 95 users may also need the WinSock 2.0 and OpenGL libraries.
|
|
||||||
These can be found at these sites:
|
|
||||||
|
|
||||||
|
|
||||||
http://www.microsoft.com/windows95/downloads/contents/wuadmintools/s_wunetworkingtools/w95sockets2/default.asp
|
|
||||||
|
|
||||||
http://www.opengl.org/Downloads/Downloads.html
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Getting Help
|
|
||||||
------------
|
|
||||||
|
|
||||||
Since wxPython is a blending of multiple technologies, help comes from
|
|
||||||
multiple sources. See the http://wxPython.org/ for details on various
|
|
||||||
sources of help, but probably the best source is the wxPython-users
|
|
||||||
mail list. You can view the archive or subscribe by going to
|
|
||||||
|
|
||||||
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
|
|
||||||
|
|
||||||
Or you can send mail directly to the list using this address:
|
|
||||||
|
|
||||||
wxpython-users@lists.wxwindows.org
|
|
||||||
|
|
||||||
|
|
||||||
Other Info
|
Other Info
|
||||||
@@ -62,11 +38,15 @@ Other Info
|
|||||||
|
|
||||||
Please also see the following files in this directory:
|
Please also see the following files in this directory:
|
||||||
|
|
||||||
CHANGES.txt Information about new features, fixes, etc. in
|
CHANGES.txt Information about new features, fixes,
|
||||||
each release.
|
etc. in each release.
|
||||||
|
|
||||||
BUILD.unix.txt Instructions for building wxPython on various
|
../README.1st.txt Instructions for building wxGTK and
|
||||||
Unix-like platforms.
|
wxPython on Unix-like platforms the
|
||||||
|
"new way."
|
||||||
|
|
||||||
|
BUILD.unix.txt Instructions for building wxPython on
|
||||||
|
various Unix-like platforms the "old way."
|
||||||
|
|
||||||
BUILD.win32.txt Instructions for building wxPython on Windows.
|
BUILD.win32.txt Instructions for building wxPython on Windows.
|
||||||
|
|
||||||
|
@@ -9,6 +9,8 @@ function getpyver {
|
|||||||
PYVER=2.1
|
PYVER=2.1
|
||||||
elif [ "$1" = "22" ]; then
|
elif [ "$1" = "22" ]; then
|
||||||
PYVER=2.2
|
PYVER=2.2
|
||||||
|
elif [ "$1" = "23" ]; then
|
||||||
|
PYVER=2.3
|
||||||
else
|
else
|
||||||
echo You must specify Python version as first parameter.
|
echo You must specify Python version as first parameter.
|
||||||
exit
|
exit
|
||||||
@@ -30,7 +32,7 @@ OTHERFLAGS=""
|
|||||||
# "c" --> clean
|
# "c" --> clean
|
||||||
if [ "$1" = "c" ]; then
|
if [ "$1" = "c" ]; then
|
||||||
shift
|
shift
|
||||||
CMD="$SETUP $FLAGS $OTHERFLAGS clean"
|
CMD="$SETUP $FLAGS $OTHERFLAGS clean $*"
|
||||||
OTHERCMD="rm -f wxPython/*.so"
|
OTHERCMD="rm -f wxPython/*.so"
|
||||||
|
|
||||||
# "d" --> clean extension modules only
|
# "d" --> clean extension modules only
|
||||||
@@ -47,12 +49,12 @@ elif [ "$1" = "t" ]; then
|
|||||||
# "i" --> install
|
# "i" --> install
|
||||||
elif [ "$1" = "i" ]; then
|
elif [ "$1" = "i" ]; then
|
||||||
shift
|
shift
|
||||||
CMD="$SETUP $FLAGS $OTHERFLAGS install"
|
CMD="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
|
||||||
|
|
||||||
# "s" --> source dist
|
# "s" --> source dist
|
||||||
elif [ "$1" = "s" ]; then
|
elif [ "$1" = "s" ]; then
|
||||||
shift
|
shift
|
||||||
CMD="$SETUP $OTHERFLAGS sdist"
|
CMD="$SETUP $OTHERFLAGS sdist $*"
|
||||||
|
|
||||||
# "r" --> rpm dist
|
# "r" --> rpm dist
|
||||||
elif [ "$1" = "r" ]; then
|
elif [ "$1" = "r" ]; then
|
||||||
|
@@ -8,7 +8,7 @@ set FLAGS=USE_SWIG=1 IN_CVS_TREE=1
|
|||||||
|
|
||||||
|
|
||||||
rem Use non-default python?
|
rem Use non-default python?
|
||||||
iff "%1" == "15" .or. "%1" == "20" .or. "%1" == "21" .or. "%1" == "22" then
|
iff "%1" == "15" .or. "%1" == "20" .or. "%1" == "21" .or. "%1" == "22" .or. "%1" == "23" then
|
||||||
set VER=%1
|
set VER=%1
|
||||||
set PYTHON=%TOOLS%\python%1%\python.exe
|
set PYTHON=%TOOLS%\python%1%\python.exe
|
||||||
shift
|
shift
|
||||||
@@ -71,29 +71,26 @@ elseiff "%1" == "a" then
|
|||||||
shift
|
shift
|
||||||
set CMD=echo Finished!
|
set CMD=echo Finished!
|
||||||
|
|
||||||
call b.bat 15 c
|
call b.bat 21 d
|
||||||
call b.bat 15 f
|
|
||||||
cd demo
|
|
||||||
p15 encode_bitmaps.py
|
|
||||||
cd -
|
|
||||||
call b.bat 15 r
|
|
||||||
call b.bat 15 c
|
|
||||||
call b.bat 15 h
|
|
||||||
call b.bat 15 r
|
|
||||||
|
|
||||||
call b.bat 21 c
|
|
||||||
call b.bat 21 f
|
|
||||||
call b.bat 21 r
|
|
||||||
call b.bat 21 c
|
|
||||||
call b.bat 21 h
|
call b.bat 21 h
|
||||||
call b.bat 21 r
|
call b.bat 21 r
|
||||||
|
call b.bat 21 d UNICODE=1
|
||||||
|
call b.bat 21 h UNICODE=1
|
||||||
|
call b.bat 21 r UNICODE=1
|
||||||
|
|
||||||
call b.bat 22 c
|
call b.bat 22 d
|
||||||
call b.bat 22 f
|
|
||||||
call b.bat 22 r
|
|
||||||
call b.bat 22 c
|
|
||||||
call b.bat 22 h
|
call b.bat 22 h
|
||||||
call b.bat 22 r
|
call b.bat 22 r
|
||||||
|
call b.bat 22 d UNICODE=1
|
||||||
|
call b.bat 22 h UNICODE=1
|
||||||
|
call b.bat 22 r UNICODE=1
|
||||||
|
|
||||||
|
call b.bat 23 d
|
||||||
|
call b.bat 23 h
|
||||||
|
call b.bat 23 r
|
||||||
|
call b.bat 23 d UNICODE=1
|
||||||
|
call b.bat 23 h UNICODE=1
|
||||||
|
call b.bat 23 r UNICODE=1
|
||||||
|
|
||||||
|
|
||||||
rem "b" --> both debug and hybrid builds
|
rem "b" --> both debug and hybrid builds
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
/* Implementation : PYTHON */
|
/* Implementation : PYTHON */
|
||||||
|
|
||||||
#define SWIGPYTHON
|
#define SWIGPYTHON
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/* Definitions for Windows/Unix exporting */
|
/* Definitions for Windows/Unix exporting */
|
||||||
@@ -36,12 +38,9 @@
|
|||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void SWIG_MakePtr(char *, void *, char *);
|
extern void SWIG_MakePtr(char *, void *, char *);
|
||||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||||
@@ -110,8 +109,8 @@ public:
|
|||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
||||||
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
||||||
PyObject* idobj = wxPyConstructObject((void*)&id, "wxTreeItemId", FALSE);
|
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), FALSE);
|
||||||
PyObject* recobj= wxPyConstructObject((void*)&rect, "wxRect", FALSE);
|
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), FALSE);
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
||||||
Py_DECREF(dcobj);
|
Py_DECREF(dcobj);
|
||||||
Py_DECREF(idobj);
|
Py_DECREF(idobj);
|
||||||
@@ -659,11 +658,10 @@ static PyObject *_wrap_wxEditableListBox_SetStrings(PyObject *self, PyObject *ar
|
|||||||
PyObject* item = PySequence_GetItem(_obj1, i);
|
PyObject* item = PySequence_GetItem(_obj1, i);
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
PyObject* str = PyObject_Unicode(item);
|
PyObject* str = PyObject_Unicode(item);
|
||||||
_arg1->Add(PyUnicode_AsUnicode(str));
|
|
||||||
#else
|
#else
|
||||||
PyObject* str = PyObject_Str(item);
|
PyObject* str = PyObject_Str(item);
|
||||||
_arg1->Add(PyString_AsString(str));
|
|
||||||
#endif
|
#endif
|
||||||
|
_arg1->Add(Py2wxString(str));
|
||||||
Py_DECREF(item);
|
Py_DECREF(item);
|
||||||
Py_DECREF(str);
|
Py_DECREF(str);
|
||||||
}
|
}
|
||||||
@@ -1790,7 +1788,7 @@ static PyObject *_wrap_wxLEDNumberCtrl_GetValue(PyObject *self, PyObject *args,
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
|
@@ -272,8 +272,8 @@ public:
|
|||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
||||||
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
||||||
PyObject* idobj = wxPyConstructObject((void*)&id, "wxTreeItemId", FALSE);
|
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), FALSE);
|
||||||
PyObject* recobj= wxPyConstructObject((void*)&rect, "wxRect", FALSE);
|
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), FALSE);
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
||||||
Py_DECREF(dcobj);
|
Py_DECREF(dcobj);
|
||||||
Py_DECREF(idobj);
|
Py_DECREF(idobj);
|
||||||
|
@@ -69,7 +69,7 @@ public:
|
|||||||
~wxGLContext();
|
~wxGLContext();
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxString& colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
@@ -151,7 +151,7 @@ public:
|
|||||||
%pragma(python) addtomethod = "wxGLCanvasWithContext:val._setOORInfo(self)"
|
%pragma(python) addtomethod = "wxGLCanvasWithContext:val._setOORInfo(self)"
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxString& colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
wxGLContext* GetContext();
|
wxGLContext* GetContext();
|
||||||
|
@@ -27,15 +27,17 @@
|
|||||||
#if wxUSE_GLCANVAS
|
#if wxUSE_GLCANVAS
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <wx/frame.h>
|
#include "wx/frame.h"
|
||||||
|
#include "wx/settings.h"
|
||||||
|
#include "wx/intl.h"
|
||||||
|
#include "wx/log.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/msw/private.h>
|
#include "wx/msw/private.h"
|
||||||
#include <wx/settings.h>
|
|
||||||
#include <wx/log.h>
|
|
||||||
|
|
||||||
#include "myglcanvas.h"
|
#include "myglcanvas.h"
|
||||||
|
|
||||||
|
const wxChar* wxGLCanvasName = wxT("GLcanvas");
|
||||||
static const wxChar *wxGLCanvasClassName = wxT("wxGLCanvasClass");
|
static const wxChar *wxGLCanvasClassName = wxT("wxGLCanvasClass");
|
||||||
static const wxChar *wxGLCanvasClassNameNoRedraw = wxT("wxGLCanvasClassNR");
|
static const wxChar *wxGLCanvasClassNameNoRedraw = wxT("wxGLCanvasClassNR");
|
||||||
|
|
||||||
@@ -108,7 +110,7 @@ void wxGLContext::SetCurrent()
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLContext::SetColour(const char *colour)
|
void wxGLContext::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
float r = 0.0;
|
float r = 0.0;
|
||||||
float g = 0.0;
|
float g = 0.0;
|
||||||
@@ -403,7 +405,6 @@ static void AdjustPFDForAttributes(PIXELFORMATDESCRIPTOR& pfd, int *attribList)
|
|||||||
|
|
||||||
void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
|
void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
|
||||||
{
|
{
|
||||||
int pixelFormat;
|
|
||||||
PIXELFORMATDESCRIPTOR pfd = {
|
PIXELFORMATDESCRIPTOR pfd = {
|
||||||
sizeof(PIXELFORMATDESCRIPTOR), /* size */
|
sizeof(PIXELFORMATDESCRIPTOR), /* size */
|
||||||
1, /* version */
|
1, /* version */
|
||||||
@@ -427,13 +428,13 @@ void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
|
|||||||
|
|
||||||
AdjustPFDForAttributes(pfd, attribList);
|
AdjustPFDForAttributes(pfd, attribList);
|
||||||
|
|
||||||
pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
|
int pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
|
||||||
if (pixelFormat == 0) {
|
if (pixelFormat == 0) {
|
||||||
wxLogWarning(_("ChoosePixelFormat failed."));
|
wxLogLastError(_T("ChoosePixelFormat"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) {
|
if ( !::SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) ) {
|
||||||
wxLogWarning(_("SetPixelFormat failed."));
|
wxLogLastError(_T("SetPixelFormat"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -527,7 +528,7 @@ void wxGLCanvas::SetCurrent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetColour(const char *colour)
|
void wxGLCanvas::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
if (m_glContext)
|
if (m_glContext)
|
||||||
m_glContext->SetColour(colour);
|
m_glContext->SetColour(colour);
|
||||||
@@ -728,7 +729,7 @@ bool wxGLApp::InitGLVisual(int *attribList)
|
|||||||
AdjustPFDForAttributes(pfd, attribList);
|
AdjustPFDForAttributes(pfd, attribList);
|
||||||
|
|
||||||
// use DC for whole (root) screen, since no windows have yet been created
|
// use DC for whole (root) screen, since no windows have yet been created
|
||||||
pixelFormat = ChoosePixelFormat((HDC) ::GetDC(NULL), &pfd);
|
pixelFormat = ChoosePixelFormat(ScreenHDC(), &pfd);
|
||||||
|
|
||||||
if (pixelFormat == 0) {
|
if (pixelFormat == 0) {
|
||||||
wxLogError(_("Failed to initialize OpenGL"));
|
wxLogError(_("Failed to initialize OpenGL"));
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include <wx/scrolwin.h>
|
#include <wx/scrolwin.h>
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include "wx/msw/winundef.h"
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
@@ -69,7 +70,7 @@ public:
|
|||||||
~wxGLContext();
|
~wxGLContext();
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxChar *colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
|
|
||||||
@@ -83,21 +84,26 @@ public:
|
|||||||
wxWindow* m_window;
|
wxWindow* m_window;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extern const wxChar* wxGLCanvasName;
|
||||||
|
|
||||||
|
|
||||||
class wxGLCanvas: public wxWindow
|
class wxGLCanvas: public wxWindow
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxGLCanvas)
|
DECLARE_CLASS(wxGLCanvas)
|
||||||
public:
|
public:
|
||||||
wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette);
|
const wxString& name = wxGLCanvasName, int *attribList = 0, const wxPalette& palette = wxNullPalette);
|
||||||
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
||||||
wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "GLCanvas",
|
const wxSize& size = wxDefaultSize, long style = 0, const wxString&
|
||||||
|
name = wxGLCanvasName,
|
||||||
int *attribList = (int*) NULL, const wxPalette& palette = wxNullPalette );
|
int *attribList = (int*) NULL, const wxPalette& palette = wxNullPalette );
|
||||||
|
|
||||||
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL, wxWindowID id = -1,
|
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL, wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxString& name = "GLCanvas", int *attribList = 0, const wxPalette& palette = wxNullPalette );
|
const wxString& name = wxGLCanvasName, int *attribList = 0, const wxPalette& palette = wxNullPalette );
|
||||||
|
|
||||||
~wxGLCanvas();
|
~wxGLCanvas();
|
||||||
|
|
||||||
@@ -106,7 +112,7 @@ class wxGLCanvas: public wxWindow
|
|||||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name);
|
const wxPoint& pos, const wxSize& size, long style, const wxString& name);
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxChar *colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
@@ -72,7 +72,7 @@ public:
|
|||||||
m_iewin->GetParent()->AddPendingEvent(event);
|
m_iewin->GetParent()->AddPendingEvent(event);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool Process(WXTYPE etype, wxString text = "", long l1 = 0, long l2 = 0)
|
bool Process(WXTYPE etype, wxString text = wxEmptyString, long l1 = 0, long l2 = 0)
|
||||||
{
|
{
|
||||||
if (! m_iewin || ! m_iewin->GetParent())
|
if (! m_iewin || ! m_iewin->GetParent())
|
||||||
return true;
|
return true;
|
||||||
@@ -103,7 +103,7 @@ public:
|
|||||||
return v.bstrVal;
|
return v.bstrVal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return "";
|
return wxEmptyString;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define STR_ARG(arg) GetStrArg(pDispParams->rgvarg[arg])
|
#define STR_ARG(arg) GetStrArg(pDispParams->rgvarg[arg])
|
||||||
@@ -137,7 +137,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DISPID_PROGRESSCHANGE:
|
case DISPID_PROGRESSCHANGE:
|
||||||
Post(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, "", LONG_ARG(1), LONG_ARG(0));
|
Post(wxEVT_COMMAND_MSHTML_PROGRESSCHANGE, wxEmptyString, LONG_ARG(1), LONG_ARG(0));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISPID_DOCUMENTCOMPLETE:
|
case DISPID_DOCUMENTCOMPLETE:
|
||||||
@@ -524,7 +524,7 @@ wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
|
|||||||
{
|
{
|
||||||
wxAutoOleInterface<IHTMLTxtRange> tr(GetSelRange(m_oleObject));
|
wxAutoOleInterface<IHTMLTxtRange> tr(GetSelRange(m_oleObject));
|
||||||
if (! tr)
|
if (! tr)
|
||||||
return "";
|
return wxEmptyString;
|
||||||
|
|
||||||
BSTR text = NULL;
|
BSTR text = NULL;
|
||||||
HRESULT hr = E_FAIL;
|
HRESULT hr = E_FAIL;
|
||||||
@@ -534,7 +534,7 @@ wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
|
|||||||
else
|
else
|
||||||
hr = tr->get_text(&text);
|
hr = tr->get_text(&text);
|
||||||
if (hr != S_OK)
|
if (hr != S_OK)
|
||||||
return "";
|
return wxEmptyString;
|
||||||
|
|
||||||
wxString s = text;
|
wxString s = text;
|
||||||
SysFreeString(text);
|
SysFreeString(text);
|
||||||
@@ -545,26 +545,26 @@ wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
|
|||||||
wxString wxIEHtmlWin::GetText(bool asHTML)
|
wxString wxIEHtmlWin::GetText(bool asHTML)
|
||||||
{
|
{
|
||||||
if (! m_webBrowser.Ok())
|
if (! m_webBrowser.Ok())
|
||||||
return "";
|
return wxEmptyString;
|
||||||
|
|
||||||
// get document dispatch interface
|
// get document dispatch interface
|
||||||
IDispatch *iDisp = NULL;
|
IDispatch *iDisp = NULL;
|
||||||
HRESULT hr = m_webBrowser->get_Document(&iDisp);
|
HRESULT hr = m_webBrowser->get_Document(&iDisp);
|
||||||
if (hr != S_OK)
|
if (hr != S_OK)
|
||||||
return "";
|
return wxEmptyString;
|
||||||
|
|
||||||
// Query for Document Interface
|
// Query for Document Interface
|
||||||
wxAutoOleInterface<IHTMLDocument2> hd(IID_IHTMLDocument2, iDisp);
|
wxAutoOleInterface<IHTMLDocument2> hd(IID_IHTMLDocument2, iDisp);
|
||||||
iDisp->Release();
|
iDisp->Release();
|
||||||
|
|
||||||
if (! hd.Ok())
|
if (! hd.Ok())
|
||||||
return "";
|
return wxEmptyString;
|
||||||
|
|
||||||
// get body element
|
// get body element
|
||||||
IHTMLElement *_body = NULL;
|
IHTMLElement *_body = NULL;
|
||||||
hd->get_body(&_body);
|
hd->get_body(&_body);
|
||||||
if (! _body)
|
if (! _body)
|
||||||
return "";
|
return wxEmptyString;
|
||||||
wxAutoOleInterface<IHTMLElement> body(_body);
|
wxAutoOleInterface<IHTMLElement> body(_body);
|
||||||
|
|
||||||
// get inner text
|
// get inner text
|
||||||
@@ -576,7 +576,7 @@ wxString wxIEHtmlWin::GetText(bool asHTML)
|
|||||||
else
|
else
|
||||||
hr = body->get_innerText(&text);
|
hr = body->get_innerText(&text);
|
||||||
if (hr != S_OK)
|
if (hr != S_OK)
|
||||||
return "";
|
return wxEmptyString;
|
||||||
|
|
||||||
wxString s = text;
|
wxString s = text;
|
||||||
SysFreeString(text);
|
SysFreeString(text);
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
/* Implementation : PYTHON */
|
/* Implementation : PYTHON */
|
||||||
|
|
||||||
#define SWIGPYTHON
|
#define SWIGPYTHON
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/* Definitions for Windows/Unix exporting */
|
/* Definitions for Windows/Unix exporting */
|
||||||
@@ -36,12 +38,9 @@
|
|||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void SWIG_MakePtr(char *, void *, char *);
|
extern void SWIG_MakePtr(char *, void *, char *);
|
||||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||||
@@ -177,7 +176,7 @@ static PyObject *_wrap_wxMSHTMLEvent_GetText1(PyObject *self, PyObject *args, Py
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -589,7 +588,7 @@ static PyObject *_wrap_wxIEHtmlWin_GetStringSelection(PyObject *self, PyObject *
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -629,7 +628,7 @@ static PyObject *_wrap_wxIEHtmlWin_GetText(PyObject *self, PyObject *args, PyObj
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -752,8 +751,8 @@ static PyObject *_wrap_wxIEHtmlWin_GoSearch(PyObject *self, PyObject *args, PyOb
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxIEHtmlWin_Refresh(_swigobj,_swigarg0) (_swigobj->Refresh(_swigarg0))
|
#define wxIEHtmlWin_RefreshPage(_swigobj,_swigarg0) (_swigobj->Refresh(_swigarg0))
|
||||||
static PyObject *_wrap_wxIEHtmlWin_Refresh(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxIEHtmlWin_RefreshPage(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _result;
|
bool _result;
|
||||||
wxIEHtmlWin * _arg0;
|
wxIEHtmlWin * _arg0;
|
||||||
@@ -762,18 +761,18 @@ static PyObject *_wrap_wxIEHtmlWin_Refresh(PyObject *self, PyObject *args, PyObj
|
|||||||
char *_kwnames[] = { "self","level", NULL };
|
char *_kwnames[] = { "self","level", NULL };
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxIEHtmlWin_Refresh",_kwnames,&_argo0,&_arg1))
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxIEHtmlWin_RefreshPage",_kwnames,&_argo0,&_arg1))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (_argo0) {
|
if (_argo0) {
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_Refresh. Expected _wxIEHtmlWin_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_RefreshPage. Expected _wxIEHtmlWin_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
_result = (bool )wxIEHtmlWin_Refresh(_arg0,_arg1);
|
_result = (bool )wxIEHtmlWin_RefreshPage(_arg0,_arg1);
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
wxPyEndAllowThreads(__tstate);
|
||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
@@ -811,7 +810,7 @@ static PyObject *_wrap_wxIEHtmlWin_Stop(PyObject *self, PyObject *args, PyObject
|
|||||||
|
|
||||||
static PyMethodDef iewincMethods[] = {
|
static PyMethodDef iewincMethods[] = {
|
||||||
{ "wxIEHtmlWin_Stop", (PyCFunction) _wrap_wxIEHtmlWin_Stop, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_Stop", (PyCFunction) _wrap_wxIEHtmlWin_Stop, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_Refresh", (PyCFunction) _wrap_wxIEHtmlWin_Refresh, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_RefreshPage", (PyCFunction) _wrap_wxIEHtmlWin_RefreshPage, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_GoSearch", (PyCFunction) _wrap_wxIEHtmlWin_GoSearch, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_GoSearch", (PyCFunction) _wrap_wxIEHtmlWin_GoSearch, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_GoHome", (PyCFunction) _wrap_wxIEHtmlWin_GoHome, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_GoHome", (PyCFunction) _wrap_wxIEHtmlWin_GoHome, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_GoForward", (PyCFunction) _wrap_wxIEHtmlWin_GoForward, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_GoForward", (PyCFunction) _wrap_wxIEHtmlWin_GoForward, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -117,7 +117,7 @@ public:
|
|||||||
bool GoForward();
|
bool GoForward();
|
||||||
bool GoHome();
|
bool GoHome();
|
||||||
bool GoSearch();
|
bool GoSearch();
|
||||||
bool Refresh(wxIEHtmlRefreshLevel level);
|
%name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
|
||||||
bool Stop();
|
bool Stop();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@@ -125,8 +125,8 @@ class wxIEHtmlWinPtr(wxWindowPtr):
|
|||||||
def GoSearch(self, *_args, **_kwargs):
|
def GoSearch(self, *_args, **_kwargs):
|
||||||
val = apply(iewinc.wxIEHtmlWin_GoSearch,(self,) + _args, _kwargs)
|
val = apply(iewinc.wxIEHtmlWin_GoSearch,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def Refresh(self, *_args, **_kwargs):
|
def RefreshPage(self, *_args, **_kwargs):
|
||||||
val = apply(iewinc.wxIEHtmlWin_Refresh,(self,) + _args, _kwargs)
|
val = apply(iewinc.wxIEHtmlWin_RefreshPage,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def Stop(self, *_args, **_kwargs):
|
def Stop(self, *_args, **_kwargs):
|
||||||
val = apply(iewinc.wxIEHtmlWin_Stop,(self,) + _args, _kwargs)
|
val = apply(iewinc.wxIEHtmlWin_Stop,(self,) + _args, _kwargs)
|
||||||
|
@@ -697,12 +697,12 @@ wxVariant& wxActiveXEvent::operator[] (wxString name)
|
|||||||
return m_params[i];
|
return m_params[i];
|
||||||
};
|
};
|
||||||
|
|
||||||
wxString err = "wxActiveXEvent::operator[] invalid name <" + name + ">";
|
wxString err = wxT("wxActiveXEvent::operator[] invalid name <") + name + wxT(">");
|
||||||
err += "\r\nValid Names = :\r\n";
|
err += wxT("\r\nValid Names = :\r\n");
|
||||||
for (i = 0; i < m_params.GetCount(); i++)
|
for (i = 0; i < m_params.GetCount(); i++)
|
||||||
{
|
{
|
||||||
err += m_params[i].GetName();
|
err += m_params[i].GetName();
|
||||||
err += "\r\n";
|
err += wxT("\r\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
wxASSERT_MSG(false, err);
|
wxASSERT_MSG(false, err);
|
||||||
@@ -772,12 +772,12 @@ void wxActiveX::GetTypeInfo()
|
|||||||
{
|
{
|
||||||
if (impTypeFlags & IMPLTYPEFLAG_FSOURCE)
|
if (impTypeFlags & IMPLTYPEFLAG_FSOURCE)
|
||||||
{
|
{
|
||||||
WXOLE_TRACEOUT("Default Event Sink");
|
WXOLE_TRACEOUT(wxT("Default Event Sink"));
|
||||||
defEventSink = true;
|
defEventSink = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WXOLE_TRACEOUT("Default Interface");
|
WXOLE_TRACEOUT(wxT("Default Interface"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -804,7 +804,7 @@ void wxActiveX::GetTypeInfo(ITypeInfo *ti, bool defEventSink)
|
|||||||
|
|
||||||
if (ta->typekind == TKIND_DISPATCH)
|
if (ta->typekind == TKIND_DISPATCH)
|
||||||
{
|
{
|
||||||
WXOLE_TRACEOUT("GUID = " << GetIIDName(ta->guid).c_str());
|
WXOLE_TRACEOUT(wxT("GUID = ") << GetIIDName(ta->guid).c_str());
|
||||||
|
|
||||||
if (defEventSink)
|
if (defEventSink)
|
||||||
{
|
{
|
||||||
@@ -831,7 +831,7 @@ void wxActiveX::GetTypeInfo(ITypeInfo *ti, bool defEventSink)
|
|||||||
{
|
{
|
||||||
wxString name = anames[0];
|
wxString name = anames[0];
|
||||||
|
|
||||||
WXOLE_TRACEOUT("Name " << i << " = " << name.c_str());
|
WXOLE_TRACEOUT(wxT("Name ") << i << wxT(" = ") << name.c_str());
|
||||||
SysFreeString(anames[0]);
|
SysFreeString(anames[0]);
|
||||||
|
|
||||||
if (defEventSink)
|
if (defEventSink)
|
||||||
@@ -1775,49 +1775,49 @@ wxString OLEHResultToString(HRESULT hr)
|
|||||||
switch (hr)
|
switch (hr)
|
||||||
{
|
{
|
||||||
case S_OK:
|
case S_OK:
|
||||||
return "";
|
return wxEmptyString;
|
||||||
|
|
||||||
case OLECMDERR_E_UNKNOWNGROUP:
|
case OLECMDERR_E_UNKNOWNGROUP:
|
||||||
return "The pguidCmdGroup parameter is not NULL but does not specify a recognized command group.";
|
return wxT("The pguidCmdGroup parameter is not NULL but does not specify a recognized command group.");
|
||||||
|
|
||||||
case OLECMDERR_E_NOTSUPPORTED:
|
case OLECMDERR_E_NOTSUPPORTED:
|
||||||
return "The nCmdID parameter is not a valid command in the group identified by pguidCmdGroup.";
|
return wxT("The nCmdID parameter is not a valid command in the group identified by pguidCmdGroup.");
|
||||||
|
|
||||||
case OLECMDERR_E_DISABLED:
|
case OLECMDERR_E_DISABLED:
|
||||||
return "The command identified by nCmdID is currently disabled and cannot be executed.";
|
return wxT("The command identified by nCmdID is currently disabled and cannot be executed.");
|
||||||
|
|
||||||
case OLECMDERR_E_NOHELP:
|
case OLECMDERR_E_NOHELP:
|
||||||
return "The caller has asked for help on the command identified by nCmdID, but no help is available.";
|
return wxT("The caller has asked for help on the command identified by nCmdID, but no help is available.");
|
||||||
|
|
||||||
case OLECMDERR_E_CANCELED:
|
case OLECMDERR_E_CANCELED:
|
||||||
return "The user canceled the execution of the command.";
|
return wxT("The user canceled the execution of the command.");
|
||||||
|
|
||||||
case E_INVALIDARG:
|
case E_INVALIDARG:
|
||||||
return "E_INVALIDARG";
|
return wxT("E_INVALIDARG");
|
||||||
|
|
||||||
case E_OUTOFMEMORY:
|
case E_OUTOFMEMORY:
|
||||||
return "E_OUTOFMEMORY";
|
return wxT("E_OUTOFMEMORY");
|
||||||
|
|
||||||
case E_NOINTERFACE:
|
case E_NOINTERFACE:
|
||||||
return "E_NOINTERFACE";
|
return wxT("E_NOINTERFACE");
|
||||||
|
|
||||||
case E_UNEXPECTED:
|
case E_UNEXPECTED:
|
||||||
return "E_UNEXPECTED";
|
return wxT("E_UNEXPECTED");
|
||||||
|
|
||||||
case STG_E_INVALIDFLAG:
|
case STG_E_INVALIDFLAG:
|
||||||
return "STG_E_INVALIDFLAG";
|
return wxT("STG_E_INVALIDFLAG");
|
||||||
|
|
||||||
case E_FAIL:
|
case E_FAIL:
|
||||||
return "E_FAIL";
|
return wxT("E_FAIL");
|
||||||
|
|
||||||
case E_NOTIMPL:
|
case E_NOTIMPL:
|
||||||
return "E_NOTIMPL";
|
return wxT("E_NOTIMPL");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
char buf[64];
|
wxString buf;
|
||||||
sprintf(buf, "Unknown - 0x%X", hr);
|
buf.Printf(wxT("Unknown - 0x%X"), hr);
|
||||||
return wxString(buf);
|
return buf;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -1948,5 +1948,5 @@ wxString GetIIDName(REFIID riid)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return "StringFromIID() error";
|
return wxT("StringFromIID() error");
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
/* Implementation : PYTHON */
|
/* Implementation : PYTHON */
|
||||||
|
|
||||||
#define SWIGPYTHON
|
#define SWIGPYTHON
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/* Definitions for Windows/Unix exporting */
|
/* Definitions for Windows/Unix exporting */
|
||||||
@@ -36,12 +38,9 @@
|
|||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void SWIG_MakePtr(char *, void *, char *);
|
extern void SWIG_MakePtr(char *, void *, char *);
|
||||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||||
@@ -188,19 +187,20 @@ PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
PyObject* wxPy_ConvertShapeList(wxListBase* list, const char* className) {
|
PyObject* wxPy_ConvertShapeList(wxListBase* listbase, const char* className) {
|
||||||
|
wxList* list = (wxList*)listbase;
|
||||||
PyObject* pyList;
|
PyObject* pyList;
|
||||||
PyObject* pyObj;
|
PyObject* pyObj;
|
||||||
wxObject* wxObj;
|
wxObject* wxObj;
|
||||||
wxNode* node = list->First();
|
wxNode* node = list->GetFirst();
|
||||||
|
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
pyList = PyList_New(0);
|
pyList = PyList_New(0);
|
||||||
while (node) {
|
while (node) {
|
||||||
wxObj = node->Data();
|
wxObj = node->GetData();
|
||||||
pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj);
|
pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj);
|
||||||
PyList_Append(pyList, pyObj);
|
PyList_Append(pyList, pyObj);
|
||||||
node = node->Next();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
return pyList;
|
return pyList;
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
/* Implementation : PYTHON */
|
/* Implementation : PYTHON */
|
||||||
|
|
||||||
#define SWIGPYTHON
|
#define SWIGPYTHON
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/* Definitions for Windows/Unix exporting */
|
/* Definitions for Windows/Unix exporting */
|
||||||
@@ -36,12 +38,9 @@
|
|||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void SWIG_MakePtr(char *, void *, char *);
|
extern void SWIG_MakePtr(char *, void *, char *);
|
||||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||||
@@ -467,7 +466,7 @@ static PyObject *_wrap_wxShapeRegion_GetText(PyObject *self, PyObject *args, PyO
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -759,7 +758,7 @@ static PyObject *_wrap_wxShapeRegion_GetName(PyObject *self, PyObject *args, PyO
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -796,7 +795,7 @@ static PyObject *_wrap_wxShapeRegion_GetColour(PyObject *self, PyObject *args, P
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -904,7 +903,7 @@ static PyObject *_wrap_wxShapeRegion_GetPenColour(PyObject *self, PyObject *args
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -1489,8 +1488,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDraw(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1526,8 +1524,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawContents(PyObject *self, P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1565,8 +1562,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawBranches(PyObject *self, P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawBranches. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawBranches. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1603,8 +1599,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMoveLinks(PyObject *self, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1640,8 +1635,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnErase(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnErase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnErase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1677,8 +1671,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnEraseContents(PyObject *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnEraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnEraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1714,8 +1707,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnHighlight(PyObject *self, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnHighlight. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnHighlight. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1884,8 +1876,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMovePre(PyObject *self, PyObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMovePre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMovePre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1927,8 +1918,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMovePost(PyObject *self, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMovePost. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMovePost. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2167,8 +2157,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawOutline(PyObject *self, Py
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2204,8 +2193,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnDrawControlPoints(PyObject *se
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnDrawControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2241,8 +2229,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnEraseControlPoints(PyObject *s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnEraseControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnEraseControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2280,8 +2267,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_base_OnMoveLink(PyObject *self, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMoveLink. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeEvtHandler_base_OnMoveLink. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4524,8 +4510,7 @@ static PyObject *_wrap_wxPyShape_Move(PyObject *self, PyObject *args, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Move. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Move. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4562,8 +4547,7 @@ static PyObject *_wrap_wxPyShape_Erase(PyObject *self, PyObject *args, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Erase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Erase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4599,8 +4583,7 @@ static PyObject *_wrap_wxPyShape_EraseContents(PyObject *self, PyObject *args, P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_EraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_EraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4636,8 +4619,7 @@ static PyObject *_wrap_wxPyShape_Draw(PyObject *self, PyObject *args, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Draw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Draw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4701,8 +4683,7 @@ static PyObject *_wrap_wxPyShape_MoveLinks(PyObject *self, PyObject *args, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_MoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_MoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4738,8 +4719,7 @@ static PyObject *_wrap_wxPyShape_DrawContents(PyObject *self, PyObject *args, Py
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_DrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_DrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5158,8 +5138,7 @@ static PyObject *_wrap_wxPyShape_FormatText(PyObject *self, PyObject *args, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_FormatText. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_FormatText. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5397,7 +5376,7 @@ static PyObject *_wrap_wxPyShape_GetTextColour(PyObject *self, PyObject *args, P
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -5503,7 +5482,7 @@ static PyObject *_wrap_wxPyShape_GetRegionName(PyObject *self, PyObject *args, P
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -5788,8 +5767,7 @@ static PyObject *_wrap_wxPyShape_FindRegionNames(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxStringList_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxStringList_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_FindRegionNames. Expected _wxStringList_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_FindRegionNames. Expected _wxStringList_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6173,8 +6151,7 @@ static PyObject *_wrap_wxPyShape_EraseLinks(PyObject *self, PyObject *args, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_EraseLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_EraseLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6214,8 +6191,7 @@ static PyObject *_wrap_wxPyShape_DrawLinks(PyObject *self, PyObject *args, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_DrawLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_DrawLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6257,8 +6233,7 @@ static PyObject *_wrap_wxPyShape_MoveLineToNewAttachment(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_MoveLineToNewAttachment. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_MoveLineToNewAttachment. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6889,8 +6864,7 @@ static PyObject *_wrap_wxPyShape_Copy(PyObject *self, PyObject *args, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPyShape_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPyShape_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Copy. Expected _wxPyShape_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Copy. Expected _wxPyShape_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6926,8 +6900,7 @@ static PyObject *_wrap_wxPyShape_CopyWithHandler(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPyShape_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPyShape_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_CopyWithHandler. Expected _wxPyShape_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_CopyWithHandler. Expected _wxPyShape_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7050,8 +7023,7 @@ static PyObject *_wrap_wxPyShape_Recentre(PyObject *self, PyObject *args, PyObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Recentre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_Recentre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7087,8 +7059,7 @@ static PyObject *_wrap_wxPyShape_ClearPointList(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxList_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxList_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_ClearPointList. Expected _wxList_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_ClearPointList. Expected _wxList_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7212,8 +7183,7 @@ static PyObject *_wrap_wxPyShape_base_OnDraw(PyObject *self, PyObject *args, PyO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7249,8 +7219,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawContents(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7288,8 +7257,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawBranches(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawBranches. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawBranches. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7326,8 +7294,7 @@ static PyObject *_wrap_wxPyShape_base_OnMoveLinks(PyObject *self, PyObject *args
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7363,8 +7330,7 @@ static PyObject *_wrap_wxPyShape_base_OnErase(PyObject *self, PyObject *args, Py
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnErase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnErase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7400,8 +7366,7 @@ static PyObject *_wrap_wxPyShape_base_OnEraseContents(PyObject *self, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnEraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnEraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7437,8 +7402,7 @@ static PyObject *_wrap_wxPyShape_base_OnHighlight(PyObject *self, PyObject *args
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnHighlight. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnHighlight. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7607,8 +7571,7 @@ static PyObject *_wrap_wxPyShape_base_OnMovePre(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMovePre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMovePre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7650,8 +7613,7 @@ static PyObject *_wrap_wxPyShape_base_OnMovePost(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMovePost. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMovePost. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7890,8 +7852,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawOutline(PyObject *self, PyObject *ar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7927,8 +7888,7 @@ static PyObject *_wrap_wxPyShape_base_OnDrawControlPoints(PyObject *self, PyObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7964,8 +7924,7 @@ static PyObject *_wrap_wxPyShape_base_OnEraseControlPoints(PyObject *self, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -8003,8 +7962,7 @@ static PyObject *_wrap_wxPyShape_base_OnMoveLink(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMoveLink. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_base_OnMoveLink. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@@ -303,7 +303,7 @@ public:
|
|||||||
void ClearText(int regionId = 0);
|
void ClearText(int regionId = 0);
|
||||||
void RemoveLine(wxPyLineShape *line);
|
void RemoveLine(wxPyLineShape *line);
|
||||||
|
|
||||||
#ifdef PROLOGIO
|
#ifdef wxUSE_PROLOGIO
|
||||||
void WriteAttributes(wxExpr *clause);
|
void WriteAttributes(wxExpr *clause);
|
||||||
void ReadAttributes(wxExpr *clause);
|
void ReadAttributes(wxExpr *clause);
|
||||||
void ReadConstraints(wxExpr *clause, wxExprDatabase *database);
|
void ReadConstraints(wxExpr *clause, wxExprDatabase *database);
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
/* Implementation : PYTHON */
|
/* Implementation : PYTHON */
|
||||||
|
|
||||||
#define SWIGPYTHON
|
#define SWIGPYTHON
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/* Definitions for Windows/Unix exporting */
|
/* Definitions for Windows/Unix exporting */
|
||||||
@@ -36,12 +38,9 @@
|
|||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void SWIG_MakePtr(char *, void *, char *);
|
extern void SWIG_MakePtr(char *, void *, char *);
|
||||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||||
@@ -199,8 +198,7 @@ static PyObject *_wrap_wxDiagram_Clear(PyObject *self, PyObject *args, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_Clear. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_Clear. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -268,8 +266,7 @@ static PyObject *_wrap_wxDiagram_DrawOutline(PyObject *self, PyObject *args, PyO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_DrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_DrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -552,156 +549,6 @@ static PyObject *_wrap_wxDiagram_InsertShape(PyObject *self, PyObject *args, PyO
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxDiagram_LoadFile(_swigobj,_swigarg0) (_swigobj->LoadFile(_swigarg0))
|
|
||||||
static PyObject *_wrap_wxDiagram_LoadFile(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
bool _result;
|
|
||||||
wxDiagram * _arg0;
|
|
||||||
wxString * _arg1;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
PyObject * _obj1 = 0;
|
|
||||||
char *_kwnames[] = { "self","filename", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDiagram_LoadFile",_kwnames,&_argo0,&_obj1))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDiagram_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDiagram_LoadFile. Expected _wxDiagram_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
_arg1 = wxString_in_helper(_obj1);
|
|
||||||
if (_arg1 == NULL)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
|
||||||
_result = (bool )wxDiagram_LoadFile(_arg0,*_arg1);
|
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
|
||||||
if (PyErr_Occurred()) return NULL;
|
|
||||||
} _resultobj = Py_BuildValue("i",_result);
|
|
||||||
{
|
|
||||||
if (_obj1)
|
|
||||||
delete _arg1;
|
|
||||||
}
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxDiagram_ReadContainerGeometry(_swigobj,_swigarg0) (_swigobj->ReadContainerGeometry(_swigarg0))
|
|
||||||
static PyObject *_wrap_wxDiagram_ReadContainerGeometry(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
wxDiagram * _arg0;
|
|
||||||
wxExprDatabase * _arg1;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
PyObject * _argo1 = 0;
|
|
||||||
char *_kwnames[] = { "self","database", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDiagram_ReadContainerGeometry",_kwnames,&_argo0,&_argo1))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDiagram_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDiagram_ReadContainerGeometry. Expected _wxDiagram_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_argo1) {
|
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxExprDatabase_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_ReadContainerGeometry. Expected _wxExprDatabase_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
|
||||||
wxDiagram_ReadContainerGeometry(_arg0,*_arg1);
|
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
|
||||||
if (PyErr_Occurred()) return NULL;
|
|
||||||
} Py_INCREF(Py_None);
|
|
||||||
_resultobj = Py_None;
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxDiagram_ReadLines(_swigobj,_swigarg0) (_swigobj->ReadLines(_swigarg0))
|
|
||||||
static PyObject *_wrap_wxDiagram_ReadLines(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
wxDiagram * _arg0;
|
|
||||||
wxExprDatabase * _arg1;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
PyObject * _argo1 = 0;
|
|
||||||
char *_kwnames[] = { "self","database", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDiagram_ReadLines",_kwnames,&_argo0,&_argo1))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDiagram_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDiagram_ReadLines. Expected _wxDiagram_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_argo1) {
|
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxExprDatabase_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_ReadLines. Expected _wxExprDatabase_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
|
||||||
wxDiagram_ReadLines(_arg0,*_arg1);
|
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
|
||||||
if (PyErr_Occurred()) return NULL;
|
|
||||||
} Py_INCREF(Py_None);
|
|
||||||
_resultobj = Py_None;
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxDiagram_ReadNodes(_swigobj,_swigarg0) (_swigobj->ReadNodes(_swigarg0))
|
|
||||||
static PyObject *_wrap_wxDiagram_ReadNodes(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
wxDiagram * _arg0;
|
|
||||||
wxExprDatabase * _arg1;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
PyObject * _argo1 = 0;
|
|
||||||
char *_kwnames[] = { "self","database", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDiagram_ReadNodes",_kwnames,&_argo0,&_argo1))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDiagram_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDiagram_ReadNodes. Expected _wxDiagram_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_argo1) {
|
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxExprDatabase_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_ReadNodes. Expected _wxExprDatabase_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
|
||||||
wxDiagram_ReadNodes(_arg0,*_arg1);
|
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
|
||||||
if (PyErr_Occurred()) return NULL;
|
|
||||||
} Py_INCREF(Py_None);
|
|
||||||
_resultobj = Py_None;
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxDiagram_RecentreAll(_swigobj,_swigarg0) (_swigobj->RecentreAll(_swigarg0))
|
#define wxDiagram_RecentreAll(_swigobj,_swigarg0) (_swigobj->RecentreAll(_swigarg0))
|
||||||
static PyObject *_wrap_wxDiagram_RecentreAll(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxDiagram_RecentreAll(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -722,8 +569,7 @@ static PyObject *_wrap_wxDiagram_RecentreAll(PyObject *self, PyObject *args, PyO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_RecentreAll. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_RecentreAll. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -759,8 +605,7 @@ static PyObject *_wrap_wxDiagram_Redraw(PyObject *self, PyObject *args, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_Redraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDiagram_Redraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -841,45 +686,6 @@ static PyObject *_wrap_wxDiagram_RemoveShape(PyObject *self, PyObject *args, PyO
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxDiagram_SaveFile(_swigobj,_swigarg0) (_swigobj->SaveFile(_swigarg0))
|
|
||||||
static PyObject *_wrap_wxDiagram_SaveFile(PyObject *self, PyObject *args, PyObject *kwargs) {
|
|
||||||
PyObject * _resultobj;
|
|
||||||
bool _result;
|
|
||||||
wxDiagram * _arg0;
|
|
||||||
wxString * _arg1;
|
|
||||||
PyObject * _argo0 = 0;
|
|
||||||
PyObject * _obj1 = 0;
|
|
||||||
char *_kwnames[] = { "self","filename", NULL };
|
|
||||||
|
|
||||||
self = self;
|
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDiagram_SaveFile",_kwnames,&_argo0,&_obj1))
|
|
||||||
return NULL;
|
|
||||||
if (_argo0) {
|
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDiagram_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDiagram_SaveFile. Expected _wxDiagram_p.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
_arg1 = wxString_in_helper(_obj1);
|
|
||||||
if (_arg1 == NULL)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
|
||||||
_result = (bool )wxDiagram_SaveFile(_arg0,*_arg1);
|
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
|
||||||
if (PyErr_Occurred()) return NULL;
|
|
||||||
} _resultobj = Py_BuildValue("i",_result);
|
|
||||||
{
|
|
||||||
if (_obj1)
|
|
||||||
delete _arg1;
|
|
||||||
}
|
|
||||||
return _resultobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define wxDiagram_SetCanvas(_swigobj,_swigarg0) (_swigobj->SetCanvas(_swigarg0))
|
#define wxDiagram_SetCanvas(_swigobj,_swigarg0) (_swigobj->SetCanvas(_swigarg0))
|
||||||
static PyObject *_wrap_wxDiagram_SetCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxDiagram_SetCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -1777,8 +1583,7 @@ static PyObject *_wrap_wxPyShapeCanvas_Redraw(PyObject *self, PyObject *args, Py
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeCanvas_Redraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShapeCanvas_Redraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1948,15 +1753,10 @@ static PyMethodDef oglcanvascMethods[] = {
|
|||||||
{ "wxDiagram_SetMouseTolerance", (PyCFunction) _wrap_wxDiagram_SetMouseTolerance, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_SetMouseTolerance", (PyCFunction) _wrap_wxDiagram_SetMouseTolerance, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_SetGridSpacing", (PyCFunction) _wrap_wxDiagram_SetGridSpacing, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_SetGridSpacing", (PyCFunction) _wrap_wxDiagram_SetGridSpacing, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_SetCanvas", (PyCFunction) _wrap_wxDiagram_SetCanvas, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_SetCanvas", (PyCFunction) _wrap_wxDiagram_SetCanvas, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_SaveFile", (PyCFunction) _wrap_wxDiagram_SaveFile, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxDiagram_RemoveShape", (PyCFunction) _wrap_wxDiagram_RemoveShape, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_RemoveShape", (PyCFunction) _wrap_wxDiagram_RemoveShape, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_RemoveAllShapes", (PyCFunction) _wrap_wxDiagram_RemoveAllShapes, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_RemoveAllShapes", (PyCFunction) _wrap_wxDiagram_RemoveAllShapes, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_Redraw", (PyCFunction) _wrap_wxDiagram_Redraw, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_Redraw", (PyCFunction) _wrap_wxDiagram_Redraw, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_RecentreAll", (PyCFunction) _wrap_wxDiagram_RecentreAll, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_RecentreAll", (PyCFunction) _wrap_wxDiagram_RecentreAll, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_ReadNodes", (PyCFunction) _wrap_wxDiagram_ReadNodes, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxDiagram_ReadLines", (PyCFunction) _wrap_wxDiagram_ReadLines, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxDiagram_ReadContainerGeometry", (PyCFunction) _wrap_wxDiagram_ReadContainerGeometry, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxDiagram_LoadFile", (PyCFunction) _wrap_wxDiagram_LoadFile, METH_VARARGS | METH_KEYWORDS },
|
|
||||||
{ "wxDiagram_InsertShape", (PyCFunction) _wrap_wxDiagram_InsertShape, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_InsertShape", (PyCFunction) _wrap_wxDiagram_InsertShape, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_GetSnapToGrid", (PyCFunction) _wrap_wxDiagram_GetSnapToGrid, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_GetSnapToGrid", (PyCFunction) _wrap_wxDiagram_GetSnapToGrid, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxDiagram_GetQuickEditMode", (PyCFunction) _wrap_wxDiagram_GetQuickEditMode, METH_VARARGS | METH_KEYWORDS },
|
{ "wxDiagram_GetQuickEditMode", (PyCFunction) _wrap_wxDiagram_GetQuickEditMode, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -71,8 +71,13 @@ public:
|
|||||||
bool GetQuickEditMode();
|
bool GetQuickEditMode();
|
||||||
bool GetSnapToGrid();
|
bool GetSnapToGrid();
|
||||||
void InsertShape(wxPyShape *shape);
|
void InsertShape(wxPyShape *shape);
|
||||||
bool LoadFile(const wxString& filename);
|
|
||||||
|
|
||||||
|
#ifdef wxUSE_PROLOGIO
|
||||||
|
bool LoadFile(const wxString& filename);
|
||||||
|
bool SaveFile(const wxString& filename);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef wxUSE_PROLOGIO
|
||||||
// **** Have to deal with wxExpr and wxExprDatabase first...
|
// **** Have to deal with wxExpr and wxExprDatabase first...
|
||||||
//void OnDatabaseLoad(wxExprDatabase& database);
|
//void OnDatabaseLoad(wxExprDatabase& database);
|
||||||
//void OnDatabaseSave(wxExprDatabase& database);
|
//void OnDatabaseSave(wxExprDatabase& database);
|
||||||
@@ -80,16 +85,18 @@ public:
|
|||||||
//bool OnHeaderSave(wxExprDatabase& database, wxExpr& expr);
|
//bool OnHeaderSave(wxExprDatabase& database, wxExpr& expr);
|
||||||
//bool OnShapeLoad(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
|
//bool OnShapeLoad(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
|
||||||
//bool OnShapeSave(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
|
//bool OnShapeSave(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef wxUSE_PROLOGIO
|
||||||
void ReadContainerGeometry(wxExprDatabase& database);
|
void ReadContainerGeometry(wxExprDatabase& database);
|
||||||
void ReadLines(wxExprDatabase& database);
|
void ReadLines(wxExprDatabase& database);
|
||||||
void ReadNodes(wxExprDatabase& database);
|
void ReadNodes(wxExprDatabase& database);
|
||||||
|
#endif
|
||||||
|
|
||||||
void RecentreAll(wxDC& dc);
|
void RecentreAll(wxDC& dc);
|
||||||
void Redraw(wxDC& dc);
|
void Redraw(wxDC& dc);
|
||||||
void RemoveAllShapes();
|
void RemoveAllShapes();
|
||||||
void RemoveShape(wxPyShape* shape);
|
void RemoveShape(wxPyShape* shape);
|
||||||
bool SaveFile(const wxString& filename);
|
|
||||||
void SetCanvas(wxPyShapeCanvas* canvas);
|
void SetCanvas(wxPyShapeCanvas* canvas);
|
||||||
void SetGridSpacing(double spacing);
|
void SetGridSpacing(double spacing);
|
||||||
void SetMouseTolerance(int tolerance);
|
void SetMouseTolerance(int tolerance);
|
||||||
|
@@ -88,18 +88,6 @@ class wxDiagramPtr(wxObjectPtr):
|
|||||||
def InsertShape(self, *_args, **_kwargs):
|
def InsertShape(self, *_args, **_kwargs):
|
||||||
val = apply(oglcanvasc.wxDiagram_InsertShape,(self,) + _args, _kwargs)
|
val = apply(oglcanvasc.wxDiagram_InsertShape,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def LoadFile(self, *_args, **_kwargs):
|
|
||||||
val = apply(oglcanvasc.wxDiagram_LoadFile,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def ReadContainerGeometry(self, *_args, **_kwargs):
|
|
||||||
val = apply(oglcanvasc.wxDiagram_ReadContainerGeometry,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def ReadLines(self, *_args, **_kwargs):
|
|
||||||
val = apply(oglcanvasc.wxDiagram_ReadLines,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def ReadNodes(self, *_args, **_kwargs):
|
|
||||||
val = apply(oglcanvasc.wxDiagram_ReadNodes,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def RecentreAll(self, *_args, **_kwargs):
|
def RecentreAll(self, *_args, **_kwargs):
|
||||||
val = apply(oglcanvasc.wxDiagram_RecentreAll,(self,) + _args, _kwargs)
|
val = apply(oglcanvasc.wxDiagram_RecentreAll,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -112,9 +100,6 @@ class wxDiagramPtr(wxObjectPtr):
|
|||||||
def RemoveShape(self, *_args, **_kwargs):
|
def RemoveShape(self, *_args, **_kwargs):
|
||||||
val = apply(oglcanvasc.wxDiagram_RemoveShape,(self,) + _args, _kwargs)
|
val = apply(oglcanvasc.wxDiagram_RemoveShape,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def SaveFile(self, *_args, **_kwargs):
|
|
||||||
val = apply(oglcanvasc.wxDiagram_SaveFile,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetCanvas(self, *_args, **_kwargs):
|
def SetCanvas(self, *_args, **_kwargs):
|
||||||
val = apply(oglcanvasc.wxDiagram_SetCanvas,(self,) + _args, _kwargs)
|
val = apply(oglcanvasc.wxDiagram_SetCanvas,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
@@ -46,16 +46,17 @@ public:
|
|||||||
~wxPseudoMetaFile();
|
~wxPseudoMetaFile();
|
||||||
|
|
||||||
void Draw(wxDC& dc, double xoffset, double yoffset);
|
void Draw(wxDC& dc, double xoffset, double yoffset);
|
||||||
|
#ifdef wxUSE_PROLOGIO
|
||||||
void WriteAttributes(wxExpr *clause, int whichAngle);
|
void WriteAttributes(wxExpr *clause, int whichAngle);
|
||||||
void ReadAttributes(wxExpr *clause, int whichAngle);
|
void ReadAttributes(wxExpr *clause, int whichAngle);
|
||||||
|
#endif
|
||||||
void Clear();
|
void Clear();
|
||||||
void Copy(wxPseudoMetaFile& copy);
|
void Copy(wxPseudoMetaFile& copy);
|
||||||
void Scale(double sx, double sy);
|
void Scale(double sx, double sy);
|
||||||
void ScaleTo(double w, double h);
|
void ScaleTo(double w, double h);
|
||||||
void Translate(double x, double y);
|
void Translate(double x, double y);
|
||||||
void Rotate(double x, double y, double theta);
|
void Rotate(double x, double y, double theta);
|
||||||
bool LoadFromMetaFile(char* filename, double *width, double *height);
|
bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
|
||||||
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
|
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
|
||||||
void CalculateSize(wxPyDrawnShape* shape);
|
void CalculateSize(wxPyDrawnShape* shape);
|
||||||
|
|
||||||
@@ -280,7 +281,7 @@ public:
|
|||||||
wxPseudoMetaFile& GetMetaFile();
|
wxPseudoMetaFile& GetMetaFile();
|
||||||
|
|
||||||
double GetRotation();
|
double GetRotation();
|
||||||
bool LoadFromMetaFile(char * filename);
|
bool LoadFromMetaFile(const wxString& filename);
|
||||||
void Rotate(double x, double y, double theta);
|
void Rotate(double x, double y, double theta);
|
||||||
void SetClippingRect(const wxRect& rect);
|
void SetClippingRect(const wxRect& rect);
|
||||||
void SetDrawnBackgroundColour(const wxColour& colour);
|
void SetDrawnBackgroundColour(const wxColour& colour);
|
||||||
|
@@ -49,18 +49,15 @@ class wxPseudoMetaFilePtr(wxObjectPtr):
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,oglshapesc=oglshapesc):
|
def __del__(self, delfunc=oglshapesc.delete_wxPseudoMetaFile):
|
||||||
if self.thisown == 1:
|
if self.thisown == 1:
|
||||||
oglshapesc.delete_wxPseudoMetaFile(self)
|
try:
|
||||||
|
delfunc(self)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
def Draw(self, *_args, **_kwargs):
|
def Draw(self, *_args, **_kwargs):
|
||||||
val = apply(oglshapesc.wxPseudoMetaFile_Draw,(self,) + _args, _kwargs)
|
val = apply(oglshapesc.wxPseudoMetaFile_Draw,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def WriteAttributes(self, *_args, **_kwargs):
|
|
||||||
val = apply(oglshapesc.wxPseudoMetaFile_WriteAttributes,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def ReadAttributes(self, *_args, **_kwargs):
|
|
||||||
val = apply(oglshapesc.wxPseudoMetaFile_ReadAttributes,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def Clear(self, *_args, **_kwargs):
|
def Clear(self, *_args, **_kwargs):
|
||||||
val = apply(oglshapesc.wxPseudoMetaFile_Clear,(self,) + _args, _kwargs)
|
val = apply(oglshapesc.wxPseudoMetaFile_Clear,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
/* Implementation : PYTHON */
|
/* Implementation : PYTHON */
|
||||||
|
|
||||||
#define SWIGPYTHON
|
#define SWIGPYTHON
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/* Definitions for Windows/Unix exporting */
|
/* Definitions for Windows/Unix exporting */
|
||||||
@@ -36,12 +38,9 @@
|
|||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void SWIG_MakePtr(char *, void *, char *);
|
extern void SWIG_MakePtr(char *, void *, char *);
|
||||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||||
@@ -210,8 +209,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDraw(PyObject *self, PyObject *ar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -247,8 +245,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawContents(PyObject *self, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -286,8 +283,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawBranches(PyObject *self, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawBranches. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawBranches. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -324,8 +320,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMoveLinks(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -361,8 +356,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnErase(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnErase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnErase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -398,8 +392,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnEraseContents(PyObject *self, PyO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnEraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnEraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -435,8 +428,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnHighlight(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnHighlight. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnHighlight. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -605,8 +597,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMovePre(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMovePre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMovePre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -648,8 +639,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMovePost(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMovePost. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMovePost. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -888,8 +878,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawOutline(PyObject *self, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -925,8 +914,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnDrawControlPoints(PyObject *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -962,8 +950,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnEraseControlPoints(PyObject *self
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1001,8 +988,7 @@ static PyObject *_wrap_wxPyEllipseShape_base_OnMoveLink(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMoveLink. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyEllipseShape_base_OnMoveLink. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1322,8 +1308,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDraw(PyObject *self, PyObject *arg
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1359,8 +1344,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawContents(PyObject *self, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1398,8 +1382,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawBranches(PyObject *self, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawBranches. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawBranches. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1436,8 +1419,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMoveLinks(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1473,8 +1455,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnErase(PyObject *self, PyObject *ar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnErase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnErase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1510,8 +1491,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEraseContents(PyObject *self, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnEraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnEraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1547,8 +1527,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnHighlight(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnHighlight. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnHighlight. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1717,8 +1696,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMovePre(PyObject *self, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMovePre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMovePre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1760,8 +1738,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMovePost(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMovePost. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMovePost. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2000,8 +1977,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawOutline(PyObject *self, PyObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2037,8 +2013,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnDrawControlPoints(PyObject *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2074,8 +2049,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnEraseControlPoints(PyObject *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2113,8 +2087,7 @@ static PyObject *_wrap_wxPyCircleShape_base_OnMoveLink(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMoveLink. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyCircleShape_base_OnMoveLink. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -2628,7 +2601,7 @@ static PyObject *_wrap_wxArrowHead_GetName(PyObject *self, PyObject *args, PyObj
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -3149,8 +3122,7 @@ static PyObject *_wrap_wxPyLineShape_DrawArrow(PyObject *self, PyObject *args, P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_DrawArrow. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_DrawArrow. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -3291,8 +3263,7 @@ static PyObject *_wrap_wxPyLineShape_DrawArrows(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_DrawArrows. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_DrawArrows. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -3332,8 +3303,7 @@ static PyObject *_wrap_wxPyLineShape_DrawRegion(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_DrawRegion. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_DrawRegion. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -3380,8 +3350,7 @@ static PyObject *_wrap_wxPyLineShape_EraseRegion(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_EraseRegion. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_EraseRegion. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -3863,7 +3832,7 @@ static PyObject *_wrap_wxPyLineShape_GetLabelPosition(PyObject *self, PyObject *
|
|||||||
#define wxPyLineShape_GetNextControlPoint(_swigobj,_swigarg0) (_swigobj->GetNextControlPoint(_swigarg0))
|
#define wxPyLineShape_GetNextControlPoint(_swigobj,_swigarg0) (_swigobj->GetNextControlPoint(_swigarg0))
|
||||||
static PyObject *_wrap_wxPyLineShape_GetNextControlPoint(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxPyLineShape_GetNextControlPoint(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
wxPoint * _result;
|
wxRealPoint * _result;
|
||||||
wxPyLineShape * _arg0;
|
wxPyLineShape * _arg0;
|
||||||
wxPyShape * _arg1;
|
wxPyShape * _arg1;
|
||||||
PyObject * _argo0 = 0;
|
PyObject * _argo0 = 0;
|
||||||
@@ -3890,12 +3859,12 @@ static PyObject *_wrap_wxPyLineShape_GetNextControlPoint(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
_result = (wxPoint *)wxPyLineShape_GetNextControlPoint(_arg0,_arg1);
|
_result = (wxRealPoint *)wxPyLineShape_GetNextControlPoint(_arg0,_arg1);
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
wxPyEndAllowThreads(__tstate);
|
||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
} if (_result) {
|
} if (_result) {
|
||||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxRealPoint_p");
|
||||||
_resultobj = Py_BuildValue("s",_ptemp);
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
} else {
|
} else {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
@@ -4465,8 +4434,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDraw(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4502,8 +4470,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawContents(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4541,8 +4508,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawBranches(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawBranches. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawBranches. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4579,8 +4545,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMoveLinks(PyObject *self, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4616,8 +4581,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnErase(PyObject *self, PyObject *args
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnErase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnErase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4653,8 +4617,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnEraseContents(PyObject *self, PyObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnEraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnEraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4690,8 +4653,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnHighlight(PyObject *self, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnHighlight. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnHighlight. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4860,8 +4822,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMovePre(PyObject *self, PyObject *ar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMovePre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMovePre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4903,8 +4864,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMovePost(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMovePost. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMovePost. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5143,8 +5103,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawOutline(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5180,8 +5139,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnDrawControlPoints(PyObject *self, Py
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5217,8 +5175,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnEraseControlPoints(PyObject *self, P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5256,8 +5213,7 @@ static PyObject *_wrap_wxPyLineShape_base_OnMoveLink(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMoveLink. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyLineShape_base_OnMoveLink. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5758,8 +5714,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDraw(PyObject *self, PyObject *ar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5795,8 +5750,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawContents(PyObject *self, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5834,8 +5788,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawBranches(PyObject *self, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawBranches. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawBranches. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5872,8 +5825,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMoveLinks(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5909,8 +5861,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnErase(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnErase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnErase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5946,8 +5897,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnEraseContents(PyObject *self, PyO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnEraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnEraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -5983,8 +5933,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnHighlight(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnHighlight. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnHighlight. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6153,8 +6102,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMovePre(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMovePre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMovePre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6196,8 +6144,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMovePost(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMovePost. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMovePost. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6436,8 +6383,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawOutline(PyObject *self, PyObj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6473,8 +6419,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnDrawControlPoints(PyObject *self,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6510,8 +6455,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnEraseControlPoints(PyObject *self
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6549,8 +6493,7 @@ static PyObject *_wrap_wxPyPolygonShape_base_OnMoveLink(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMoveLink. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPolygonShape_base_OnMoveLink. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6899,8 +6842,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDraw(PyObject *self, PyObject *args,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDraw. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDraw. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6936,8 +6878,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawContents(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -6975,8 +6916,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawBranches(PyObject *self, PyObjec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawBranches. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawBranches. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7013,8 +6953,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMoveLinks(PyObject *self, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMoveLinks. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMoveLinks. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7050,8 +6989,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnErase(PyObject *self, PyObject *args
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnErase. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnErase. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7087,8 +7025,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnEraseContents(PyObject *self, PyObje
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnEraseContents. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnEraseContents. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7124,8 +7061,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnHighlight(PyObject *self, PyObject *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnHighlight. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnHighlight. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7294,8 +7230,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMovePre(PyObject *self, PyObject *ar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMovePre. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMovePre. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7337,8 +7272,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMovePost(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMovePost. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMovePost. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7577,8 +7511,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawOutline(PyObject *self, PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawOutline. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawOutline. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7614,8 +7547,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnDrawControlPoints(PyObject *self, Py
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnDrawControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7651,8 +7583,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnEraseControlPoints(PyObject *self, P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnEraseControlPoints. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -7690,8 +7621,7 @@ static PyObject *_wrap_wxPyTextShape_base_OnMoveLink(PyObject *self, PyObject *a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMoveLink. Expected _wxDC_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTextShape_base_OnMoveLink. Expected _wxDC_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@@ -209,7 +209,7 @@ public:
|
|||||||
void GetEnds(double *OUTPUT, double *OUTPUT, double *OUTPUT, double *OUTPUT);
|
void GetEnds(double *OUTPUT, double *OUTPUT, double *OUTPUT, double *OUTPUT);
|
||||||
wxPyShape * GetFrom();
|
wxPyShape * GetFrom();
|
||||||
void GetLabelPosition(int position, double *OUTPUT, double *OUTPUT);
|
void GetLabelPosition(int position, double *OUTPUT, double *OUTPUT);
|
||||||
wxPoint * GetNextControlPoint(wxPyShape *shape);
|
wxRealPoint * GetNextControlPoint(wxPyShape *shape);
|
||||||
wxPyShape * GetTo();
|
wxPyShape * GetTo();
|
||||||
void Initialise();
|
void Initialise();
|
||||||
void InsertLineControlPoint(wxDC* dc);
|
void InsertLineControlPoint(wxDC* dc);
|
||||||
|
@@ -257,9 +257,12 @@ class wxArrowHeadPtr(wxObjectPtr):
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,oglshapes2c=oglshapes2c):
|
def __del__(self, delfunc=oglshapes2c.delete_wxArrowHead):
|
||||||
if self.thisown == 1:
|
if self.thisown == 1:
|
||||||
oglshapes2c.delete_wxArrowHead(self)
|
try:
|
||||||
|
delfunc(self)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
def _GetType(self, *_args, **_kwargs):
|
def _GetType(self, *_args, **_kwargs):
|
||||||
val = apply(oglshapes2c.wxArrowHead__GetType,(self,) + _args, _kwargs)
|
val = apply(oglshapes2c.wxArrowHead__GetType,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -393,7 +396,7 @@ class wxPyLineShapePtr(wxPyShapePtr):
|
|||||||
return val
|
return val
|
||||||
def GetNextControlPoint(self, *_args, **_kwargs):
|
def GetNextControlPoint(self, *_args, **_kwargs):
|
||||||
val = apply(oglshapes2c.wxPyLineShape_GetNextControlPoint,(self,) + _args, _kwargs)
|
val = apply(oglshapes2c.wxPyLineShape_GetNextControlPoint,(self,) + _args, _kwargs)
|
||||||
if val: val = wxPointPtr(val)
|
if val: val = wxRealPointPtr(val)
|
||||||
return val
|
return val
|
||||||
def GetTo(self, *_args, **_kwargs):
|
def GetTo(self, *_args, **_kwargs):
|
||||||
val = apply(oglshapes2c.wxPyLineShape_GetTo,(self,) + _args, _kwargs)
|
val = apply(oglshapes2c.wxPyLineShape_GetTo,(self,) + _args, _kwargs)
|
||||||
|
@@ -3,5 +3,5 @@
|
|||||||
wx.wxStyledTextEventPtr = wxStyledTextEventPtr
|
wx.wxStyledTextEventPtr = wxStyledTextEventPtr
|
||||||
wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr
|
wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr
|
||||||
|
|
||||||
|
# This constant no longer exists in Scintilla, but I'll put it here for a while to avoid disrupting user code...
|
||||||
wxSTC_CARET_CENTER = wxSTC_CARET_STRICT
|
wxSTC_CARET_CENTER = 0
|
||||||
|
@@ -4,3 +4,35 @@
|
|||||||
wxTheXmlResource = wxXmlResource_Get()
|
wxTheXmlResource = wxXmlResource_Get()
|
||||||
|
|
||||||
wx.wxXmlNodePtr = wxXmlNodePtr
|
wx.wxXmlNodePtr = wxXmlNodePtr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
# Create a factory for handling the subclass property of the object tag.
|
||||||
|
|
||||||
|
|
||||||
|
def _my_import(name):
|
||||||
|
mod = __import__(name)
|
||||||
|
components = name.split('.')
|
||||||
|
for comp in components[1:]:
|
||||||
|
mod = getattr(mod, comp)
|
||||||
|
return mod
|
||||||
|
|
||||||
|
|
||||||
|
class wxXmlSubclassFactory_Python(wxXmlSubclassFactory):
|
||||||
|
def __init__(self):
|
||||||
|
wxXmlSubclassFactory.__init__(self)
|
||||||
|
|
||||||
|
def Create(self, className):
|
||||||
|
assert className.find('.') != -1, "Module name must be specified!"
|
||||||
|
mname = className[:className.rfind('.')]
|
||||||
|
cname = className[className.rfind('.')+1:]
|
||||||
|
module = _my_import(mname)
|
||||||
|
klass = getattr(module, cname)
|
||||||
|
inst = klass()
|
||||||
|
return inst
|
||||||
|
|
||||||
|
|
||||||
|
wxXmlResource_AddSubclassFactory(wxXmlSubclassFactory_Python())
|
||||||
|
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
/* Implementation : PYTHON */
|
/* Implementation : PYTHON */
|
||||||
|
|
||||||
#define SWIGPYTHON
|
#define SWIGPYTHON
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
/* Definitions for Windows/Unix exporting */
|
/* Definitions for Windows/Unix exporting */
|
||||||
@@ -36,12 +38,9 @@
|
|||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT(a) a
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Python.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void SWIG_MakePtr(char *, void *, char *);
|
extern void SWIG_MakePtr(char *, void *, char *);
|
||||||
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
|
||||||
extern char *SWIG_GetPtr(char *, void **, char *);
|
extern char *SWIG_GetPtr(char *, void **, char *);
|
||||||
@@ -98,6 +97,16 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
static const wxString wxPyBitmapString(wxT("bitmap"));
|
static const wxString wxPyBitmapString(wxT("bitmap"));
|
||||||
static const wxString wxPyIconString(wxT("icon"));
|
static const wxString wxPyIconString(wxT("icon"));
|
||||||
static const wxString wxPyFontString(wxT("font"));
|
static const wxString wxPyFontString(wxT("font"));
|
||||||
|
|
||||||
|
class wxPyXmlSubclassFactory : public wxXmlSubclassFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxPyXmlSubclassFactory() {}
|
||||||
|
DEC_PYCALLBACK_OBJECT_STRING_pure(Create);
|
||||||
|
PYPRIVATE;
|
||||||
|
};
|
||||||
|
|
||||||
|
IMP_PYCALLBACK_OBJECT_STRING_pure(wxPyXmlSubclassFactory, wxXmlSubclassFactory, Create);
|
||||||
// C++ version of Python aware wxXmlResourceHandler, for the pure virtual
|
// C++ version of Python aware wxXmlResourceHandler, for the pure virtual
|
||||||
// callbacks, as well as to make some protected things public so they can
|
// callbacks, as well as to make some protected things public so they can
|
||||||
// be wrapped.
|
// be wrapped.
|
||||||
@@ -111,34 +120,6 @@ public:
|
|||||||
DEC_PYCALLBACK_OBJECT__pure(DoCreateResource);
|
DEC_PYCALLBACK_OBJECT__pure(DoCreateResource);
|
||||||
DEC_PYCALLBACK_BOOL_NODE_pure(CanHandle);
|
DEC_PYCALLBACK_BOOL_NODE_pure(CanHandle);
|
||||||
|
|
||||||
// wxObject* DoCreateResource() {
|
|
||||||
// wxObject* rv = NULL;
|
|
||||||
// wxPyBeginBlockThreads();
|
|
||||||
// if (wxPyCBH_findCallback(m_myInst, "DoCreateResource")) {
|
|
||||||
// PyObject* ro;
|
|
||||||
// ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
|
|
||||||
// if (ro) {
|
|
||||||
// SWIG_GetPtrObj(ro, (void **)&rv, "_wxObject_p");
|
|
||||||
// Py_DECREF(ro);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// wxPyEndBlockThreads();
|
|
||||||
// return rv;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool CanHandle(wxXmlNode* a) {
|
|
||||||
// bool rv=FALSE;
|
|
||||||
// wxPyBeginBlockThreads();
|
|
||||||
// if (wxPyCBH_findCallback(m_myInst, "CanHandle")) {
|
|
||||||
// PyObject* obj = wxPyConstructObject((void*)a, "wxXmlNode", 0);
|
|
||||||
// rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
|
|
||||||
// Py_DECREF(obj);
|
|
||||||
// }
|
|
||||||
// wxPyEndBlockThreads();
|
|
||||||
// return rv;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// accessors for protected members
|
// accessors for protected members
|
||||||
|
|
||||||
@@ -576,6 +557,33 @@ static PyObject *_wrap_wxXmlResource_ClearHandlers(PyObject *self, PyObject *arg
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxXmlResource_AddSubclassFactory(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxPyXmlSubclassFactory * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "factory", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_AddSubclassFactory",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyXmlSubclassFactory_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_AddSubclassFactory. Expected _wxPyXmlSubclassFactory_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxXmlResource::AddSubclassFactory(_arg0);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxXmlResource_LoadMenu(_swigobj,_swigarg0) (_swigobj->LoadMenu(_swigarg0))
|
#define wxXmlResource_LoadMenu(_swigobj,_swigarg0) (_swigobj->LoadMenu(_swigarg0))
|
||||||
static PyObject *_wrap_wxXmlResource_LoadMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxXmlResource_LoadMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -1521,6 +1529,99 @@ static PyObject *_wrap_wxXmlResource_GetFlags(PyObject *self, PyObject *args, Py
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxXmlResource_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxXmlResource_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxXmlResource * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","flags", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxXmlResource_SetFlags",_kwnames,&_argo0,&_arg1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_SetFlags. Expected _wxXmlResource_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxXmlResource_SetFlags(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define new_wxXmlSubclassFactory() (new wxPyXmlSubclassFactory())
|
||||||
|
static PyObject *_wrap_new_wxXmlSubclassFactory(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxPyXmlSubclassFactory * _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxXmlSubclassFactory",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (wxPyXmlSubclassFactory *)new_wxXmlSubclassFactory();
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} if (_result) {
|
||||||
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyXmlSubclassFactory_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxXmlSubclassFactory__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxXmlSubclassFactory__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxPyXmlSubclassFactory * _arg0;
|
||||||
|
PyObject * _arg1;
|
||||||
|
PyObject * _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
PyObject * _obj2 = 0;
|
||||||
|
char *_kwnames[] = { "self","self","_class", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxXmlSubclassFactory__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyXmlSubclassFactory_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlSubclassFactory__setCallbackInfo. Expected _wxPyXmlSubclassFactory_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg1 = _obj1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg2 = _obj2;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxXmlSubclassFactory__setCallbackInfo(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define new_wxXmlProperty(_swigarg0,_swigarg1,_swigarg2) (new wxXmlProperty(_swigarg0,_swigarg1,_swigarg2))
|
#define new_wxXmlProperty(_swigarg0,_swigarg1,_swigarg2) (new wxXmlProperty(_swigarg0,_swigarg1,_swigarg2))
|
||||||
static PyObject *_wrap_new_wxXmlProperty(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_new_wxXmlProperty(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -1606,7 +1707,7 @@ static PyObject *_wrap_wxXmlProperty_GetName(PyObject *self, PyObject *args, PyO
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -1643,7 +1744,7 @@ static PyObject *_wrap_wxXmlProperty_GetValue(PyObject *self, PyObject *args, Py
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -2260,7 +2361,7 @@ static PyObject *_wrap_wxXmlNode_GetName(PyObject *self, PyObject *args, PyObjec
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -2297,7 +2398,7 @@ static PyObject *_wrap_wxXmlNode_GetContent(PyObject *self, PyObject *args, PyOb
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -2488,7 +2589,7 @@ static PyObject *_wrap_wxXmlNode_GetPropVal(PyObject *self, PyObject *args, PyOb
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -3143,8 +3244,7 @@ static PyObject *_wrap_wxXmlDocument_SaveToStream(PyObject *self, PyObject *args
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_argo1) {
|
if (_argo1) {
|
||||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxOutputStream_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxOutputStream_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlDocument_SaveToStream. Expected _wxOutputStream_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlDocument_SaveToStream. Expected _wxOutputStream_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -3248,7 +3348,7 @@ static PyObject *_wrap_wxXmlDocument_GetVersion(PyObject *self, PyObject *args,
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -3285,7 +3385,7 @@ static PyObject *_wrap_wxXmlDocument_GetFileEncoding(PyObject *self, PyObject *a
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -3443,7 +3543,7 @@ static PyObject *_wrap_wxXmlDocument_GetEncoding(PyObject *self, PyObject *args,
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -3454,6 +3554,51 @@ static PyObject *_wrap_wxXmlDocument_GetEncoding(PyObject *self, PyObject *args,
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void wxXmlDocument_SetEncoding(wxXmlDocument *self,const wxString & enc) {
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
// do nothing
|
||||||
|
#else
|
||||||
|
self->SetEncoding(enc);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
static PyObject *_wrap_wxXmlDocument_SetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxXmlDocument * _arg0;
|
||||||
|
wxString * _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
char *_kwnames[] = { "self","enc", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlDocument_SetEncoding",_kwnames,&_argo0,&_obj1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlDocument_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlDocument_SetEncoding. Expected _wxXmlDocument_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg1 = wxString_in_helper(_obj1);
|
||||||
|
if (_arg1 == NULL)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxXmlDocument_SetEncoding(_arg0,*_arg1);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
{
|
||||||
|
if (_obj1)
|
||||||
|
delete _arg1;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxPyXmlResourceHandlerTowxObject(void *ptr) {
|
static void *SwigwxPyXmlResourceHandlerTowxObject(void *ptr) {
|
||||||
wxPyXmlResourceHandler *src;
|
wxPyXmlResourceHandler *src;
|
||||||
wxObject *dest;
|
wxObject *dest;
|
||||||
@@ -3714,7 +3859,7 @@ static PyObject *_wrap_wxXmlResourceHandler_GetClass(PyObject *self, PyObject *a
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -3920,7 +4065,7 @@ static PyObject *_wrap_wxXmlResourceHandler_GetNodeContent(PyObject *self, PyObj
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -4049,7 +4194,7 @@ static PyObject *_wrap_wxXmlResourceHandler_GetParamValue(PyObject *self, PyObje
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -4209,7 +4354,7 @@ static PyObject *_wrap_wxXmlResourceHandler_GetText(PyObject *self, PyObject *ar
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -4278,7 +4423,7 @@ static PyObject *_wrap_wxXmlResourceHandler_GetName(PyObject *self, PyObject *ar
|
|||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
}{
|
}{
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||||
#else
|
#else
|
||||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||||
#endif
|
#endif
|
||||||
@@ -4569,8 +4714,7 @@ static PyObject *_wrap_wxXmlResourceHandler_GetBitmap(PyObject *self, PyObject *
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_argo2) {
|
if (_argo2) {
|
||||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArtClient_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArtClient_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResourceHandler_GetBitmap. Expected _wxArtClient_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResourceHandler_GetBitmap. Expected _wxArtClient_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4629,8 +4773,7 @@ static PyObject *_wrap_wxXmlResourceHandler_GetIcon(PyObject *self, PyObject *ar
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_argo2) {
|
if (_argo2) {
|
||||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArtClient_p")) {
|
||||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArtClient_p")) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResourceHandler_GetIcon. Expected _wxArtClient_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxXmlResourceHandler_GetIcon. Expected _wxArtClient_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -4942,6 +5085,7 @@ static PyMethodDef xrccMethods[] = {
|
|||||||
{ "wxXmlResourceHandler_CreateResource", (PyCFunction) _wrap_wxXmlResourceHandler_CreateResource, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResourceHandler_CreateResource", (PyCFunction) _wrap_wxXmlResourceHandler_CreateResource, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResourceHandler__setCallbackInfo", (PyCFunction) _wrap_wxXmlResourceHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResourceHandler__setCallbackInfo", (PyCFunction) _wrap_wxXmlResourceHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxXmlResourceHandler", (PyCFunction) _wrap_new_wxXmlResourceHandler, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxXmlResourceHandler", (PyCFunction) _wrap_new_wxXmlResourceHandler, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxXmlDocument_SetEncoding", (PyCFunction) _wrap_wxXmlDocument_SetEncoding, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlDocument_GetEncoding", (PyCFunction) _wrap_wxXmlDocument_GetEncoding, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlDocument_GetEncoding", (PyCFunction) _wrap_wxXmlDocument_GetEncoding, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlDocument_SetFileEncoding", (PyCFunction) _wrap_wxXmlDocument_SetFileEncoding, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlDocument_SetFileEncoding", (PyCFunction) _wrap_wxXmlDocument_SetFileEncoding, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlDocument_SetVersion", (PyCFunction) _wrap_wxXmlDocument_SetVersion, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlDocument_SetVersion", (PyCFunction) _wrap_wxXmlDocument_SetVersion, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -4990,6 +5134,9 @@ static PyMethodDef xrccMethods[] = {
|
|||||||
{ "wxXmlProperty_GetValue", (PyCFunction) _wrap_wxXmlProperty_GetValue, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlProperty_GetValue", (PyCFunction) _wrap_wxXmlProperty_GetValue, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlProperty_GetName", (PyCFunction) _wrap_wxXmlProperty_GetName, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlProperty_GetName", (PyCFunction) _wrap_wxXmlProperty_GetName, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxXmlProperty", (PyCFunction) _wrap_new_wxXmlProperty, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxXmlProperty", (PyCFunction) _wrap_new_wxXmlProperty, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxXmlSubclassFactory__setCallbackInfo", (PyCFunction) _wrap_wxXmlSubclassFactory__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "new_wxXmlSubclassFactory", (PyCFunction) _wrap_new_wxXmlSubclassFactory, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxXmlResource_SetFlags", (PyCFunction) _wrap_wxXmlResource_SetFlags, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_GetFlags", (PyCFunction) _wrap_wxXmlResource_GetFlags, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_GetFlags", (PyCFunction) _wrap_wxXmlResource_GetFlags, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_Set", (PyCFunction) _wrap_wxXmlResource_Set, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_Set", (PyCFunction) _wrap_wxXmlResource_Set, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -5011,6 +5158,7 @@ static PyMethodDef xrccMethods[] = {
|
|||||||
{ "wxXmlResource_LoadMenuBarOnFrame", (PyCFunction) _wrap_wxXmlResource_LoadMenuBarOnFrame, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_LoadMenuBarOnFrame", (PyCFunction) _wrap_wxXmlResource_LoadMenuBarOnFrame, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_LoadMenuBar", (PyCFunction) _wrap_wxXmlResource_LoadMenuBar, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_LoadMenuBar", (PyCFunction) _wrap_wxXmlResource_LoadMenuBar, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_LoadMenu", (PyCFunction) _wrap_wxXmlResource_LoadMenu, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_LoadMenu", (PyCFunction) _wrap_wxXmlResource_LoadMenu, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxXmlResource_AddSubclassFactory", (PyCFunction) _wrap_wxXmlResource_AddSubclassFactory, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_ClearHandlers", (PyCFunction) _wrap_wxXmlResource_ClearHandlers, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_ClearHandlers", (PyCFunction) _wrap_wxXmlResource_ClearHandlers, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_InsertHandler", (PyCFunction) _wrap_wxXmlResource_InsertHandler, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_InsertHandler", (PyCFunction) _wrap_wxXmlResource_InsertHandler, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_AddHandler", (PyCFunction) _wrap_wxXmlResource_AddHandler, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_AddHandler", (PyCFunction) _wrap_wxXmlResource_AddHandler, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -48,6 +48,9 @@
|
|||||||
static const wxString wxPyIconString(wxT("icon"));
|
static const wxString wxPyIconString(wxT("icon"));
|
||||||
static const wxString wxPyFontString(wxT("font"));
|
static const wxString wxPyFontString(wxT("font"));
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
class wxPyXmlSubclassFactory;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
enum wxXmlResourceFlags
|
enum wxXmlResourceFlags
|
||||||
@@ -128,6 +131,12 @@ public:
|
|||||||
// Removes all handlers
|
// Removes all handlers
|
||||||
void ClearHandlers();
|
void ClearHandlers();
|
||||||
|
|
||||||
|
// Registers subclasses factory for use in XRC. This function is not meant
|
||||||
|
// for public use, please see the comment above wxXmlSubclassFactory
|
||||||
|
// definition.
|
||||||
|
static void AddSubclassFactory(wxPyXmlSubclassFactory *factory);
|
||||||
|
|
||||||
|
|
||||||
// Loads menu from resource. Returns NULL on failure.
|
// Loads menu from resource. Returns NULL on failure.
|
||||||
wxMenu *LoadMenu(const wxString& name);
|
wxMenu *LoadMenu(const wxString& name);
|
||||||
|
|
||||||
@@ -199,6 +208,9 @@ public:
|
|||||||
// Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
|
// Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
|
||||||
int GetFlags();
|
int GetFlags();
|
||||||
|
|
||||||
|
// Set flags after construction.
|
||||||
|
void SetFlags(int flags) { m_flags = flags; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -215,6 +227,31 @@ XMLCTRL = XRCCTRL
|
|||||||
"
|
"
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
// wxXmlSubclassFactory
|
||||||
|
|
||||||
|
|
||||||
|
%{
|
||||||
|
class wxPyXmlSubclassFactory : public wxXmlSubclassFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxPyXmlSubclassFactory() {}
|
||||||
|
DEC_PYCALLBACK_OBJECT_STRING_pure(Create);
|
||||||
|
PYPRIVATE;
|
||||||
|
};
|
||||||
|
|
||||||
|
IMP_PYCALLBACK_OBJECT_STRING_pure(wxPyXmlSubclassFactory, wxXmlSubclassFactory, Create);
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
||||||
|
%name(wxXmlSubclassFactory)class wxPyXmlSubclassFactory {
|
||||||
|
public:
|
||||||
|
wxPyXmlSubclassFactory();
|
||||||
|
|
||||||
|
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
||||||
|
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxXmlSubclassFactory)"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// In order to provide wrappers for wxXmlResourceHandler we need to also
|
// In order to provide wrappers for wxXmlResourceHandler we need to also
|
||||||
// provide the classes for representing and parsing XML.
|
// provide the classes for representing and parsing XML.
|
||||||
@@ -374,6 +411,13 @@ public:
|
|||||||
return self->GetEncoding();
|
return self->GetEncoding();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
void SetEncoding(const wxString& enc) {
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
// do nothing
|
||||||
|
#else
|
||||||
|
self->SetEncoding(enc);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -396,34 +440,6 @@ public:
|
|||||||
DEC_PYCALLBACK_OBJECT__pure(DoCreateResource);
|
DEC_PYCALLBACK_OBJECT__pure(DoCreateResource);
|
||||||
DEC_PYCALLBACK_BOOL_NODE_pure(CanHandle);
|
DEC_PYCALLBACK_BOOL_NODE_pure(CanHandle);
|
||||||
|
|
||||||
// wxObject* DoCreateResource() {
|
|
||||||
// wxObject* rv = NULL;
|
|
||||||
// wxPyBeginBlockThreads();
|
|
||||||
// if (wxPyCBH_findCallback(m_myInst, "DoCreateResource")) {
|
|
||||||
// PyObject* ro;
|
|
||||||
// ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
|
|
||||||
// if (ro) {
|
|
||||||
// SWIG_GetPtrObj(ro, (void **)&rv, "_wxObject_p");
|
|
||||||
// Py_DECREF(ro);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// wxPyEndBlockThreads();
|
|
||||||
// return rv;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool CanHandle(wxXmlNode* a) {
|
|
||||||
// bool rv=FALSE;
|
|
||||||
// wxPyBeginBlockThreads();
|
|
||||||
// if (wxPyCBH_findCallback(m_myInst, "CanHandle")) {
|
|
||||||
// PyObject* obj = wxPyConstructObject((void*)a, "wxXmlNode", 0);
|
|
||||||
// rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
|
|
||||||
// Py_DECREF(obj);
|
|
||||||
// }
|
|
||||||
// wxPyEndBlockThreads();
|
|
||||||
// return rv;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// accessors for protected members
|
// accessors for protected members
|
||||||
|
|
||||||
|
@@ -56,9 +56,12 @@ class wxXmlResourcePtr(wxObjectPtr):
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,xrcc=xrcc):
|
def __del__(self, delfunc=xrcc.delete_wxXmlResource):
|
||||||
if self.thisown == 1:
|
if self.thisown == 1:
|
||||||
xrcc.delete_wxXmlResource(self)
|
try:
|
||||||
|
delfunc(self)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
def Load(self, *_args, **_kwargs):
|
def Load(self, *_args, **_kwargs):
|
||||||
val = apply(xrcc.wxXmlResource_Load,(self,) + _args, _kwargs)
|
val = apply(xrcc.wxXmlResource_Load,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -135,6 +138,9 @@ class wxXmlResourcePtr(wxObjectPtr):
|
|||||||
def GetFlags(self, *_args, **_kwargs):
|
def GetFlags(self, *_args, **_kwargs):
|
||||||
val = apply(xrcc.wxXmlResource_GetFlags,(self,) + _args, _kwargs)
|
val = apply(xrcc.wxXmlResource_GetFlags,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetFlags(self, *_args, **_kwargs):
|
||||||
|
val = apply(xrcc.wxXmlResource_SetFlags,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxXmlResource instance at %s>" % (self.this,)
|
return "<C wxXmlResource instance at %s>" % (self.this,)
|
||||||
class wxXmlResource(wxXmlResourcePtr):
|
class wxXmlResource(wxXmlResourcePtr):
|
||||||
@@ -152,6 +158,24 @@ def wxEmptyXmlResource(*_args,**_kwargs):
|
|||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
||||||
|
class wxXmlSubclassFactoryPtr :
|
||||||
|
def __init__(self,this):
|
||||||
|
self.this = this
|
||||||
|
self.thisown = 0
|
||||||
|
def _setCallbackInfo(self, *_args, **_kwargs):
|
||||||
|
val = apply(xrcc.wxXmlSubclassFactory__setCallbackInfo,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def __repr__(self):
|
||||||
|
return "<C wxXmlSubclassFactory instance at %s>" % (self.this,)
|
||||||
|
class wxXmlSubclassFactory(wxXmlSubclassFactoryPtr):
|
||||||
|
def __init__(self,*_args,**_kwargs):
|
||||||
|
self.this = apply(xrcc.new_wxXmlSubclassFactory,_args,_kwargs)
|
||||||
|
self.thisown = 1
|
||||||
|
self._setCallbackInfo(self, wxXmlSubclassFactory)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class wxXmlPropertyPtr :
|
class wxXmlPropertyPtr :
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
@@ -189,9 +213,12 @@ class wxXmlNodePtr :
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,xrcc=xrcc):
|
def __del__(self, delfunc=xrcc.delete_wxXmlNode):
|
||||||
if self.thisown == 1:
|
if self.thisown == 1:
|
||||||
xrcc.delete_wxXmlNode(self)
|
try:
|
||||||
|
delfunc(self)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
def AddChild(self, *_args, **_kwargs):
|
def AddChild(self, *_args, **_kwargs):
|
||||||
val = apply(xrcc.wxXmlNode_AddChild,(self,) + _args, _kwargs)
|
val = apply(xrcc.wxXmlNode_AddChild,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -281,9 +308,12 @@ class wxXmlDocumentPtr(wxObjectPtr):
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,xrcc=xrcc):
|
def __del__(self, delfunc=xrcc.delete_wxXmlDocument):
|
||||||
if self.thisown == 1:
|
if self.thisown == 1:
|
||||||
xrcc.delete_wxXmlDocument(self)
|
try:
|
||||||
|
delfunc(self)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
def Load(self, *_args, **_kwargs):
|
def Load(self, *_args, **_kwargs):
|
||||||
val = apply(xrcc.wxXmlDocument_Load,(self,) + _args, _kwargs)
|
val = apply(xrcc.wxXmlDocument_Load,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -321,6 +351,9 @@ class wxXmlDocumentPtr(wxObjectPtr):
|
|||||||
def GetEncoding(self, *_args, **_kwargs):
|
def GetEncoding(self, *_args, **_kwargs):
|
||||||
val = apply(xrcc.wxXmlDocument_GetEncoding,(self,) + _args, _kwargs)
|
val = apply(xrcc.wxXmlDocument_GetEncoding,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetEncoding(self, *_args, **_kwargs):
|
||||||
|
val = apply(xrcc.wxXmlDocument_SetEncoding,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxXmlDocument instance at %s>" % (self.this,)
|
return "<C wxXmlDocument instance at %s>" % (self.this,)
|
||||||
class wxXmlDocument(wxXmlDocumentPtr):
|
class wxXmlDocument(wxXmlDocumentPtr):
|
||||||
@@ -474,6 +507,8 @@ class wxXmlResourceHandler(wxXmlResourceHandlerPtr):
|
|||||||
|
|
||||||
#-------------- FUNCTION WRAPPERS ------------------
|
#-------------- FUNCTION WRAPPERS ------------------
|
||||||
|
|
||||||
|
wxXmlResource_AddSubclassFactory = xrcc.wxXmlResource_AddSubclassFactory
|
||||||
|
|
||||||
wxXmlResource_GetXRCID = xrcc.wxXmlResource_GetXRCID
|
wxXmlResource_GetXRCID = xrcc.wxXmlResource_GetXRCID
|
||||||
|
|
||||||
def wxXmlResource_Get(*_args, **_kwargs):
|
def wxXmlResource_Get(*_args, **_kwargs):
|
||||||
@@ -515,3 +550,35 @@ wxXML_HTML_DOCUMENT_NODE = xrcc.wxXML_HTML_DOCUMENT_NODE
|
|||||||
wxTheXmlResource = wxXmlResource_Get()
|
wxTheXmlResource = wxXmlResource_Get()
|
||||||
|
|
||||||
wx.wxXmlNodePtr = wxXmlNodePtr
|
wx.wxXmlNodePtr = wxXmlNodePtr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
# Create a factory for handling the subclass property of the object tag.
|
||||||
|
|
||||||
|
|
||||||
|
def _my_import(name):
|
||||||
|
mod = __import__(name)
|
||||||
|
components = name.split('.')
|
||||||
|
for comp in components[1:]:
|
||||||
|
mod = getattr(mod, comp)
|
||||||
|
return mod
|
||||||
|
|
||||||
|
|
||||||
|
class wxXmlSubclassFactory_Python(wxXmlSubclassFactory):
|
||||||
|
def __init__(self):
|
||||||
|
wxXmlSubclassFactory.__init__(self)
|
||||||
|
|
||||||
|
def Create(self, className):
|
||||||
|
assert className.find('.') != -1, "Module name must be specified!"
|
||||||
|
mname = className[:className.rfind('.')]
|
||||||
|
cname = className[className.rfind('.')+1:]
|
||||||
|
module = _my_import(mname)
|
||||||
|
klass = getattr(module, cname)
|
||||||
|
inst = klass()
|
||||||
|
return inst
|
||||||
|
|
||||||
|
|
||||||
|
wxXmlResource_AddSubclassFactory(wxXmlSubclassFactory_Python())
|
||||||
|
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
._demo.py
|
||||||
.emacs.desktop
|
.emacs.desktop
|
||||||
|
.gdb_history
|
||||||
|
.setup.sh
|
||||||
b.bat
|
b.bat
|
||||||
hangman_dict.txt
|
hangman_dict.txt
|
||||||
mimetypes_wdr
|
mimetypes_wdr
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import sys, string
|
import sys
|
||||||
|
|
||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
from wxPython.html import *
|
from wxPython.html import *
|
||||||
@@ -46,12 +46,12 @@ demo item so you can learn how to use the classes yourself.</p>
|
|||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wxDialog.__init__(self, parent, -1, 'About the wxPython demo',)
|
wxDialog.__init__(self, parent, -1, 'About the wxPython demo',)
|
||||||
html = wxHtmlWindow(self, -1, size=(420, -1))
|
html = wxHtmlWindow(self, -1, size=(420, -1))
|
||||||
py_version = string.split(sys.version)[0]
|
py_version = sys.version.split()[0]
|
||||||
html.SetPage(self.text % (wx.__version__, py_version))
|
html.SetPage(self.text % (wx.__version__, py_version))
|
||||||
btn = html.FindWindowById(wxID_OK)
|
btn = html.FindWindowById(wxID_OK)
|
||||||
btn.SetDefault()
|
btn.SetDefault()
|
||||||
ir = html.GetInternalRepresentation()
|
ir = html.GetInternalRepresentation()
|
||||||
html.SetSize( (ir.GetWidth()+5, ir.GetHeight()+5) )
|
html.SetSize( (ir.GetWidth()+25, ir.GetHeight()+25) )
|
||||||
self.SetClientSize(html.GetSize())
|
self.SetClientSize(html.GetSize())
|
||||||
self.CentreOnParent(wxBOTH)
|
self.CentreOnParent(wxBOTH)
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ class TestPanel(wxPanel):
|
|||||||
sizer.Add(btnSizer, 0, wxEXPAND)
|
sizer.Add(btnSizer, 0, wxEXPAND)
|
||||||
|
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
|
|
||||||
EVT_WINDOW_DESTROY(self, self.OnDestroy)
|
EVT_WINDOW_DESTROY(self, self.OnDestroy)
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
app = wxPySimpleApp()
|
app = wxPySimpleApp()
|
||||||
frame = TestFrame()
|
frame = TestFrame()
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -101,12 +101,18 @@ class TestPanel(wxWindow):
|
|||||||
self.location.Append(self.current)
|
self.location.Append(self.current)
|
||||||
|
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
EVT_SIZE(self, self.OnSize)
|
EVT_SIZE(self, self.OnSize)
|
||||||
|
|
||||||
EVT_WINDOW_DESTROY(self, self.OnDestroy)
|
EVT_WINDOW_DESTROY(self, self.OnDestroy)
|
||||||
|
|
||||||
|
|
||||||
|
def ShutdownDemo(self):
|
||||||
|
# put the frame title back
|
||||||
|
if self.frame:
|
||||||
|
self.frame.SetTitle(self.titleBase)
|
||||||
|
|
||||||
|
|
||||||
def OnDestroy(self, evt):
|
def OnDestroy(self, evt):
|
||||||
if self.ie:
|
if self.ie:
|
||||||
self.ie.Cleanup()
|
self.ie.Cleanup()
|
||||||
@@ -224,7 +230,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
app = wxPySimpleApp()
|
app = wxPySimpleApp()
|
||||||
frame = TestFrame()
|
frame = TestFrame()
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
from wxPython.lib.colourselect import *
|
from wxPython.lib.colourselect import *
|
||||||
import string
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ class TestColourSelect(wxPanel):
|
|||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
self.log = log
|
self.log = log
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
mainSizer = wxBoxSizer(wxVERTICAL)
|
mainSizer = wxBoxSizer(wxVERTICAL)
|
||||||
self.SetSizer(mainSizer)
|
self.SetSizer(mainSizer)
|
||||||
t = wxStaticText(self, -1,
|
t = wxStaticText(self, -1,
|
||||||
@@ -86,7 +85,7 @@ class TestColourSelect(wxPanel):
|
|||||||
colour = button.GetColour() # get the colour selection button result
|
colour = button.GetColour() # get the colour selection button result
|
||||||
result.append(name + ": " + str(colour)) # create string list for easy viewing of results
|
result.append(name + ": " + str(colour)) # create string list for easy viewing of results
|
||||||
|
|
||||||
out_result = string.joinfields(result, ', ')
|
out_result = ', '.join(result)
|
||||||
self.log.WriteText("Colour Results: " + out_result + "\n")
|
self.log.WriteText("Colour Results: " + out_result + "\n")
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
@@ -53,7 +53,7 @@ class TestPanel(wxPanel):
|
|||||||
border = wxBoxSizer(wxVERTICAL)
|
border = wxBoxSizer(wxVERTICAL)
|
||||||
border.Add(sizer, 0, wxALL, 25)
|
border.Add(sizer, 0, wxALL, 25)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(border)
|
self.SetSizer(border)
|
||||||
self.Layout()
|
self.Layout()
|
||||||
|
|
||||||
|
@@ -124,7 +124,8 @@ class DoodleDropTarget(wxPyDropTarget):
|
|||||||
self.dv = window
|
self.dv = window
|
||||||
|
|
||||||
# specify the type of data we will accept
|
# specify the type of data we will accept
|
||||||
self.data = wxCustomDataObject(wxCustomDataFormat("DoodleLines"))
|
self.df = wxCustomDataFormat("DoodleLines")
|
||||||
|
self.data = wxCustomDataObject(self.df)
|
||||||
self.SetDataObject(self.data)
|
self.SetDataObject(self.data)
|
||||||
|
|
||||||
|
|
||||||
@@ -138,7 +139,7 @@ class DoodleDropTarget(wxPyDropTarget):
|
|||||||
|
|
||||||
def OnDrop(self, x, y):
|
def OnDrop(self, x, y):
|
||||||
self.log.WriteText("OnDrop: %d %d\n" % (x, y))
|
self.log.WriteText("OnDrop: %d %d\n" % (x, y))
|
||||||
return true
|
return True
|
||||||
|
|
||||||
def OnDragOver(self, x, y, d):
|
def OnDragOver(self, x, y, d):
|
||||||
#self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d))
|
#self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d))
|
||||||
@@ -153,7 +154,7 @@ class DoodleDropTarget(wxPyDropTarget):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Called when OnDrop returns true. We need to get the data and
|
# Called when OnDrop returns True. We need to get the data and
|
||||||
# do something with it.
|
# do something with it.
|
||||||
def OnData(self, x, y, d):
|
def OnData(self, x, y, d):
|
||||||
self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d))
|
self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d))
|
||||||
@@ -205,7 +206,7 @@ class CustomDnDPanel(wxPanel):
|
|||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false))
|
self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
|
|
||||||
# Make the controls
|
# Make the controls
|
||||||
text1 = wxStaticText(self, -1,
|
text1 = wxStaticText(self, -1,
|
||||||
@@ -217,9 +218,9 @@ class CustomDnDPanel(wxPanel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
rb1 = wxRadioButton(self, -1, "Draw", style=wxRB_GROUP)
|
rb1 = wxRadioButton(self, -1, "Draw", style=wxRB_GROUP)
|
||||||
rb1.SetValue(true)
|
rb1.SetValue(True)
|
||||||
rb2 = wxRadioButton(self, -1, "Drag")
|
rb2 = wxRadioButton(self, -1, "Drag")
|
||||||
rb2.SetValue(false)
|
rb2.SetValue(False)
|
||||||
|
|
||||||
text2 = wxStaticText(self, -1,
|
text2 = wxStaticText(self, -1,
|
||||||
"The lower window is accepting a\n"
|
"The lower window is accepting a\n"
|
||||||
@@ -249,7 +250,7 @@ class CustomDnDPanel(wxPanel):
|
|||||||
|
|
||||||
sizer.Add(dndsizer, 1, wxEXPAND)
|
sizer.Add(dndsizer, 1, wxEXPAND)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
# Events
|
# Events
|
||||||
@@ -269,12 +270,12 @@ class TestPanel(wxPanel):
|
|||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
sizer = wxBoxSizer(wxVERTICAL)
|
sizer = wxBoxSizer(wxVERTICAL)
|
||||||
|
|
||||||
msg = "Custom Drag-And-Drop"
|
msg = "Custom Drag-And-Drop"
|
||||||
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
|
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
|
||||||
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, false))
|
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
text.SetLabel(msg)
|
text.SetLabel(msg)
|
||||||
w,h = text.GetTextExtent(msg)
|
w,h = text.GetTextExtent(msg)
|
||||||
text.SetSize(wxSize(w,h+1))
|
text.SetSize(wxSize(w,h+1))
|
||||||
@@ -303,8 +304,9 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
class TestApp(wxApp):
|
class TestApp(wxApp):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
|
wxInitAllImageHandlers()
|
||||||
self.MakeFrame()
|
self.MakeFrame()
|
||||||
return true
|
return True
|
||||||
|
|
||||||
def MakeFrame(self, event=None):
|
def MakeFrame(self, event=None):
|
||||||
frame = wxFrame(None, -1, "Custom Drag and Drop", size=(550,400))
|
frame = wxFrame(None, -1, "Custom Drag and Drop", size=(550,400))
|
||||||
@@ -315,7 +317,7 @@ if __name__ == '__main__':
|
|||||||
frame.SetMenuBar(mb)
|
frame.SetMenuBar(mb)
|
||||||
EVT_MENU(frame, 6543, self.MakeFrame)
|
EVT_MENU(frame, 6543, self.MakeFrame)
|
||||||
panel = TestPanel(frame, DummyLog())
|
panel = TestPanel(frame, DummyLog())
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
|
|
||||||
|
|
||||||
@@ -326,21 +328,20 @@ if __name__ == '__main__':
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
overview = """<html><body>
|
||||||
|
This demo shows Drag and Drop using a custom data type and a custom
|
||||||
|
data object. A type called "DoodleLines" is created and a Python
|
||||||
|
Pickle of a list is actually transfered in the drag and drop
|
||||||
|
opperation.
|
||||||
|
|
||||||
|
A second data object is also created containing a bitmap of the image
|
||||||
|
and is made available to any drop target that accepts bitmaps, such as
|
||||||
|
MS Word.
|
||||||
|
|
||||||
|
The two data objects are combined in a wxDataObjectComposite and the
|
||||||
|
rest is handled by the framework.
|
||||||
|
</body></html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
overview = """\
|
|
||||||
This demo shows Drag and Drop using a custom data type and a custom data object. A type called "DoodleLines" is created and a Python Pickle of a list is actually transfered in the drag and drop opperation.
|
|
||||||
|
|
||||||
A second data object is also created containing a bitmap of the image and is made available to any drop target that accepts bitmaps, such as MS Word.
|
|
||||||
|
|
||||||
The two data objects are combined in a wxDataObjectComposite and the rest is handled by the framework.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -88,13 +88,13 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# Create an instance of our customized Frame class
|
# Create an instance of our customized Frame class
|
||||||
frame = MyFrame(None, -1, "This is a test")
|
frame = MyFrame(None, -1, "This is a test")
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
|
|
||||||
# Tell wxWindows that this is our main window
|
# Tell wxWindows that this is our main window
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
|
|
||||||
# Return a success flag
|
# Return a success flag
|
||||||
return true
|
return True
|
||||||
|
|
||||||
|
|
||||||
app = MyApp(0) # Create an instance of the application class
|
app = MyApp(0) # Create an instance of the application class
|
||||||
@@ -107,7 +107,7 @@ if __name__ == "__main__":
|
|||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
win = MyFrame(frame, -1, "This is a test")
|
win = MyFrame(frame, -1, "This is a test")
|
||||||
frame.otherWin = win
|
frame.otherWin = win
|
||||||
win.Show(true)
|
win.Show(True)
|
||||||
|
|
||||||
|
|
||||||
overview = """\
|
overview = """\
|
||||||
|
@@ -8,7 +8,7 @@ class ClipTextPanel(wxPanel):
|
|||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
self.log = log
|
self.log = log
|
||||||
|
|
||||||
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false))
|
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
|
|
||||||
sizer = wxBoxSizer(wxVERTICAL)
|
sizer = wxBoxSizer(wxVERTICAL)
|
||||||
sizer.Add(wxStaticText(self, -1,
|
sizer.Add(wxStaticText(self, -1,
|
||||||
@@ -28,7 +28,7 @@ class ClipTextPanel(wxPanel):
|
|||||||
EVT_BUTTON(self, 6051, self.OnPaste)
|
EVT_BUTTON(self, 6051, self.OnPaste)
|
||||||
EVT_BUTTON(self, 6052, self.OnCopyBitmap)
|
EVT_BUTTON(self, 6052, self.OnCopyBitmap)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ class OtherDropTarget(wxPyDropTarget):
|
|||||||
|
|
||||||
def OnDrop(self, x, y):
|
def OnDrop(self, x, y):
|
||||||
self.log.WriteText("OnDrop: %d %d\n" % (x, y))
|
self.log.WriteText("OnDrop: %d %d\n" % (x, y))
|
||||||
return true
|
return True
|
||||||
|
|
||||||
def OnData(self, x, y, d):
|
def OnData(self, x, y, d):
|
||||||
self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d))
|
self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d))
|
||||||
@@ -128,7 +128,7 @@ class FileDropPanel(wxPanel):
|
|||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false))
|
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
|
|
||||||
sizer = wxBoxSizer(wxVERTICAL)
|
sizer = wxBoxSizer(wxVERTICAL)
|
||||||
sizer.Add(wxStaticText(self, -1, " \nDrag some files here:"),
|
sizer.Add(wxStaticText(self, -1, " \nDrag some files here:"),
|
||||||
@@ -148,7 +148,7 @@ class FileDropPanel(wxPanel):
|
|||||||
self.text2.SetDropTarget(dt)
|
self.text2.SetDropTarget(dt)
|
||||||
sizer.Add(self.text2, 1, wxEXPAND)
|
sizer.Add(self.text2, 1, wxEXPAND)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
|
|
||||||
@@ -166,12 +166,12 @@ class TestPanel(wxPanel):
|
|||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
outsideSizer = wxBoxSizer(wxVERTICAL)
|
outsideSizer = wxBoxSizer(wxVERTICAL)
|
||||||
|
|
||||||
msg = "Clipboard / Drag-And-Drop"
|
msg = "Clipboard / Drag-And-Drop"
|
||||||
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
|
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
|
||||||
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, false))
|
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
text.SetLabel(msg)
|
text.SetLabel(msg)
|
||||||
w,h = text.GetTextExtent(msg)
|
w,h = text.GetTextExtent(msg)
|
||||||
text.SetSize(wxSize(w,h+1))
|
text.SetSize(wxSize(w,h+1))
|
||||||
|
@@ -46,6 +46,43 @@ def makeRandomLines(num, w, h):
|
|||||||
return pnts
|
return pnts
|
||||||
|
|
||||||
|
|
||||||
|
def makeRandomRectangles(num, W, H):
|
||||||
|
rects = []
|
||||||
|
for i in range(num):
|
||||||
|
w = whrandom.randint(10, W/2)
|
||||||
|
h = whrandom.randint(10, H/2)
|
||||||
|
x = whrandom.randint(0, W - w)
|
||||||
|
y = whrandom.randint(0, H - h)
|
||||||
|
rects.append( (x, y, w, h) )
|
||||||
|
return rects
|
||||||
|
|
||||||
|
|
||||||
|
def makeRandomText(num):
|
||||||
|
Np = 8 # number of charcters in text
|
||||||
|
text = []
|
||||||
|
for i in range(num):
|
||||||
|
word = []
|
||||||
|
for i in range(Np):
|
||||||
|
c = chr( whrandom.randint(48, 122) )
|
||||||
|
word.append( c )
|
||||||
|
text.append( "".join(word) )
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
def makeRandomPolygons(num, W, H):
|
||||||
|
Np = 8 # number of points per polygon
|
||||||
|
polys = []
|
||||||
|
for i in range(num):
|
||||||
|
poly = []
|
||||||
|
for i in range(Np):
|
||||||
|
x = whrandom.randint(0, W)
|
||||||
|
y = whrandom.randint(0, H)
|
||||||
|
poly.append( (x,y) )
|
||||||
|
polys.append( poly )
|
||||||
|
return polys
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def makeRandomPens(num, cache):
|
def makeRandomPens(num, cache):
|
||||||
pens = []
|
pens = []
|
||||||
for i in range(num):
|
for i in range(num):
|
||||||
@@ -57,62 +94,278 @@ def makeRandomPens(num, cache):
|
|||||||
return pens
|
return pens
|
||||||
|
|
||||||
|
|
||||||
class TestPanel(wxPanel):
|
def makeRandomBrushes(num, cache):
|
||||||
def __init__(self, parent, size, log):
|
brushes = []
|
||||||
wxPanel.__init__(self, parent, -1, size=size)
|
for i in range(num):
|
||||||
|
c = whrandom.choice(colours)
|
||||||
|
if not cache.has_key(c):
|
||||||
|
cache[c] = wxBrush(c)
|
||||||
|
brushes.append( cache[c] )
|
||||||
|
return brushes
|
||||||
|
|
||||||
|
|
||||||
|
def makeRandomColors(num):
|
||||||
|
colors = []
|
||||||
|
for i in range(num):
|
||||||
|
c = whrandom.choice(colours)
|
||||||
|
colors.append(wxNamedColor(c))
|
||||||
|
return colors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pencache = {}
|
||||||
|
brushcache = {}
|
||||||
|
points = None
|
||||||
|
lines = None
|
||||||
|
rectangles = None
|
||||||
|
polygons = None
|
||||||
|
text = None
|
||||||
|
pens = None
|
||||||
|
brushes = None
|
||||||
|
colors1 = None
|
||||||
|
colors2 = None
|
||||||
|
|
||||||
|
|
||||||
|
def Init(w, h, n):
|
||||||
|
global pencache
|
||||||
|
global brushcache
|
||||||
|
global points
|
||||||
|
global lines
|
||||||
|
global rectangles
|
||||||
|
global polygons
|
||||||
|
global text
|
||||||
|
global pens
|
||||||
|
global brushes
|
||||||
|
global colors1
|
||||||
|
global colors2
|
||||||
|
|
||||||
|
# make some lists of random shapes
|
||||||
|
points = makeRandomPoints(n, w, h)
|
||||||
|
try:
|
||||||
|
import Numeric
|
||||||
|
Apoints = Numeric.array(points)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
lines = makeRandomLines(n, w, h)
|
||||||
|
rectangles = makeRandomRectangles(n, w, h)
|
||||||
|
polygons = makeRandomPolygons(n, w, h)
|
||||||
|
text = makeRandomText(n)
|
||||||
|
|
||||||
|
# make some random pens and brushes
|
||||||
|
pens = makeRandomPens(n, pencache)
|
||||||
|
brushes = makeRandomBrushes(n, brushcache)
|
||||||
|
# make some random color lists
|
||||||
|
colors1 = makeRandomColors(n)
|
||||||
|
colors2 = makeRandomColors(n)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def TestPoints(dc,log):
|
||||||
|
dc.BeginDrawing()
|
||||||
|
start = time.time()
|
||||||
|
dc.SetPen(wxPen("BLACK", 4))
|
||||||
|
|
||||||
|
dc.DrawPointList(points)
|
||||||
|
dc.DrawPointList(points, wxPen("RED", 2))
|
||||||
|
dc.DrawPointList(points, pens)
|
||||||
|
|
||||||
|
dc.EndDrawing()
|
||||||
|
log.write("DrawTime: %s seconds with DrawPointList\n" % (time.time() - start))
|
||||||
|
|
||||||
|
|
||||||
|
def TestArrayPoints(dc,log):
|
||||||
|
try:
|
||||||
|
import Numeric
|
||||||
|
|
||||||
|
dc.BeginDrawing()
|
||||||
|
start = time.time()
|
||||||
|
dc.SetPen(wxPen("BLACK", 1))
|
||||||
|
for i in range(1):
|
||||||
|
dc.DrawPointList(Apoints)
|
||||||
|
#dc.DrawPointList(Apoints, wxPen("RED", 2))
|
||||||
|
#dc.DrawPointList(Apoints, pens)
|
||||||
|
dc.EndDrawing()
|
||||||
|
log.write("DrawTime: %s seconds with DrawPointList an Numpy Array\n" % (time.time() - start))
|
||||||
|
except ImportError:
|
||||||
|
log.write("Couldn't import Numeric")
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def TestLines(dc,log):
|
||||||
|
dc.BeginDrawing()
|
||||||
|
start = time.time()
|
||||||
|
|
||||||
|
dc.SetPen(wxPen("BLACK", 2))
|
||||||
|
dc.DrawLineList(lines)
|
||||||
|
dc.DrawLineList(lines, wxPen("RED", 2))
|
||||||
|
dc.DrawLineList(lines, pens)
|
||||||
|
|
||||||
|
dc.EndDrawing()
|
||||||
|
log.write("DrawTime: %s seconds with DrawLineList\n" % (time.time() - start))
|
||||||
|
|
||||||
|
|
||||||
|
def TestRectangles(dc,log):
|
||||||
|
dc.BeginDrawing()
|
||||||
|
start = time.time()
|
||||||
|
|
||||||
|
dc.SetPen( wxPen("BLACK",1) )
|
||||||
|
dc.SetBrush( wxBrush("RED") )
|
||||||
|
|
||||||
|
dc.DrawRectangleList(rectangles)
|
||||||
|
dc.DrawRectangleList(rectangles,pens)
|
||||||
|
dc.DrawRectangleList(rectangles,pens[0],brushes)
|
||||||
|
dc.DrawRectangleList(rectangles,pens,brushes[0])
|
||||||
|
dc.DrawRectangleList(rectangles,None,brushes)
|
||||||
|
## for i in range(10):
|
||||||
|
## #dc.DrawRectangleList(rectangles,pens,brushes)
|
||||||
|
## dc.DrawRectangleList(rectangles)
|
||||||
|
|
||||||
|
dc.EndDrawing()
|
||||||
|
log.write("DrawTime: %s seconds with DrawRectanglesList\n" % (time.time() - start))
|
||||||
|
|
||||||
|
|
||||||
|
def TestEllipses(dc,log):
|
||||||
|
dc.BeginDrawing()
|
||||||
|
start = time.time()
|
||||||
|
|
||||||
|
dc.SetPen( wxPen("BLACK",1) )
|
||||||
|
dc.SetBrush( wxBrush("RED") )
|
||||||
|
|
||||||
|
dc.DrawEllipseList(rectangles)
|
||||||
|
dc.DrawEllipseList(rectangles,pens)
|
||||||
|
dc.DrawEllipseList(rectangles,pens[0],brushes)
|
||||||
|
dc.DrawEllipseList(rectangles,pens,brushes[0])
|
||||||
|
dc.DrawEllipseList(rectangles,None,brushes)
|
||||||
|
dc.DrawEllipseList(rectangles,pens,brushes)
|
||||||
|
|
||||||
|
dc.EndDrawing()
|
||||||
|
log.write("DrawTime: %s seconds with DrawEllipsesList\n" % (time.time() - start))
|
||||||
|
|
||||||
|
|
||||||
|
def TestRectanglesArray(dc,log):
|
||||||
|
try:
|
||||||
|
import Numeric
|
||||||
|
Apoints = Numeric.array(rectangles)
|
||||||
|
|
||||||
|
dc.BeginDrawing()
|
||||||
|
start = time.time()
|
||||||
|
dc.SetPen(wxPen("BLACK", 1))
|
||||||
|
dc.DrawRectangleList(rectangles)
|
||||||
|
dc.DrawRectangleList(rectangles,pens)
|
||||||
|
dc.DrawRectangleList(rectangles,pens[0],brushes)
|
||||||
|
dc.DrawRectangleList(rectangles,pens,brushes[0])
|
||||||
|
dc.DrawRectangleList(rectangles,None,brushes)
|
||||||
|
## for i in range(10):
|
||||||
|
## #dc.DrawRectangleList(rectangles,pens,brushes)
|
||||||
|
## dc.DrawRectangleList(rectangles)
|
||||||
|
|
||||||
|
dc.EndDrawing()
|
||||||
|
log.write("DrawTime: %s seconds with DrawRectangleList and Numpy Array\n" % (time.time() - start))
|
||||||
|
except ImportError:
|
||||||
|
log.write("Couldn't import Numeric")
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def TestRectanglesLoop(dc,log):
|
||||||
|
dc.BeginDrawing()
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
|
dc.DrawRectangleList(rectangles,pens,brushes)
|
||||||
|
log.write("DrawTime: %s seconds with DrawRectanglesList\n" % (time.time() - start))
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
|
for i in range(len(rectangles)):
|
||||||
|
dc.SetPen( pens[i] )
|
||||||
|
dc.SetBrush( brushes[i] )
|
||||||
|
dc.DrawRectangle(rectangles[i][0],rectangles[i][1],rectangles[i][2],rectangles[i][3])
|
||||||
|
dc.EndDrawing()
|
||||||
|
log.write("DrawTime: %s seconds with Python loop\n" % (time.time() - start))
|
||||||
|
|
||||||
|
|
||||||
|
def TestPolygons(dc,log):
|
||||||
|
dc.BeginDrawing()
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
|
dc.SetPen(wxPen("BLACK", 1))
|
||||||
|
dc.DrawPolygonList(polygons)
|
||||||
|
dc.DrawPolygonList(polygons,pens)
|
||||||
|
dc.DrawPolygonList(polygons,pens[0],brushes)
|
||||||
|
dc.DrawPolygonList(polygons,pens,brushes[0])
|
||||||
|
dc.DrawPolygonList(polygons,None,brushes)
|
||||||
|
log.write("DrawTime: %s seconds with DrawPolygonList\n" % (time.time() - start))
|
||||||
|
|
||||||
|
dc.EndDrawing()
|
||||||
|
|
||||||
|
|
||||||
|
def TestText(dc,log):
|
||||||
|
dc.BeginDrawing()
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
|
|
||||||
|
# NOTE: you need to set BackgroundMode for the background colors to be used.
|
||||||
|
dc.SetBackgroundMode(wxSOLID)
|
||||||
|
foreground = colors1
|
||||||
|
background = colors2
|
||||||
|
dc.DrawTextList(text, points, foreground, background)
|
||||||
|
|
||||||
|
log.write("DrawTime: %s seconds with DrawTextList\n" % (time.time() - start))
|
||||||
|
|
||||||
|
dc.EndDrawing()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class TestNB(wxNotebook):
|
||||||
|
def __init__(self, parent, id, log):
|
||||||
|
style = wxNB_BOTTOM
|
||||||
|
if wxPlatform == "__WXMAC__":
|
||||||
|
style = 0
|
||||||
|
wxNotebook.__init__(self, parent, id, style=style)
|
||||||
self.log = log
|
self.log = log
|
||||||
|
|
||||||
|
win = DrawPanel(self, TestEllipses, log)
|
||||||
|
self.AddPage(win, 'Ellipses')
|
||||||
|
|
||||||
|
win = DrawPanel(self, TestText, log)
|
||||||
|
self.AddPage(win, 'Text')
|
||||||
|
|
||||||
|
win = DrawPanel(self, TestPolygons, log)
|
||||||
|
self.AddPage(win, 'Polygons')
|
||||||
|
|
||||||
|
win = DrawPanel(self, TestPoints, log)
|
||||||
|
self.AddPage(win, 'Points')
|
||||||
|
|
||||||
|
win = DrawPanel(self, TestLines, log)
|
||||||
|
self.AddPage(win, 'Lines')
|
||||||
|
|
||||||
|
win = DrawPanel(self, TestRectangles, log)
|
||||||
|
self.AddPage(win, 'Rectangles')
|
||||||
|
|
||||||
|
|
||||||
|
class DrawPanel(wxPanel):
|
||||||
|
def __init__(self, parent, drawFun, log):
|
||||||
|
wxPanel.__init__(self, parent, -1)
|
||||||
self.SetBackgroundColour(wxWHITE)
|
self.SetBackgroundColour(wxWHITE)
|
||||||
|
|
||||||
w = size.width
|
self.log = log
|
||||||
h = size.height
|
self.drawFun = drawFun
|
||||||
pencache = {}
|
|
||||||
|
|
||||||
# make some lists of random points
|
|
||||||
self.pnts1 = makeRandomPoints(1000, w, h)
|
|
||||||
self.pnts2 = makeRandomPoints(1000, w, h)
|
|
||||||
self.pnts3 = makeRandomPoints(1000, w, h)
|
|
||||||
self.pens1 = makeRandomPens(1000, pencache)
|
|
||||||
|
|
||||||
# and now some lines
|
|
||||||
self.lines1 = makeRandomLines(500, w, h)
|
|
||||||
self.lines2 = makeRandomLines(500, w, h)
|
|
||||||
self.lines3 = makeRandomLines(500, w, h)
|
|
||||||
self.pens2 = makeRandomPens(500, pencache)
|
|
||||||
|
|
||||||
EVT_PAINT(self, self.OnPaint)
|
EVT_PAINT(self, self.OnPaint)
|
||||||
|
|
||||||
|
|
||||||
def OnPaint(self, evt):
|
def OnPaint(self, evt):
|
||||||
dc = wxPaintDC(self)
|
dc = wxPaintDC(self)
|
||||||
dc.BeginDrawing()
|
dc.Clear()
|
||||||
start = time.time()
|
self.drawFun(dc,self.log)
|
||||||
|
|
||||||
dc.SetPen(wxPen("BLACK", 1))
|
|
||||||
dc.DrawPointList(self.pnts1)
|
|
||||||
dc.DrawPointList(self.pnts2, wxPen("RED", 2))
|
|
||||||
dc.DrawPointList(self.pnts3, self.pens1)
|
|
||||||
|
|
||||||
dc.SetPen(wxPen("BLACK", 1))
|
|
||||||
dc.DrawLineList(self.lines1)
|
|
||||||
dc.DrawLineList(self.lines2, wxPen("RED", 2))
|
|
||||||
dc.DrawLineList(self.lines3, self.pens2)
|
|
||||||
|
|
||||||
dc.EndDrawing()
|
|
||||||
self.log.write("DrawTime: %s seconds\n" % (time.time() - start))
|
|
||||||
self.log.write("GetBoundingBox: %s\n" % (dc.GetBoundingBox(), ))
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
w = nb.GetClientSize().width
|
w = nb.GetClientSize().width
|
||||||
h = nb.GetClientSize().height
|
h = nb.GetClientSize().height
|
||||||
if w < 300: w = 300
|
if w < 600: w = 600
|
||||||
if h < 300: h = 300
|
if h < 400: h = 400
|
||||||
win = wxPanel(nb, -1)
|
Init(w, h, 200)
|
||||||
tp = TestPanel(win, wxSize(w, h), log)
|
win = TestNB(nb, -1, log)
|
||||||
def OnPanelSize(evt, tp=tp):
|
|
||||||
tp.SetSize(evt.GetSize())
|
|
||||||
EVT_SIZE(win, OnPanelSize)
|
|
||||||
return win
|
return win
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -136,4 +389,30 @@ drawing routines. Currently they are:
|
|||||||
(x1,y1, x2,y2) andd pens is either None, a single pen or a list
|
(x1,y1, x2,y2) andd pens is either None, a single pen or a list
|
||||||
of pens.
|
of pens.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
DrawRectangleList(rectangles, pens=None, brushes=None)
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
DrawEllipseList(ellipses, pens=None, brushes=None)
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
DrawPolygonList(polygons, pens=None, brushes=None)
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
DrawTextList(textList, coords, foregrounds = None, backgrounds = None)
|
||||||
|
</pre>
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import sys,os
|
||||||
|
import run
|
||||||
|
run.main(['', os.path.basename(sys.argv[0])])
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ ID_BUTTON_wxPyNonFatalErrorDialog = 10004
|
|||||||
ID_BUTTON_wxPyFatalErrorDialogWithTraceback = 10005
|
ID_BUTTON_wxPyFatalErrorDialogWithTraceback = 10005
|
||||||
ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback = 10006
|
ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback = 10006
|
||||||
|
|
||||||
def ErrorDialogsDemoPanelFunc( parent, call_fit = true, set_sizer = true ):
|
def ErrorDialogsDemoPanelFunc( parent, call_fit = True, set_sizer = True ):
|
||||||
item0 = wxBoxSizer( wxVERTICAL )
|
item0 = wxBoxSizer( wxVERTICAL )
|
||||||
|
|
||||||
item1 = wxStaticText( parent, ID_TEXT, "Please select one of the buttons below for an example using explicit errors...", wxDefaultPosition, wxDefaultSize, 0 )
|
item1 = wxStaticText( parent, ID_TEXT, "Please select one of the buttons below for an example using explicit errors...", wxDefaultPosition, wxDefaultSize, 0 )
|
||||||
@@ -54,10 +54,10 @@ def ErrorDialogsDemoPanelFunc( parent, call_fit = true, set_sizer = true ):
|
|||||||
|
|
||||||
item0.AddSizer( item11, 0, wxALIGN_CENTRE|wxALL, 5 )
|
item0.AddSizer( item11, 0, wxALIGN_CENTRE|wxALL, 5 )
|
||||||
|
|
||||||
if set_sizer == true:
|
if set_sizer == True:
|
||||||
parent.SetAutoLayout( true )
|
parent.SetAutoLayout( True )
|
||||||
parent.SetSizer( item0 )
|
parent.SetSizer( item0 )
|
||||||
if call_fit == true:
|
if call_fit == True:
|
||||||
item0.Fit( parent )
|
item0.Fit( parent )
|
||||||
item0.SetSizeHints( parent )
|
item0.SetSizeHints( parent )
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ class MyPanel(wxPanel):
|
|||||||
EVT_BUTTON(self,
|
EVT_BUTTON(self,
|
||||||
ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback,
|
ID_BUTTON_wxPyNonFatalErrorDialogWithTraceback,
|
||||||
self.DoDialog)
|
self.DoDialog)
|
||||||
EVT_CLOSE(self,self.OnClose)
|
|
||||||
|
|
||||||
IndexFromID = {
|
IndexFromID = {
|
||||||
ID_BUTTON_wxPyFatalErrorDialog: 3,
|
ID_BUTTON_wxPyFatalErrorDialog: 3,
|
||||||
@@ -138,10 +138,11 @@ class MyPanel(wxPanel):
|
|||||||
print "%s.DoDialog(): testing %s..." % (self,sys.stderr)
|
print "%s.DoDialog(): testing %s..." % (self,sys.stderr)
|
||||||
this_will_generate_a_NameError_exception
|
this_will_generate_a_NameError_exception
|
||||||
|
|
||||||
def OnClose(self,evt):
|
def ShutdownDemo(self):
|
||||||
for d in self.dialogs:
|
for d in self.dialogs:
|
||||||
d.Destroy()
|
d.Destroy()
|
||||||
self.Destroy ()
|
|
||||||
|
|
||||||
|
|
||||||
class MyFrame(wxFrame):
|
class MyFrame(wxFrame):
|
||||||
def __init__(self,parent=None):
|
def __init__(self,parent=None):
|
||||||
@@ -158,9 +159,9 @@ class MyFrame(wxFrame):
|
|||||||
class MyApp(wxApp):
|
class MyApp(wxApp):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
frame = MyFrame()
|
frame = MyFrame()
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
return true
|
return True
|
||||||
|
|
||||||
def runTest(pframe, nb, log):
|
def runTest(pframe, nb, log):
|
||||||
panel = MyPanel(nb)
|
panel = MyPanel(nb)
|
||||||
|
287
wxPython/demo/EventManager.py
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Name: EventManager.py
|
||||||
|
# Purpose: A module to demonstrate wxPython.lib.evtmgr.EventManager.
|
||||||
|
#
|
||||||
|
# Author: Robb Shecter (robb@acm.org)
|
||||||
|
#
|
||||||
|
# Created: 16-December-2002
|
||||||
|
# Copyright: (c) 2002 by Robb Shecter (robb@acm.org)
|
||||||
|
# Licence: wxWindows license
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
from wxPython.lib.evtmgr import eventManager
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class TestPanel(wxPanel):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
self.log = log
|
||||||
|
|
||||||
|
fsize = self.GetFont().GetPointSize()
|
||||||
|
f1 = wxFont(fsize+0, wxSWISS, wxNORMAL, wxNORMAL)
|
||||||
|
f2 = wxFont(fsize+2, wxSWISS, wxNORMAL, wxBOLD)
|
||||||
|
f3 = wxFont(fsize+6, wxSWISS, wxNORMAL, wxBOLD)
|
||||||
|
|
||||||
|
title1 = wxStaticText(self, -1, 'EventManager')
|
||||||
|
title1.SetFont(f3)
|
||||||
|
txt = """\
|
||||||
|
This demo shows (1) basic uses and features of the EventManager, as well
|
||||||
|
as (2) how it helps with a real-world task: creating independent, object-
|
||||||
|
oriented components."""
|
||||||
|
message0 = wxStaticText(self, -1, txt)
|
||||||
|
message0.SetFont(f1)
|
||||||
|
|
||||||
|
title2 = wxStaticText(self, -1, 'Event Listeners')
|
||||||
|
title2.SetFont(f2)
|
||||||
|
|
||||||
|
txt = """\
|
||||||
|
These objects listen to motion events from the target window, using the ability
|
||||||
|
to register one event with multiple listeners. They also register for mouse events
|
||||||
|
on themselves to implement toggle-button functionality."""
|
||||||
|
message1 = wxStaticText(self, -1, txt)
|
||||||
|
message1.SetFont(f1)
|
||||||
|
|
||||||
|
title3 = wxStaticText(self, -1, 'Target Window')
|
||||||
|
title3.SetFont(f2)
|
||||||
|
|
||||||
|
txt = """\
|
||||||
|
A passive window that's used as an event generator. Move the mouse over it to
|
||||||
|
send events to the listeners above."""
|
||||||
|
message2 = wxStaticText(self, -1, txt)
|
||||||
|
message2.SetFont(f1)
|
||||||
|
|
||||||
|
targetPanel = Tile(self, log, bgColor=wxColor(80,10,10), active=0)
|
||||||
|
buttonPanel = wxPanel(self ,-1)
|
||||||
|
sizer = wxBoxSizer(wxHORIZONTAL)
|
||||||
|
target = targetPanel.tile
|
||||||
|
|
||||||
|
sizer.Add(0,0,1)
|
||||||
|
for factor in [0.2, 0.3, 0.4, 0.5, 0.6, 0.7]:
|
||||||
|
sizer.Add(Tile(buttonPanel, log, factor-0.05, target), 0, wxALIGN_CENTER)
|
||||||
|
sizer.Add(0,0,1)
|
||||||
|
sizer.Add(Tile(buttonPanel, log, factor, target), 0, wxALIGN_CENTER)
|
||||||
|
sizer.Add(0,0,1)
|
||||||
|
|
||||||
|
buttonPanel.SetAutoLayout(1)
|
||||||
|
buttonPanel.SetSizer(sizer)
|
||||||
|
sizer.Fit(buttonPanel)
|
||||||
|
|
||||||
|
sizer = wxBoxSizer(wxVERTICAL)
|
||||||
|
sizer.Add(title1, 0, wxALIGN_CENTER | wxTOP | wxBOTTOM, 6)
|
||||||
|
sizer.Add(message0, 0, wxALIGN_CENTER | wxALL, 6)
|
||||||
|
sizer.Add(title2, 0, wxALIGN_CENTER | wxLEFT | wxTOP | wxRIGHT, 16)
|
||||||
|
sizer.Add(message1, 0, wxALIGN_CENTER | wxALL, 6)
|
||||||
|
sizer.Add(buttonPanel, 0, wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT, 16)
|
||||||
|
sizer.Add(title3, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 16)
|
||||||
|
sizer.Add(message2, 0, wxALIGN_CENTER | wxALL, 6)
|
||||||
|
sizer.Add(targetPanel, 2, wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT, 16)
|
||||||
|
self.SetAutoLayout(1)
|
||||||
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Tile(wxPanel):
|
||||||
|
"""
|
||||||
|
This outer class is responsible for changing
|
||||||
|
its border color in response to certain mouse
|
||||||
|
events over its contained 'InnerTile'.
|
||||||
|
"""
|
||||||
|
normal = wxColor(150,150,150)
|
||||||
|
active = wxColor(250,245,245)
|
||||||
|
hover = wxColor(210,220,210)
|
||||||
|
|
||||||
|
def __init__(self, parent, log, factor=1, thingToWatch=None, bgColor=None, active=1, size=(38,38), borderWidth=3):
|
||||||
|
wxPanel.__init__(self, parent, -1, size=size, style=wxCLIP_CHILDREN)
|
||||||
|
self.tile = InnerTile(self, log, factor, thingToWatch, bgColor)
|
||||||
|
self.log = log
|
||||||
|
sizer = wxBoxSizer(wxHORIZONTAL)
|
||||||
|
sizer.Add(self.tile, 1, wxEXPAND | wxALL, borderWidth)
|
||||||
|
self.SetAutoLayout(1)
|
||||||
|
self.SetSizer(sizer)
|
||||||
|
self.Layout()
|
||||||
|
self.SetBackgroundColour(Tile.normal)
|
||||||
|
if active:
|
||||||
|
# Register myself for mouse events over self.tile in order to
|
||||||
|
# create typical button/hyperlink visual effects.
|
||||||
|
eventManager.Register(self.setHover, EVT_ENTER_WINDOW, self.tile)
|
||||||
|
eventManager.Register(self.setNormal, EVT_LEAVE_WINDOW, self.tile)
|
||||||
|
eventManager.Register(self.setActive, EVT_LEFT_DOWN, self.tile)
|
||||||
|
eventManager.Register(self.setHover, EVT_LEFT_UP, self.tile)
|
||||||
|
|
||||||
|
|
||||||
|
def setHover(self, event):
|
||||||
|
self.SetBackgroundColour(Tile.hover)
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
def setActive(self, event):
|
||||||
|
self.SetBackgroundColour(Tile.active)
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
def setNormal(self, event):
|
||||||
|
self.SetBackgroundColour(Tile.normal)
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class InnerTile(wxPanel):
|
||||||
|
IDLE_COLOR = wxColor( 80, 10, 10)
|
||||||
|
START_COLOR = wxColor(200, 70, 50)
|
||||||
|
FINAL_COLOR = wxColor( 20, 80,240)
|
||||||
|
OFF_COLOR = wxColor(185,190,185)
|
||||||
|
# Some pre-computation.
|
||||||
|
DELTAS = map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get())
|
||||||
|
START_COLOR_TUPLE = START_COLOR.Get()
|
||||||
|
|
||||||
|
"""
|
||||||
|
This inner panel changes its color in reaction to mouse
|
||||||
|
events over the 'thingToWatch'.
|
||||||
|
"""
|
||||||
|
def __init__(self, parent, log, factor, thingToWatch=None, bgColor=None):
|
||||||
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
self.log=log
|
||||||
|
if bgColor:
|
||||||
|
self.SetBackgroundColour(bgColor)
|
||||||
|
if thingToWatch:
|
||||||
|
self.factor = factor
|
||||||
|
self.thingToWatch = thingToWatch
|
||||||
|
self.state = 0
|
||||||
|
self.toggleOnOff()
|
||||||
|
# Watch for the mouse click to enable/disable myself.
|
||||||
|
eventManager.Register(self.toggleOnOff, EVT_LEFT_UP, self)
|
||||||
|
|
||||||
|
|
||||||
|
def toggleOnOff(self, event=None):
|
||||||
|
# Implement being on or off by registering and
|
||||||
|
# de-registering self.makeColor() from the event manager.
|
||||||
|
if self.state:
|
||||||
|
eventManager.DeregisterListener(self.makeColor)
|
||||||
|
else:
|
||||||
|
eventManager.Register(self.makeColor, EVT_MOTION, self.thingToWatch)
|
||||||
|
self.state = 1 - self.state
|
||||||
|
self.resetColor()
|
||||||
|
|
||||||
|
|
||||||
|
def resetColor(self, event=None):
|
||||||
|
if self.state:
|
||||||
|
self.setColor(InnerTile.IDLE_COLOR)
|
||||||
|
else:
|
||||||
|
self.setColor(InnerTile.OFF_COLOR)
|
||||||
|
|
||||||
|
|
||||||
|
def setColor(self, color):
|
||||||
|
self.SetBackgroundColour(color)
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
def makeColor(self, mouseEvent):
|
||||||
|
self.makeColorFromTuple(mouseEvent.GetPositionTuple())
|
||||||
|
|
||||||
|
|
||||||
|
def makeColorFromTuple(self, (x, y)):
|
||||||
|
MAX = 180.0
|
||||||
|
scaled = min((x + y) * self.factor, MAX) # In range [0..MAX]
|
||||||
|
percent = scaled / MAX
|
||||||
|
r = InnerTile.START_COLOR_TUPLE[0] + (InnerTile.DELTAS[0] * percent)
|
||||||
|
g = InnerTile.START_COLOR_TUPLE[1] + (InnerTile.DELTAS[1] * percent)
|
||||||
|
b = InnerTile.START_COLOR_TUPLE[2] + (InnerTile.DELTAS[2] * percent)
|
||||||
|
self.setColor(wxColor(r,g,b))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
win = TestPanel(nb, log)
|
||||||
|
return win
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overview = """<html><body>
|
||||||
|
<h2>EventManager</h2>
|
||||||
|
|
||||||
|
<p> The goal of the EventManager is to make wxWindows events more
|
||||||
|
'Pythonic' (ie. object-oriented) and easier to work with, without
|
||||||
|
impacting performance. It offers these features:
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li> Allows any number of listeners to register for a single
|
||||||
|
event. (In addition to the standard wxPython feature of a single
|
||||||
|
listener being able to respond to many events.)
|
||||||
|
|
||||||
|
<li> Makes it easy to disconnect and reconnect listeners. This
|
||||||
|
has the effect of reducing the need for case-based branching in
|
||||||
|
application code.
|
||||||
|
|
||||||
|
<li> Has an object-oriented API. Programmers register to get
|
||||||
|
events directly from the objects that generate them, instead of
|
||||||
|
using ID numbers.
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Usage</h3>
|
||||||
|
|
||||||
|
<p>The EventManager class has three public methods. First get a
|
||||||
|
reference to it:
|
||||||
|
|
||||||
|
<PRE>
|
||||||
|
from wxPython.lib.evtmgr import eventManager
|
||||||
|
</PRE>
|
||||||
|
|
||||||
|
<p>...and then invoke any of the following methods. These methods are
|
||||||
|
'safe'; duplicate registrations or de-registrations will have no
|
||||||
|
effect.
|
||||||
|
|
||||||
|
<p><b>Registering a listener:</b>
|
||||||
|
|
||||||
|
<PRE>
|
||||||
|
eventManager.Register(listener, event, event-source)
|
||||||
|
</PRE>
|
||||||
|
|
||||||
|
|
||||||
|
<p><b>De-registering by window:</b>
|
||||||
|
|
||||||
|
<PRE>
|
||||||
|
eventManager.DeregisterWindow(event-source)
|
||||||
|
</PRE>
|
||||||
|
|
||||||
|
|
||||||
|
<p><b>De-registering by listener:</b>
|
||||||
|
|
||||||
|
<PRE>
|
||||||
|
eventManager.DeregisterListener(listener)
|
||||||
|
</PRE>
|
||||||
|
|
||||||
|
<p><b>Simple Example:</b>
|
||||||
|
|
||||||
|
<PRE>
|
||||||
|
from wxPython.lib.evtmgr import eventManager
|
||||||
|
|
||||||
|
aButton = wxButton(somePanel, -1, 'Click me')
|
||||||
|
eventManager.Register(self.someMethod, EVT_BUTTON, aButton)
|
||||||
|
</PRE>
|
||||||
|
|
||||||
|
<p> See the demo code as well as the documentation in the source of
|
||||||
|
<tt>wxPython.lib.evtmgr</tt> for more details.
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
by Robb Shecter (robb@acm.org)
|
||||||
|
</body></html>
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import sys,os
|
||||||
|
import run
|
||||||
|
run.main(['', os.path.basename(sys.argv[0])])
|
||||||
|
|
@@ -36,6 +36,5 @@ def runTest(frame, nb, log):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
import string
|
overview = fancytext.__doc__.replace("<", "<")
|
||||||
overview = string.replace(fancytext.__doc__, "<", "<")
|
|
||||||
|
|
||||||
|
@@ -3,44 +3,40 @@ from wxPython.wx import *
|
|||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
## class MyFontEnumerator(wxFontEnumerator):
|
|
||||||
## def __init__(self, list):
|
|
||||||
## wxFontEnumerator.__init__(self)
|
|
||||||
## self.list = list
|
|
||||||
|
|
||||||
## def OnFacename(self, face):
|
|
||||||
## self.list.append(face)
|
|
||||||
## return true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TestPanel(wxPanel):
|
class TestPanel(wxPanel):
|
||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
## list = []
|
|
||||||
## e = MyFontEnumerator(list)
|
|
||||||
## e.EnumerateFacenames()
|
|
||||||
|
|
||||||
e = wxFontEnumerator()
|
e = wxFontEnumerator()
|
||||||
e.EnumerateFacenames()
|
e.EnumerateFacenames()
|
||||||
list = e.GetFacenames()
|
list = e.GetFacenames()
|
||||||
|
|
||||||
list.sort()
|
list.sort()
|
||||||
|
|
||||||
wxStaticText(self, -1, "Face names:", (15, 50), (65, 18))
|
s1 = wxStaticText(self, -1, "Face names:")
|
||||||
self.lb1 = wxListBox(self, -1, (80, 50), (200, 250),
|
self.lb1 = wxListBox(self, -1, wxDefaultPosition, (200, 250),
|
||||||
list, wxLB_SINGLE)
|
list, wxLB_SINGLE)
|
||||||
EVT_LISTBOX(self, self.lb1.GetId(), self.OnSelect)
|
EVT_LISTBOX(self, self.lb1.GetId(), self.OnSelect)
|
||||||
|
|
||||||
self.txt = wxStaticText(self, -1, "Sample text...", (285, 50))
|
self.txt = wxStaticText(self, -1, "Sample text...", (285, 50))
|
||||||
|
|
||||||
|
row = wxBoxSizer(wxHORIZONTAL)
|
||||||
|
row.Add(s1, 0, wxALL, 5)
|
||||||
|
row.Add(self.lb1, 0, wxALL, 5)
|
||||||
|
row.Add(self.txt, 0, wxALL, 5)
|
||||||
|
|
||||||
|
sizer = wxBoxSizer(wxVERTICAL)
|
||||||
|
sizer.Add(row, 0, wxALL, 30)
|
||||||
|
self.SetSizer(sizer)
|
||||||
|
self.Layout()
|
||||||
|
|
||||||
self.lb1.SetSelection(0)
|
self.lb1.SetSelection(0)
|
||||||
|
|
||||||
|
|
||||||
def OnSelect(self, evt):
|
def OnSelect(self, evt):
|
||||||
face = self.lb1.GetStringSelection()
|
face = self.lb1.GetStringSelection()
|
||||||
font = wxFont(28, wxDEFAULT, wxNORMAL, wxNORMAL, false, face)
|
font = wxFont(28, wxDEFAULT, wxNORMAL, wxNORMAL, False, face)
|
||||||
self.txt.SetFont(font)
|
self.txt.SetFont(font)
|
||||||
self.txt.SetSize(self.txt.GetBestSize())
|
self.txt.SetSize(self.txt.GetBestSize())
|
||||||
|
|
||||||
@@ -64,9 +60,12 @@ def runTest(frame, nb, log):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
overview = """\
|
overview = """<html><body>
|
||||||
wxFontEnumerator enumerates either all available fonts on the system or only the ones with given attributes - either only fixed-width (suited for use in programs such as terminal emulators and the like) or the fonts available in the given encoding.
|
wxFontEnumerator enumerates either all available fonts on the system or only
|
||||||
|
the ones with given attributes - either only fixed-width (suited for use in
|
||||||
|
programs such as terminal emulators and the like) or the fonts available in
|
||||||
|
the given encoding.
|
||||||
|
</body></html>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@@ -28,12 +28,12 @@ class TestPanel(wxPanel):
|
|||||||
|
|
||||||
b = wxGenButton(self, -1, 'disabled')
|
b = wxGenButton(self, -1, 'disabled')
|
||||||
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
b.Enable(false)
|
b.Enable(False)
|
||||||
sizer.Add(b)
|
sizer.Add(b)
|
||||||
|
|
||||||
b = wxGenButton(self, -1, 'bigger')
|
b = wxGenButton(self, -1, 'bigger')
|
||||||
EVT_BUTTON(self, b.GetId(), self.OnBiggerButton)
|
EVT_BUTTON(self, b.GetId(), self.OnBiggerButton)
|
||||||
b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD, false))
|
b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
b.SetBezelWidth(5)
|
b.SetBezelWidth(5)
|
||||||
###b.SetBestSize()
|
###b.SetBestSize()
|
||||||
b.SetBackgroundColour("Navy")
|
b.SetBackgroundColour("Navy")
|
||||||
@@ -46,6 +46,12 @@ class TestPanel(wxPanel):
|
|||||||
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
sizer.Add(b)
|
sizer.Add(b)
|
||||||
|
|
||||||
|
bmp = images.getTest2Bitmap()
|
||||||
|
b = wxGenBitmapButton(self, -1, bmp)
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
sizer.Add(b)
|
||||||
|
b.Enable(False)
|
||||||
|
|
||||||
b = wxGenBitmapButton(self, -1, None)
|
b = wxGenBitmapButton(self, -1, None)
|
||||||
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
bmp = images.getBulb1Bitmap()
|
bmp = images.getBulb1Bitmap()
|
||||||
@@ -58,7 +64,6 @@ class TestPanel(wxPanel):
|
|||||||
b.SetBitmapSelected(bmp)
|
b.SetBitmapSelected(bmp)
|
||||||
b.SetBestSize()
|
b.SetBestSize()
|
||||||
sizer.Add(b)
|
sizer.Add(b)
|
||||||
sizer.Add(10,10)
|
|
||||||
|
|
||||||
b = wxGenToggleButton(self, -1, "Toggle Button")
|
b = wxGenToggleButton(self, -1, "Toggle Button")
|
||||||
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
|
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
|
||||||
@@ -74,7 +79,7 @@ class TestPanel(wxPanel):
|
|||||||
mask = wxMaskColour(bmp, wxBLUE)
|
mask = wxMaskColour(bmp, wxBLUE)
|
||||||
bmp.SetMask(mask)
|
bmp.SetMask(mask)
|
||||||
b.SetBitmapSelected(bmp)
|
b.SetBitmapSelected(bmp)
|
||||||
b.SetToggle(true)
|
b.SetToggle(True)
|
||||||
b.SetBestSize()
|
b.SetBestSize()
|
||||||
sizer.Add(b)
|
sizer.Add(b)
|
||||||
|
|
||||||
@@ -88,7 +93,7 @@ class TestPanel(wxPanel):
|
|||||||
mask = wxMaskColour(bmp, wxBLUE)
|
mask = wxMaskColour(bmp, wxBLUE)
|
||||||
bmp.SetMask(mask)
|
bmp.SetMask(mask)
|
||||||
b.SetBitmapSelected(bmp)
|
b.SetBitmapSelected(bmp)
|
||||||
b.SetUseFocusIndicator(false)
|
b.SetUseFocusIndicator(False)
|
||||||
b.SetBestSize()
|
b.SetBestSize()
|
||||||
sizer.Add(b)
|
sizer.Add(b)
|
||||||
|
|
||||||
@@ -128,3 +133,11 @@ def runTest(frame, nb, log):
|
|||||||
|
|
||||||
import wxPython.lib.buttons
|
import wxPython.lib.buttons
|
||||||
overview = wxPython.lib.buttons.__doc__
|
overview = wxPython.lib.buttons.__doc__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import sys,os
|
||||||
|
import run
|
||||||
|
run.main(['', os.path.basename(sys.argv[0])])
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
from wxPython.grid import *
|
from wxPython.grid import *
|
||||||
|
|
||||||
|
import string
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
class MyCellEditor(wxPyGridCellEditor):
|
class MyCellEditor(wxPyGridCellEditor):
|
||||||
"""
|
"""
|
||||||
@@ -86,16 +87,16 @@ class MyCellEditor(wxPyGridCellEditor):
|
|||||||
|
|
||||||
def EndEdit(self, row, col, grid):
|
def EndEdit(self, row, col, grid):
|
||||||
"""
|
"""
|
||||||
Complete the editing of the current cell. Returns true if the value
|
Complete the editing of the current cell. Returns True if the value
|
||||||
has changed. If necessary, the control may be destroyed.
|
has changed. If necessary, the control may be destroyed.
|
||||||
*Must Override*
|
*Must Override*
|
||||||
"""
|
"""
|
||||||
self.log.write("MyCellEditor: EndEdit (%d,%d)\n" % (row, col))
|
self.log.write("MyCellEditor: EndEdit (%d,%d)\n" % (row, col))
|
||||||
changed = false
|
changed = False
|
||||||
|
|
||||||
val = self._tc.GetValue()
|
val = self._tc.GetValue()
|
||||||
if val != self.startValue:
|
if val != self.startValue:
|
||||||
changed = true
|
changed = True
|
||||||
grid.GetTable().SetValue(row, col, val) # update the table
|
grid.GetTable().SetValue(row, col, val) # update the table
|
||||||
|
|
||||||
self.startValue = ''
|
self.startValue = ''
|
||||||
@@ -115,7 +116,7 @@ class MyCellEditor(wxPyGridCellEditor):
|
|||||||
|
|
||||||
def IsAcceptedKey(self, evt):
|
def IsAcceptedKey(self, evt):
|
||||||
"""
|
"""
|
||||||
Return TRUE to allow the given key to start editing: the base class
|
Return True to allow the given key to start editing: the base class
|
||||||
version only checks that the event has no modifiers. F2 is special
|
version only checks that the event has no modifiers. F2 is special
|
||||||
and will always start the editor.
|
and will always start the editor.
|
||||||
"""
|
"""
|
||||||
@@ -143,12 +144,13 @@ class MyCellEditor(wxPyGridCellEditor):
|
|||||||
elif key < 256 and key >= 0 and chr(key) in string.printable:
|
elif key < 256 and key >= 0 and chr(key) in string.printable:
|
||||||
ch = chr(key)
|
ch = chr(key)
|
||||||
if not evt.ShiftDown():
|
if not evt.ShiftDown():
|
||||||
ch = string.lower(ch)
|
ch = ch.lower()
|
||||||
|
|
||||||
if ch is not None:
|
if ch is not None:
|
||||||
# For this example, replace the text. Normally we would append it.
|
# For this example, replace the text. Normally we would append it.
|
||||||
#self._tc.AppendText(ch)
|
#self._tc.AppendText(ch)
|
||||||
self._tc.SetValue(ch)
|
self._tc.SetValue(ch)
|
||||||
|
self._tc.SetInsertionPointEnd()
|
||||||
else:
|
else:
|
||||||
evt.Skip()
|
evt.Skip()
|
||||||
|
|
||||||
@@ -226,7 +228,7 @@ if __name__ == '__main__':
|
|||||||
import sys
|
import sys
|
||||||
app = wxPySimpleApp()
|
app = wxPySimpleApp()
|
||||||
frame = TestFrame(None, sys.stdout)
|
frame = TestFrame(None, sys.stdout)
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
from wxPython.grid import *
|
from wxPython.grid import *
|
||||||
|
|
||||||
import string
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
class CustomDataTable(wxPyGridTableBase):
|
class CustomDataTable(wxPyGridTableBase):
|
||||||
@@ -45,7 +43,10 @@ class CustomDataTable(wxPyGridTableBase):
|
|||||||
return len(self.data[0])
|
return len(self.data[0])
|
||||||
|
|
||||||
def IsEmptyCell(self, row, col):
|
def IsEmptyCell(self, row, col):
|
||||||
|
try:
|
||||||
return not self.data[row][col]
|
return not self.data[row][col]
|
||||||
|
except IndexError:
|
||||||
|
return true
|
||||||
|
|
||||||
# Get/Set values in the table. The Python version of these
|
# Get/Set values in the table. The Python version of these
|
||||||
# methods can handle any data-type, (as long as the Editor and
|
# methods can handle any data-type, (as long as the Editor and
|
||||||
@@ -90,11 +91,11 @@ class CustomDataTable(wxPyGridTableBase):
|
|||||||
# editor and renderer. This allows you to enforce some type-safety
|
# editor and renderer. This allows you to enforce some type-safety
|
||||||
# in the grid.
|
# in the grid.
|
||||||
def CanGetValueAs(self, row, col, typeName):
|
def CanGetValueAs(self, row, col, typeName):
|
||||||
colType = string.split(self.dataTypes[col], ':')[0]
|
colType = self.dataTypes[col].split(':')[0]
|
||||||
if typeName == colType:
|
if typeName == colType:
|
||||||
return true
|
return true
|
||||||
else:
|
else:
|
||||||
return false
|
return False
|
||||||
|
|
||||||
def CanSetValueAs(self, row, col, typeName):
|
def CanSetValueAs(self, row, col, typeName):
|
||||||
return self.CanGetValueAs(row, col, typeName)
|
return self.CanGetValueAs(row, col, typeName)
|
||||||
@@ -120,7 +121,7 @@ class CustTableGrid(wxGrid):
|
|||||||
|
|
||||||
self.SetRowLabelSize(0)
|
self.SetRowLabelSize(0)
|
||||||
self.SetMargins(0,0)
|
self.SetMargins(0,0)
|
||||||
self.AutoSizeColumns(false)
|
self.AutoSizeColumns(False)
|
||||||
|
|
||||||
EVT_GRID_CELL_LEFT_DCLICK(self, self.OnLeftDClick)
|
EVT_GRID_CELL_LEFT_DCLICK(self, self.OnLeftDClick)
|
||||||
|
|
||||||
@@ -138,8 +139,22 @@ class CustTableGrid(wxGrid):
|
|||||||
class TestFrame(wxFrame):
|
class TestFrame(wxFrame):
|
||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxFrame.__init__(self, parent, -1, "Custom Table, data driven Grid Demo", size=(640,480))
|
wxFrame.__init__(self, parent, -1, "Custom Table, data driven Grid Demo", size=(640,480))
|
||||||
grid = CustTableGrid(self, log)
|
p = wxPanel(self, -1, style=0)
|
||||||
|
grid = CustTableGrid(p, log)
|
||||||
|
b = wxButton(p, -1, "Another Control...")
|
||||||
|
b.SetDefault()
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
EVT_SET_FOCUS(b, self.OnButtonFocus)
|
||||||
|
bs = wxBoxSizer(wxVERTICAL)
|
||||||
|
bs.Add(grid, 1, wxGROW|wxALL, 5)
|
||||||
|
bs.Add(b)
|
||||||
|
p.SetSizer(bs)
|
||||||
|
|
||||||
|
def OnButton(self, evt):
|
||||||
|
print "button selected"
|
||||||
|
|
||||||
|
def OnButtonFocus(self, evt):
|
||||||
|
print "button focus"
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
193
wxPython/demo/GridDragable.py
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
from wxPython.wx import *
|
||||||
|
from wxPython.grid import *
|
||||||
|
from wxPython.lib.gridmovers import wxGridColMover, EVT_GRID_COL_MOVE
|
||||||
|
from wxPython.lib.gridmovers import wxGridRowMover, EVT_GRID_ROW_MOVE
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class CustomDataTable(wxPyGridTableBase):
|
||||||
|
"""
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, log):
|
||||||
|
wxPyGridTableBase.__init__(self)
|
||||||
|
self.log = log
|
||||||
|
|
||||||
|
self.identifiers = ['id','ds','sv','pr','pl','op','fx','ts']
|
||||||
|
|
||||||
|
self.rowLabels = ['Row1','Row2','Row3']
|
||||||
|
|
||||||
|
self.colLabels = {'id':'ID','ds':'Description','sv':'Severity',
|
||||||
|
'pr':'Priority','pl':'Platform','op':'Opened?',
|
||||||
|
'fx':'Fixed?','ts':'Tested?'}
|
||||||
|
|
||||||
|
self.data = [{'id':1010,
|
||||||
|
'ds':"The foo doesn't bar",
|
||||||
|
'sv':"major",
|
||||||
|
'pr':1,
|
||||||
|
'pl':'MSW',
|
||||||
|
'op':1,
|
||||||
|
'fx':1,
|
||||||
|
'ts':1
|
||||||
|
},
|
||||||
|
{'id':1011,
|
||||||
|
'ds':"I've got a wicket in my wocket",
|
||||||
|
'sv':"wish list",
|
||||||
|
'pr':2,
|
||||||
|
'pl':'other',
|
||||||
|
'op':0,
|
||||||
|
'fx':0,
|
||||||
|
'ts':0
|
||||||
|
},
|
||||||
|
{'id':1012,
|
||||||
|
'ds':"Rectangle() returns a triangle",
|
||||||
|
'sv':"critical",
|
||||||
|
'pr':5,
|
||||||
|
'pl':'all',
|
||||||
|
'op':0,
|
||||||
|
'fx':0,
|
||||||
|
'ts':0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
#--------------------------------------------------
|
||||||
|
# required methods for the wxPyGridTableBase interface
|
||||||
|
|
||||||
|
def GetNumberRows(self):
|
||||||
|
return len(self.data)
|
||||||
|
|
||||||
|
def GetNumberCols(self):
|
||||||
|
return len(self.identifiers)
|
||||||
|
|
||||||
|
def IsEmptyCell(self, row, col):
|
||||||
|
id = self.identifiers[col]
|
||||||
|
return not self.data[row][id]
|
||||||
|
|
||||||
|
def GetValue(self, row, col):
|
||||||
|
id = self.identifiers[col]
|
||||||
|
return self.data[row][id]
|
||||||
|
|
||||||
|
def SetValue(self, row, col, value):
|
||||||
|
id = self.identifiers[col]
|
||||||
|
self.data[row][id] = value
|
||||||
|
|
||||||
|
#--------------------------------------------------
|
||||||
|
# Some optional methods
|
||||||
|
|
||||||
|
# Called when the grid needs to display column labels
|
||||||
|
def GetColLabelValue(self, col):
|
||||||
|
id = self.identifiers[col]
|
||||||
|
return self.colLabels[id]
|
||||||
|
|
||||||
|
# Called when the grid needs to display row labels
|
||||||
|
def GetRowLabelValue(self,row):
|
||||||
|
return self.rowLabels[row]
|
||||||
|
|
||||||
|
#--------------------------------------------------
|
||||||
|
# Methods added for demo purposes.
|
||||||
|
|
||||||
|
# The physical moving of the cols/rows is left to the implementer.
|
||||||
|
# Because of the dynamic nature of a wxGrid the physical moving of
|
||||||
|
# columns differs from implementation to implementation
|
||||||
|
|
||||||
|
# Move the column
|
||||||
|
def MoveColumn(self,frm,to):
|
||||||
|
grid = self.GetView()
|
||||||
|
if grid:
|
||||||
|
# Move the identifiers
|
||||||
|
old = self.identifiers[frm]
|
||||||
|
del self.identifiers[frm]
|
||||||
|
if to > frm:
|
||||||
|
self.identifiers.insert(to-1,old)
|
||||||
|
else:
|
||||||
|
self.identifiers.insert(to,old)
|
||||||
|
|
||||||
|
# Notify the grid
|
||||||
|
grid.BeginBatch()
|
||||||
|
msg = wxGridTableMessage(self,wxGRIDTABLE_NOTIFY_COLS_DELETED,
|
||||||
|
frm,1)
|
||||||
|
grid.ProcessTableMessage(msg)
|
||||||
|
msg = wxGridTableMessage(self,wxGRIDTABLE_NOTIFY_COLS_INSERTED,
|
||||||
|
to,1)
|
||||||
|
grid.ProcessTableMessage(msg)
|
||||||
|
grid.EndBatch()
|
||||||
|
|
||||||
|
# Move the row
|
||||||
|
def MoveRow(self,frm,to):
|
||||||
|
grid = self.GetView()
|
||||||
|
if grid:
|
||||||
|
# Move the rowLabels and data rows
|
||||||
|
oldLabel = self.rowLabels[frm]
|
||||||
|
oldData = self.data[frm]
|
||||||
|
del self.rowLabels[frm]
|
||||||
|
del self.data[frm]
|
||||||
|
if to > frm:
|
||||||
|
self.rowLabels.insert(to-1,oldLabel)
|
||||||
|
self.data.insert(to-1,oldData)
|
||||||
|
else:
|
||||||
|
self.rowLabels.insert(to,oldLabel)
|
||||||
|
self.data.insert(to,oldData)
|
||||||
|
|
||||||
|
# Notify the grid
|
||||||
|
grid.BeginBatch()
|
||||||
|
msg = wxGridTableMessage(self,wxGRIDTABLE_NOTIFY_ROWS_DELETED,
|
||||||
|
frm,1)
|
||||||
|
grid.ProcessTableMessage(msg)
|
||||||
|
msg = wxGridTableMessage(self,wxGRIDTABLE_NOTIFY_ROWS_INSERTED,
|
||||||
|
to,1)
|
||||||
|
grid.ProcessTableMessage(msg)
|
||||||
|
grid.EndBatch()
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
class DragableGrid(wxGrid):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxGrid.__init__(self, parent, -1)
|
||||||
|
|
||||||
|
table = CustomDataTable(log)
|
||||||
|
|
||||||
|
# The second parameter means that the grid is to take ownership of the
|
||||||
|
# table and will destroy it when done. Otherwise you would need to keep
|
||||||
|
# a reference to it and call it's Destroy method later.
|
||||||
|
self.SetTable(table, True)
|
||||||
|
|
||||||
|
# Enable Column moving
|
||||||
|
wxGridColMover(self)
|
||||||
|
EVT_GRID_COL_MOVE(self,self.GetId(),self.OnColMove)
|
||||||
|
|
||||||
|
# Enable Row moving
|
||||||
|
wxGridRowMover(self)
|
||||||
|
EVT_GRID_ROW_MOVE(self,self.GetId(),self.OnRowMove)
|
||||||
|
|
||||||
|
# Event method called when a column move needs to take place
|
||||||
|
def OnColMove(self,evt):
|
||||||
|
frm = evt.GetMoveColumn() # Column being moved
|
||||||
|
to = evt.GetBeforeColumn() # Before which column to insert
|
||||||
|
self.GetTable().MoveColumn(frm,to)
|
||||||
|
|
||||||
|
# Event method called when a row move needs to take place
|
||||||
|
def OnRowMove(self,evt):
|
||||||
|
frm = evt.GetMoveRow() # Row being moved
|
||||||
|
to = evt.GetBeforeRow() # Before which row to insert
|
||||||
|
self.GetTable().MoveRow(frm,to)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class TestFrame(wxFrame):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxFrame.__init__(self, parent, -1, "Custom Table, data driven Grid Demo", size=(640,480))
|
||||||
|
grid = DragableGrid(self, log)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import sys
|
||||||
|
app = wxPySimpleApp()
|
||||||
|
frame = TestFrame(None, sys.stdout)
|
||||||
|
frame.Show(True)
|
||||||
|
app.MainLoop()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
@@ -55,7 +55,7 @@ if __name__ == '__main__':
|
|||||||
import sys
|
import sys
|
||||||
app = wxPySimpleApp()
|
app = wxPySimpleApp()
|
||||||
frame = TestFrame(None, sys.stdout)
|
frame = TestFrame(None, sys.stdout)
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ class HugeTable(wxPyGridTableBase):
|
|||||||
return 10000
|
return 10000
|
||||||
|
|
||||||
def IsEmptyCell(self, row, col):
|
def IsEmptyCell(self, row, col):
|
||||||
return false
|
return False
|
||||||
|
|
||||||
def GetValue(self, row, col):
|
def GetValue(self, row, col):
|
||||||
return str( (row, col) )
|
return str( (row, col) )
|
||||||
@@ -45,7 +45,15 @@ class HugeTableGrid(wxGrid):
|
|||||||
# The second parameter means that the grid is to take ownership of the
|
# The second parameter means that the grid is to take ownership of the
|
||||||
# table and will destroy it when done. Otherwise you would need to keep
|
# table and will destroy it when done. Otherwise you would need to keep
|
||||||
# a reference to it and call it's Destroy method later.
|
# a reference to it and call it's Destroy method later.
|
||||||
self.SetTable(table, true)
|
self.SetTable(table, True)
|
||||||
|
|
||||||
|
EVT_GRID_CELL_RIGHT_CLICK(self, self.OnRightDown) #added
|
||||||
|
|
||||||
|
def OnRightDown(self, event): #added
|
||||||
|
print "hello"
|
||||||
|
print self.GetSelectedRows() #added
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -56,7 +64,7 @@ class TestFrame(wxFrame):
|
|||||||
wxFrame.__init__(self, parent, -1, "Huge (virtual) Table Demo", size=(640,480))
|
wxFrame.__init__(self, parent, -1, "Huge (virtual) Table Demo", size=(640,480))
|
||||||
grid = HugeTableGrid(self, log)
|
grid = HugeTableGrid(self, log)
|
||||||
|
|
||||||
grid.SetReadOnly(5,5, true)
|
grid.SetReadOnly(5,5, True)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -64,7 +72,7 @@ if __name__ == '__main__':
|
|||||||
import sys
|
import sys
|
||||||
app = wxPySimpleApp()
|
app = wxPySimpleApp()
|
||||||
frame = TestFrame(None, sys.stdout)
|
frame = TestFrame(None, sys.stdout)
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -13,8 +13,8 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
|
|||||||
|
|
||||||
EVT_IDLE(self, self.OnIdle)
|
EVT_IDLE(self, self.OnIdle)
|
||||||
|
|
||||||
self.CreateGrid(25, 25)
|
self.CreateGrid(25, 25) #, wxGrid.wxGridSelectRows)
|
||||||
##self.EnableEditing(false)
|
##self.EnableEditing(False)
|
||||||
|
|
||||||
# simple cell formatting
|
# simple cell formatting
|
||||||
self.SetColSize(3, 200)
|
self.SetColSize(3, 200)
|
||||||
@@ -26,9 +26,9 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
|
|||||||
self.SetCellFont(0, 0, wxFont(12, wxROMAN, wxITALIC, wxNORMAL))
|
self.SetCellFont(0, 0, wxFont(12, wxROMAN, wxITALIC, wxNORMAL))
|
||||||
self.SetCellTextColour(1, 1, wxRED)
|
self.SetCellTextColour(1, 1, wxRED)
|
||||||
self.SetCellBackgroundColour(2, 2, wxCYAN)
|
self.SetCellBackgroundColour(2, 2, wxCYAN)
|
||||||
self.SetReadOnly(3, 3, true)
|
self.SetReadOnly(3, 3, True)
|
||||||
|
|
||||||
self.SetCellEditor(5, 0, wxGridCellNumberEditor())
|
self.SetCellEditor(5, 0, wxGridCellNumberEditor(1,1000))
|
||||||
self.SetCellValue(5, 0, "123")
|
self.SetCellValue(5, 0, "123")
|
||||||
self.SetCellEditor(6, 0, wxGridCellFloatEditor())
|
self.SetCellEditor(6, 0, wxGridCellFloatEditor())
|
||||||
self.SetCellValue(6, 0, "123.34")
|
self.SetCellValue(6, 0, "123.34")
|
||||||
@@ -53,6 +53,18 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
|
|||||||
|
|
||||||
self.SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_BOTTOM)
|
self.SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_BOTTOM)
|
||||||
|
|
||||||
|
#self.SetDefaultCellOverflow(False)
|
||||||
|
#r = wxGridCellAutoWrapStringRenderer()
|
||||||
|
#self.SetCellRenderer(9, 1, r)
|
||||||
|
|
||||||
|
# overflow cells
|
||||||
|
self.SetCellValue( 9, 1, "This default cell will overflow into neighboring cells, but not if you turn overflow off.");
|
||||||
|
self.SetCellSize(11, 1, 3, 3);
|
||||||
|
self.SetCellAlignment(11, 1, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||||
|
self.SetCellValue(11, 1, "This cell is set to span 3 rows and 3 columns");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# test all the events
|
# test all the events
|
||||||
EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick)
|
EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick)
|
||||||
EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick)
|
EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick)
|
||||||
@@ -216,7 +228,7 @@ if __name__ == '__main__':
|
|||||||
import sys
|
import sys
|
||||||
app = wxPySimpleApp()
|
app = wxPySimpleApp()
|
||||||
frame = TestFrame(None, sys.stdout)
|
frame = TestFrame(None, sys.stdout)
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
from wxPython.grid import *
|
from wxPython.grid import *
|
||||||
|
|
||||||
import string, random
|
import random
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ editorDemoData = [
|
|||||||
('wxGridCellBoolEditor', '1', wxGridCellBoolEditor, ()),
|
('wxGridCellBoolEditor', '1', wxGridCellBoolEditor, ()),
|
||||||
('wxGridCellChoiceEditor', 'one', wxGridCellChoiceEditor, (['one', 'two', 'three', 'four',
|
('wxGridCellChoiceEditor', 'one', wxGridCellChoiceEditor, (['one', 'two', 'three', 'four',
|
||||||
'kick', 'Microsoft', 'out the',
|
'kick', 'Microsoft', 'out the',
|
||||||
'door'], false)),
|
'door'], False)),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -139,15 +139,15 @@ Renderers used together.
|
|||||||
attr = wxGridCellAttr()
|
attr = wxGridCellAttr()
|
||||||
attr.SetFont(font)
|
attr.SetFont(font)
|
||||||
attr.SetBackgroundColour(wxLIGHT_GREY)
|
attr.SetBackgroundColour(wxLIGHT_GREY)
|
||||||
attr.SetReadOnly(true)
|
attr.SetReadOnly(True)
|
||||||
attr.SetAlignment(wxRIGHT, -1)
|
attr.SetAlignment(wxRIGHT, -1)
|
||||||
self.SetColAttr(renCol, attr)
|
self.SetColAttr(renCol, attr)
|
||||||
attr.IncRef()
|
attr.IncRef()
|
||||||
self.SetColAttr(edCol, attr)
|
self.SetColAttr(edCol, attr)
|
||||||
|
|
||||||
# There is a bug in wxGTK for this method...
|
# There is a bug in wxGTK for this method...
|
||||||
self.AutoSizeColumns(true)
|
self.AutoSizeColumns(True)
|
||||||
self.AutoSizeRows(true)
|
self.AutoSizeRows(True)
|
||||||
|
|
||||||
EVT_GRID_CELL_LEFT_DCLICK(self, self.OnLeftDClick)
|
EVT_GRID_CELL_LEFT_DCLICK(self, self.OnLeftDClick)
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ if __name__ == '__main__':
|
|||||||
import sys
|
import sys
|
||||||
app = wxPySimpleApp()
|
app = wxPySimpleApp()
|
||||||
frame = TestFrame(None, sys.stdout)
|
frame = TestFrame(None, sys.stdout)
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -21,38 +21,38 @@ class AnchorsDemoFrame(wxFrame):
|
|||||||
self._init_utils()
|
self._init_utils()
|
||||||
|
|
||||||
self.mainPanel = wxPanel(size = wxSize(320, 160), parent = self, id = wxID_ANCHORSDEMOFRAMEMAINPANEL, name = 'panel1', style = wxTAB_TRAVERSAL | wxCLIP_CHILDREN, pos = wxPoint(0, 0))
|
self.mainPanel = wxPanel(size = wxSize(320, 160), parent = self, id = wxID_ANCHORSDEMOFRAMEMAINPANEL, name = 'panel1', style = wxTAB_TRAVERSAL | wxCLIP_CHILDREN, pos = wxPoint(0, 0))
|
||||||
self.mainPanel.SetAutoLayout(true)
|
self.mainPanel.SetAutoLayout(True)
|
||||||
|
|
||||||
self.okButton = wxButton(label = 'OK', id = wxID_ANCHORSDEMOFRAMEOKBUTTON, parent = self.mainPanel, name = 'okButton', size = wxSize(72, 24), style = 0, pos = wxPoint(240, 128))
|
self.okButton = wxButton(label = 'OK', id = wxID_ANCHORSDEMOFRAMEOKBUTTON, parent = self.mainPanel, name = 'okButton', size = wxSize(72, 24), style = 0, pos = wxPoint(240, 128))
|
||||||
self.okButton.SetConstraints(LayoutAnchors(self.okButton, false, false, true, true))
|
self.okButton.SetConstraints(LayoutAnchors(self.okButton, False, False, True, True))
|
||||||
EVT_BUTTON(self.okButton, wxID_ANCHORSDEMOFRAMEOKBUTTON, self.OnOkButtonButton)
|
EVT_BUTTON(self.okButton, wxID_ANCHORSDEMOFRAMEOKBUTTON, self.OnOkButtonButton)
|
||||||
|
|
||||||
self.backgroundPanel = wxPanel(size = wxSize(304, 80), parent = self.mainPanel, id = wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL, name = 'backgroundPanel', style = wxSIMPLE_BORDER | wxCLIP_CHILDREN, pos = wxPoint(8, 40))
|
self.backgroundPanel = wxPanel(size = wxSize(304, 80), parent = self.mainPanel, id = wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL, name = 'backgroundPanel', style = wxSIMPLE_BORDER | wxCLIP_CHILDREN, pos = wxPoint(8, 40))
|
||||||
self.backgroundPanel.SetBackgroundColour(wxColour(255, 255, 255))
|
self.backgroundPanel.SetBackgroundColour(wxColour(255, 255, 255))
|
||||||
self.backgroundPanel.SetConstraints(LayoutAnchors(self.backgroundPanel, true, true, true, true))
|
self.backgroundPanel.SetConstraints(LayoutAnchors(self.backgroundPanel, True, True, True, True))
|
||||||
|
|
||||||
self.anchoredPanel = wxPanel(size = wxSize(88, 48), id = wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, parent = self.backgroundPanel, name = 'anchoredPanel', style = wxSIMPLE_BORDER, pos = wxPoint(104, 16))
|
self.anchoredPanel = wxPanel(size = wxSize(88, 48), id = wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, parent = self.backgroundPanel, name = 'anchoredPanel', style = wxSIMPLE_BORDER, pos = wxPoint(104, 16))
|
||||||
self.anchoredPanel.SetBackgroundColour(wxColour(0, 0, 222))
|
self.anchoredPanel.SetBackgroundColour(wxColour(0, 0, 222))
|
||||||
self.anchoredPanel.SetConstraints(LayoutAnchors(self.anchoredPanel, false, false, false, false))
|
self.anchoredPanel.SetConstraints(LayoutAnchors(self.anchoredPanel, False, False, False, False))
|
||||||
|
|
||||||
self.leftCheckBox = wxCheckBox(label = 'Left', id = wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, parent = self.mainPanel, name = 'leftCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(8, 8))
|
self.leftCheckBox = wxCheckBox(label = 'Left', id = wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, parent = self.mainPanel, name = 'leftCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(8, 8))
|
||||||
self.leftCheckBox.SetConstraints(LayoutAnchors(self.leftCheckBox, false, true, false, false))
|
self.leftCheckBox.SetConstraints(LayoutAnchors(self.leftCheckBox, False, True, False, False))
|
||||||
EVT_CHECKBOX(self.leftCheckBox, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, self.OnCheckboxCheckbox)
|
EVT_CHECKBOX(self.leftCheckBox, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, self.OnCheckboxCheckbox)
|
||||||
|
|
||||||
self.topCheckBox = wxCheckBox(label = 'Top', id = wxID_ANCHORSDEMOFRAMETOPCHECKBOX, parent = self.mainPanel, name = 'topCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(88, 8))
|
self.topCheckBox = wxCheckBox(label = 'Top', id = wxID_ANCHORSDEMOFRAMETOPCHECKBOX, parent = self.mainPanel, name = 'topCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(88, 8))
|
||||||
self.topCheckBox.SetConstraints(LayoutAnchors(self.topCheckBox, false, true, false, false))
|
self.topCheckBox.SetConstraints(LayoutAnchors(self.topCheckBox, False, True, False, False))
|
||||||
EVT_CHECKBOX(self.topCheckBox, wxID_ANCHORSDEMOFRAMETOPCHECKBOX, self.OnCheckboxCheckbox)
|
EVT_CHECKBOX(self.topCheckBox, wxID_ANCHORSDEMOFRAMETOPCHECKBOX, self.OnCheckboxCheckbox)
|
||||||
|
|
||||||
self.rightCheckBox = wxCheckBox(label = 'Right', id = wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, parent = self.mainPanel, name = 'rightCheckBox', size = wxSize(48, 16), style = 0, pos = wxPoint(168, 8))
|
self.rightCheckBox = wxCheckBox(label = 'Right', id = wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, parent = self.mainPanel, name = 'rightCheckBox', size = wxSize(48, 16), style = 0, pos = wxPoint(168, 8))
|
||||||
self.rightCheckBox.SetConstraints(LayoutAnchors(self.rightCheckBox, false, true, false, false))
|
self.rightCheckBox.SetConstraints(LayoutAnchors(self.rightCheckBox, False, True, False, False))
|
||||||
EVT_CHECKBOX(self.rightCheckBox, wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, self.OnCheckboxCheckbox)
|
EVT_CHECKBOX(self.rightCheckBox, wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, self.OnCheckboxCheckbox)
|
||||||
|
|
||||||
self.bottomCheckBox = wxCheckBox(label = 'Bottom', id = wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, parent = self.mainPanel, name = 'bottomCheckBox', size = wxSize(56, 16), style = 0, pos = wxPoint(248, 8))
|
self.bottomCheckBox = wxCheckBox(label = 'Bottom', id = wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, parent = self.mainPanel, name = 'bottomCheckBox', size = wxSize(56, 16), style = 0, pos = wxPoint(248, 8))
|
||||||
self.bottomCheckBox.SetConstraints(LayoutAnchors(self.bottomCheckBox, false, true, false, false))
|
self.bottomCheckBox.SetConstraints(LayoutAnchors(self.bottomCheckBox, False, True, False, False))
|
||||||
EVT_CHECKBOX(self.bottomCheckBox, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, self.OnCheckboxCheckbox)
|
EVT_CHECKBOX(self.bottomCheckBox, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, self.OnCheckboxCheckbox)
|
||||||
|
|
||||||
self.helpStaticText = wxStaticText(label = 'Select anchor options above, then resize window to see the effect', id = wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT, parent = self.mainPanel, name = 'helpStaticText', size = wxSize(224, 24), style = wxST_NO_AUTORESIZE, pos = wxPoint(8, 128))
|
self.helpStaticText = wxStaticText(label = 'Select anchor options above, then resize window to see the effect', id = wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT, parent = self.mainPanel, name = 'helpStaticText', size = wxSize(224, 24), style = wxST_NO_AUTORESIZE, pos = wxPoint(8, 128))
|
||||||
self.helpStaticText.SetConstraints(LayoutAnchors(self.helpStaticText, true, false, true, true))
|
self.helpStaticText.SetConstraints(LayoutAnchors(self.helpStaticText, True, False, True, True))
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
self._init_ctrls(parent)
|
self._init_ctrls(parent)
|
||||||
@@ -71,7 +71,7 @@ class AnchorsDemoFrame(wxFrame):
|
|||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
win = AnchorsDemoFrame(frame)
|
win = AnchorsDemoFrame(frame)
|
||||||
frame.otherWin = win
|
frame.otherWin = win
|
||||||
win.Show(true)
|
win.Show(True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ class TestLayoutf(wxPanel):
|
|||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
EVT_BUTTON(self, 100, self.OnButton)
|
EVT_BUTTON(self, 100, self.OnButton)
|
||||||
|
|
||||||
self.panelA = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
|
self.panelA = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
|
||||||
|
@@ -3,6 +3,9 @@
|
|||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
from wxScrolledWindow import MyCanvas
|
from wxScrolledWindow import MyCanvas
|
||||||
|
|
||||||
|
import images
|
||||||
|
SHOW_BACKGROUND = 1
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
class MyParentFrame(wxMDIParentFrame):
|
class MyParentFrame(wxMDIParentFrame):
|
||||||
@@ -24,16 +27,38 @@ class MyParentFrame(wxMDIParentFrame):
|
|||||||
EVT_MENU(self, 5000, self.OnNewWindow)
|
EVT_MENU(self, 5000, self.OnNewWindow)
|
||||||
EVT_MENU(self, 5001, self.OnExit)
|
EVT_MENU(self, 5001, self.OnExit)
|
||||||
|
|
||||||
|
if SHOW_BACKGROUND:
|
||||||
|
self.bg_bmp = images.getGridBGBitmap()
|
||||||
|
EVT_ERASE_BACKGROUND(self.GetClientWindow(), self.OnEraseBackground)
|
||||||
|
|
||||||
|
|
||||||
def OnExit(self, evt):
|
def OnExit(self, evt):
|
||||||
self.Close(true)
|
self.Close(True)
|
||||||
|
|
||||||
|
|
||||||
def OnNewWindow(self, evt):
|
def OnNewWindow(self, evt):
|
||||||
self.winCount = self.winCount + 1
|
self.winCount = self.winCount + 1
|
||||||
win = wxMDIChildFrame(self, -1, "Child Window: %d" % self.winCount)
|
win = wxMDIChildFrame(self, -1, "Child Window: %d" % self.winCount)
|
||||||
canvas = MyCanvas(win)
|
canvas = MyCanvas(win)
|
||||||
win.Show(true)
|
win.Show(True)
|
||||||
|
|
||||||
|
|
||||||
|
def OnEraseBackground(self, evt):
|
||||||
|
dc = evt.GetDC()
|
||||||
|
if not dc:
|
||||||
|
dc = wxClientDC(self.GetClientWindow())
|
||||||
|
|
||||||
|
# tile the background bitmap
|
||||||
|
sz = self.GetClientSize()
|
||||||
|
w = self.bg_bmp.GetWidth()
|
||||||
|
h = self.bg_bmp.GetHeight()
|
||||||
|
x = 0
|
||||||
|
while x < sz.width:
|
||||||
|
y = 0
|
||||||
|
while y < sz.height:
|
||||||
|
dc.DrawBitmap(self.bg_bmp, x, y)
|
||||||
|
y = y + h
|
||||||
|
x = x + w
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -43,9 +68,9 @@ if __name__ == '__main__':
|
|||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
wxInitAllImageHandlers()
|
wxInitAllImageHandlers()
|
||||||
frame = MyParentFrame()
|
frame = MyParentFrame()
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
return true
|
return True
|
||||||
|
|
||||||
|
|
||||||
app = MyApp(0)
|
app = MyApp(0)
|
||||||
|
@@ -44,7 +44,7 @@ class MyParentFrame(wxMDIParentFrame):
|
|||||||
win.SetOrientation(wxLAYOUT_HORIZONTAL)
|
win.SetOrientation(wxLAYOUT_HORIZONTAL)
|
||||||
win.SetAlignment(wxLAYOUT_TOP)
|
win.SetAlignment(wxLAYOUT_TOP)
|
||||||
win.SetBackgroundColour(wxColour(255, 0, 0))
|
win.SetBackgroundColour(wxColour(255, 0, 0))
|
||||||
win.SetSashVisible(wxSASH_BOTTOM, true)
|
win.SetSashVisible(wxSASH_BOTTOM, True)
|
||||||
|
|
||||||
self.topWindow = win
|
self.topWindow = win
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ class MyParentFrame(wxMDIParentFrame):
|
|||||||
win.SetOrientation(wxLAYOUT_HORIZONTAL)
|
win.SetOrientation(wxLAYOUT_HORIZONTAL)
|
||||||
win.SetAlignment(wxLAYOUT_BOTTOM)
|
win.SetAlignment(wxLAYOUT_BOTTOM)
|
||||||
win.SetBackgroundColour(wxColour(0, 0, 255))
|
win.SetBackgroundColour(wxColour(0, 0, 255))
|
||||||
win.SetSashVisible(wxSASH_TOP, true)
|
win.SetSashVisible(wxSASH_TOP, True)
|
||||||
|
|
||||||
self.bottomWindow = win
|
self.bottomWindow = win
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ class MyParentFrame(wxMDIParentFrame):
|
|||||||
win.SetOrientation(wxLAYOUT_VERTICAL)
|
win.SetOrientation(wxLAYOUT_VERTICAL)
|
||||||
win.SetAlignment(wxLAYOUT_LEFT)
|
win.SetAlignment(wxLAYOUT_LEFT)
|
||||||
win.SetBackgroundColour(wxColour(0, 255, 0))
|
win.SetBackgroundColour(wxColour(0, 255, 0))
|
||||||
win.SetSashVisible(wxSASH_RIGHT, TRUE)
|
win.SetSashVisible(wxSASH_RIGHT, True)
|
||||||
win.SetExtraBorderSize(10)
|
win.SetExtraBorderSize(10)
|
||||||
textWindow = wxTextCtrl(win, -1, "", wxDefaultPosition, wxDefaultSize,
|
textWindow = wxTextCtrl(win, -1, "", wxDefaultPosition, wxDefaultSize,
|
||||||
wxTE_MULTILINE|wxSUNKEN_BORDER)
|
wxTE_MULTILINE|wxSUNKEN_BORDER)
|
||||||
@@ -81,7 +81,7 @@ class MyParentFrame(wxMDIParentFrame):
|
|||||||
win.SetOrientation(wxLAYOUT_VERTICAL)
|
win.SetOrientation(wxLAYOUT_VERTICAL)
|
||||||
win.SetAlignment(wxLAYOUT_LEFT)
|
win.SetAlignment(wxLAYOUT_LEFT)
|
||||||
win.SetBackgroundColour(wxColour(0, 255, 255))
|
win.SetBackgroundColour(wxColour(0, 255, 255))
|
||||||
win.SetSashVisible(wxSASH_RIGHT, TRUE)
|
win.SetSashVisible(wxSASH_RIGHT, True)
|
||||||
|
|
||||||
self.leftWindow2 = win
|
self.leftWindow2 = win
|
||||||
|
|
||||||
@@ -113,14 +113,14 @@ class MyParentFrame(wxMDIParentFrame):
|
|||||||
|
|
||||||
|
|
||||||
def OnExit(self, evt):
|
def OnExit(self, evt):
|
||||||
self.Close(true)
|
self.Close(True)
|
||||||
|
|
||||||
|
|
||||||
def OnNewWindow(self, evt):
|
def OnNewWindow(self, evt):
|
||||||
self.winCount = self.winCount + 1
|
self.winCount = self.winCount + 1
|
||||||
win = wxMDIChildFrame(self, -1, "Child Window: %d" % self.winCount)
|
win = wxMDIChildFrame(self, -1, "Child Window: %d" % self.winCount)
|
||||||
canvas = MyCanvas(win)
|
canvas = MyCanvas(win)
|
||||||
win.Show(true)
|
win.Show(True)
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -130,9 +130,9 @@ if __name__ == '__main__':
|
|||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
wxInitAllImageHandlers()
|
wxInitAllImageHandlers()
|
||||||
frame = MyParentFrame()
|
frame = MyParentFrame()
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
return true
|
return True
|
||||||
|
|
||||||
|
|
||||||
app = MyApp(0)
|
app = MyApp(0)
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
# Licence: wxWindows license
|
# Licence: wxWindows license
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
import sys, os, time, string
|
import sys, os, time
|
||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
from wxPython.html import wxHtmlWindow
|
from wxPython.html import wxHtmlWindow
|
||||||
|
|
||||||
@@ -19,27 +19,19 @@ from wxPython.html import wxHtmlWindow
|
|||||||
|
|
||||||
import images
|
import images
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
_treeList = [
|
_treeList = [
|
||||||
# new stuff
|
# new stuff
|
||||||
('New since last release', [
|
('Recent Additions', [
|
||||||
'RowColSizer',
|
'wxIntCtrl',
|
||||||
'Unicode',
|
'wxPyColourChooser',
|
||||||
'wxFileHistory',
|
'wxScrolledPanel',
|
||||||
'wxGenericDirCtrl',
|
|
||||||
'wxImageFromStream',
|
|
||||||
'wxArtProvider',
|
|
||||||
'ScrolledPanel',
|
|
||||||
'wxMenu',
|
|
||||||
'wxIEHtmlWin',
|
|
||||||
'wxKeyEvents',
|
|
||||||
'wxWizard',
|
|
||||||
'wxXmlResourceHandler',
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# managed windows == things with a caption you can close
|
# managed windows == things with a (optional) caption you can close
|
||||||
('Base Frames and Dialogs', [
|
('Base Frames and Dialogs', [
|
||||||
'wxDialog',
|
'wxDialog',
|
||||||
'wxFrame',
|
'wxFrame',
|
||||||
@@ -88,14 +80,15 @@ _treeList = [
|
|||||||
'wxNotebook',
|
'wxNotebook',
|
||||||
'wxPopupWindow',
|
'wxPopupWindow',
|
||||||
'wxRadioBox',
|
'wxRadioBox',
|
||||||
|
'wxRadioButton',
|
||||||
'wxSashWindow',
|
'wxSashWindow',
|
||||||
'wxSlider',
|
|
||||||
'wxScrolledWindow',
|
'wxScrolledWindow',
|
||||||
'wxSplitterWindow',
|
'wxSlider',
|
||||||
'wxSpinButton',
|
'wxSpinButton',
|
||||||
'wxSpinCtrl',
|
'wxSpinCtrl',
|
||||||
'wxStaticText',
|
'wxSplitterWindow',
|
||||||
'wxStaticBitmap',
|
'wxStaticBitmap',
|
||||||
|
'wxStaticText',
|
||||||
'wxStatusBar',
|
'wxStatusBar',
|
||||||
'wxTextCtrl',
|
'wxTextCtrl',
|
||||||
'wxToggleButton',
|
'wxToggleButton',
|
||||||
@@ -106,6 +99,9 @@ _treeList = [
|
|||||||
|
|
||||||
# controls coming from other librairies
|
# controls coming from other librairies
|
||||||
('More Windows/Controls', [
|
('More Windows/Controls', [
|
||||||
|
#'wxFloatBar', deprecated
|
||||||
|
#'wxMVCTree', deprecated
|
||||||
|
#'wxRightTextCtrl', deprecated as we have wxTE_RIGHT now.
|
||||||
'ColourSelect',
|
'ColourSelect',
|
||||||
'ContextHelp',
|
'ContextHelp',
|
||||||
'FancyText',
|
'FancyText',
|
||||||
@@ -115,20 +111,23 @@ _treeList = [
|
|||||||
'PyCrustWithFilling',
|
'PyCrustWithFilling',
|
||||||
'SplitTree',
|
'SplitTree',
|
||||||
'TablePrint',
|
'TablePrint',
|
||||||
|
'Throbber',
|
||||||
'wxCalendar',
|
'wxCalendar',
|
||||||
'wxCalendarCtrl',
|
'wxCalendarCtrl',
|
||||||
|
'wxPyColourChooser',
|
||||||
'wxDynamicSashWindow',
|
'wxDynamicSashWindow',
|
||||||
'wxEditableListBox',
|
'wxEditableListBox',
|
||||||
'wxEditor',
|
'wxEditor',
|
||||||
#'wxFloatBar', deprecated
|
|
||||||
'wxHtmlWindow',
|
'wxHtmlWindow',
|
||||||
'wxIEHtmlWin',
|
'wxIEHtmlWin',
|
||||||
|
'wxIntCtrl',
|
||||||
'wxLEDNumberCtrl',
|
'wxLEDNumberCtrl',
|
||||||
'wxMimeTypesManager',
|
'wxMimeTypesManager',
|
||||||
#'wxMVCTree', deprecated
|
'wxMultiSash',
|
||||||
'wxRightTextCtrl',
|
'wxPopupControl',
|
||||||
'wxStyledTextCtrl_1',
|
'wxStyledTextCtrl_1',
|
||||||
'wxStyledTextCtrl_2',
|
'wxStyledTextCtrl_2',
|
||||||
|
'wxTimeCtrl',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# How to lay out the controls in a frame/dialog
|
# How to lay out the controls in a frame/dialog
|
||||||
@@ -136,22 +135,23 @@ _treeList = [
|
|||||||
'LayoutAnchors',
|
'LayoutAnchors',
|
||||||
'Layoutf',
|
'Layoutf',
|
||||||
'RowColSizer',
|
'RowColSizer',
|
||||||
'ScrolledPanel',
|
|
||||||
'Sizers',
|
'Sizers',
|
||||||
'wxLayoutConstraints',
|
'wxLayoutConstraints',
|
||||||
|
'wxScrolledPanel',
|
||||||
'wxXmlResource',
|
'wxXmlResource',
|
||||||
'wxXmlResourceHandler',
|
'wxXmlResourceHandler',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# ditto
|
# ditto
|
||||||
('Process and Events', [
|
('Process and Events', [
|
||||||
|
'EventManager',
|
||||||
'infoframe',
|
'infoframe',
|
||||||
'OOR',
|
'OOR',
|
||||||
'PythonEvents',
|
'PythonEvents',
|
||||||
'Threads',
|
'Threads',
|
||||||
|
'wxKeyEvents',
|
||||||
'wxProcess',
|
'wxProcess',
|
||||||
'wxTimer',
|
'wxTimer',
|
||||||
'wxKeyEvents',
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# Clipboard and DnD
|
# Clipboard and DnD
|
||||||
@@ -162,12 +162,13 @@ _treeList = [
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
('Images', [
|
('Using Images', [
|
||||||
|
'Throbber',
|
||||||
|
'wxArtProvider',
|
||||||
'wxDragImage',
|
'wxDragImage',
|
||||||
'wxImage',
|
'wxImage',
|
||||||
'wxImageFromStream',
|
'wxImageFromStream',
|
||||||
'wxMask',
|
'wxMask',
|
||||||
'wxArtProvider',
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# Other stuff
|
# Other stuff
|
||||||
@@ -177,6 +178,7 @@ _treeList = [
|
|||||||
'DrawXXXList',
|
'DrawXXXList',
|
||||||
'FontEnumerator',
|
'FontEnumerator',
|
||||||
'PrintFramework',
|
'PrintFramework',
|
||||||
|
'Throbber',
|
||||||
'Unicode',
|
'Unicode',
|
||||||
'wxFileHistory',
|
'wxFileHistory',
|
||||||
'wxJoystick',
|
'wxJoystick',
|
||||||
@@ -212,6 +214,7 @@ class MyLog(wxPyLog):
|
|||||||
if self.logTime:
|
if self.logTime:
|
||||||
message = time.strftime("%X", time.localtime(timeStamp)) + \
|
message = time.strftime("%X", time.localtime(timeStamp)) + \
|
||||||
": " + message
|
": " + message
|
||||||
|
if self.tc:
|
||||||
self.tc.AppendText(message + '\n')
|
self.tc.AppendText(message + '\n')
|
||||||
|
|
||||||
|
|
||||||
@@ -223,7 +226,7 @@ class MyTP(wxPyTipProvider):
|
|||||||
|
|
||||||
def opj(path):
|
def opj(path):
|
||||||
"""Convert paths to the platform-specific separator"""
|
"""Convert paths to the platform-specific separator"""
|
||||||
return apply(os.path.join, tuple(string.split(path, '/')))
|
return apply(os.path.join, tuple(path.split('/')))
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -237,6 +240,7 @@ class wxPythonDemo(wxFrame):
|
|||||||
|
|
||||||
self.cwd = os.getcwd()
|
self.cwd = os.getcwd()
|
||||||
self.curOverview = ""
|
self.curOverview = ""
|
||||||
|
self.window = None
|
||||||
|
|
||||||
icon = images.getMondrianIcon()
|
icon = images.getMondrianIcon()
|
||||||
self.SetIcon(icon)
|
self.SetIcon(icon)
|
||||||
@@ -250,9 +254,9 @@ class wxPythonDemo(wxFrame):
|
|||||||
EVT_MENU(self.tbicon, self.TBMENU_RESTORE, self.OnTaskBarActivate)
|
EVT_MENU(self.tbicon, self.TBMENU_RESTORE, self.OnTaskBarActivate)
|
||||||
EVT_MENU(self.tbicon, self.TBMENU_CLOSE, self.OnTaskBarClose)
|
EVT_MENU(self.tbicon, self.TBMENU_CLOSE, self.OnTaskBarClose)
|
||||||
|
|
||||||
|
wxCallAfter(self.ShowTip)
|
||||||
|
|
||||||
self.otherWin = None
|
self.otherWin = None
|
||||||
self.showTip = true
|
|
||||||
EVT_IDLE(self, self.OnIdle)
|
EVT_IDLE(self, self.OnIdle)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
EVT_CLOSE(self, self.OnCloseWindow)
|
||||||
EVT_ICONIZE(self, self.OnIconfiy)
|
EVT_ICONIZE(self, self.OnIconfiy)
|
||||||
@@ -268,8 +272,8 @@ class wxPythonDemo(wxFrame):
|
|||||||
EVT_ERASE_BACKGROUND(splitter, EmptyHandler)
|
EVT_ERASE_BACKGROUND(splitter, EmptyHandler)
|
||||||
EVT_ERASE_BACKGROUND(splitter2, EmptyHandler)
|
EVT_ERASE_BACKGROUND(splitter2, EmptyHandler)
|
||||||
|
|
||||||
# Prevent TreeCtrl from displaying all items after destruction when true
|
# Prevent TreeCtrl from displaying all items after destruction when True
|
||||||
self.dying = false
|
self.dying = False
|
||||||
|
|
||||||
# Make a File menu
|
# Make a File menu
|
||||||
self.mainmenu = wxMenuBar()
|
self.mainmenu = wxMenuBar()
|
||||||
@@ -277,6 +281,7 @@ class wxPythonDemo(wxFrame):
|
|||||||
exitID = wxNewId()
|
exitID = wxNewId()
|
||||||
menu.Append(exitID, 'E&xit\tAlt-X', 'Get the heck outta here!')
|
menu.Append(exitID, 'E&xit\tAlt-X', 'Get the heck outta here!')
|
||||||
EVT_MENU(self, exitID, self.OnFileExit)
|
EVT_MENU(self, exitID, self.OnFileExit)
|
||||||
|
wxApp_SetMacExitMenuItemId(exitID)
|
||||||
self.mainmenu.Append(menu, '&File')
|
self.mainmenu.Append(menu, '&File')
|
||||||
|
|
||||||
# Make a Demo menu
|
# Make a Demo menu
|
||||||
@@ -293,15 +298,32 @@ class wxPythonDemo(wxFrame):
|
|||||||
|
|
||||||
# Make a Help menu
|
# Make a Help menu
|
||||||
helpID = wxNewId()
|
helpID = wxNewId()
|
||||||
|
findID = wxNewId()
|
||||||
|
findnextID = wxNewId()
|
||||||
menu = wxMenu()
|
menu = wxMenu()
|
||||||
|
menu.Append(findID, '&Find\tCtrl-F', 'Find in the Demo Code')
|
||||||
|
menu.Append(findnextID, 'Find &Next\tF3', 'Find Next')
|
||||||
|
menu.AppendSeparator()
|
||||||
menu.Append(helpID, '&About\tCtrl-H', 'wxPython RULES!!!')
|
menu.Append(helpID, '&About\tCtrl-H', 'wxPython RULES!!!')
|
||||||
|
wxApp_SetMacAboutMenuItemId(helpID)
|
||||||
EVT_MENU(self, helpID, self.OnHelpAbout)
|
EVT_MENU(self, helpID, self.OnHelpAbout)
|
||||||
|
EVT_MENU(self, findID, self.OnHelpFind)
|
||||||
|
EVT_MENU(self, findnextID, self.OnFindNext)
|
||||||
|
EVT_COMMAND_FIND(self, -1, self.OnFind)
|
||||||
|
EVT_COMMAND_FIND_NEXT(self, -1, self.OnFind)
|
||||||
|
EVT_COMMAND_FIND_CLOSE(self, -1 , self.OnFindClose)
|
||||||
self.mainmenu.Append(menu, '&Help')
|
self.mainmenu.Append(menu, '&Help')
|
||||||
self.SetMenuBar(self.mainmenu)
|
self.SetMenuBar(self.mainmenu)
|
||||||
|
|
||||||
# set the menu accellerator table...
|
self.finddata = wxFindReplaceData()
|
||||||
|
|
||||||
|
if 0:
|
||||||
|
# This is another way to set Accelerators, in addition to
|
||||||
|
# using the '\t<key>' syntax in the menu items.
|
||||||
aTable = wxAcceleratorTable([(wxACCEL_ALT, ord('X'), exitID),
|
aTable = wxAcceleratorTable([(wxACCEL_ALT, ord('X'), exitID),
|
||||||
(wxACCEL_CTRL, ord('H'), helpID)])
|
(wxACCEL_CTRL, ord('H'), helpID),
|
||||||
|
(wxACCEL_CTRL, ord('F'), findID),
|
||||||
|
(wxACCEL_NORMAL, WXK_F3, findnextID)])
|
||||||
self.SetAcceleratorTable(aTable)
|
self.SetAcceleratorTable(aTable)
|
||||||
|
|
||||||
|
|
||||||
@@ -358,7 +380,8 @@ class wxPythonDemo(wxFrame):
|
|||||||
|
|
||||||
# Set up a TextCtrl on the Demo Code Notebook page
|
# Set up a TextCtrl on the Demo Code Notebook page
|
||||||
self.txt = wxTextCtrl(self.nb, -1,
|
self.txt = wxTextCtrl(self.nb, -1,
|
||||||
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
style = wxTE_MULTILINE|wxTE_READONLY|
|
||||||
|
wxHSCROLL|wxTE_RICH2|wxTE_NOHIDESEL)
|
||||||
self.nb.AddPage(self.txt, "Demo Code")
|
self.nb.AddPage(self.txt, "Demo Code")
|
||||||
|
|
||||||
|
|
||||||
@@ -376,16 +399,14 @@ class wxPythonDemo(wxFrame):
|
|||||||
#wxLog_SetActiveTarget(wxLogStderr())
|
#wxLog_SetActiveTarget(wxLogStderr())
|
||||||
#wxLog_SetTraceMask(wxTraceMessages)
|
#wxLog_SetTraceMask(wxTraceMessages)
|
||||||
|
|
||||||
self.Show(true)
|
self.Show(True)
|
||||||
|
|
||||||
|
|
||||||
# add the windows to the splitter and split it.
|
# add the windows to the splitter and split it.
|
||||||
splitter2.SplitHorizontally(self.nb, self.log)
|
splitter2.SplitHorizontally(self.nb, self.log, 450)
|
||||||
splitter.SplitVertically(self.tree, splitter2)
|
splitter.SplitVertically(self.tree, splitter2, 180)
|
||||||
|
|
||||||
splitter.SetSashPosition(180, true)
|
|
||||||
splitter.SetMinimumPaneSize(20)
|
splitter.SetMinimumPaneSize(20)
|
||||||
splitter2.SetSashPosition(450, true)
|
|
||||||
splitter2.SetMinimumPaneSize(20)
|
splitter2.SetMinimumPaneSize(20)
|
||||||
|
|
||||||
|
|
||||||
@@ -453,6 +474,11 @@ class wxPythonDemo(wxFrame):
|
|||||||
if self.nb.GetPageCount() == 3:
|
if self.nb.GetPageCount() == 3:
|
||||||
if self.nb.GetSelection() == 2:
|
if self.nb.GetSelection() == 2:
|
||||||
self.nb.SetSelection(0)
|
self.nb.SetSelection(0)
|
||||||
|
# inform the window that it's time to quit if it cares
|
||||||
|
if self.window is not None:
|
||||||
|
if hasattr(self.window, "ShutdownDemo"):
|
||||||
|
self.window.ShutdownDemo()
|
||||||
|
wxSafeYield() # in case the page has pending events
|
||||||
self.nb.DeletePage(2)
|
self.nb.DeletePage(2)
|
||||||
|
|
||||||
if itemText == self.overviewText:
|
if itemText == self.overviewText:
|
||||||
@@ -478,7 +504,7 @@ class wxPythonDemo(wxFrame):
|
|||||||
wxSafeYield()
|
wxSafeYield()
|
||||||
|
|
||||||
self.window = module.runTest(self, self.nb, self) ###
|
self.window = module.runTest(self, self.nb, self) ###
|
||||||
if self.window:
|
if self.window is not None:
|
||||||
self.nb.AddPage(self.window, 'Demo')
|
self.nb.AddPage(self.window, 'Demo')
|
||||||
self.nb.SetSelection(2)
|
self.nb.SetSelection(2)
|
||||||
self.nb.Refresh() # without this wxMac has troubles showing the just added page
|
self.nb.Refresh() # without this wxMac has troubles showing the just added page
|
||||||
@@ -507,7 +533,7 @@ class wxPythonDemo(wxFrame):
|
|||||||
self.curOverview = text
|
self.curOverview = text
|
||||||
lead = text[:6]
|
lead = text[:6]
|
||||||
if lead != '<html>' and lead != '<HTML>':
|
if lead != '<html>' and lead != '<HTML>':
|
||||||
text = string.join(string.split(text, '\n'), '<br>')
|
text = '<br>'.join(text.split('\n'))
|
||||||
self.ovr.SetPage(text)
|
self.ovr.SetPage(text)
|
||||||
self.nb.SetPageText(0, name)
|
self.nb.SetPageText(0, name)
|
||||||
|
|
||||||
@@ -516,17 +542,61 @@ class wxPythonDemo(wxFrame):
|
|||||||
def OnFileExit(self, *event):
|
def OnFileExit(self, *event):
|
||||||
self.Close()
|
self.Close()
|
||||||
|
|
||||||
|
|
||||||
def OnHelpAbout(self, event):
|
def OnHelpAbout(self, event):
|
||||||
from About import MyAboutBox
|
from About import MyAboutBox
|
||||||
about = MyAboutBox(self)
|
about = MyAboutBox(self)
|
||||||
about.ShowModal()
|
about.ShowModal()
|
||||||
about.Destroy()
|
about.Destroy()
|
||||||
|
|
||||||
|
def OnHelpFind(self, event):
|
||||||
|
self.nb.SetSelection(1)
|
||||||
|
self.finddlg = wxFindReplaceDialog(self, self.finddata, "Find",
|
||||||
|
wxFR_NOUPDOWN |
|
||||||
|
wxFR_NOMATCHCASE |
|
||||||
|
wxFR_NOWHOLEWORD)
|
||||||
|
self.finddlg.Show(True)
|
||||||
|
|
||||||
|
def OnFind(self, event):
|
||||||
|
self.nb.SetSelection(1)
|
||||||
|
end = self.txt.GetLastPosition()
|
||||||
|
textstring = self.txt.GetRange(0, end).lower()
|
||||||
|
start = self.txt.GetSelection()[1]
|
||||||
|
findstring = self.finddata.GetFindString().lower()
|
||||||
|
loc = textstring.find(findstring, start)
|
||||||
|
if loc == -1 and start != 0:
|
||||||
|
# string not found, start at beginning
|
||||||
|
start = 0
|
||||||
|
loc = textstring.find(findstring, start)
|
||||||
|
if loc == -1:
|
||||||
|
dlg = wxMessageDialog(self, 'Find String Not Found',
|
||||||
|
'Find String Not Found in Demo File',
|
||||||
|
wxOK | wxICON_INFORMATION)
|
||||||
|
dlg.ShowModal()
|
||||||
|
dlg.Destroy()
|
||||||
|
if self.finddlg:
|
||||||
|
if loc == -1:
|
||||||
|
self.finddlg.SetFocus()
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
self.finddlg.Destroy()
|
||||||
|
self.txt.SetSelection(loc, loc + len(findstring))
|
||||||
|
self.txt.ShowPosition(loc)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def OnFindNext(self, event):
|
||||||
|
if self.finddata.GetFindString():
|
||||||
|
self.OnFind(event)
|
||||||
|
else:
|
||||||
|
self.OnHelpFind(event)
|
||||||
|
|
||||||
|
def OnFindClose(self, event):
|
||||||
|
event.GetDialog().Destroy()
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
||||||
self.dying = true
|
self.dying = True
|
||||||
self.window = None
|
self.window = None
|
||||||
self.mainmenu = None
|
self.mainmenu = None
|
||||||
if hasattr(self, "tbicon"):
|
if hasattr(self, "tbicon"):
|
||||||
@@ -541,10 +611,6 @@ class wxPythonDemo(wxFrame):
|
|||||||
self.window = self.otherWin
|
self.window = self.otherWin
|
||||||
self.otherWin = None
|
self.otherWin = None
|
||||||
|
|
||||||
if self.showTip:
|
|
||||||
self.ShowTip()
|
|
||||||
self.showTip = false
|
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def ShowTip(self):
|
def ShowTip(self):
|
||||||
@@ -575,9 +641,9 @@ class wxPythonDemo(wxFrame):
|
|||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def OnTaskBarActivate(self, evt):
|
def OnTaskBarActivate(self, evt):
|
||||||
if self.IsIconized():
|
if self.IsIconized():
|
||||||
self.Iconize(false)
|
self.Iconize(False)
|
||||||
if not self.IsShown():
|
if not self.IsShown():
|
||||||
self.Show(true)
|
self.Show(True)
|
||||||
self.Raise()
|
self.Raise()
|
||||||
|
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
@@ -628,7 +694,7 @@ class MySplashScreen(wxSplashScreen):
|
|||||||
|
|
||||||
def OnClose(self, evt):
|
def OnClose(self, evt):
|
||||||
frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)")
|
frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)")
|
||||||
frame.Show(true)
|
frame.Show()
|
||||||
evt.Skip() # Make sure the default handler runs too...
|
evt.Skip() # Make sure the default handler runs too...
|
||||||
|
|
||||||
|
|
||||||
@@ -638,10 +704,15 @@ class MyApp(wxApp):
|
|||||||
Create and show the splash screen. It will then create and show
|
Create and show the splash screen. It will then create and show
|
||||||
the main frame when it is time to do so.
|
the main frame when it is time to do so.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
#import locale
|
||||||
|
#self.locale = wxLocale(wxLANGUAGE_FRENCH)
|
||||||
|
#locale.setlocale(locale.LC_ALL, 'fr')
|
||||||
|
|
||||||
wxInitAllImageHandlers()
|
wxInitAllImageHandlers()
|
||||||
splash = MySplashScreen()
|
splash = MySplashScreen()
|
||||||
splash.Show()
|
splash.Show()
|
||||||
return true
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ class TestPanel(wxPanel):
|
|||||||
sizer.Add(btns, 0, wxEXPAND|wxALL, 15)
|
sizer.Add(btns, 0, wxEXPAND|wxALL, 15)
|
||||||
|
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
|
|
||||||
self.sizer = sizer # save it for testing later
|
self.sizer = sizer # save it for testing later
|
||||||
|
|
||||||
|
@@ -33,9 +33,9 @@ class MyPrintout(wxPrintout):
|
|||||||
def HasPage(self, page):
|
def HasPage(self, page):
|
||||||
self.log.WriteText("wxPrintout.HasPage: %d\n" % page)
|
self.log.WriteText("wxPrintout.HasPage: %d\n" % page)
|
||||||
if page <= 2:
|
if page <= 2:
|
||||||
return true
|
return True
|
||||||
else:
|
else:
|
||||||
return false
|
return False
|
||||||
|
|
||||||
def GetPageInfo(self):
|
def GetPageInfo(self):
|
||||||
self.log.WriteText("wxPrintout.GetPageInfo\n")
|
self.log.WriteText("wxPrintout.GetPageInfo\n")
|
||||||
@@ -82,7 +82,7 @@ class MyPrintout(wxPrintout):
|
|||||||
self.canvas.DoDrawing(dc)
|
self.canvas.DoDrawing(dc)
|
||||||
dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
|
dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
|
||||||
|
|
||||||
return true
|
return True
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -117,14 +117,14 @@ class TestPrintPanel(wxPanel):
|
|||||||
|
|
||||||
self.box.Add(subbox, 0, wxGROW)
|
self.box.Add(subbox, 0, wxGROW)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(self.box)
|
self.SetSizer(self.box)
|
||||||
|
|
||||||
|
|
||||||
def OnPrintSetup(self, event):
|
def OnPrintSetup(self, event):
|
||||||
printerDialog = wxPrintDialog(self)
|
printerDialog = wxPrintDialog(self)
|
||||||
printerDialog.GetPrintDialogData().SetPrintData(self.printData)
|
printerDialog.GetPrintDialogData().SetPrintData(self.printData)
|
||||||
printerDialog.GetPrintDialogData().SetSetupDialog(true)
|
printerDialog.GetPrintDialogData().SetSetupDialog(True)
|
||||||
printerDialog.ShowModal();
|
printerDialog.ShowModal();
|
||||||
self.printData = printerDialog.GetPrintDialogData().GetPrintData()
|
self.printData = printerDialog.GetPrintDialogData().GetPrintData()
|
||||||
printerDialog.Destroy()
|
printerDialog.Destroy()
|
||||||
@@ -144,7 +144,7 @@ class TestPrintPanel(wxPanel):
|
|||||||
frame.Initialize()
|
frame.Initialize()
|
||||||
frame.SetPosition(self.frame.GetPosition())
|
frame.SetPosition(self.frame.GetPosition())
|
||||||
frame.SetSize(self.frame.GetSize())
|
frame.SetSize(self.frame.GetSize())
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ class TestPanel(wxPanel):
|
|||||||
sizer.AddSpacer(10,10, pos=(13,1))
|
sizer.AddSpacer(10,10, pos=(13,1))
|
||||||
|
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -67,3 +67,9 @@ import wxPython.lib.rcsizer
|
|||||||
overview = wxPython.lib.rcsizer.__doc__
|
overview = wxPython.lib.rcsizer.__doc__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import sys,os
|
||||||
|
import run
|
||||||
|
run.main(['', os.path.basename(sys.argv[0])])
|
||||||
|
|
||||||
|
@@ -1,97 +0,0 @@
|
|||||||
|
|
||||||
from wxPython.wx import *
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
|
||||||
|
|
||||||
text = "one two buckle my shoe three four shut the door five six pick up sticks seven eight lay them straight nine ten big fat hen"
|
|
||||||
|
|
||||||
|
|
||||||
class ScrolledPanel(wxScrolledWindow):
|
|
||||||
def __init__(self, parent, log):
|
|
||||||
self.log = log
|
|
||||||
wxScrolledWindow.__init__(self, parent, -1,
|
|
||||||
style = wxTAB_TRAVERSAL)
|
|
||||||
|
|
||||||
box = wxBoxSizer(wxVERTICAL)
|
|
||||||
box.Add(wxStaticText(self, -1,
|
|
||||||
"This sample shows how to make a scrollable data entry \n"
|
|
||||||
"form by using a wxSizer in a wxScrolledWindow."),
|
|
||||||
0, wxCENTER|wxALL, 5)
|
|
||||||
box.Add(wxStaticLine(self, -1), 0, wxEXPAND|wxALL, 5)
|
|
||||||
|
|
||||||
fgs = wxFlexGridSizer(cols=2, vgap=4, hgap=4)
|
|
||||||
fgs.AddGrowableCol(1)
|
|
||||||
|
|
||||||
# Add some spacers
|
|
||||||
fgs.Add(75, 10)
|
|
||||||
fgs.Add(150, 10)
|
|
||||||
|
|
||||||
for word in text.split():
|
|
||||||
label = wxStaticText(self, -1, word+":")
|
|
||||||
tc = wxTextCtrl(self, -1, word)
|
|
||||||
fgs.Add(label, flag=wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL)
|
|
||||||
fgs.Add(tc, flag=wxEXPAND)
|
|
||||||
|
|
||||||
box.Add(fgs, 1)
|
|
||||||
box.Add(10, 40) # some more empty space at the bottom
|
|
||||||
self.SetSizer(box)
|
|
||||||
|
|
||||||
|
|
||||||
# The following is all that is needed to integrate the sizer and the
|
|
||||||
# scrolled window. In this case we will only support vertical scrolling.
|
|
||||||
self.EnableScrolling(false, true)
|
|
||||||
self.SetScrollRate(0, 20)
|
|
||||||
box.SetVirtualSizeHints(self)
|
|
||||||
EVT_CHILD_FOCUS(self, self.OnChildFocus)
|
|
||||||
|
|
||||||
wxCallAfter(self.Scroll, 0, 0) # scroll back to top after initial events
|
|
||||||
|
|
||||||
|
|
||||||
def OnChildFocus(self, evt):
|
|
||||||
# If the child window that gets the focus is not visible,
|
|
||||||
# this handler will try to scroll enough to see it. If you
|
|
||||||
# need to handle horizontal auto-scrolling too then this will
|
|
||||||
# need adapted.
|
|
||||||
evt.Skip()
|
|
||||||
child = evt.GetWindow()
|
|
||||||
|
|
||||||
sppu_y = self.GetScrollPixelsPerUnit()[1]
|
|
||||||
vs_y = self.GetViewStart()[1]
|
|
||||||
cpos = child.GetPosition()
|
|
||||||
csz = child.GetSize()
|
|
||||||
|
|
||||||
# is it above the top?
|
|
||||||
if cpos.y < 0:
|
|
||||||
new_vs = cpos.y / sppu_y
|
|
||||||
self.Scroll(-1, new_vs)
|
|
||||||
|
|
||||||
# is it below the bottom ?
|
|
||||||
if cpos.y + csz.height > self.GetClientSize().height:
|
|
||||||
diff = (cpos.y + csz.height - self.GetClientSize().height) / sppu_y
|
|
||||||
self.Scroll(-1, vs_y + diff + 1)
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
|
||||||
win = ScrolledPanel(nb, log)
|
|
||||||
return win
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
overview = """<html><body>
|
|
||||||
This sample shows how to make a scrollable data entry form by
|
|
||||||
using a wxSizer in a wxScrolledWindow.
|
|
||||||
</body></html>
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
import sys,os
|
|
||||||
import run
|
|
||||||
run.main(['', os.path.basename(sys.argv[0])])
|
|
||||||
|
|
@@ -479,16 +479,16 @@ class TestFrame(wxFrame):
|
|||||||
self.SetStatusText("Resize this frame to see how the sizers respond...")
|
self.SetStatusText("Resize this frame to see how the sizers respond...")
|
||||||
self.sizer.Fit(self)
|
self.sizer.Fit(self)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(self.sizer)
|
self.SetSizer(self.sizer)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
EVT_CLOSE(self, self.OnCloseWindow)
|
||||||
|
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
||||||
self.MakeModal(false)
|
self.MakeModal(False)
|
||||||
self.Destroy()
|
self.Destroy()
|
||||||
|
|
||||||
def OnButton(self, event):
|
def OnButton(self, event):
|
||||||
self.Close(true)
|
self.Close(True)
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -531,8 +531,8 @@ class TestSelectionPanel(wxPanel):
|
|||||||
if func:
|
if func:
|
||||||
win = TestFrame(self, title, func)
|
win = TestFrame(self, title, func)
|
||||||
win.CentreOnParent(wxBOTH)
|
win.CentreOnParent(wxBOTH)
|
||||||
win.Show(true)
|
win.Show(True)
|
||||||
win.MakeModal(true)
|
win.MakeModal(True)
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -570,15 +570,15 @@ if __name__ == '__main__':
|
|||||||
self.Destroy()
|
self.Destroy()
|
||||||
|
|
||||||
def OnExit(self, event):
|
def OnExit(self, event):
|
||||||
self.Close(true)
|
self.Close(True)
|
||||||
|
|
||||||
|
|
||||||
class TestApp(wxApp):
|
class TestApp(wxApp):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
frame = MainFrame()
|
frame = MainFrame()
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
return true
|
return True
|
||||||
|
|
||||||
app = TestApp(0)
|
app = TestApp(0)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
@@ -201,8 +201,8 @@ class AppFrame(wxFrame):
|
|||||||
EVT_MENU(self, 212, self.OnViewArticle)
|
EVT_MENU(self, 212, self.OnViewArticle)
|
||||||
self.mainmenu.Append(menu, '&View')
|
self.mainmenu.Append(menu, '&View')
|
||||||
menu = wxMenu()
|
menu = wxMenu()
|
||||||
menu.Append(220, '&Internal', 'Use internal text browser',TRUE)
|
menu.Append(220, '&Internal', 'Use internal text browser',True)
|
||||||
menu.Check(220, true)
|
menu.Check(220, True)
|
||||||
self.UseInternal = 1;
|
self.UseInternal = 1;
|
||||||
EVT_MENU(self, 220, self.OnBrowserInternal)
|
EVT_MENU(self, 220, self.OnBrowserInternal)
|
||||||
menu.Append(222, '&Settings...', 'External browser Settings')
|
menu.Append(222, '&Settings...', 'External browser Settings')
|
||||||
@@ -279,7 +279,7 @@ class AppFrame(wxFrame):
|
|||||||
if self.UseInternal:
|
if self.UseInternal:
|
||||||
self.view = HTMLTextView(self, -1, 'slashdot.org',
|
self.view = HTMLTextView(self, -1, 'slashdot.org',
|
||||||
'http://slashdot.org')
|
'http://slashdot.org')
|
||||||
self.view.Show(true)
|
self.view.Show(True)
|
||||||
else:
|
else:
|
||||||
self.logprint(self.BrowserSettings % ('http://slashdot.org'))
|
self.logprint(self.BrowserSettings % ('http://slashdot.org'))
|
||||||
#os.system(self.BrowserSettings % ('http://slashdot.org'))
|
#os.system(self.BrowserSettings % ('http://slashdot.org'))
|
||||||
@@ -296,7 +296,7 @@ class AppFrame(wxFrame):
|
|||||||
url = self.url[self.current]
|
url = self.url[self.current]
|
||||||
if self.UseInternal:
|
if self.UseInternal:
|
||||||
self.view = HTMLTextView(self, -1, url, url)
|
self.view = HTMLTextView(self, -1, url, url)
|
||||||
self.view.Show(true)
|
self.view.Show(True)
|
||||||
else:
|
else:
|
||||||
self.logprint(self.BrowserSettings % (url))
|
self.logprint(self.BrowserSettings % (url))
|
||||||
os.system(self.BrowserSettings % (url))
|
os.system(self.BrowserSettings % (url))
|
||||||
@@ -353,9 +353,9 @@ if __name__ == '__main__':
|
|||||||
class MyApp(wxApp):
|
class MyApp(wxApp):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
frame = AppFrame(None, -1, "Slashdot Breaking News")
|
frame = AppFrame(None, -1, "Slashdot Breaking News")
|
||||||
frame.Show(true)
|
frame.Show(True)
|
||||||
self.SetTopWindow(frame)
|
self.SetTopWindow(frame)
|
||||||
return true
|
return True
|
||||||
|
|
||||||
app = MyApp(0)
|
app = MyApp(0)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
@@ -368,7 +368,7 @@ if __name__ == '__main__':
|
|||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
win = AppFrame(None, -1, "Slashdot Breaking News")
|
win = AppFrame(None, -1, "Slashdot Breaking News")
|
||||||
frame.otherWin = win
|
frame.otherWin = win
|
||||||
win.Show(true)
|
win.Show(True)
|
||||||
|
|
||||||
|
|
||||||
overview = __doc__
|
overview = __doc__
|
||||||
|
@@ -76,23 +76,26 @@ class TestPanel(wxPanel):
|
|||||||
wxNO_BORDER )
|
wxNO_BORDER )
|
||||||
valueWindow = TestValueWindow(splitter, -1, style=wxNO_BORDER)
|
valueWindow = TestValueWindow(splitter, -1, style=wxNO_BORDER)
|
||||||
|
|
||||||
splitter.SplitVertically(tree, valueWindow)
|
splitter.SplitVertically(tree, valueWindow, 150)
|
||||||
splitter.SetSashPosition(150)
|
|
||||||
scroller.SetTargetWindow(tree)
|
scroller.SetTargetWindow(tree)
|
||||||
scroller.EnableScrolling(FALSE, FALSE)
|
scroller.EnableScrolling(False, False)
|
||||||
|
|
||||||
valueWindow.SetTreeCtrl(tree)
|
valueWindow.SetTreeCtrl(tree)
|
||||||
tree.SetCompanionWindow(valueWindow)
|
tree.SetCompanionWindow(valueWindow)
|
||||||
|
|
||||||
sizer = wxBoxSizer(wxVERTICAL)
|
sizer = wxBoxSizer(wxVERTICAL)
|
||||||
sizer.Add(scroller, 1, wxEXPAND|wxALL, 25)
|
sizer.Add(scroller, 1, wxEXPAND|wxALL, 25)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
|
if wxPlatform == "__WXMAC__":
|
||||||
|
wxMessageBox("This demo currently fails on the Mac. The problem is being looked into...", "Sorry")
|
||||||
|
return
|
||||||
|
|
||||||
win = TestPanel(nb, log)
|
win = TestPanel(nb, log)
|
||||||
return win
|
return win
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@ class TablePanel(wxPanel):
|
|||||||
box.Add(btn, 0, wxALIGN_CENTER|wxALL, 15)
|
box.Add(btn, 0, wxALIGN_CENTER|wxALL, 15)
|
||||||
EVT_BUTTON(self, k, self.OnButton)
|
EVT_BUTTON(self, k, self.OnButton)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(box)
|
self.SetSizer(box)
|
||||||
|
|
||||||
def OnButton(self, evt):
|
def OnButton(self, evt):
|
||||||
@@ -47,11 +47,11 @@ class TablePanel(wxPanel):
|
|||||||
data = []
|
data = []
|
||||||
while 1:
|
while 1:
|
||||||
text = file.readline()
|
text = file.readline()
|
||||||
text = string.strip(text)
|
text = text.strip()
|
||||||
if not text:
|
if not text:
|
||||||
break
|
break
|
||||||
|
|
||||||
list_val = string.splitfields(text,'\t')
|
list_val = text.split('\t')
|
||||||
data.append(list_val)
|
data.append(list_val)
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
@@ -30,11 +30,11 @@ class CalcBarThread:
|
|||||||
self.val = val
|
self.val = val
|
||||||
|
|
||||||
def Start(self):
|
def Start(self):
|
||||||
self.keepGoing = self.running = true
|
self.keepGoing = self.running = True
|
||||||
thread.start_new_thread(self.Run, ())
|
thread.start_new_thread(self.Run, ())
|
||||||
|
|
||||||
def Stop(self):
|
def Stop(self):
|
||||||
self.keepGoing = false
|
self.keepGoing = False
|
||||||
|
|
||||||
def IsRunning(self):
|
def IsRunning(self):
|
||||||
return self.running
|
return self.running
|
||||||
@@ -57,7 +57,7 @@ class CalcBarThread:
|
|||||||
if self.val < 0: self.val = 0
|
if self.val < 0: self.val = 0
|
||||||
if self.val > 300: self.val = 300
|
if self.val > 300: self.val = 300
|
||||||
|
|
||||||
self.running = false
|
self.running = False
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ class TestFrame(wxFrame):
|
|||||||
sizer.Add(self.graph, 1, wxEXPAND)
|
sizer.Add(self.graph, 1, wxEXPAND)
|
||||||
|
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
sizer.Fit(self)
|
sizer.Fit(self)
|
||||||
|
|
||||||
EVT_UPDATE_BARGRAPH(self, self.OnUpdate)
|
EVT_UPDATE_BARGRAPH(self, self.OnUpdate)
|
||||||
@@ -194,7 +194,7 @@ class TestFrame(wxFrame):
|
|||||||
|
|
||||||
def OnUpdate(self, evt):
|
def OnUpdate(self, evt):
|
||||||
self.graph.SetValue(evt.barNum, evt.value)
|
self.graph.SetValue(evt.barNum, evt.value)
|
||||||
self.graph.Refresh(false)
|
self.graph.Refresh(False)
|
||||||
|
|
||||||
|
|
||||||
def OnCloseWindow(self, evt):
|
def OnCloseWindow(self, evt):
|
||||||
@@ -217,7 +217,7 @@ class TestFrame(wxFrame):
|
|||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
win = TestFrame(frame, log)
|
win = TestFrame(frame, log)
|
||||||
frame.otherWin = win
|
frame.otherWin = win
|
||||||
win.Show(true)
|
win.Show(True)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
180
wxPython/demo/Throbber.py
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
#
|
||||||
|
# Throbber.py - Cliff Wells <clifford.wells@attbi.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
from wxPython.lib.rcsizer import RowColSizer
|
||||||
|
from wxPython.lib.throbber import Throbber, __doc__ as docString
|
||||||
|
import throbImages # this was created using a modified version of img2py
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class TestPanel(wxPanel):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
self.log = log
|
||||||
|
|
||||||
|
# create the throbbers
|
||||||
|
self.throbbers = {
|
||||||
|
'plain': { 'throbber': None,
|
||||||
|
'text': "Plain throbber." },
|
||||||
|
'reverse': { 'throbber': None,
|
||||||
|
'text': "This throbber runs in reverse and faster." },
|
||||||
|
'autoreverse': { 'throbber': None,
|
||||||
|
'text': "This throbber switches direction." },
|
||||||
|
'label': { 'throbber': None,
|
||||||
|
'text': "With a label." },
|
||||||
|
'overlay': { 'throbber': None,
|
||||||
|
'text': "With an overlayed image." },
|
||||||
|
'overlay+text': { 'throbber': None,
|
||||||
|
'text': "With a label and an overlayed image." },
|
||||||
|
}
|
||||||
|
|
||||||
|
images = [throbImages.catalog[i].getBitmap()
|
||||||
|
for i in throbImages.index
|
||||||
|
if i not in ['eclouds', 'logo']]
|
||||||
|
|
||||||
|
self.throbbers['plain']['throbber'] = Throbber(self, -1,
|
||||||
|
images, size=(36, 36),
|
||||||
|
frameDelay = 0.1)
|
||||||
|
self.throbbers['reverse']['throbber'] = Throbber(self, -1, images, #size=(36, 36),
|
||||||
|
frameDelay = 0.07)
|
||||||
|
self.throbbers['reverse']['throbber'].Reverse()
|
||||||
|
self.throbbers['autoreverse']['throbber'] = Throbber(self, -1,
|
||||||
|
images, #size=(36, 36),
|
||||||
|
frameDelay = 0.1,
|
||||||
|
reverse = True)
|
||||||
|
self.throbbers['autoreverse']['throbber'].sequence.append(0)
|
||||||
|
self.throbbers['label']['throbber'] = Throbber(self, -1,
|
||||||
|
images, #size=(36, 36),
|
||||||
|
frameDelay = 0.1,
|
||||||
|
label = 'Label')
|
||||||
|
self.throbbers['label']['throbber'].SetFont(wxFont(pointSize = 10,
|
||||||
|
family = wxDEFAULT,
|
||||||
|
style = wxNORMAL,
|
||||||
|
weight = wxBOLD))
|
||||||
|
self.throbbers['overlay']['throbber'] = Throbber(self, -1,
|
||||||
|
images, #size=(36, 36),
|
||||||
|
frameDelay = 0.1,
|
||||||
|
overlay = throbImages.catalog['logo'].getBitmap())
|
||||||
|
self.throbbers['overlay+text']['throbber'] = Throbber(self, -1,
|
||||||
|
images, #size=(36, 36),
|
||||||
|
frameDelay = 0.1,
|
||||||
|
overlay = throbImages.catalog['logo'].getBitmap(),
|
||||||
|
label = "Python!")
|
||||||
|
self.throbbers['overlay+text']['throbber'].SetFont(wxFont(pointSize = 8,
|
||||||
|
family = wxDEFAULT,
|
||||||
|
style = wxNORMAL,
|
||||||
|
weight = wxBOLD))
|
||||||
|
|
||||||
|
|
||||||
|
# this throbber is created using a single, composite image
|
||||||
|
self.otherThrobber = Throbber(self, -1,
|
||||||
|
throbImages.catalog['eclouds'].getBitmap(), #size=(48, 48),
|
||||||
|
frameDelay = 0.15,
|
||||||
|
frames = 12,
|
||||||
|
frameWidth = 48,
|
||||||
|
label = "Stop")
|
||||||
|
|
||||||
|
|
||||||
|
EVT_LEFT_DOWN(self.otherThrobber, self.OnClickThrobber)
|
||||||
|
|
||||||
|
box = wxBoxSizer(wxVERTICAL)
|
||||||
|
sizer = RowColSizer()
|
||||||
|
box.Add(sizer, 1, wxEXPAND|wxALL, 5)
|
||||||
|
sizer.AddGrowableCol(1)
|
||||||
|
|
||||||
|
sizer.Add(self.otherThrobber, row = 0, col = 2, rowspan = 4, flag = wxALIGN_CENTER_VERTICAL)
|
||||||
|
|
||||||
|
row = 2
|
||||||
|
# use a list so we can keep our order
|
||||||
|
for t in ['plain', 'reverse', 'autoreverse', 'label', 'overlay', 'overlay+text']:
|
||||||
|
sizer.Add(self.throbbers[t]['throbber'], row = row, col = 0, flag = wxALIGN_CENTER|wxALL, border=2)
|
||||||
|
sizer.Add(wxStaticText(self, -1, self.throbbers[t]['text']), row = row, col = 1,
|
||||||
|
flag = wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT)
|
||||||
|
row += 1
|
||||||
|
|
||||||
|
# start and stop buttons
|
||||||
|
startButton = wxButton(self, -1, "Start")
|
||||||
|
EVT_BUTTON(self, startButton.GetId(), self.OnStartAnimation)
|
||||||
|
stopButton = wxButton(self, -1, "Stop")
|
||||||
|
EVT_BUTTON(self, stopButton.GetId(), self.OnStopAnimation)
|
||||||
|
|
||||||
|
buttonBox = wxBoxSizer(wxHORIZONTAL)
|
||||||
|
buttonBox.AddMany([
|
||||||
|
(startButton, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5),
|
||||||
|
(stopButton, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5),
|
||||||
|
])
|
||||||
|
|
||||||
|
sizer.Add(buttonBox,
|
||||||
|
row = len(self.throbbers) + 3,
|
||||||
|
col = 0,
|
||||||
|
colspan = 3,
|
||||||
|
flag = wxALIGN_CENTER)
|
||||||
|
|
||||||
|
self.SetSizer(box)
|
||||||
|
self.SetAutoLayout(True)
|
||||||
|
self.Layout()
|
||||||
|
sizer.SetSizeHints(self)
|
||||||
|
sizer.Fit(self)
|
||||||
|
|
||||||
|
for t in self.throbbers.keys():
|
||||||
|
self.throbbers[t]['throbber'].Start()
|
||||||
|
self.otherThrobber.Start()
|
||||||
|
self.otherThrobber.Reverse()
|
||||||
|
|
||||||
|
EVT_WINDOW_DESTROY(self, self.OnDestroy)
|
||||||
|
|
||||||
|
def OnDestroy(self, event):
|
||||||
|
self.log.write("got destroy event")
|
||||||
|
event.Skip()
|
||||||
|
|
||||||
|
def OnStartAnimation(self, event):
|
||||||
|
for t in self.throbbers.keys():
|
||||||
|
self.throbbers[t]['throbber'].Start()
|
||||||
|
|
||||||
|
def OnStopAnimation(self, event):
|
||||||
|
for t in self.throbbers.keys():
|
||||||
|
self.throbbers[t]['throbber'].Rest()
|
||||||
|
|
||||||
|
def OnClickThrobber(self, event):
|
||||||
|
if self.otherThrobber.Running():
|
||||||
|
self.otherThrobber.Rest()
|
||||||
|
self.otherThrobber.SetLabel("Start")
|
||||||
|
else:
|
||||||
|
self.otherThrobber.Start()
|
||||||
|
self.otherThrobber.SetLabel("Stop")
|
||||||
|
|
||||||
|
def ShutdownDemo(self):
|
||||||
|
self.otherThrobber.Rest()
|
||||||
|
for t in self.throbbers.keys():
|
||||||
|
self.throbbers[t]['throbber'].Rest()
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
if wxPlatform == "__WXMAC__":
|
||||||
|
wxMessageBox("This demo currently fails on the Mac.",
|
||||||
|
"Sorry")
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
win = TestPanel(nb, log)
|
||||||
|
return win
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overview = """<html><body>
|
||||||
|
<h4><center>Throbber</center></h4>
|
||||||
|
<p>%s</p>
|
||||||
|
</body></html>
|
||||||
|
""" % docString
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import sys,os
|
||||||
|
import run
|
||||||
|
run.main(['', os.path.basename(sys.argv[0])])
|
@@ -30,12 +30,12 @@ class TestPanel(wxPanel):
|
|||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
outsideSizer = wxBoxSizer(wxVERTICAL)
|
outsideSizer = wxBoxSizer(wxVERTICAL)
|
||||||
|
|
||||||
msg = "Drag-And-Drop of URLs"
|
msg = "Drag-And-Drop of URLs"
|
||||||
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
|
text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
|
||||||
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, false))
|
text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
text.SetLabel(msg)
|
text.SetLabel(msg)
|
||||||
w,h = text.GetTextExtent(msg)
|
w,h = text.GetTextExtent(msg)
|
||||||
text.SetSize(wxSize(w,h+1))
|
text.SetSize(wxSize(w,h+1))
|
||||||
@@ -44,7 +44,7 @@ class TestPanel(wxPanel):
|
|||||||
outsideSizer.Add(wxStaticLine(self, -1), 0, wxEXPAND)
|
outsideSizer.Add(wxStaticLine(self, -1), 0, wxEXPAND)
|
||||||
outsideSizer.Add(20,20)
|
outsideSizer.Add(20,20)
|
||||||
|
|
||||||
self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false))
|
self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
|
||||||
|
|
||||||
inSizer = wxFlexGridSizer(2, 2, 5, 5)
|
inSizer = wxFlexGridSizer(2, 2, 5, 5)
|
||||||
inSizer.AddGrowableCol(0)
|
inSizer.AddGrowableCol(0)
|
||||||
|
@@ -56,7 +56,7 @@ class TestPanel(wxPanel):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
f = self.GetFont()
|
f = self.GetFont()
|
||||||
font = wxFont(14, f.GetFamily(), f.GetStyle(), wxBOLD, false,
|
font = wxFont(14, f.GetFamily(), f.GetStyle(), wxBOLD, False,
|
||||||
f.GetFaceName(), f.GetEncoding())
|
f.GetFaceName(), f.GetEncoding())
|
||||||
|
|
||||||
self.AddLine(box)
|
self.AddLine(box)
|
||||||
@@ -79,7 +79,7 @@ class TestPanel(wxPanel):
|
|||||||
|
|
||||||
border = wxBoxSizer(wxVERTICAL)
|
border = wxBoxSizer(wxVERTICAL)
|
||||||
border.Add(box, 1, wxEXPAND|wxALL, 10)
|
border.Add(box, 1, wxEXPAND|wxALL, 10)
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(border)
|
self.SetSizer(border)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import string, sys
|
import sys
|
||||||
|
|
||||||
py2 = sys.version[0] == '2'
|
py2 = sys.version[0] == '2'
|
||||||
|
|
||||||
@@ -11,9 +11,9 @@ try:
|
|||||||
else:
|
else:
|
||||||
from xml.parsers import pyexpat
|
from xml.parsers import pyexpat
|
||||||
parsermodule = pyexpat
|
parsermodule = pyexpat
|
||||||
haveXML = true
|
haveXML = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
haveXML = false
|
haveXML = False
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ else:
|
|||||||
self.nodeStack = self.nodeStack[:-1]
|
self.nodeStack = self.nodeStack[:-1]
|
||||||
|
|
||||||
def CharacterData(self, data ):
|
def CharacterData(self, data ):
|
||||||
if string.strip(data):
|
if data.strip():
|
||||||
if py2:
|
if py2:
|
||||||
data = data.encode()
|
data = data.encode()
|
||||||
self.AppendItem(self.nodeStack[-1], data)
|
self.AppendItem(self.nodeStack[-1], data)
|
||||||
|
BIN
wxPython/demo/bmp_source/001.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/002.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/003.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/004.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
wxPython/demo/bmp_source/005.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
wxPython/demo/bmp_source/006.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/007.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/008.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/009.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/010.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
wxPython/demo/bmp_source/011.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/012.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/013.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
wxPython/demo/bmp_source/014.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/015.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
wxPython/demo/bmp_source/016.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/017.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/018.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/019.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/020.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
wxPython/demo/bmp_source/021.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/022.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
wxPython/demo/bmp_source/023.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
wxPython/demo/bmp_source/024.png
Normal file
After Width: | Height: | Size: 2.2 KiB |