Compare commits
1 Commits
wxPy_2_1_1
...
wxPython-2
Author | SHA1 | Date | |
---|---|---|---|
|
818ffd7cb5 |
114
utils/wxPython/.cvsignore
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
*.pyc
|
||||||
|
*.pyd
|
||||||
|
*.pyo
|
||||||
|
*.zip
|
||||||
|
.cvsignore
|
||||||
|
.emacs.desktop
|
||||||
|
__init__.py
|
||||||
|
__init__.py
|
||||||
|
__init__.pyc
|
||||||
|
__init__.pyc
|
||||||
|
__init__.pyo
|
||||||
|
__init__.pyo
|
||||||
|
cmndlgs.py
|
||||||
|
cmndlgs.py
|
||||||
|
cmndlgs.pyc
|
||||||
|
cmndlgs.pyc
|
||||||
|
cmndlgs.pyo
|
||||||
|
cmndlgs.pyo
|
||||||
|
controls.py
|
||||||
|
controls.py
|
||||||
|
controls.pyc
|
||||||
|
controls.pyc
|
||||||
|
controls.pyo
|
||||||
|
controls.pyo
|
||||||
|
controls2.py
|
||||||
|
controls2.py
|
||||||
|
controls2.pyc
|
||||||
|
controls2.pyc
|
||||||
|
controls2.pyo
|
||||||
|
controls2.pyo
|
||||||
|
docs
|
||||||
|
events.py
|
||||||
|
events.py
|
||||||
|
events.pyc
|
||||||
|
events.pyc
|
||||||
|
events.pyo
|
||||||
|
events.pyo
|
||||||
|
frames.py
|
||||||
|
frames.py
|
||||||
|
frames.pyc
|
||||||
|
frames.pyc
|
||||||
|
frames.pyo
|
||||||
|
frames.pyo
|
||||||
|
gdi.py
|
||||||
|
gdi.py
|
||||||
|
gdi.pyc
|
||||||
|
gdi.pyc
|
||||||
|
gdi.pyo
|
||||||
|
gdi.pyo
|
||||||
|
glcanvas.py
|
||||||
|
glcanvas.pyc
|
||||||
|
glcanvasc.ilk
|
||||||
|
glcanvasc.pyd
|
||||||
|
image.py
|
||||||
|
image.pyc
|
||||||
|
mdi.py
|
||||||
|
mdi.py
|
||||||
|
mdi.pyc
|
||||||
|
mdi.pyc
|
||||||
|
mdi.pyo
|
||||||
|
mdi.pyo
|
||||||
|
misc.py
|
||||||
|
misc.py
|
||||||
|
misc.pyc
|
||||||
|
misc.pyc
|
||||||
|
misc.pyo
|
||||||
|
misc.pyo
|
||||||
|
printfw.py
|
||||||
|
stattool.py
|
||||||
|
stattool.py
|
||||||
|
stattool.pyc
|
||||||
|
stattool.pyc
|
||||||
|
stattool.pyo
|
||||||
|
stattool.pyo
|
||||||
|
utils.py
|
||||||
|
utils.py
|
||||||
|
utils.pyc
|
||||||
|
utils.pyc
|
||||||
|
utils.pyo
|
||||||
|
utilsc.ilk
|
||||||
|
utilsc.pyd
|
||||||
|
windows.py
|
||||||
|
windows.py
|
||||||
|
windows.pyc
|
||||||
|
windows.pyc
|
||||||
|
windows.pyo
|
||||||
|
windows.pyo
|
||||||
|
windows2.py
|
||||||
|
windows2.py
|
||||||
|
windows2.pyc
|
||||||
|
windows2.pyc
|
||||||
|
windows2.pyo
|
||||||
|
windows2.pyo
|
||||||
|
windows3.py
|
||||||
|
windows3.pyc
|
||||||
|
windows3.pyo
|
||||||
|
wx.py
|
||||||
|
wx.py
|
||||||
|
wx.pyc
|
||||||
|
wx.pyc
|
||||||
|
wx.pyo
|
||||||
|
wxc.ilk
|
||||||
|
wxc.pdb
|
||||||
|
wxc.pyd
|
||||||
|
wxp.py
|
||||||
|
wxp.pyc
|
||||||
|
wxp.pyo
|
||||||
|
wxpc.ilk
|
||||||
|
wxpc.pdb
|
||||||
|
wxpc.pyd
|
||||||
|
*.py
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
318
utils/wxPython/README.txt
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
wxPython README
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Welcome to the wonderful world of wxPython!
|
||||||
|
|
||||||
|
Once you have installed the wxPython extension module, you can try it
|
||||||
|
out by going to the [install dir]\wxPython\demo directory and typing:
|
||||||
|
|
||||||
|
python demo.py
|
||||||
|
|
||||||
|
There are also some other sample files there for you to play with and
|
||||||
|
learn from.
|
||||||
|
|
||||||
|
If you selected to install the documentation then point your browser
|
||||||
|
to [install dir]\wxPython\docs\index.htm and you will then be looking
|
||||||
|
at the docs for wxWindows. For the most part you can use the C++ docs
|
||||||
|
as most classes and methods are used identically. Where there are
|
||||||
|
differences they are documented with a "wxPython Note."
|
||||||
|
|
||||||
|
On Win32 systems the binary self-installer creates a program group on
|
||||||
|
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/workshop/author/htmlhelp/download.asp.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Getting Help
|
||||||
|
------------
|
||||||
|
|
||||||
|
Since wxPython is a blending of multiple technologies, help comes from
|
||||||
|
multiple sources. See the http://alldunn.com/wxPython 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://starship.python.net/mailman/listinfo/wxpython-users
|
||||||
|
|
||||||
|
Or you can send mail directly to the list using this address:
|
||||||
|
|
||||||
|
wxpython-users@starship.python.net
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 2.1b1
|
||||||
|
--------------------
|
||||||
|
Fixed wxComboBox.SetSelection so that it actually sets the selected
|
||||||
|
item. (Actually just removed it from wxPython and let it default to
|
||||||
|
wxChoice.SetSelection which was already doing the right thing.)
|
||||||
|
|
||||||
|
Added the Printing Framework.
|
||||||
|
|
||||||
|
Switched back to using the wxWindows DLL for the pre-built Win32
|
||||||
|
version. The problem was needing to reinitialize static class info
|
||||||
|
data after loading each extension module.
|
||||||
|
|
||||||
|
Lots of little tweaks and additions to reflect changes to various
|
||||||
|
wxWindows classes.
|
||||||
|
|
||||||
|
Fixed a bug with attaching objects to tree items. Actually was a
|
||||||
|
symptom of a larger problem with not obtaining the interpreter lock
|
||||||
|
when doing any Py_DECREFs.
|
||||||
|
|
||||||
|
wxSizer and friends. Sizers are layout tools that manage a colection
|
||||||
|
of windows and sizers. Different types of sizers apply different
|
||||||
|
types of layout algorithms. You saw it here first! These classes are
|
||||||
|
not even in the wxWindows C++ library yet!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 2.0b9
|
||||||
|
-------------------
|
||||||
|
Bug fix for ListCtrl in test4.py (Was a missing file... DSM!)
|
||||||
|
|
||||||
|
Bug fix for occassional GPF on Win32 systems upon termination of a
|
||||||
|
wxPython application.
|
||||||
|
|
||||||
|
Added wxListBox.GetSelections returning selections as a Tuple.
|
||||||
|
|
||||||
|
Added a wxTreeItemData that is able to hold any Python object and be
|
||||||
|
associated with items in a wxTreeCtrl. Added test pytree.py to show
|
||||||
|
this feature off.
|
||||||
|
|
||||||
|
Added wxSafeYield function.
|
||||||
|
|
||||||
|
OpenGL Canvas can be optionally compiled in to wxPython.
|
||||||
|
|
||||||
|
Awesome new Demo Framework for showing off wxPython and for learning
|
||||||
|
how it all works.
|
||||||
|
|
||||||
|
The pre-built Win32 version is no longer distributing the wxWindows
|
||||||
|
DLL. It is statically linked with the wxWindows library instead.
|
||||||
|
|
||||||
|
Added a couple missing items from the docs.
|
||||||
|
|
||||||
|
Added wxImage, wxImageHandler, wxPNGHandler, wxJPEGHandler,
|
||||||
|
wxGIFHandler and wxBMPHandler.
|
||||||
|
|
||||||
|
Added new methods to wxTextCtrl.
|
||||||
|
|
||||||
|
Fixed some problems with how SWIG was wrapping some wxTreeCtrl
|
||||||
|
methods.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 2.0b8
|
||||||
|
-------------------
|
||||||
|
Support for using Python threads in wxPython apps.
|
||||||
|
|
||||||
|
Several missing methods from various classes.
|
||||||
|
|
||||||
|
Various bug fixes.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 2.0b7
|
||||||
|
-------------------
|
||||||
|
Added DLG_PNT and DLG_SZE convienience methods to wxWindow class.
|
||||||
|
|
||||||
|
Added missing constructor and other methods for wxMenuItem.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 2.0b6
|
||||||
|
-------------------
|
||||||
|
Just a quickie update to fix the self-installer to be compatible with
|
||||||
|
Python 1.5.2b2's Registry settings.
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 2.0b5
|
||||||
|
-------------------
|
||||||
|
Well obviously the numbering scheme has changed. I did this to
|
||||||
|
reflect the fact that this truly is the second major revision of
|
||||||
|
wxPython, (well the third actually if you count the one I did for
|
||||||
|
wxWindows 1.68 and then threw away...) and also that it is associated
|
||||||
|
with the 2.0 version of wxWindows.
|
||||||
|
|
||||||
|
I have finally started documenting wxPython. There are several pages
|
||||||
|
in the wxWindows documentation tree specifically about wxPython, and I
|
||||||
|
have added notes within the class references about where and how wxPython
|
||||||
|
diverges from wxWindows.
|
||||||
|
|
||||||
|
Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
|
||||||
|
window handle. If you can get the window handle into the python code,
|
||||||
|
it should just work... More news on this later.
|
||||||
|
|
||||||
|
Added wxImageList, wxToolTip.
|
||||||
|
|
||||||
|
Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
|
||||||
|
wxRegConfig class.
|
||||||
|
|
||||||
|
As usual, some bug fixes, tweaks, etc.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 0.5.3
|
||||||
|
-------------------
|
||||||
|
Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
|
||||||
|
|
||||||
|
Various cleanup, tweaks, minor additions, etc. to maintain
|
||||||
|
compatibility with the current wxWindows.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 0.5.0
|
||||||
|
-------------------
|
||||||
|
Changed the import semantics from "from wxPython import *" to "from
|
||||||
|
wxPython.wx import *" This is for people who are worried about
|
||||||
|
namespace pollution, they can use "from wxPython import wx" and then
|
||||||
|
prefix all the wxPython identifiers with "wx."
|
||||||
|
|
||||||
|
Added wxTaskbarIcon for wxMSW.
|
||||||
|
|
||||||
|
Made the events work for wxGrid.
|
||||||
|
|
||||||
|
Added wxConfig.
|
||||||
|
|
||||||
|
Added wxMiniFrame for wxGTK.
|
||||||
|
|
||||||
|
Changed many of the args and return values that were pointers to gdi
|
||||||
|
objects to references to reflect changes in the wxWindows API.
|
||||||
|
|
||||||
|
Other assorted fixes and additions.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's new in 0.4.2
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
wxPython on wxGTK works!!! Both dynamic and static on Linux and
|
||||||
|
static on Solaris have been tested. Many thanks go to Harm
|
||||||
|
<H.v.d.Heijden@phys.tue.nl> for his astute detective work on tracking
|
||||||
|
down a nasty DECREF bug. Okay so I have to confess that it was just a
|
||||||
|
DSM (Dumb Stupid Mistake) on my part but it was nasty none the less
|
||||||
|
because the behavior was so different on different platforms.
|
||||||
|
|
||||||
|
The dynamicly loaded module on Solaris is still segfaulting, so it
|
||||||
|
must have been a different issue all along...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
What's New in 0.4
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
1. Worked on wxGTK compatibility. It is partially working. On a
|
||||||
|
Solaris/Sparc box wxPython is working but only when it is statically
|
||||||
|
linked with the Python interpreter. When built as a dyamically loaded
|
||||||
|
extension module, things start acting weirdly and it soon seg-faults.
|
||||||
|
And on Linux both the statically linked and the dynamically linked
|
||||||
|
version segfault shortly after starting up.
|
||||||
|
|
||||||
|
2. Added Toolbar, StatusBar and SplitterWindow classes.
|
||||||
|
|
||||||
|
3. Varioius bug fixes, enhancements, etc.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Build Instructions
|
||||||
|
------------------
|
||||||
|
I used SWIG (http://www.swig.org) to create the source code for the
|
||||||
|
extension module. This enabled me to only have to deal with a small
|
||||||
|
amount of code and only have to bother with the exceptional issues.
|
||||||
|
SWIG takes care of the rest and generates all the repetative code for
|
||||||
|
me. You don't need SWIG to build the extension module as all the
|
||||||
|
generated C++ code is included under the src directory.
|
||||||
|
|
||||||
|
I added a few minor features to SWIG to control some of the code
|
||||||
|
generation. If you want to playaround with this the patches are in
|
||||||
|
wxPython/SWIG.patches and they should be applied to the 1.1p5 version
|
||||||
|
of SWIG. These new patches are documented at
|
||||||
|
http://starship.skyport.net/crew/robind/#swig, and they should also
|
||||||
|
end up in the 1.2 version of SWIG.
|
||||||
|
|
||||||
|
wxPython is organized as a Python package. This means that the
|
||||||
|
directory containing the results of the build process should be a
|
||||||
|
subdirectory of a directory on the PYTHONPATH. (And preferably should
|
||||||
|
be named wxPython.) You can control where the build process will dump
|
||||||
|
wxPython by setting the TARGETDIR makefile variable. The default is
|
||||||
|
$(WXWIN)/utils/wxPython, where this README.txt is located. If you
|
||||||
|
leave it here then you should add $(WXWIN)/utils to your PYTHONPATH.
|
||||||
|
However, you may prefer to use something that is already on your
|
||||||
|
PYTHONPATH, such as the site-packages directory on Unix systems.
|
||||||
|
|
||||||
|
|
||||||
|
Win32
|
||||||
|
-----
|
||||||
|
|
||||||
|
1. Build wxWindows with wxUSE_RESOURCE_LOADING_IN_MSW set to 1 in
|
||||||
|
include/wx/msw/setup.h so icons can be loaded dynamically. While
|
||||||
|
there, make sure wxUSE_OWNER_DRAWN is also set to 1.
|
||||||
|
|
||||||
|
2. Change into the $(WXWIN)/utils/wxPython/src directory.
|
||||||
|
|
||||||
|
3. Edit makefile.vc and specify where your python installation is at.
|
||||||
|
You may also want to fiddle with the TARGETDIR variable as described
|
||||||
|
above.
|
||||||
|
|
||||||
|
4. Run nmake -f makefile.vc
|
||||||
|
|
||||||
|
5. If it builds successfully, congratulations! Move on to the next
|
||||||
|
step. If not then you can try mailing me for help. Also, I will
|
||||||
|
always have a pre-built win32 version of this extension module at
|
||||||
|
http://alldunn.com/wxPython/.
|
||||||
|
|
||||||
|
6. Change to the $(WXWIN)/utils/wxPython/demo directory.
|
||||||
|
|
||||||
|
7. Try executing the demo program. For example:
|
||||||
|
|
||||||
|
python demo.py
|
||||||
|
|
||||||
|
To run it without requiring a console, you can use the pythonw.exe
|
||||||
|
version of Python either from the command line or from a shortcut.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Unix
|
||||||
|
----
|
||||||
|
0. I configure wxWindows like this, YMMV:
|
||||||
|
|
||||||
|
./configure --with-gtk --without-shared --with-threads --without-unicode --with-libjpeg
|
||||||
|
|
||||||
|
|
||||||
|
1. Change into the $(WXWIN)/utils/wxPython/src directory.
|
||||||
|
|
||||||
|
2. Edit Setup.in and ensure that the flags, directories, and toolkit
|
||||||
|
options are correct. See the above commentary about TARGETDIR. There
|
||||||
|
are a few sample Setup.in.[platform] files provided.
|
||||||
|
|
||||||
|
3. Run this command to generate a makefile:
|
||||||
|
|
||||||
|
make -f Makefile.pre.in boot
|
||||||
|
|
||||||
|
4. Run these commands to build and then install the wxPython extension
|
||||||
|
module:
|
||||||
|
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
|
||||||
|
5. Change to the $(WXWIN)/utils/wxPython/demo directory.
|
||||||
|
|
||||||
|
6. Try executing the demo program. For example:
|
||||||
|
|
||||||
|
python demo.py
|
||||||
|
|
||||||
|
----------------
|
||||||
|
Robin Dunn
|
||||||
|
robin@alldunn.com
|
||||||
|
|
||||||
|
|
||||||
|
|
97
utils/wxPython/SWIG.patches/Include.patch
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
*** swig.h.old Wed Feb 04 14:59:40 1998
|
||||||
|
--- swig.h Fri Aug 28 14:46:32 1998
|
||||||
|
***************
|
||||||
|
*** 178,185 ****
|
||||||
|
--- 178,211 ----
|
||||||
|
char *firstkey();
|
||||||
|
char *nextkey();
|
||||||
|
};
|
||||||
|
|
||||||
|
+ // -------------------------------------------------------------------
|
||||||
|
+ // Simple Vector class
|
||||||
|
+ // User is responsible for deleting contents before deleteing Vector
|
||||||
|
+ // -------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+ class Vector {
|
||||||
|
+ public:
|
||||||
|
+ Vector(size_t allocSize=8);
|
||||||
|
+ ~Vector();
|
||||||
|
+
|
||||||
|
+ size_t size() { return m_size; }
|
||||||
|
+ size_t count() { return m_count; }
|
||||||
|
+ size_t append(void* object);
|
||||||
|
+ size_t extend(size_t newSize);
|
||||||
|
+
|
||||||
|
+ void*& operator[] (size_t idx);
|
||||||
|
+
|
||||||
|
+ static void* s_nullPtr;
|
||||||
|
+
|
||||||
|
+ private:
|
||||||
|
+ size_t m_size;
|
||||||
|
+ size_t m_count;
|
||||||
|
+ void** m_data;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+
|
||||||
|
/************************************************************************
|
||||||
|
* class DataType
|
||||||
|
*
|
||||||
|
* Defines the basic datatypes supported by the translator.
|
||||||
|
***************
|
||||||
|
*** 684,691 ****
|
||||||
|
--- 710,761 ----
|
||||||
|
extern char *name_get(char *vname, int suppress=0);
|
||||||
|
extern char *name_set(char *vname, int suppress=0);
|
||||||
|
extern char *name_construct(char *classname, int suppress=0);
|
||||||
|
extern char *name_destroy(char *classname, int suppress=0);
|
||||||
|
+
|
||||||
|
+ // ----------------------------------------------------------------------
|
||||||
|
+ // class CPP_class
|
||||||
|
+ //
|
||||||
|
+ // Class for managing class members (internally)
|
||||||
|
+ // ----------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+ class CPP_member;
|
||||||
|
+
|
||||||
|
+ class CPP_class {
|
||||||
|
+ public:
|
||||||
|
+ char *classname; // Real class name
|
||||||
|
+ char *classrename; // New name of class (if applicable)
|
||||||
|
+ char *classtype; // class type (struct, union, class)
|
||||||
|
+ int strip; // Strip off class declarator
|
||||||
|
+ int wextern; // Value of extern wrapper variable for this class
|
||||||
|
+ int have_constructor; // Status bit indicating if we've seen a constructor
|
||||||
|
+ int have_destructor; // Status bit indicating if a destructor has been seen
|
||||||
|
+ int is_abstract; // Status bit indicating if this is an abstract class
|
||||||
|
+ int generate_default; // Generate default constructors
|
||||||
|
+ int objective_c; // Set if this is an objective C class
|
||||||
|
+ int error; // Set if this class can't be generated
|
||||||
|
+ int line; // Line number
|
||||||
|
+ char **baseclass; // Base classes (if any)
|
||||||
|
+ Hash *local; // Hash table for local types
|
||||||
|
+ Hash *scope; // Local scope hash table
|
||||||
|
+ DocEntry *de; // Documentation entry of class
|
||||||
|
+ CPP_member *members; // Linked list of members
|
||||||
|
+ CPP_class *next; // Next class
|
||||||
|
+ static CPP_class *classlist; // List of all classes stored
|
||||||
|
+
|
||||||
|
+ Vector addPragmas;
|
||||||
|
+
|
||||||
|
+ CPP_class(char *name, char *ctype);
|
||||||
|
+ void add_member(CPP_member *m);
|
||||||
|
+ CPP_member *search_member(char *name);
|
||||||
|
+ void inherit_decls(int mode);
|
||||||
|
+ void emit_decls();
|
||||||
|
+ static CPP_class *search(char *name);
|
||||||
|
+ void create_default();
|
||||||
|
+ static void create_all();
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ extern CPP_class *current_class;
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* -- Revision History
|
||||||
|
* $Log$
|
||||||
|
* Revision 1.1 1998/10/03 05:56:02 RD
|
||||||
|
* *** empty log message ***
|
||||||
|
*
|
136
utils/wxPython/SWIG.patches/Modules.patch
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
*** python.cxx.old Fri Jan 02 22:17:40 1998
|
||||||
|
--- python.cxx Fri Aug 28 14:49:18 1998
|
||||||
|
***************
|
||||||
|
*** 1679,1684 ****
|
||||||
|
--- 1679,1701 ----
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ } else if (strcmp(cmd, "addtomethod") == 0) {
|
||||||
|
+ // parse value, expected to be in the form "methodName:line"
|
||||||
|
+ char* txtptr = strchr(value, ':');
|
||||||
|
+ if (txtptr) {
|
||||||
|
+ // add name and line to a list in current_class
|
||||||
|
+ *txtptr = 0;
|
||||||
|
+ txtptr++;
|
||||||
|
+ AddPragmaData* apData = new AddPragmaData(value, txtptr);
|
||||||
|
+ current_class->addPragmas.append(apData);
|
||||||
|
+
|
||||||
|
+ } else {
|
||||||
|
+ fprintf(stderr,"%s : Line %d. Malformed addtomethod pragma. Should be \"methodName:text\"\n",
|
||||||
|
+ input_file, line_number);
|
||||||
|
+ }
|
||||||
|
+ } else if (strcmp(cmd, "addtoclass") == 0) {
|
||||||
|
+ AddPragmaData* apData = new AddPragmaData("__class__", value);
|
||||||
|
+ current_class->addPragmas.append(apData);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr,"%s : Line %d. Unrecognized pragma.\n", input_file, line_number);
|
||||||
|
}
|
||||||
|
*** python.h.old Thu Jul 24 22:18:50 1997
|
||||||
|
--- python.h Fri Aug 28 14:46:08 1998
|
||||||
|
***************
|
||||||
|
*** 185,191 ****
|
||||||
|
--- 185,203 ----
|
||||||
|
void cpp_class_decl(char *, char *,char *);
|
||||||
|
void pragma(char *, char *, char *);
|
||||||
|
void add_typedef(DataType *t, char *name);
|
||||||
|
+
|
||||||
|
+ void emitAddPragmas(String& output, char* name, char* spacing);
|
||||||
|
};
|
||||||
|
|
||||||
|
#define PYSHADOW_MEMBER 0x2
|
||||||
|
+
|
||||||
|
+ struct AddPragmaData {
|
||||||
|
+ String m_method;
|
||||||
|
+ String m_text;
|
||||||
|
+
|
||||||
|
+ AddPragmaData(char* method, char* text)
|
||||||
|
+ : m_method(method),
|
||||||
|
+ m_text(text)
|
||||||
|
+ {}
|
||||||
|
+ };
|
||||||
|
|
||||||
|
*** pycpp.cxx.old Fri Jan 02 20:23:22 1998
|
||||||
|
--- pycpp.cxx Fri Aug 28 16:01:46 1998
|
||||||
|
***************
|
||||||
|
*** 276,281 ****
|
||||||
|
--- 276,282 ----
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if ((t->type != T_VOID) || (t->is_pointer))
|
||||||
|
+ emitAddPragmas(*pyclass, realname, tab8);
|
||||||
|
*pyclass << tab8 << "return val\n";
|
||||||
|
|
||||||
|
// Change the usage string to reflect our shadow class
|
||||||
|
***************
|
||||||
|
*** 394,399 ****
|
||||||
|
--- 395,401 ----
|
||||||
|
}
|
||||||
|
*construct << ")\n";
|
||||||
|
*construct << tab8 << "self.thisown = 1\n";
|
||||||
|
+ emitAddPragmas(*construct, "__init__", tab8);
|
||||||
|
have_constructor = 1;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
***************
|
||||||
|
*** 494,502 ****
|
||||||
|
*pyclass << tab4 << "def __del__(self):\n"
|
||||||
|
<< tab8 << "if self.thisown == 1 :\n"
|
||||||
|
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
|
||||||
|
!
|
||||||
|
have_destructor = 1;
|
||||||
|
-
|
||||||
|
if (doc_entry) {
|
||||||
|
doc_entry->usage = "";
|
||||||
|
doc_entry->usage << "del this";
|
||||||
|
--- 496,503 ----
|
||||||
|
*pyclass << tab4 << "def __del__(self):\n"
|
||||||
|
<< tab8 << "if self.thisown == 1 :\n"
|
||||||
|
<< tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n";
|
||||||
|
! emitAddPragmas(*pyclass, "__del__", tab8);
|
||||||
|
have_destructor = 1;
|
||||||
|
if (doc_entry) {
|
||||||
|
doc_entry->usage = "";
|
||||||
|
doc_entry->usage << "del this";
|
||||||
|
***************
|
||||||
|
*** 552,557 ****
|
||||||
|
--- 553,560 ----
|
||||||
|
<< tab8 << "return \"<C " << class_name <<" instance>\"\n";
|
||||||
|
|
||||||
|
classes << repr;
|
||||||
|
+ emitAddPragmas(classes, "__class__", tab4);
|
||||||
|
+
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now build the real class with a normal constructor
|
||||||
|
***************
|
||||||
|
*** 747,752 ****
|
||||||
|
--- 750,777 ----
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // --------------------------------------------------------------------------------
|
||||||
|
+ // PYTHON::emitAddPragmas(String& output, char* name, char* spacing);
|
||||||
|
+ //
|
||||||
|
+ // Search the current_class->addPragmas vector for any text belonging to name.
|
||||||
|
+ // Append the text properly spcaed to the output string.
|
||||||
|
+ //
|
||||||
|
+ // --------------------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+ void PYTHON::emitAddPragmas(String& output, char* name, char* spacing)
|
||||||
|
+ {
|
||||||
|
+ AddPragmaData* apData;
|
||||||
|
+ size_t count;
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ count = current_class->addPragmas.count();
|
||||||
|
+ for (i=0; i<count; i++) {
|
||||||
|
+ apData = (AddPragmaData*)current_class->addPragmas[i];
|
||||||
|
+ if (strcmp(apData->m_method, name) == 0) {
|
||||||
|
+ output << spacing << apData->m_text << "\n";
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/*********************************************************************************
|
||||||
|
*
|
499
utils/wxPython/SWIG.patches/SWIG.patch
Normal file
@@ -0,0 +1,499 @@
|
|||||||
|
*** cplus.cxx.old Mon Feb 02 14:55:42 1998
|
||||||
|
--- cplus.cxx Fri Aug 28 12:02:50 1998
|
||||||
|
***************
|
||||||
|
*** 581,612 ****
|
||||||
|
// Class for managing class members (internally)
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
static char *inherit_base_class = 0;
|
||||||
|
|
||||||
|
- class CPP_class {
|
||||||
|
- public:
|
||||||
|
- char *classname; // Real class name
|
||||||
|
- char *classrename; // New name of class (if applicable)
|
||||||
|
- char *classtype; // class type (struct, union, class)
|
||||||
|
- int strip; // Strip off class declarator
|
||||||
|
- int wextern; // Value of extern wrapper variable for this class
|
||||||
|
- int have_constructor; // Status bit indicating if we've seen a constructor
|
||||||
|
- int have_destructor; // Status bit indicating if a destructor has been seen
|
||||||
|
- int is_abstract; // Status bit indicating if this is an abstract class
|
||||||
|
- int generate_default; // Generate default constructors
|
||||||
|
- int objective_c; // Set if this is an objective C class
|
||||||
|
- int error; // Set if this class can't be generated
|
||||||
|
- int line; // Line number
|
||||||
|
- char **baseclass; // Base classes (if any)
|
||||||
|
- Hash *local; // Hash table for local types
|
||||||
|
- Hash *scope; // Local scope hash table
|
||||||
|
- DocEntry *de; // Documentation entry of class
|
||||||
|
- CPP_member *members; // Linked list of members
|
||||||
|
- CPP_class *next; // Next class
|
||||||
|
- static CPP_class *classlist; // List of all classes stored
|
||||||
|
|
||||||
|
! CPP_class(char *name, char *ctype) {
|
||||||
|
CPP_class *c;
|
||||||
|
classname = copy_string(name);
|
||||||
|
classtype = copy_string(ctype);
|
||||||
|
classrename = 0;
|
||||||
|
--- 581,593 ----
|
||||||
|
// Class for managing class members (internally)
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
static char *inherit_base_class = 0;
|
||||||
|
+ CPP_class *CPP_class::classlist = 0;
|
||||||
|
+ CPP_class *current_class;
|
||||||
|
|
||||||
|
|
||||||
|
! CPP_class::CPP_class(char *name, char *ctype) {
|
||||||
|
CPP_class *c;
|
||||||
|
classname = copy_string(name);
|
||||||
|
classtype = copy_string(ctype);
|
||||||
|
classrename = 0;
|
||||||
|
***************
|
||||||
|
*** 642,650 ****
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Add a new C++ member to this class
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void add_member(CPP_member *m) {
|
||||||
|
CPP_member *cm;
|
||||||
|
|
||||||
|
// Set base class where this was defined
|
||||||
|
if (inherit_base_class)
|
||||||
|
--- 623,631 ----
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Add a new C++ member to this class
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void CPP_class::add_member(CPP_member *m) {
|
||||||
|
CPP_member *cm;
|
||||||
|
|
||||||
|
// Set base class where this was defined
|
||||||
|
if (inherit_base_class)
|
||||||
|
***************
|
||||||
|
*** 664,672 ****
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Search for a member with the given name. Returns the member on success, 0 on failure
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! CPP_member *search_member(char *name) {
|
||||||
|
CPP_member *m;
|
||||||
|
char *c;
|
||||||
|
m = members;
|
||||||
|
while (m) {
|
||||||
|
--- 645,653 ----
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Search for a member with the given name. Returns the member on success, 0 on failure
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! CPP_member *CPP_class::search_member(char *name) {
|
||||||
|
CPP_member *m;
|
||||||
|
char *c;
|
||||||
|
m = members;
|
||||||
|
while (m) {
|
||||||
|
***************
|
||||||
|
*** 680,688 ****
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Inherit. Put all the declarations associated with this class into the current
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void inherit_decls(int mode) {
|
||||||
|
CPP_member *m;
|
||||||
|
m = members;
|
||||||
|
while (m) {
|
||||||
|
inherit_base_class = m->base;
|
||||||
|
--- 661,669 ----
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Inherit. Put all the declarations associated with this class into the current
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void CPP_class::inherit_decls(int mode) {
|
||||||
|
CPP_member *m;
|
||||||
|
m = members;
|
||||||
|
while (m) {
|
||||||
|
inherit_base_class = m->base;
|
||||||
|
***************
|
||||||
|
*** 696,704 ****
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Emit all of the declarations associated with this class
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void emit_decls() {
|
||||||
|
CPP_member *m = members;
|
||||||
|
int last_scope = name_scope(0);
|
||||||
|
abstract = is_abstract;
|
||||||
|
while (m) {
|
||||||
|
--- 677,685 ----
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Emit all of the declarations associated with this class
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void CPP_class::emit_decls() {
|
||||||
|
CPP_member *m = members;
|
||||||
|
int last_scope = name_scope(0);
|
||||||
|
abstract = is_abstract;
|
||||||
|
while (m) {
|
||||||
|
***************
|
||||||
|
*** 713,721 ****
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Search for a given class in the list
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! static CPP_class *search(char *name) {
|
||||||
|
CPP_class *c;
|
||||||
|
c = classlist;
|
||||||
|
if (!name) return 0;
|
||||||
|
while (c) {
|
||||||
|
--- 694,702 ----
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Search for a given class in the list
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! CPP_class *CPP_class::search(char *name) {
|
||||||
|
CPP_class *c;
|
||||||
|
c = classlist;
|
||||||
|
if (!name) return 0;
|
||||||
|
while (c) {
|
||||||
|
***************
|
||||||
|
*** 729,737 ****
|
||||||
|
// Add default constructors and destructors
|
||||||
|
//
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void create_default() {
|
||||||
|
if (!generate_default) return;
|
||||||
|
|
||||||
|
// Try to generate a constructor if not available.
|
||||||
|
|
||||||
|
--- 710,718 ----
|
||||||
|
// Add default constructors and destructors
|
||||||
|
//
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
! void CPP_class::create_default() {
|
||||||
|
if (!generate_default) return;
|
||||||
|
|
||||||
|
// Try to generate a constructor if not available.
|
||||||
|
|
||||||
|
***************
|
||||||
|
*** 751,764 ****
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Dump *all* of the classes saved out to the various
|
||||||
|
// language modules (this does what cplus_close_class used to do)
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
- static void create_all();
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- CPP_class *CPP_class::classlist = 0;
|
||||||
|
- static CPP_class *current_class;
|
||||||
|
-
|
||||||
|
void CPP_class::create_all() {
|
||||||
|
CPP_class *c;
|
||||||
|
c = classlist;
|
||||||
|
while (c) {
|
||||||
|
--- 732,739 ----
|
||||||
|
*** vector.cxx.old Fri Aug 28 14:23:16 1998
|
||||||
|
--- vector.cxx Fri Aug 28 14:46:52 1998
|
||||||
|
***************
|
||||||
|
*** 0 ****
|
||||||
|
--- 1,182 ----
|
||||||
|
+
|
||||||
|
+ /*******************************************************************************
|
||||||
|
+ * Simplified Wrapper and Interface Generator (SWIG)
|
||||||
|
+ *
|
||||||
|
+ * Dave Beazley
|
||||||
|
+ *
|
||||||
|
+ * Department of Computer Science Theoretical Division (T-11)
|
||||||
|
+ * University of Utah Los Alamos National Laboratory
|
||||||
|
+ * Salt Lake City, Utah 84112 Los Alamos, New Mexico 87545
|
||||||
|
+ * beazley@cs.utah.edu beazley@lanl.gov
|
||||||
|
+ *
|
||||||
|
+ * Copyright (c) 1995-1997
|
||||||
|
+ * The University of Utah and the Regents of the University of California
|
||||||
|
+ * All Rights Reserved
|
||||||
|
+ *
|
||||||
|
+ * Permission is hereby granted, without written agreement and without
|
||||||
|
+ * license or royalty fees, to use, copy, modify, and distribute this
|
||||||
|
+ * software and its documentation for any purpose, provided that
|
||||||
|
+ * (1) The above copyright notice and the following two paragraphs
|
||||||
|
+ * appear in all copies of the source code and (2) redistributions
|
||||||
|
+ * including binaries reproduces these notices in the supporting
|
||||||
|
+ * documentation. Substantial modifications to this software may be
|
||||||
|
+ * copyrighted by their authors and need not follow the licensing terms
|
||||||
|
+ * described here, provided that the new terms are clearly indicated in
|
||||||
|
+ * all files where they apply.
|
||||||
|
+ *
|
||||||
|
+ * IN NO EVENT SHALL THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, THE
|
||||||
|
+ * UNIVERSITY OF UTAH OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY
|
||||||
|
+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
+ * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
|
||||||
|
+ * EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF
|
||||||
|
+ * THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
+ *
|
||||||
|
+ * THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, AND THE UNIVERSITY OF UTAH
|
||||||
|
+ * SPECIFICALLY DISCLAIM ANY WARRANTIES,INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
+ * PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
|
||||||
|
+ * THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE,
|
||||||
|
+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||||
|
+ *
|
||||||
|
+ *******************************************************************************/
|
||||||
|
+
|
||||||
|
+ #include "internal.h"
|
||||||
|
+
|
||||||
|
+ /*******************************************************************************
|
||||||
|
+ * $Header$
|
||||||
|
+ *
|
||||||
|
+ * File : vector.cxx
|
||||||
|
+ *
|
||||||
|
+ * A very simple Vector class. Allways assumes that memory allocations are
|
||||||
|
+ * successful. Should be made more robust...
|
||||||
|
+ *
|
||||||
|
+ *******************************************************************************/
|
||||||
|
+
|
||||||
|
+ void* Vector::s_nullPtr = NULL;
|
||||||
|
+
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+ // Vector::Vector(size_t allocSize = 8)
|
||||||
|
+ //
|
||||||
|
+ // Constructor. Creates a new Vector.
|
||||||
|
+ //
|
||||||
|
+ // Inputs : initial allocation size (optional)
|
||||||
|
+ //
|
||||||
|
+ // Output : New Vector object.
|
||||||
|
+ //
|
||||||
|
+ // Side Effects : None
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+ Vector::Vector(size_t allocSize)
|
||||||
|
+ : m_size(allocSize),
|
||||||
|
+ m_count(0),
|
||||||
|
+ m_data(0)
|
||||||
|
+ {
|
||||||
|
+ if (m_size) {
|
||||||
|
+ m_data = new void*[m_size];
|
||||||
|
+ int i;
|
||||||
|
+ for (i=0; i<m_size;i++)
|
||||||
|
+ m_data[i] = 0;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+ // Vector::~Vector
|
||||||
|
+ //
|
||||||
|
+ // Destructor. Only cleans up the vector, not its contents!
|
||||||
|
+ //
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ Vector::~Vector() {
|
||||||
|
+ if (m_data) {
|
||||||
|
+ delete [] m_data;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ m_data = 0;
|
||||||
|
+ m_size = m_count = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+ // size_t Vector::extend(size_t newSize)
|
||||||
|
+ //
|
||||||
|
+ // Extends the vector to at least newSize length. Won't do anything if newSize
|
||||||
|
+ // is smaller than the current size of the vector.
|
||||||
|
+ //
|
||||||
|
+ // Returns the new allocated size.
|
||||||
|
+ //
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+ #define GRANULARITY 16
|
||||||
|
+
|
||||||
|
+ size_t Vector::extend(size_t newSize) {
|
||||||
|
+
|
||||||
|
+ if (newSize > m_size) {
|
||||||
|
+ newSize = newSize + (GRANULARITY - (newSize % GRANULARITY));
|
||||||
|
+
|
||||||
|
+ void** temp = new void*[newSize];
|
||||||
|
+ memcpy(temp, m_data, m_size*sizeof(void*));
|
||||||
|
+
|
||||||
|
+ int i;
|
||||||
|
+ for (i=m_size; i<newSize; i++)
|
||||||
|
+ temp[i] = 0;
|
||||||
|
+
|
||||||
|
+ delete [] m_data;
|
||||||
|
+ m_data = temp;
|
||||||
|
+ m_size = newSize;
|
||||||
|
+ }
|
||||||
|
+ return m_size;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+ // Vector::append(void* object)
|
||||||
|
+ //
|
||||||
|
+ // Appends the object pointer to vector at index m_count. Increments m_count.
|
||||||
|
+ // Returns the new count.
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+ size_t Vector::append(void* object) {
|
||||||
|
+ if (m_count >= m_size) {
|
||||||
|
+ extend(m_count + 1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ m_data[m_count] = object;
|
||||||
|
+ m_count += 1;
|
||||||
|
+
|
||||||
|
+ return m_count;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+ // Vector::operator[] (size_t idx)
|
||||||
|
+ //
|
||||||
|
+ // Returns a reference to the void pointer at idx. If idx is beyond the range
|
||||||
|
+ // of the vector, returns a reference to s_nullPtr.
|
||||||
|
+ //
|
||||||
|
+ // -----------------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+ void*& Vector::operator[] (size_t idx) {
|
||||||
|
+ if (idx >= m_size) {
|
||||||
|
+ s_nullPtr = 0;
|
||||||
|
+ return s_nullPtr;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return m_data[idx];
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ /***********************************************************************
|
||||||
|
+ *
|
||||||
|
+ * -- Revision History
|
||||||
|
+ * $Log$
|
||||||
|
+ * Revision 1.2 1999/04/30 03:28:35 RD
|
||||||
|
+ * wxPython 2.0b9, first phase (win32)
|
||||||
|
+ * Added gobs of stuff, see wxPython/README.txt for details
|
||||||
|
+ *
|
||||||
|
+ * Revision 1.1.4.1 1999/03/27 23:28:59 RD
|
||||||
|
+ *
|
||||||
|
+ * wxPython 2.0b8
|
||||||
|
+ * Python thread support
|
||||||
|
+ * various minor additions
|
||||||
|
+ * various minor fixes
|
||||||
|
+ *
|
||||||
|
+ * Revision 1.1 1998/10/03 05:56:03 RD
|
||||||
|
+ * *** empty log message ***
|
||||||
|
+ *
|
||||||
|
+ *
|
||||||
|
+ ***********************************************************************/
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
*** makefile.msc.old Mon Jun 23 15:15:32 1997
|
||||||
|
--- makefile.msc Fri Aug 28 10:21:58 1998
|
||||||
|
***************
|
||||||
|
*** 33,50 ****
|
||||||
|
# Normally, you shouldn't have to change anything below this point #
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj emit.obj newdoc.obj ascii.obj \
|
||||||
|
! html.obj latex.obj cplus.obj lang.obj hash.obj sstring.obj wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
|
||||||
|
|
||||||
|
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
|
||||||
|
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
|
||||||
|
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
|
||||||
|
|
||||||
|
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
|
||||||
|
LIBNAME = ..\libswig.lib
|
||||||
|
INCLUDE = -I../Include -I$(STD_INC)
|
||||||
|
! CFLAGS = -Zi -nologo -DSWIG_LIB="\"$(SWIG_LIB)\"" -DSWIG_CC="\"$(CC)\"" -DMSDOS -DSTDC_HEADERS=1 -DHAVE_LIBDL=1 $(SWIG_OPTS)
|
||||||
|
LD_FLAGS = -VERBOSE
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
--- 33,50 ----
|
||||||
|
# Normally, you shouldn't have to change anything below this point #
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj emit.obj newdoc.obj ascii.obj \
|
||||||
|
! html.obj latex.obj cplus.obj lang.obj hash.obj vector.obj sstring.obj wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
|
||||||
|
|
||||||
|
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
|
||||||
|
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx vector.cxx \
|
||||||
|
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
|
||||||
|
|
||||||
|
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
|
||||||
|
LIBNAME = ..\libswig.lib
|
||||||
|
INCLUDE = -I../Include -I$(STD_INC)
|
||||||
|
! CFLAGS = -Zi -nologo -DSWIG_LIB="\"$(SWIG_LIB)\"" -DSWIG_CC="\"$(CC)\"" -DMSDOS -DSTDC_HEADERS=1 -DHAVE_LIBDL=1 $(SWIG_OPTS) $(OTHERFLAGS)
|
||||||
|
LD_FLAGS = -VERBOSE
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
*** makefile.bc.old Sun Jan 04 12:49:24 1998
|
||||||
|
--- makefile.bc Fri Aug 28 14:42:58 1998
|
||||||
|
***************
|
||||||
|
*** 34,47 ****
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj \
|
||||||
|
emit.obj newdoc.obj ascii.obj \
|
||||||
|
! html.obj latex.obj cplus.obj lang.obj hash.obj sstring.obj \
|
||||||
|
wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
|
||||||
|
|
||||||
|
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \
|
||||||
|
emit.cxx newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
|
||||||
|
! sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
|
||||||
|
|
||||||
|
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
|
||||||
|
LIBNAME = ..\libswig.lib
|
||||||
|
INCLUDE = -I../Include -I$(STD_INC)
|
||||||
|
--- 34,47 ----
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj \
|
||||||
|
emit.obj newdoc.obj ascii.obj \
|
||||||
|
! html.obj latex.obj cplus.obj lang.obj hash.obj vector.obj sstring.obj \
|
||||||
|
wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj
|
||||||
|
|
||||||
|
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \
|
||||||
|
emit.cxx newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
|
||||||
|
! vector.cxx sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
|
||||||
|
|
||||||
|
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
|
||||||
|
LIBNAME = ..\libswig.lib
|
||||||
|
INCLUDE = -I../Include -I$(STD_INC)
|
||||||
|
*** Makefile.in.old Wed May 28 22:56:56 1997
|
||||||
|
--- Makefile.in Fri Aug 28 14:43:36 1998
|
||||||
|
***************
|
||||||
|
*** 51,63 ****
|
||||||
|
# Normally, you shouldn't have to change anything below this point #
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \
|
||||||
|
! html.o latex.o cplus.o lang.o hash.o sstring.o wrapfunc.o getopt.o comment.o \
|
||||||
|
typemap.o naming.o
|
||||||
|
|
||||||
|
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
|
||||||
|
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
|
||||||
|
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
|
||||||
|
|
||||||
|
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
|
||||||
|
LIB = ../libswig.a
|
||||||
|
--- 51,63 ----
|
||||||
|
# Normally, you shouldn't have to change anything below this point #
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \
|
||||||
|
! html.o latex.o cplus.o lang.o hash.o vector.o sstring.o wrapfunc.o getopt.o comment.o \
|
||||||
|
typemap.o naming.o
|
||||||
|
|
||||||
|
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
|
||||||
|
! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx vector.cxx \
|
||||||
|
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
|
||||||
|
|
||||||
|
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
|
||||||
|
LIB = ../libswig.a
|
@@ -2,5 +2,4 @@
|
|||||||
.emacs.desktop
|
.emacs.desktop
|
||||||
hangman_dict.txt
|
hangman_dict.txt
|
||||||
setup.bat
|
setup.bat
|
||||||
test.out
|
|
||||||
tmphtml.txt
|
tmphtml.txt
|
25
utils/wxPython/demo/ColorPanel.py
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/env python
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Name: ColorPanel.py
|
||||||
|
# Purpose: Testing lots of stuff, controls, window types, etc.
|
||||||
|
#
|
||||||
|
# Author: Robin Dunn & Gary Dumer
|
||||||
|
#
|
||||||
|
# Created:
|
||||||
|
# RCS-ID: $Id$
|
||||||
|
# Copyright: (c) 1998 by Total Control Software
|
||||||
|
# Licence: wxWindows license
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
class ColoredPanel(wxWindow):
|
||||||
|
def __init__(self, parent, color):
|
||||||
|
wxWindow.__init__(self, parent, -1,
|
||||||
|
wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER)
|
||||||
|
self.SetBackgroundColour(color)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/bin/env python
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Name: DialogUnits.py
|
# Name: DialogUnits.py
|
||||||
# Purpose: A minimal wxPython program that is a bit smarter than test1.
|
# Purpose: A minimal wxPython program that is a bit smarter than test1.
|
||||||
@@ -29,7 +29,6 @@ class MyFrame(wxFrame):
|
|||||||
# Associate some events with methods of this class
|
# Associate some events with methods of this class
|
||||||
EVT_SIZE(self, self.OnSize)
|
EVT_SIZE(self, self.OnSize)
|
||||||
EVT_MOVE(self, self.OnMove)
|
EVT_MOVE(self, self.OnMove)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
# Add a panel and some controls to display the size and position
|
# Add a panel and some controls to display the size and position
|
||||||
panel = wxPanel(self, -1)
|
panel = wxPanel(self, -1)
|
||||||
@@ -47,9 +46,6 @@ class MyFrame(wxFrame):
|
|||||||
wxDLG_SZE(panel, wxSize(36, -1)),
|
wxDLG_SZE(panel, wxSize(36, -1)),
|
||||||
wxTE_READONLY)
|
wxTE_READONLY)
|
||||||
|
|
||||||
#print wxDLG_PNT(panel, wxPoint(24, 4)), wxDLG_SZE(panel, wxSize(36, -1))
|
|
||||||
#print wxDLG_PNT(panel, wxPoint(24, 16)),wxDLG_SZE(panel, wxSize(36, -1))
|
|
||||||
|
|
||||||
|
|
||||||
# This method is called automatically when the CLOSE event is
|
# This method is called automatically when the CLOSE event is
|
||||||
# sent to this window
|
# sent to this window
|
336
utils/wxPython/demo/Main.py
Normal file
@@ -0,0 +1,336 @@
|
|||||||
|
#!/bin/env python
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Name: Main.py
|
||||||
|
# Purpose: Testing lots of stuff, controls, window types, etc.
|
||||||
|
#
|
||||||
|
# Author: Robin Dunn & Gary Dumer
|
||||||
|
#
|
||||||
|
# Created:
|
||||||
|
# RCS-ID: $Id$
|
||||||
|
# Copyright: (c) 1999 by Total Control Software
|
||||||
|
# Licence: wxWindows license
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
import sys, os
|
||||||
|
from wxPython.wx import *
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
_treeList = [
|
||||||
|
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
|
||||||
|
|
||||||
|
('Miscellaneous Windows', ['wxGrid', 'wxSashWindow',
|
||||||
|
'wxScrolledWindow', 'wxSplitterWindow',
|
||||||
|
'wxStatusBar', 'wxToolBar', 'wxNotebook']),
|
||||||
|
|
||||||
|
('Common Dialogs', ['wxColourDialog', 'wxDirDialog', 'wxFileDialog',
|
||||||
|
'wxSingleChoiceDialog', 'wxTextEntryDialog',
|
||||||
|
'wxFontDialog', 'wxPageSetupDialog', 'wxPrintDialog',
|
||||||
|
'wxMessageDialog', 'wxProgressDialog']),
|
||||||
|
|
||||||
|
('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice',
|
||||||
|
'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl',
|
||||||
|
'wxTreeCtrl', 'wxSpinButton', 'wxStaticText', 'wxStaticBitmap',
|
||||||
|
'wxRadioBox', 'wxSlider']),
|
||||||
|
|
||||||
|
('Window Layout', ['wxLayoutConstraints', 'Sizers']),
|
||||||
|
|
||||||
|
('Miscellaneous', ['wxTimer', 'wxGLCanvas', 'DialogUnits', 'wxImage',
|
||||||
|
'PrintFramework']),
|
||||||
|
|
||||||
|
('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog',
|
||||||
|
'wxMultipleChoiceDialog', 'wxPlotCanvas']),
|
||||||
|
|
||||||
|
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot']),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxPythonDemo(wxFrame):
|
||||||
|
def __init__(self, parent, id, title):
|
||||||
|
wxFrame.__init__(self, parent, -1, title,
|
||||||
|
wxDefaultPosition, wxSize(700, 550))
|
||||||
|
if wxPlatform == '__WXMSW__':
|
||||||
|
self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
|
||||||
|
self.SetIcon(self.icon)
|
||||||
|
|
||||||
|
self.otherWin = None
|
||||||
|
EVT_IDLE(self, self.OnIdle)
|
||||||
|
|
||||||
|
self.Centre(wxBOTH)
|
||||||
|
self.CreateStatusBar(1, wxST_SIZEGRIP)
|
||||||
|
splitter = wxSplitterWindow(self, -1)
|
||||||
|
splitter2 = wxSplitterWindow(splitter, -1)
|
||||||
|
|
||||||
|
# Prevent TreeCtrl from displaying all items after destruction
|
||||||
|
self.dying = false
|
||||||
|
|
||||||
|
# Make a File menu
|
||||||
|
self.mainmenu = wxMenuBar()
|
||||||
|
menu = wxMenu()
|
||||||
|
mID = NewId()
|
||||||
|
menu.Append(mID, 'E&xit', 'Get the heck outta here!')
|
||||||
|
EVT_MENU(self, mID, self.OnFileExit)
|
||||||
|
self.mainmenu.Append(menu, '&File')
|
||||||
|
|
||||||
|
# Make a Help menu
|
||||||
|
mID = NewId()
|
||||||
|
menu = wxMenu()
|
||||||
|
menu.Append(mID, '&About', 'wxPython RULES!!!')
|
||||||
|
EVT_MENU(self, mID, self.OnHelpAbout)
|
||||||
|
self.mainmenu.Append(menu, '&Help')
|
||||||
|
self.SetMenuBar(self.mainmenu)
|
||||||
|
|
||||||
|
selectedDemo = None
|
||||||
|
selectedDemoName = "Nada"
|
||||||
|
if len(sys.argv) == 2:
|
||||||
|
selectedDemoName = sys.argv[1]
|
||||||
|
|
||||||
|
# Create a TreeCtrl
|
||||||
|
tID = NewId()
|
||||||
|
self.tree = wxTreeCtrl(splitter, tID)
|
||||||
|
root = self.tree.AddRoot("Overview")
|
||||||
|
for item in _treeList:
|
||||||
|
child = self.tree.AppendItem(root, item[0])
|
||||||
|
for childItem in item[1]:
|
||||||
|
theDemo = self.tree.AppendItem(child, childItem)
|
||||||
|
if childItem == selectedDemoName:
|
||||||
|
selectedDemo = theDemo
|
||||||
|
|
||||||
|
self.tree.Expand(root)
|
||||||
|
EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded)
|
||||||
|
EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed)
|
||||||
|
EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged)
|
||||||
|
|
||||||
|
# Create a Notebook
|
||||||
|
self.nb = wxNotebook(splitter2, -1)
|
||||||
|
|
||||||
|
# Set up a TextCtrl on the Overview Notebook page
|
||||||
|
self.ovr = wxTextCtrl(self.nb, -1, '', wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxTE_MULTILINE|wxTE_READONLY)
|
||||||
|
self.nb.AddPage(self.ovr, "Overview")
|
||||||
|
|
||||||
|
|
||||||
|
# Set up a TextCtrl on the Demo Code Notebook page
|
||||||
|
self.txt = wxTextCtrl(self.nb, -1, '', wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
||||||
|
self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false))
|
||||||
|
self.nb.AddPage(self.txt, "Demo Code")
|
||||||
|
|
||||||
|
|
||||||
|
# Set up a log on the View Log Notebook page
|
||||||
|
self.log = wxTextCtrl(splitter2, -1, '', wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
||||||
|
(w, self.charHeight) = self.log.GetTextExtent('X')
|
||||||
|
#self.WriteText('wxPython Demo Log:\n')
|
||||||
|
|
||||||
|
|
||||||
|
# add the windows to the splitter and split it.
|
||||||
|
splitter.SplitVertically(self.tree, splitter2)
|
||||||
|
splitter.SetSashPosition(180, true)
|
||||||
|
splitter.SetMinimumPaneSize(20)
|
||||||
|
|
||||||
|
splitter2.SplitHorizontally(self.nb, self.log)
|
||||||
|
splitter2.SetSashPosition(360, true)
|
||||||
|
splitter2.SetMinimumPaneSize(20)
|
||||||
|
|
||||||
|
# make our log window be stdout
|
||||||
|
#sys.stdout = self
|
||||||
|
|
||||||
|
# select initial items
|
||||||
|
self.nb.SetSelection(0)
|
||||||
|
self.tree.SelectItem(root)
|
||||||
|
if selectedDemo:
|
||||||
|
self.tree.SelectItem(selectedDemo)
|
||||||
|
self.tree.EnsureVisible(selectedDemo)
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def WriteText(self, text):
|
||||||
|
self.log.WriteText(text)
|
||||||
|
w, h = self.log.GetClientSizeTuple()
|
||||||
|
numLines = h/self.charHeight
|
||||||
|
x, y = self.log.PositionToXY(self.log.GetLastPosition())
|
||||||
|
self.log.ShowPosition(self.log.XYToPosition(x, y-numLines+1))
|
||||||
|
self.log.SetInsertionPointEnd()
|
||||||
|
|
||||||
|
def write(self, txt):
|
||||||
|
self.WriteText(txt)
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def OnItemExpanded(self, event):
|
||||||
|
item = event.GetItem()
|
||||||
|
self.log.WriteText("OnItemExpanded: %s\n" % self.tree.GetItemText(item))
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def OnItemCollapsed(self, event):
|
||||||
|
item = event.GetItem()
|
||||||
|
self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item))
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def OnSelChanged(self, event):
|
||||||
|
if self.dying:
|
||||||
|
return
|
||||||
|
|
||||||
|
if self.nb.GetPageCount() == 3:
|
||||||
|
if self.nb.GetSelection() == 2:
|
||||||
|
self.nb.SetSelection(0)
|
||||||
|
self.nb.DeletePage(2)
|
||||||
|
|
||||||
|
item = event.GetItem()
|
||||||
|
itemText = self.tree.GetItemText(item)
|
||||||
|
|
||||||
|
if itemText == 'Overview':
|
||||||
|
self.GetDemoFile('Main.py')
|
||||||
|
self.SetOverview('Overview', overview)
|
||||||
|
#self.nb.ResizeChildren();
|
||||||
|
self.nb.Refresh();
|
||||||
|
#wxYield()
|
||||||
|
|
||||||
|
else:
|
||||||
|
if os.path.exists(itemText + '.py'):
|
||||||
|
self.GetDemoFile(itemText + '.py')
|
||||||
|
module = __import__(itemText, globals())
|
||||||
|
self.SetOverview(itemText, module.overview)
|
||||||
|
|
||||||
|
# in case runTest is modal, make sure things look right...
|
||||||
|
self.nb.Refresh();
|
||||||
|
wxYield()
|
||||||
|
|
||||||
|
window = module.runTest(self, self.nb, self)
|
||||||
|
if window:
|
||||||
|
self.nb.AddPage(window, 'Demo')
|
||||||
|
self.nb.SetSelection(2)
|
||||||
|
self.nb.ResizeChildren();
|
||||||
|
|
||||||
|
else:
|
||||||
|
self.ovr.Clear()
|
||||||
|
self.txt.Clear()
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
# Get the Demo files
|
||||||
|
def GetDemoFile(self, filename):
|
||||||
|
self.txt.Clear()
|
||||||
|
#if not self.txt.LoadFile(filename):
|
||||||
|
# self.txt.WriteText("Cannot open %s file." % filename)
|
||||||
|
try:
|
||||||
|
self.txt.SetValue(open(filename).read())
|
||||||
|
except IOException:
|
||||||
|
self.txt.WriteText("Cannot open %s file." % filename)
|
||||||
|
|
||||||
|
|
||||||
|
self.txt.SetInsertionPoint(0)
|
||||||
|
self.txt.ShowPosition(0)
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def SetOverview(self, name, text):
|
||||||
|
self.ovr.Clear()
|
||||||
|
self.ovr.WriteText(text)
|
||||||
|
self.nb.SetPageText(0, name)
|
||||||
|
self.ovr.SetInsertionPoint(0)
|
||||||
|
self.ovr.ShowPosition(0)
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
# Menu methods
|
||||||
|
def OnFileExit(self, event):
|
||||||
|
self.Close()
|
||||||
|
|
||||||
|
|
||||||
|
def OnHelpAbout(self, event):
|
||||||
|
about = wxMessageDialog(self,
|
||||||
|
"wxPython is a Python extension module that\n"
|
||||||
|
"encapsulates the wxWindows GUI classes.\n\n"
|
||||||
|
"This demo shows off some of the capabilities\n"
|
||||||
|
"of wxPython.\n\n"
|
||||||
|
" Developed by Robin Dunn",
|
||||||
|
"About wxPython", wxOK)
|
||||||
|
about.ShowModal()
|
||||||
|
about.Destroy()
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def OnCloseWindow(self, event):
|
||||||
|
self.dying = true
|
||||||
|
self.Destroy()
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def OnIdle(self, event):
|
||||||
|
if self.otherWin:
|
||||||
|
self.otherWin.Raise()
|
||||||
|
self.otherWin = None
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class MyApp(wxApp):
|
||||||
|
def OnInit(self):
|
||||||
|
wxImage_AddHandler(wxJPEGHandler())
|
||||||
|
wxImage_AddHandler(wxPNGHandler())
|
||||||
|
wxImage_AddHandler(wxGIFHandler())
|
||||||
|
frame = wxPythonDemo(NULL, -1, "wxPython: (A Demonstration)")
|
||||||
|
frame.Show(true)
|
||||||
|
self.SetTopWindow(frame)
|
||||||
|
return true
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app = MyApp(0)
|
||||||
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overview = """\
|
||||||
|
Python
|
||||||
|
------------
|
||||||
|
|
||||||
|
Python is an interpreted, interactive, object-oriented programming language often compared to Tcl, Perl, Scheme, or Java.
|
||||||
|
|
||||||
|
Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, and new built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface.
|
||||||
|
|
||||||
|
wxWindows
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
wxWindows is a free C++ framework designed to make cross-platform programming child's play. Well, almost. wxWindows 2 supports Windows 3.1/95/98/NT, Unix with GTK/Motif/Lesstif, with a Mac version underway. Other ports are under consideration.
|
||||||
|
|
||||||
|
wxWindows is a set of libraries that allows C++ applications to compile and run on several different types of computers, with minimal source code changes. There is one library per supported GUI (such as Motif, or Windows). As well as providing a common API (Application Programming Interface) for GUI functionality, it provides functionality for accessing some commonly-used operating system facilities, such as copying or deleting files. wxWindows is a 'framework' in the sense that it provides a lot of built-in functionality, which the application can use or replace as required, thus saving a great deal of coding effort. Basic data structures such as strings, linked lists and hash tables are also supported.
|
||||||
|
|
||||||
|
wxPython
|
||||||
|
----------------
|
||||||
|
|
||||||
|
wxPython is a Python extension module that encapsulates the wxWindows GUI classes. Currently it is only available for the Win32 and GTK ports of wxWindows, but as soon as the other ports are brought up to the same level as Win32 and GTK, it should be fairly trivial to enable wxPython to be used with the new GUI.
|
||||||
|
|
||||||
|
The wxPython extension module attempts to mirror the class heiarchy of wxWindows as closely as possible. This means that there is a wxFrame class in wxPython that looks, smells, tastes and acts almost the same as the wxFrame class in the C++ version. Unfortunately, because of differences in the languages, wxPython doesn't match wxWindows exactly, but the differences should be easy to absorb because they are natural to Python. For example, some methods that return multiple values via argument pointers in C++ will return a tuple of values in Python.
|
||||||
|
|
||||||
|
There is still much to be done for wxPython, many classes still need to be mirrored. Also, wxWindows is still somewhat of a moving target so it is a bit of an effort just keeping wxPython up to date. On the other hand, there are enough of the core classes completed that useful applications can be written.
|
||||||
|
|
||||||
|
wxPython is close enough to the C++ version that the majority of the wxPython documentation is actually just notes attached to the C++ documents that describe the places where wxPython is different. There is also a series of sample programs included, and a series of documentation pages that assist the programmer in getting started with wxPython.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
|
from wxPython.lib.sizers import *
|
||||||
from wxScrolledWindow import MyCanvas
|
from wxScrolledWindow import MyCanvas
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -96,29 +97,31 @@ class TestPrintPanel(wxPanel):
|
|||||||
self.printData = wxPrintData()
|
self.printData = wxPrintData()
|
||||||
self.printData.SetPaperId(wxPAPER_LETTER)
|
self.printData.SetPaperId(wxPAPER_LETTER)
|
||||||
|
|
||||||
self.box = wxBoxSizer(wxVERTICAL)
|
self.box = box.wxBoxSizer(wxVERTICAL)
|
||||||
self.canvas = MyCanvas(self)
|
self.canvas = MyCanvas(self)
|
||||||
self.box.Add(self.canvas, 1, wxGROW)
|
self.box.Add(self.canvas, 1)
|
||||||
|
|
||||||
subbox = wxBoxSizer(wxHORIZONTAL)
|
subbox = wxBoxSizer(wxHORIZONTAL)
|
||||||
btn = wxButton(self, 1201, "Print Setup")
|
btn = wxButton(self, 1201, "Print Setup")
|
||||||
EVT_BUTTON(self, 1201, self.OnPrintSetup)
|
EVT_BUTTON(self, 1201, self.OnPrintSetup)
|
||||||
subbox.Add(btn, 1, wxGROW | wxALL, 2)
|
subbox.Add(btn, 1)
|
||||||
|
|
||||||
btn = wxButton(self, 1202, "Print Preview")
|
btn = wxButton(self, 1202, "Print Preview")
|
||||||
EVT_BUTTON(self, 1202, self.OnPrintPreview)
|
EVT_BUTTON(self, 1202, self.OnPrintPreview)
|
||||||
subbox.Add(btn, 1, wxGROW | wxALL, 2)
|
subbox.Add(btn, 1)
|
||||||
|
|
||||||
btn = wxButton(self, 1203, "Print")
|
btn = wxButton(self, 1203, "Print")
|
||||||
EVT_BUTTON(self, 1203, self.OnDoPrint)
|
EVT_BUTTON(self, 1203, self.OnDoPrint)
|
||||||
subbox.Add(btn, 1, wxGROW | wxALL, 2)
|
subbox.Add(btn, 1)
|
||||||
|
|
||||||
self.box.Add(subbox, 0, wxGROW)
|
self.box.Add(subbox)
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
|
||||||
self.SetSizer(self.box)
|
|
||||||
|
|
||||||
|
|
||||||
|
def OnSize(self, event):
|
||||||
|
size = self.GetClientSize()
|
||||||
|
self.box.Layout(size)
|
||||||
|
|
||||||
def OnPrintSetup(self, event):
|
def OnPrintSetup(self, event):
|
||||||
printerDialog = wxPrintDialog(self)
|
printerDialog = wxPrintDialog(self)
|
||||||
printerDialog.GetPrintDialogData().SetPrintData(self.printData)
|
printerDialog.GetPrintDialogData().SetPrintData(self.printData)
|
@@ -106,50 +106,26 @@ def makeSimpleBorder3(win):
|
|||||||
return bdr
|
return bdr
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
def makeShapes(win):
|
|
||||||
box =wxBoxSizer(wxVERTICAL)
|
|
||||||
box.Add(wxStaticLine(win, -1), 0)
|
|
||||||
for line in (
|
|
||||||
(wxANCHOR_NW, "NorthWest"),
|
|
||||||
(wxANCHOR_NORTH, "North"),
|
|
||||||
(wxANCHOR_NE, "NorthEast")
|
|
||||||
), (
|
|
||||||
(wxANCHOR_WEST, "West"),
|
|
||||||
(wxANCHOR_NONE, "Center"),
|
|
||||||
(wxANCHOR_EAST, "East")
|
|
||||||
), (
|
|
||||||
(wxANCHOR_SW, "SouthWest"),
|
|
||||||
(wxANCHOR_SOUTH, "South"),
|
|
||||||
(wxANCHOR_SE, "SouthEast")
|
|
||||||
):
|
|
||||||
linebox =wxBoxSizer(wxHORIZONTAL)
|
|
||||||
linebox.Add(wxStaticLine(win, -1, style=wxVERTICAL), 0)
|
|
||||||
for (anchor, label) in line:
|
|
||||||
sizer =wxShapeSizer(anchor)
|
|
||||||
sizer.Add(wxButton(win, -1, label, size=wxSize(100, 50)))
|
|
||||||
linebox.Add(sizer, 1)
|
|
||||||
linebox.Add(wxStaticLine(win, -1, style=wxVERTICAL), 0)
|
|
||||||
box.Add(linebox, 1)
|
|
||||||
box.Add(wxStaticLine(win, -1), 0)
|
|
||||||
return box
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
def makeBoxInBox(win):
|
def makeBoxInBox(win):
|
||||||
box = wxBoxSizer(wxVERTICAL)
|
box = wxBoxSizer(wxVERTICAL)
|
||||||
|
|
||||||
box.Add(wxButton(win, 1010, "one"))
|
btn = wxButton(win, 1010, "one")
|
||||||
|
box.Add(btn)
|
||||||
|
|
||||||
box2 = wxBoxSizer(wxHORIZONTAL)
|
box2 = wxBoxSizer(wxHORIZONTAL)
|
||||||
box2.AddMany([ wxButton(win, 1010, "two"),
|
btn = wxButton(win, 1010, "two")
|
||||||
wxButton(win, 1010, "three"),
|
box2.Add(btn)
|
||||||
wxButton(win, 1010, "four"),
|
btn = wxButton(win, 1010, "three")
|
||||||
wxButton(win, 1010, "five"),
|
box2.Add(btn)
|
||||||
])
|
btn = wxButton(win, 1010, "four")
|
||||||
|
box2.Add(btn)
|
||||||
|
btn = wxButton(win, 1010, "five")
|
||||||
|
box2.Add(btn)
|
||||||
|
|
||||||
box3 = wxBoxSizer(wxVERTICAL)
|
box3 = wxBoxSizer(wxVERTICAL)
|
||||||
box3.AddMany([ (wxButton(win, 1010, "six"), 0),
|
box3.AddMany([ (wxButton(win, 1010, "six"), 1),
|
||||||
(wxButton(win, 1010, "seven"), 2),
|
(wxButton(win, 1010, "seven"), 2),
|
||||||
(wxButton(win, 1010, "eight"), 1),
|
(wxButton(win, 1010, "eight"), 1),
|
||||||
(wxButton(win, 1010, "nine"), 1),
|
(wxButton(win, 1010, "nine"), 1),
|
||||||
@@ -158,7 +134,8 @@ def makeBoxInBox(win):
|
|||||||
box2.Add(box3, 1)
|
box2.Add(box3, 1)
|
||||||
box.Add(box2, 1)
|
box.Add(box2, 1)
|
||||||
|
|
||||||
box.Add(wxButton(win, 1010, "ten"))
|
btn = wxButton(win, 1010, "ten")
|
||||||
|
box.Add(btn)
|
||||||
|
|
||||||
return box
|
return box
|
||||||
|
|
||||||
@@ -177,11 +154,11 @@ def makeBorderInBox(win):
|
|||||||
insideBox = wxBoxSizer(wxHORIZONTAL)
|
insideBox = wxBoxSizer(wxHORIZONTAL)
|
||||||
|
|
||||||
box2 = wxBoxSizer(wxHORIZONTAL)
|
box2 = wxBoxSizer(wxHORIZONTAL)
|
||||||
box2.AddMany([ wxButton(win, 1010, "one"),
|
box2.AddMany([ (wxButton(win, 1010, "one"), 0),
|
||||||
wxButton(win, 1010, "two"),
|
(wxButton(win, 1010, "two"), 0),
|
||||||
wxButton(win, 1010, "three"),
|
(wxButton(win, 1010, "three"), 0),
|
||||||
wxButton(win, 1010, "four"),
|
(wxButton(win, 1010, "four"), 0),
|
||||||
wxButton(win, 1010, "five"),
|
(wxButton(win, 1010, "five"), 0),
|
||||||
])
|
])
|
||||||
|
|
||||||
insideBox.Add(box2, 0)
|
insideBox.Add(box2, 0)
|
||||||
@@ -191,7 +168,7 @@ def makeBorderInBox(win):
|
|||||||
insideBox.Add(bdr, 1)
|
insideBox.Add(bdr, 1)
|
||||||
|
|
||||||
box3 = wxBoxSizer(wxVERTICAL)
|
box3 = wxBoxSizer(wxVERTICAL)
|
||||||
box3.AddMany([ (wxButton(win, 1010, "six"), 0),
|
box3.AddMany([ (wxButton(win, 1010, "six"), 1),
|
||||||
(wxButton(win, 1010, "seven"), 2),
|
(wxButton(win, 1010, "seven"), 2),
|
||||||
(wxButton(win, 1010, "eight"), 1),
|
(wxButton(win, 1010, "eight"), 1),
|
||||||
(wxButton(win, 1010, "nine"), 1),
|
(wxButton(win, 1010, "nine"), 1),
|
||||||
@@ -258,13 +235,6 @@ theTests = [
|
|||||||
|
|
||||||
("", None, ""),
|
("", None, ""),
|
||||||
|
|
||||||
|
|
||||||
("Proportional resize", makeShapes,
|
|
||||||
"The wxShapeSizer preserves the original proportions of the window."
|
|
||||||
),
|
|
||||||
|
|
||||||
("", None, ""),
|
|
||||||
|
|
||||||
("Boxes inside of boxes", makeBoxInBox,
|
("Boxes inside of boxes", makeBoxInBox,
|
||||||
"This one shows nesting of boxes within boxes within boxes, using both "
|
"This one shows nesting of boxes within boxes within boxes, using both "
|
||||||
"orientations. Notice also that button seven has a greater weighting "
|
"orientations. Notice also that button seven has a greater weighting "
|
||||||
@@ -292,8 +262,6 @@ class TestFrame(wxFrame):
|
|||||||
self.CreateStatusBar()
|
self.CreateStatusBar()
|
||||||
self.SetStatusText("Resize this frame to see how the sizers respond...")
|
self.SetStatusText("Resize this frame to see how the sizers respond...")
|
||||||
self.sizer.FitWindow(self)
|
self.sizer.FitWindow(self)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
EVT_SIZE(self, self.OnSize)
|
|
||||||
|
|
||||||
|
|
||||||
def OnSize(self, event):
|
def OnSize(self, event):
|
||||||
@@ -312,7 +280,7 @@ class TestFrame(wxFrame):
|
|||||||
|
|
||||||
|
|
||||||
class TestSelectionPanel(wxPanel):
|
class TestSelectionPanel(wxPanel):
|
||||||
def __init__(self, parent, frame=NULL):
|
def __init__(self, parent, frame):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
self.frame = frame
|
self.frame = frame
|
||||||
|
|
||||||
@@ -378,9 +346,8 @@ if __name__ == '__main__':
|
|||||||
mainmenu.Append(menu, "&File")
|
mainmenu.Append(menu, "&File")
|
||||||
self.SetMenuBar(mainmenu)
|
self.SetMenuBar(mainmenu)
|
||||||
EVT_MENU(self, 200, self.OnExit)
|
EVT_MENU(self, 200, self.OnExit)
|
||||||
self.panel = TestSelectionPanel(self, self)
|
self.panel = TestSelectionPanel(self)
|
||||||
self.SetSize(wxSize(400, 380))
|
self.SetSize(wxSize(400, 380))
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
||||||
self.Destroy()
|
self.Destroy()
|
@@ -43,7 +43,6 @@ class HTMLTextView(wxFrame):
|
|||||||
wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition,
|
wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition,
|
||||||
wxSize(600,400))
|
wxSize(600,400))
|
||||||
|
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
self.mainmenu = wxMenuBar()
|
self.mainmenu = wxMenuBar()
|
||||||
|
|
||||||
menu = wxMenu()
|
menu = wxMenu()
|
||||||
@@ -156,7 +155,6 @@ class AppStatusBar(wxStatusBar):
|
|||||||
self.SetStatusWidths([-1, 100])
|
self.SetStatusWidths([-1, 100])
|
||||||
self.but = wxButton(self, 1001, "Refresh")
|
self.but = wxButton(self, 1001, "Refresh")
|
||||||
EVT_BUTTON(self, 1001, parent.OnViewRefresh)
|
EVT_BUTTON(self, 1001, parent.OnViewRefresh)
|
||||||
EVT_SIZE(self, self.OnSize)
|
|
||||||
self.OnSize(None)
|
self.OnSize(None)
|
||||||
|
|
||||||
def logprint(self,x):
|
def logprint(self,x):
|
||||||
@@ -229,7 +227,8 @@ class AppFrame(wxFrame):
|
|||||||
self.sb = AppStatusBar(self)
|
self.sb = AppStatusBar(self)
|
||||||
self.SetStatusBar(self.sb)
|
self.SetStatusBar(self.sb)
|
||||||
|
|
||||||
self.list = wxListCtrl(self, 1100, style=wxLC_REPORT)
|
self.list = wxListCtrl(self, 1100)
|
||||||
|
self.list.SetSingleStyle(wxLC_REPORT)
|
||||||
self.list.InsertColumn(0, 'Subject')
|
self.list.InsertColumn(0, 'Subject')
|
||||||
self.list.InsertColumn(1, 'Date')
|
self.list.InsertColumn(1, 'Date')
|
||||||
self.list.InsertColumn(2, 'Posted by')
|
self.list.InsertColumn(2, 'Posted by')
|
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/bin/env python
|
||||||
|
|
||||||
import Main
|
import Main
|
||||||
Main.main()
|
Main.main()
|
@@ -124,8 +124,6 @@ class HangmanWnd(wxWindow):
|
|||||||
else:
|
else:
|
||||||
self.font = wxFont(10, wxMODERN, wxNORMAL, wxNORMAL)
|
self.font = wxFont(10, wxMODERN, wxNORMAL, wxNORMAL)
|
||||||
self.SetFocus()
|
self.SetFocus()
|
||||||
EVT_PAINT(self, self.OnPaint)
|
|
||||||
|
|
||||||
|
|
||||||
def StartGame(self, word):
|
def StartGame(self, word):
|
||||||
self.word = word
|
self.word = word
|
||||||
@@ -254,7 +252,6 @@ class HangmanDemoFrame(wxFrame):
|
|||||||
def __init__(self, wf, parent, id, pos, size):
|
def __init__(self, wf, parent, id, pos, size):
|
||||||
wxFrame.__init__(self, parent, id, "Hangman demo", pos, size)
|
wxFrame.__init__(self, parent, id, "Hangman demo", pos, size)
|
||||||
self.demo = HangmanDemo(wf, self, -1, wxDefaultPosition, wxDefaultSize)
|
self.demo = HangmanDemo(wf, self, -1, wxDefaultPosition, wxDefaultSize)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
||||||
self.demo.timer.Stop()
|
self.demo.timer.Stop()
|
@@ -8,22 +8,13 @@ class TestPanel(wxPanel):
|
|||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
self.log = log
|
self.log = log
|
||||||
|
|
||||||
b = wxButton(self, 10, "Hello", wxPoint(20, 20))
|
wxButton(self, 10, "Hello", wxPoint(20, 20)).SetDefault()
|
||||||
EVT_BUTTON(self, 10, self.OnClick)
|
EVT_BUTTON(self, 10, self.OnClick)
|
||||||
b.SetBackgroundColour(wxBLUE)
|
|
||||||
b.SetForegroundColour(wxWHITE)
|
|
||||||
b.SetDefault()
|
|
||||||
|
|
||||||
wxButton(self, 20, "HELLO AGAIN!", wxPoint(20, 60), wxSize(90, 45))
|
wxButton(self, 20, "HELLO AGAIN!", wxPoint(20, 60), wxSize(90, 45))
|
||||||
EVT_BUTTON(self, 20, self.OnClick)
|
EVT_BUTTON(self, 20, self.OnClick)
|
||||||
|
|
||||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||||
|
|
||||||
mask = wxMaskColour(bmp, wxBLUE)
|
|
||||||
bmp.SetMask(mask)
|
|
||||||
|
|
||||||
print bmp.GetWidth(), bmp.GetHeight()
|
|
||||||
|
|
||||||
wxBitmapButton(self, 30, bmp, wxPoint(140, 20),
|
wxBitmapButton(self, 30, bmp, wxPoint(140, 20),
|
||||||
wxSize(bmp.GetWidth()+10, bmp.GetHeight()+10))
|
wxSize(bmp.GetWidth()+10, bmp.GetHeight()+10))
|
||||||
EVT_BUTTON(self, 30, self.OnClick)
|
EVT_BUTTON(self, 30, self.OnClick)
|
@@ -15,18 +15,14 @@ class TestComboBox(wxPanel):
|
|||||||
wxPoint(8, 10))
|
wxPoint(8, 10))
|
||||||
|
|
||||||
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18))
|
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18))
|
||||||
wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, -1),
|
wxComboBox(self, 50, "default value", wxPoint(80, 50), wxSize(95, 20),
|
||||||
sampleList, wxCB_DROPDOWN)
|
sampleList, wxCB_DROPDOWN)
|
||||||
EVT_COMBOBOX(self, 500, self.EvtComboBox)
|
EVT_COMBOBOX(self, 50, self.EvtComboBox)
|
||||||
EVT_TEXT(self, 500, self.EvtText)
|
|
||||||
|
|
||||||
|
|
||||||
def EvtComboBox(self, event):
|
def EvtComboBox(self, event):
|
||||||
self.log.WriteText('EvtComboBox: %s\n' % event.GetString())
|
self.log.WriteText('EvtComboBox: %s\n' % event.GetString())
|
||||||
|
|
||||||
def EvtText(self, event):
|
|
||||||
self.log.WriteText('EvtText: %s\n' % event.GetString())
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
@@ -8,7 +8,7 @@ def runTest(frame, nb, log):
|
|||||||
|
|
||||||
wxStaticText(win, -1, "This is a wxDialog", wxPoint(20, 20))
|
wxStaticText(win, -1, "This is a wxDialog", wxPoint(20, 20))
|
||||||
wxButton(win, wxID_OK, " OK ", wxPoint(75, 120), wxDefaultSize).SetDefault()
|
wxButton(win, wxID_OK, " OK ", wxPoint(75, 120), wxDefaultSize).SetDefault()
|
||||||
wxButton(win, wxID_CANCEL, " Cancel ", wxPoint(200, 120), wxDefaultSize)
|
wxButton(win, wxID_CANCEL, " Cancel ", wxPoint(150, 120), wxDefaultSize)
|
||||||
|
|
||||||
val = win.ShowModal()
|
val = win.ShowModal()
|
||||||
if val == wxID_OK:
|
if val == wxID_OK:
|
@@ -4,10 +4,9 @@ from wxPython.wx import *
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN|wxMULTIPLE)
|
dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN)
|
||||||
if dlg.ShowModal() == wxID_OK:
|
if dlg.ShowModal() == wxID_OK:
|
||||||
for path in dlg.GetPaths():
|
log.WriteText('You selected: %s\n' % dlg.GetPath())
|
||||||
log.WriteText('You selected: %s\n' % path)
|
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
@@ -4,8 +4,7 @@ from wxPython.wx import *
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
data = wxFontData()
|
dlg = wxFontDialog(frame)
|
||||||
dlg = wxFontDialog(frame, data)
|
|
||||||
if dlg.ShowModal() == wxID_OK:
|
if dlg.ShowModal() == wxID_OK:
|
||||||
data = dlg.GetFontData()
|
data = dlg.GetFontData()
|
||||||
font = data.GetChosenFont()
|
font = data.GetChosenFont()
|
||||||
@@ -34,7 +33,7 @@ This class represents the font chooser dialog.
|
|||||||
wxFontDialog()
|
wxFontDialog()
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
wxFontDialog(wxWindow* parent, wxFontData* data)
|
wxFontDialog(wxWindow* parent, wxFontData* data = NULL)
|
||||||
|
|
||||||
Constructor. Pass a parent window and a font data object, which will be copied to the font dialog's font data.
|
Constructor. Pass a parent window, and optionally a pointer to a block of font data, which will be copied to the font dialog's font data.
|
||||||
"""
|
"""
|
@@ -11,8 +11,6 @@ class MyFrame(wxFrame):
|
|||||||
button = wxButton(panel, 1003, "Close Me")
|
button = wxButton(panel, 1003, "Close Me")
|
||||||
button.SetPosition(wxPoint(15, 15))
|
button.SetPosition(wxPoint(15, 15))
|
||||||
EVT_BUTTON(self, 1003, self.OnCloseMe)
|
EVT_BUTTON(self, 1003, self.OnCloseMe)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
|
|
||||||
def OnCloseMe(self, event):
|
def OnCloseMe(self, event):
|
||||||
self.Close(true)
|
self.Close(true)
|
153
utils/wxPython/demo/wxGLCanvas.py
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
try:
|
||||||
|
from wxPython.glcanvas import *
|
||||||
|
haveGLCanvas = true
|
||||||
|
except ImportError:
|
||||||
|
haveGLCanvas = false
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
if not haveGLCanvas:
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
dlg = wxMessageDialog(frame, 'The wxGLCanvas has not been included with this build of wxPython!',
|
||||||
|
'Sorry', wxOK | wxICON_INFORMATION)
|
||||||
|
dlg.ShowModal()
|
||||||
|
dlg.Destroy()
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
win = TestGLCanvas(nb)
|
||||||
|
return win
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class TestGLCanvas(wxGLCanvas):
|
||||||
|
def __init__(self, parent):
|
||||||
|
wxGLCanvas.__init__(self, parent, -1)
|
||||||
|
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
|
||||||
|
self.init = false
|
||||||
|
|
||||||
|
def OnEraseBackground(self, event):
|
||||||
|
pass # Do nothing, to avoid flashing.
|
||||||
|
|
||||||
|
|
||||||
|
def OnSize(self, event):
|
||||||
|
size = self.GetClientSize()
|
||||||
|
if self.GetContext() != 'NULL':
|
||||||
|
self.SetCurrent()
|
||||||
|
glViewport(0, 0, size.width, size.height)
|
||||||
|
|
||||||
|
|
||||||
|
def OnPaint(self, event):
|
||||||
|
dc = wxPaintDC(self)
|
||||||
|
|
||||||
|
ctx = self.GetContext()
|
||||||
|
if ctx == "NULL": return
|
||||||
|
|
||||||
|
self.SetCurrent()
|
||||||
|
|
||||||
|
|
||||||
|
if not self.init:
|
||||||
|
self.InitGL()
|
||||||
|
self.init = true
|
||||||
|
|
||||||
|
# clear color and depth buffers
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
|
# draw six faces of a cube
|
||||||
|
glBegin(GL_QUADS)
|
||||||
|
glNormal3f( 0.0, 0.0, 1.0)
|
||||||
|
glVertex3f( 0.5, 0.5, 0.5)
|
||||||
|
glVertex3f(-0.5, 0.5, 0.5)
|
||||||
|
glVertex3f(-0.5,-0.5, 0.5)
|
||||||
|
glVertex3f( 0.5,-0.5, 0.5)
|
||||||
|
|
||||||
|
glNormal3f( 0.0, 0.0,-1.0)
|
||||||
|
glVertex3f(-0.5,-0.5,-0.5)
|
||||||
|
glVertex3f(-0.5, 0.5,-0.5)
|
||||||
|
glVertex3f( 0.5, 0.5,-0.5)
|
||||||
|
glVertex3f( 0.5,-0.5,-0.5)
|
||||||
|
|
||||||
|
glNormal3f( 0.0, 1.0, 0.0)
|
||||||
|
glVertex3f( 0.5, 0.5, 0.5)
|
||||||
|
glVertex3f( 0.5, 0.5,-0.5)
|
||||||
|
glVertex3f(-0.5, 0.5,-0.5)
|
||||||
|
glVertex3f(-0.5, 0.5, 0.5)
|
||||||
|
|
||||||
|
glNormal3f( 0.0,-1.0, 0.0)
|
||||||
|
glVertex3f(-0.5,-0.5,-0.5)
|
||||||
|
glVertex3f( 0.5,-0.5,-0.5)
|
||||||
|
glVertex3f( 0.5,-0.5, 0.5)
|
||||||
|
glVertex3f(-0.5,-0.5, 0.5)
|
||||||
|
|
||||||
|
glNormal3f( 1.0, 0.0, 0.0)
|
||||||
|
glVertex3f( 0.5, 0.5, 0.5)
|
||||||
|
glVertex3f( 0.5,-0.5, 0.5)
|
||||||
|
glVertex3f( 0.5,-0.5,-0.5)
|
||||||
|
glVertex3f( 0.5, 0.5,-0.5)
|
||||||
|
|
||||||
|
glNormal3f(-1.0, 0.0, 0.0)
|
||||||
|
glVertex3f(-0.5,-0.5,-0.5)
|
||||||
|
glVertex3f(-0.5,-0.5, 0.5)
|
||||||
|
glVertex3f(-0.5, 0.5, 0.5)
|
||||||
|
glVertex3f(-0.5, 0.5,-0.5)
|
||||||
|
glEnd()
|
||||||
|
|
||||||
|
self.SwapBuffers()
|
||||||
|
|
||||||
|
|
||||||
|
def InitGL(self):
|
||||||
|
# set viewing projection
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glFrustum(-0.5, 0.5, -0.5, 0.5, 1.0, 3.0);
|
||||||
|
|
||||||
|
# position viewer
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glTranslatef(0.0, 0.0, -2.0);
|
||||||
|
|
||||||
|
# position object
|
||||||
|
glRotatef(30.0, 1.0, 0.0, 0.0);
|
||||||
|
glRotatef(30.0, 0.0, 1.0, 0.0);
|
||||||
|
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
glEnable(GL_LIGHTING);
|
||||||
|
glEnable(GL_LIGHT0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overview = """\
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
def _test():
|
||||||
|
class MyApp(wxApp):
|
||||||
|
def OnInit(self):
|
||||||
|
frame = wxFrame(NULL, -1, "HELP ME!!")
|
||||||
|
win = TestGLCanvas(frame)
|
||||||
|
frame.Show(TRUE)
|
||||||
|
self.SetTopWindow(frame)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
app = MyApp(0)
|
||||||
|
app.MainLoop()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
_test()
|
77
utils/wxPython/demo/wxGrid.py
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class TestGrid(wxGrid):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxGrid.__init__(self, parent, -1)
|
||||||
|
self.log = log
|
||||||
|
|
||||||
|
self.CreateGrid(16, 16)
|
||||||
|
self.SetColumnWidth(3, 200)
|
||||||
|
self.SetRowHeight(4, 45)
|
||||||
|
self.SetCellValue("First cell", 0, 0)
|
||||||
|
self.SetCellValue("Another cell", 1, 1)
|
||||||
|
self.SetCellValue("Yet another cell", 2, 2)
|
||||||
|
self.SetCellTextFont(wxFont(12, wxROMAN, wxITALIC, wxNORMAL), 0, 0)
|
||||||
|
self.SetCellTextColour(wxRED, 1, 1)
|
||||||
|
self.SetCellBackgroundColour(wxCYAN, 2, 2)
|
||||||
|
self.UpdateDimensions()
|
||||||
|
self.AdjustScrollbars()
|
||||||
|
|
||||||
|
EVT_GRID_SELECT_CELL(self, self.OnSelectCell)
|
||||||
|
EVT_GRID_CELL_CHANGE(self, self.OnCellChange)
|
||||||
|
EVT_GRID_CELL_LCLICK(self, self.OnCellClick)
|
||||||
|
EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def OnSelectCell(self, event):
|
||||||
|
self.log.WriteText("OnSelectCell: (%d, %d)\n" % (event.m_row, event.m_col))
|
||||||
|
|
||||||
|
def OnCellChange(self, event):
|
||||||
|
self.log.WriteText("OnCellChange: (%d, %d)\n" % (event.m_row, event.m_col))
|
||||||
|
|
||||||
|
def OnCellClick(self, event):
|
||||||
|
self.log.WriteText("OnCellClick: (%d, %d)\n" % (event.m_row, event.m_col))
|
||||||
|
|
||||||
|
def OnLabelClick(self, event):
|
||||||
|
self.log.WriteText("OnLabelClick: (%d, %d)\n" % (event.m_row, event.m_col))
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
win = TestGrid(nb, log)
|
||||||
|
return win
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overview = """\
|
||||||
|
wxGrid is a class for displaying and editing tabular information.
|
||||||
|
|
||||||
|
wxGrid()
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
wxGrid(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="grid")
|
||||||
|
|
||||||
|
Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns.
|
||||||
|
"""
|
@@ -3,14 +3,14 @@ from wxPython.wx import *
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
class TestLayoutConstraints(wxPanel):
|
class TestLayoutConstraints(wxWindow):
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxWindow.__init__(self, parent, -1)
|
||||||
|
self.SetBackgroundColour(wxNamedColour("MEDIUM ORCHID"))
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(true)
|
||||||
EVT_BUTTON(self, 100, self.OnButton)
|
EVT_BUTTON(self, 100, self.OnButton)
|
||||||
|
|
||||||
self.SetBackgroundColour(wxNamedColour("MEDIUM ORCHID"))
|
|
||||||
|
|
||||||
self.panelA = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize,
|
self.panelA = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize,
|
||||||
wxSIMPLE_BORDER)
|
wxSIMPLE_BORDER)
|
||||||
self.panelA.SetBackgroundColour(wxBLUE)
|
self.panelA.SetBackgroundColour(wxBLUE)
|
||||||
@@ -86,8 +86,6 @@ class TestLayoutConstraints(wxPanel):
|
|||||||
self.panelD.SetConstraints(lc);
|
self.panelD.SetConstraints(lc);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def OnButton(self, event):
|
def OnButton(self, event):
|
||||||
wxBell()
|
wxBell()
|
||||||
|
|
@@ -37,7 +37,6 @@ class TestListBox(wxPanel):
|
|||||||
|
|
||||||
def EvtListBoxDClick(self, event):
|
def EvtListBoxDClick(self, event):
|
||||||
self.log.WriteText('EvtListBoxDClick: %s\n' % self.lb1.GetSelection())
|
self.log.WriteText('EvtListBoxDClick: %s\n' % self.lb1.GetSelection())
|
||||||
self.lb1.Delete(self.lb1.GetSelection())
|
|
||||||
|
|
||||||
def EvtMultiListBox(self, event):
|
def EvtMultiListBox(self, event):
|
||||||
self.log.WriteText('EvtMultiListBox: %s\n' % str(self.lb2.GetSelections()))
|
self.log.WriteText('EvtMultiListBox: %s\n' % str(self.lb2.GetSelections()))
|
@@ -15,49 +15,6 @@ from wxPython.wx import *
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
musicdata = {
|
|
||||||
1 : ("Bad English", "The Price Of Love", "Rock"),
|
|
||||||
2 : ("DNA featuring Suzanne Vega", "Tom's Diner", "Rock"),
|
|
||||||
3 : ("George Michael", "Praying For Time", "Rock"),
|
|
||||||
4 : ("Gloria Estefan", "Here We Are", "Rock"),
|
|
||||||
5 : ("Linda Ronstadt", "Don't Know Much", "Rock"),
|
|
||||||
6 : ("Michael Bolton", "How Am I Supposed To Live Without You", "Blues"),
|
|
||||||
7 : ("Paul Young", "Oh Girl", "Rock"),
|
|
||||||
8 : ("Paula Abdul", "Opposites Attract", "Rock"),
|
|
||||||
9 : ("Richard Marx", "Should've Known Better", "Rock"),
|
|
||||||
10: ("Rod Stewart", "Forever Young", "Rock"),
|
|
||||||
11: ("Roxette", "Dangerous", "Rock"),
|
|
||||||
12: ("Sheena Easton", "The Lover In Me", "Rock"),
|
|
||||||
13: ("Sinead O'Connor", "Nothing Compares 2 U", "Rock"),
|
|
||||||
14: ("Stevie B.", "Because I Love You", "Rock"),
|
|
||||||
15: ("Taylor Dayne", "Love Will Lead You Back", "Rock"),
|
|
||||||
16: ("The Bangles", "Eternal Flame", "Rock"),
|
|
||||||
17: ("Wilson Phillips", "Release Me", "Rock"),
|
|
||||||
18: ("Billy Joel", "Blonde Over Blue", "Rock"),
|
|
||||||
19: ("Billy Joel", "Famous Last Words", "Rock"),
|
|
||||||
20: ("Billy Joel", "Lullabye (Goodnight, My Angel)", "Rock"),
|
|
||||||
21: ("Billy Joel", "The River Of Dreams", "Rock"),
|
|
||||||
22: ("Billy Joel", "Two Thousand Years", "Rock"),
|
|
||||||
23: ("Janet Jackson", "Alright", "Rock"),
|
|
||||||
24: ("Janet Jackson", "Black Cat", "Rock"),
|
|
||||||
25: ("Janet Jackson", "Come Back To Me", "Rock"),
|
|
||||||
26: ("Janet Jackson", "Escapade", "Rock"),
|
|
||||||
27: ("Janet Jackson", "Love Will Never Do (Without You)", "Rock"),
|
|
||||||
28: ("Janet Jackson", "Miss You Much", "Rock"),
|
|
||||||
29: ("Janet Jackson", "Rhythm Nation", "Rock"),
|
|
||||||
30: ("Janet Jackson", "State Of The World", "Rock"),
|
|
||||||
31: ("Janet Jackson", "The Knowledge", "Rock"),
|
|
||||||
32: ("Spyro Gyra", "End of Romanticism", "Jazz"),
|
|
||||||
33: ("Spyro Gyra", "Heliopolis", "Jazz"),
|
|
||||||
34: ("Spyro Gyra", "Jubilee", "Jazz"),
|
|
||||||
35: ("Spyro Gyra", "Little Linda", "Jazz"),
|
|
||||||
36: ("Spyro Gyra", "Morning Dance", "Jazz"),
|
|
||||||
37: ("Spyro Gyra", "Song for Lorraine", "Jazz"),
|
|
||||||
38: ("Yes", "Owner Of A Lonely Heart", "Rock"),
|
|
||||||
39: ("Yes", "Rhythm Of Love", "Rock"),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class TestListCtrlPanel(wxPanel):
|
class TestListCtrlPanel(wxPanel):
|
||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
@@ -66,7 +23,7 @@ class TestListCtrlPanel(wxPanel):
|
|||||||
tID = NewId()
|
tID = NewId()
|
||||||
|
|
||||||
self.il = wxImageList(16, 16)
|
self.il = wxImageList(16, 16)
|
||||||
idx1 = self.il.Add(wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
|
idx1 = self.il.Add(wxNoRefBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
|
||||||
|
|
||||||
self.list = wxListCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
|
self.list = wxListCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
|
||||||
wxLC_REPORT|wxSUNKEN_BORDER)
|
wxLC_REPORT|wxSUNKEN_BORDER)
|
||||||
@@ -75,28 +32,22 @@ class TestListCtrlPanel(wxPanel):
|
|||||||
self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
|
self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
|
||||||
wxToolTip_Enable(true)
|
wxToolTip_Enable(true)
|
||||||
|
|
||||||
self.list.InsertColumn(0, "Artist")
|
self.list.InsertColumn(0, "Column 0")
|
||||||
self.list.InsertColumn(1, "Title")
|
self.list.InsertColumn(1, "Column 1")
|
||||||
self.list.InsertColumn(2, "Genre")
|
self.list.InsertColumn(2, "One More Column (2)")
|
||||||
items = musicdata.items()
|
for x in range(50):
|
||||||
for x in range(len(items)):
|
self.list.InsertImageStringItem(x, "This is item %d" % x, idx1)
|
||||||
key, data = items[x]
|
self.list.SetStringItem(x, 1, "Col 1, item %d" % x)
|
||||||
self.list.InsertImageStringItem(x, data[0], idx1)
|
self.list.SetStringItem(x, 2, "item %d in column 2" % x)
|
||||||
self.list.SetStringItem(x, 1, data[1])
|
|
||||||
self.list.SetStringItem(x, 2, data[2])
|
|
||||||
self.list.SetItemData(x, key)
|
|
||||||
|
|
||||||
self.list.SetColumnWidth(0, wxLIST_AUTOSIZE)
|
self.list.SetColumnWidth(0, wxLIST_AUTOSIZE)
|
||||||
self.list.SetColumnWidth(1, wxLIST_AUTOSIZE)
|
self.list.SetColumnWidth(1, wxLIST_AUTOSIZE)
|
||||||
##self.list.SetColumnWidth(2, wxLIST_AUTOSIZE)
|
self.list.SetColumnWidth(2, wxLIST_AUTOSIZE)
|
||||||
|
|
||||||
self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
|
self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
|
||||||
|
|
||||||
self.currentItem = 0
|
self.currentItem = 0
|
||||||
EVT_SIZE(self, self.OnSize)
|
|
||||||
EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected)
|
EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected)
|
||||||
EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete)
|
|
||||||
EVT_LIST_COL_CLICK(self, tID, self.OnColClick)
|
|
||||||
EVT_LEFT_DCLICK(self.list, self.OnDoubleClick)
|
EVT_LEFT_DCLICK(self.list, self.OnDoubleClick)
|
||||||
EVT_RIGHT_DOWN(self.list, self.OnRightDown)
|
EVT_RIGHT_DOWN(self.list, self.OnRightDown)
|
||||||
|
|
||||||
@@ -117,46 +68,23 @@ class TestListCtrlPanel(wxPanel):
|
|||||||
self.currentItem = event.m_itemIndex
|
self.currentItem = event.m_itemIndex
|
||||||
self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem))
|
self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem))
|
||||||
|
|
||||||
def OnItemDelete(self, event):
|
|
||||||
self.log.WriteText("OnItemDelete\n")
|
|
||||||
|
|
||||||
def OnColClick(self, event):
|
|
||||||
self.log.WriteText("OnColClick: %d\n" % event.m_col)
|
|
||||||
self.col = event.m_col
|
|
||||||
self.list.SortItems(self.ColumnSorter)
|
|
||||||
|
|
||||||
def ColumnSorter(self, key1, key2):
|
|
||||||
item1 = musicdata[key1][self.col]
|
|
||||||
item2 = musicdata[key2][self.col]
|
|
||||||
if item1 == item2: return 0
|
|
||||||
elif item1 < item2: return -1
|
|
||||||
else: return 1
|
|
||||||
|
|
||||||
|
|
||||||
def OnDoubleClick(self, event):
|
def OnDoubleClick(self, event):
|
||||||
self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem))
|
self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem))
|
||||||
|
|
||||||
|
|
||||||
def OnRightClick(self, event):
|
def OnRightClick(self, event):
|
||||||
self.log.WriteText("OnRightClick %s\n" % self.list.GetItemText(self.currentItem))
|
self.log.WriteText("OnRightClick %s\n" % self.list.GetItemText(self.currentItem))
|
||||||
menu = wxMenu()
|
self.menu = wxMenu()
|
||||||
tPopupID1 = 0
|
tPopupID1 = 0
|
||||||
tPopupID2 = 1
|
tPopupID2 = 1
|
||||||
tPopupID3 = 2
|
tPopupID3 = 2
|
||||||
tPopupID4 = 3
|
self.menu.Append(tPopupID1, "One")
|
||||||
tPopupID5 = 5
|
self.menu.Append(tPopupID2, "Two")
|
||||||
menu.Append(tPopupID1, "One")
|
self.menu.Append(tPopupID3, "Three")
|
||||||
menu.Append(tPopupID2, "Two")
|
|
||||||
menu.Append(tPopupID3, "Three")
|
|
||||||
menu.Append(tPopupID4, "DeleteAllItems")
|
|
||||||
menu.Append(tPopupID5, "GetItem")
|
|
||||||
EVT_MENU(self, tPopupID1, self.OnPopupOne)
|
EVT_MENU(self, tPopupID1, self.OnPopupOne)
|
||||||
EVT_MENU(self, tPopupID2, self.OnPopupTwo)
|
EVT_MENU(self, tPopupID2, self.OnPopupTwo)
|
||||||
EVT_MENU(self, tPopupID3, self.OnPopupThree)
|
EVT_MENU(self, tPopupID3, self.OnPopupThree)
|
||||||
EVT_MENU(self, tPopupID4, self.OnPopupFour)
|
self.PopupMenu(self.menu, self.x, self.y)
|
||||||
EVT_MENU(self, tPopupID5, self.OnPopupFive)
|
|
||||||
self.PopupMenu(menu, wxPoint(self.x, self.y))
|
|
||||||
menu.Destroy()
|
|
||||||
|
|
||||||
def OnPopupOne(self, event):
|
def OnPopupOne(self, event):
|
||||||
self.log.WriteText("Popup one\n")
|
self.log.WriteText("Popup one\n")
|
||||||
@@ -167,13 +95,6 @@ class TestListCtrlPanel(wxPanel):
|
|||||||
def OnPopupThree(self, event):
|
def OnPopupThree(self, event):
|
||||||
self.log.WriteText("Popup three\n")
|
self.log.WriteText("Popup three\n")
|
||||||
|
|
||||||
def OnPopupFour(self, event):
|
|
||||||
self.list.DeleteAllItems()
|
|
||||||
|
|
||||||
def OnPopupFive(self, event):
|
|
||||||
item = self.list.GetItem(self.currentItem)
|
|
||||||
print item.m_text, item.m_itemId, self.list.GetItemData(self.currentItem)
|
|
||||||
|
|
||||||
def OnSize(self, event):
|
def OnSize(self, event):
|
||||||
w,h = self.GetClientSizeTuple()
|
w,h = self.GetClientSizeTuple()
|
||||||
self.list.SetDimensions(0, 0, w, h)
|
self.list.SetDimensions(0, 0, w, h)
|
@@ -6,7 +6,6 @@ from wxPython.wx import *
|
|||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
dlg = wxMessageDialog(frame, 'Hello from Python and wxPython!',
|
dlg = wxMessageDialog(frame, 'Hello from Python and wxPython!',
|
||||||
'A Message Box', wxOK | wxICON_INFORMATION)
|
'A Message Box', wxOK | wxICON_INFORMATION)
|
||||||
#wxYES_NO | wxNO_DEFAULT | wxCANCEL | wxICON_INFORMATION)
|
|
||||||
dlg.ShowModal()
|
dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
|
|
@@ -10,7 +10,6 @@ class MyMiniFrame(wxMiniFrame):
|
|||||||
button = wxButton(panel, 1003, "Close Me")
|
button = wxButton(panel, 1003, "Close Me")
|
||||||
button.SetPosition(wxPoint(15, 15))
|
button.SetPosition(wxPoint(15, 15))
|
||||||
EVT_BUTTON(self, 1003, self.OnCloseMe)
|
EVT_BUTTON(self, 1003, self.OnCloseMe)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
def OnCloseMe(self, event):
|
def OnCloseMe(self, event):
|
||||||
self.Close(true)
|
self.Close(true)
|
84
utils/wxPython/demo/wxNotebook.py
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
import ColorPanel
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
|
||||||
|
testWin = wxNotebook(nb, -1)
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxBLUE)
|
||||||
|
testWin.AddPage(win, "Blue")
|
||||||
|
st = wxStaticText(win, -1,
|
||||||
|
"You can put nearly any type of window here!",
|
||||||
|
wxPoint(10, 10))
|
||||||
|
st.SetForegroundColour(wxWHITE)
|
||||||
|
st.SetBackgroundColour(wxBLUE)
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxRED)
|
||||||
|
testWin.AddPage(win, "Red")
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxGREEN)
|
||||||
|
testWin.AddPage(win, "Green")
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxCYAN)
|
||||||
|
testWin.AddPage(win, "Cyan")
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxWHITE)
|
||||||
|
testWin.AddPage(win, "White")
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxBLACK)
|
||||||
|
testWin.AddPage(win, "Black")
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxNamedColour('MIDNIGHT BLUE'))
|
||||||
|
testWin.AddPage(win, "MIDNIGHT BLUE")
|
||||||
|
|
||||||
|
win = ColorPanel.ColoredPanel(testWin, wxNamedColour('INDIAN RED'))
|
||||||
|
testWin.AddPage(win, "INDIAN RED")
|
||||||
|
|
||||||
|
return testWin
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overview = """\
|
||||||
|
This class represents a notebook control, which manages multiple windows with associated tabs.
|
||||||
|
|
||||||
|
To use the class, create a wxNotebook object and call AddPage or InsertPage, passing a window to be used as the page. Do not explicitly delete the window for a page that is currently managed by wxNotebook.
|
||||||
|
|
||||||
|
wxNotebook()
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Default constructor.
|
||||||
|
|
||||||
|
wxNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size, long style = 0, const wxString& name = "notebook")
|
||||||
|
|
||||||
|
Constructs a notebook control.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
parent = The parent window. Must be non-NULL.
|
||||||
|
|
||||||
|
id = The window identifier.
|
||||||
|
|
||||||
|
pos = The window position.
|
||||||
|
|
||||||
|
size = The window size.
|
||||||
|
|
||||||
|
style = The window style. Its value is a bit list of zero or more of wxTC_MULTILINE, wxTC_RIGHTJUSTIFY, wxTC_FIXEDWIDTH and wxTC_OWNERDRAW.
|
||||||
|
"""
|
@@ -7,23 +7,13 @@ class TestRadioButtons(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.SetBackgroundColour(wxBLUE)
|
|
||||||
|
|
||||||
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
|
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
|
||||||
'six', 'seven', 'eight']
|
'six', 'seven', 'eight']
|
||||||
|
|
||||||
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 30), wxDefaultSize,
|
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 30), wxDefaultSize,
|
||||||
sampleList, 3, wxRA_SPECIFY_COLS)
|
|
||||||
EVT_RADIOBOX(self, 30, self.EvtRadioBox)
|
|
||||||
#rb.SetBackgroundColour(wxBLUE)
|
|
||||||
rb.SetToolTip(wxToolTip("This is a ToolTip!"))
|
|
||||||
|
|
||||||
wxRadioButton(self, 32, "wxRadioButton", (235, 35))
|
|
||||||
wxRadioButton(self, 33, "wxRadioButton", (235, 55))
|
|
||||||
|
|
||||||
rb = wxRadioBox(self, 35, "", wxPoint(35, 120), wxDefaultSize,
|
|
||||||
sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER)
|
sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER)
|
||||||
EVT_RADIOBOX(self, 35, self.EvtRadioBox)
|
EVT_RADIOBOX(self, 30, self.EvtRadioBox)
|
||||||
|
|
||||||
|
|
||||||
def EvtRadioBox(self, event):
|
def EvtRadioBox(self, event):
|
@@ -17,7 +17,6 @@ class TestSashWindow(wxPanel):
|
|||||||
|
|
||||||
EVT_SASH_DRAGGED_RANGE(self, self.ID_WINDOW_TOP,
|
EVT_SASH_DRAGGED_RANGE(self, self.ID_WINDOW_TOP,
|
||||||
self.ID_WINDOW_BOTTOM, self.OnSashDrag)
|
self.ID_WINDOW_BOTTOM, self.OnSashDrag)
|
||||||
EVT_SIZE(self, self.OnSize)
|
|
||||||
|
|
||||||
|
|
||||||
# Create some layout windows
|
# Create some layout windows
|
@@ -4,25 +4,20 @@ from wxPython.wx import *
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
class MyCanvas(wxScrolledWindow):
|
class MyCanvas(wxScrolledWindow):
|
||||||
def __init__(self, parent, id = -1, size = wxDefaultSize):
|
def __init__(self, parent):
|
||||||
wxScrolledWindow.__init__(self, parent, id, wxPoint(0, 0), size, wxSUNKEN_BORDER)
|
wxScrolledWindow.__init__(self, parent, -1, wxPoint(0, 0), wxPyDefaultSize, wxSUNKEN_BORDER)
|
||||||
|
|
||||||
self.lines = []
|
self.lines = []
|
||||||
self.maxWidth = 1000
|
self.maxWidth = 1000
|
||||||
self.maxHeight = 1000
|
self.maxHeight = 1000
|
||||||
|
|
||||||
self.SetBackgroundColour(wxNamedColor("WHITE"))
|
self.SetBackgroundColour(wxNamedColor("WHITE"))
|
||||||
EVT_LEFT_DOWN(self, self.OnLeftButtonEvent)
|
self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftButtonEvent)
|
||||||
EVT_LEFT_UP(self, self.OnLeftButtonEvent)
|
self.Connect(-1, -1, wxEVT_LEFT_UP, self.OnLeftButtonEvent)
|
||||||
EVT_MOTION(self, self.OnLeftButtonEvent)
|
self.Connect(-1, -1, wxEVT_MOTION, self.OnLeftButtonEvent)
|
||||||
|
|
||||||
EVT_PAINT(self, self.OnPaint)
|
|
||||||
|
|
||||||
|
|
||||||
self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
|
self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
|
||||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||||
mask = wxMaskColour(bmp, wxBLUE)
|
|
||||||
bmp.SetMask(mask)
|
|
||||||
self.bmp = bmp
|
self.bmp = bmp
|
||||||
|
|
||||||
self.SetScrollbars(20, 20, self.maxWidth/20, self.maxHeight/20)
|
self.SetScrollbars(20, 20, self.maxWidth/20, self.maxHeight/20)
|
||||||
@@ -66,29 +61,14 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
dc.SetPen(wxGREEN_PEN)
|
dc.SetPen(wxGREEN_PEN)
|
||||||
dc.DrawSpline(lst+[(100,100)])
|
dc.DrawSpline(lst+[(100,100)])
|
||||||
|
|
||||||
dc.DrawBitmap(self.bmp, 200, 20, true)
|
dc.DrawBitmap(self.bmp, 200, 20)
|
||||||
dc.SetTextForeground(wxColour(0, 0xFF, 0x80))
|
dc.SetTextForeground(wxColour(0, 0xFF, 0x80))
|
||||||
dc.DrawText("a bitmap", 200, 85)
|
dc.DrawText("a bitmap", 200, 85)
|
||||||
|
|
||||||
font = wxFont(20, wxSWISS, wxNORMAL, wxNORMAL)
|
|
||||||
dc.SetFont(font)
|
|
||||||
dc.SetTextForeground(wxBLACK)
|
|
||||||
for a in range(0, 360, 45):
|
|
||||||
dc.DrawRotatedText("Rotated text...", 300, 300, a)
|
|
||||||
|
|
||||||
dc.SetPen(wxTRANSPARENT_PEN)
|
|
||||||
dc.SetBrush(wxBLUE_BRUSH)
|
|
||||||
dc.DrawRectangle(50,500,50,50)
|
|
||||||
dc.DrawRectangle(100,500,50,50)
|
|
||||||
|
|
||||||
#from wxPython import dch
|
|
||||||
#dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK)
|
|
||||||
|
|
||||||
self.DrawSavedLines(dc)
|
self.DrawSavedLines(dc)
|
||||||
dc.EndDrawing()
|
dc.EndDrawing()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def DrawSavedLines(self, dc):
|
def DrawSavedLines(self, dc):
|
||||||
dc.SetPen(wxPen(wxNamedColour('MEDIUM FOREST GREEN'), 4))
|
dc.SetPen(wxPen(wxNamedColour('MEDIUM FOREST GREEN'), 4))
|
||||||
for line in self.lines:
|
for line in self.lines:
|
||||||
@@ -109,7 +89,6 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
if event.LeftDown():
|
if event.LeftDown():
|
||||||
self.SetXY(event)
|
self.SetXY(event)
|
||||||
self.curLine = []
|
self.curLine = []
|
||||||
self.CaptureMouse()
|
|
||||||
|
|
||||||
elif event.Dragging():
|
elif event.Dragging():
|
||||||
dc = wxClientDC(self)
|
dc = wxClientDC(self)
|
||||||
@@ -125,7 +104,6 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
elif event.LeftUp():
|
elif event.LeftUp():
|
||||||
self.lines.append(self.curLine)
|
self.lines.append(self.curLine)
|
||||||
self.curLine = []
|
self.curLine = []
|
||||||
self.ReleaseMouse()
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
@@ -17,8 +17,7 @@ class TestPanel(wxPanel):
|
|||||||
|
|
||||||
self.text = wxTextCtrl(self, -1, "1", wxPoint(30, 50), wxSize(60, -1))
|
self.text = wxTextCtrl(self, -1, "1", wxPoint(30, 50), wxSize(60, -1))
|
||||||
h = self.text.GetSize().height
|
h = self.text.GetSize().height
|
||||||
self.spin = wxSpinButton(self, 20, wxPoint(92, 50), wxSize(h, h),
|
self.spin = wxSpinButton(self, 20, wxPoint(92, 50), wxSize(h*2, h))
|
||||||
wxSP_VERTICAL)
|
|
||||||
self.spin.SetRange(1, 100)
|
self.spin.SetRange(1, 100)
|
||||||
self.spin.SetValue(1)
|
self.spin.SetValue(1)
|
||||||
|
|
@@ -2,21 +2,10 @@
|
|||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class MySplitter(wxSplitterWindow):
|
|
||||||
def __init__(self, parent, ID, log):
|
|
||||||
wxSplitterWindow.__init__(self, parent, ID)
|
|
||||||
self.log = log
|
|
||||||
EVT_SPLITTER_SASH_POS_CHANGED(self, self.GetId(), self.OnSashChanged)
|
|
||||||
|
|
||||||
def OnSashChanged(self, evt):
|
|
||||||
self.log.WriteText("sash changed to " + str(evt.GetSashPosition()))
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
splitter = MySplitter(nb, -1, log)
|
splitter = wxSplitterWindow(nb, -1)
|
||||||
|
|
||||||
p1 = wxWindow(splitter, -1)
|
p1 = wxWindow(splitter, -1)
|
||||||
p1.SetBackgroundColour(wxRED)
|
p1.SetBackgroundColour(wxRED)
|
||||||
@@ -26,9 +15,9 @@ def runTest(frame, nb, log):
|
|||||||
p2.SetBackgroundColour(wxBLUE)
|
p2.SetBackgroundColour(wxBLUE)
|
||||||
wxStaticText(p2, -1, "Panel Two", wxPoint(5,5)).SetBackgroundColour(wxBLUE)
|
wxStaticText(p2, -1, "Panel Two", wxPoint(5,5)).SetBackgroundColour(wxBLUE)
|
||||||
|
|
||||||
splitter.SetMinimumPaneSize(20)
|
|
||||||
splitter.SplitVertically(p1, p2)
|
splitter.SplitVertically(p1, p2)
|
||||||
splitter.SetSashPosition(100)
|
splitter.SetSashPosition(100)
|
||||||
|
splitter.SetMinimumPaneSize(20)
|
||||||
|
|
||||||
return splitter
|
return splitter
|
||||||
|
|
@@ -10,7 +10,6 @@ class CustomStatusBar(wxStatusBar):
|
|||||||
wxStatusBar.__init__(self, parent, -1)
|
wxStatusBar.__init__(self, parent, -1)
|
||||||
self.SetFieldsCount(3)
|
self.SetFieldsCount(3)
|
||||||
self.log = log
|
self.log = log
|
||||||
EVT_SIZE(self, self.OnSize)
|
|
||||||
|
|
||||||
self.SetStatusText("A Custom StatusBar...", 0)
|
self.SetStatusText("A Custom StatusBar...", 0)
|
||||||
|
|
||||||
@@ -63,7 +62,6 @@ class TestCustomStatusBar(wxFrame):
|
|||||||
|
|
||||||
self.sb = CustomStatusBar(self, log)
|
self.sb = CustomStatusBar(self, log)
|
||||||
self.SetStatusBar(self.sb)
|
self.SetStatusBar(self.sb)
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
||||||
self.sb.timer.Stop()
|
self.sb.timer.Stop()
|
@@ -9,8 +9,7 @@ class TestPanel(wxPanel):
|
|||||||
self.log = log
|
self.log = log
|
||||||
|
|
||||||
wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, 25), wxSize(75, 20))
|
wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, 25), wxSize(75, 20))
|
||||||
t = wxTextCtrl(self, 10, "Test it out and see", wxPoint(80, 25), wxSize(150, 20))
|
wxTextCtrl(self, 10, "", wxPoint(80, 25), wxSize(150, 20))
|
||||||
t.SetInsertionPoint(0)
|
|
||||||
EVT_TEXT(self, 10, self.EvtText)
|
EVT_TEXT(self, 10, self.EvtText)
|
||||||
|
|
||||||
wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20))
|
wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20))
|
||||||
@@ -18,8 +17,7 @@ class TestPanel(wxPanel):
|
|||||||
EVT_TEXT(self, 20, self.EvtText)
|
EVT_TEXT(self, 20, self.EvtText)
|
||||||
|
|
||||||
wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20))
|
wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20))
|
||||||
t = wxTextCtrl(self, 30, "How does it work with a long line of text set in the control", wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE)
|
wxTextCtrl(self, 30, "", wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE)
|
||||||
t.SetInsertionPoint(0)
|
|
||||||
EVT_TEXT(self, 30, self.EvtText)
|
EVT_TEXT(self, 30, self.EvtText)
|
||||||
|
|
||||||
def EvtText(self, event):
|
def EvtText(self, event):
|
@@ -29,7 +29,7 @@ class TestTimerWin(wxPanel):
|
|||||||
wxPoint(15, 30))
|
wxPoint(15, 30))
|
||||||
|
|
||||||
wxButton(self, 11101, ' Start ', wxPoint(15, 75), wxDefaultSize)
|
wxButton(self, 11101, ' Start ', wxPoint(15, 75), wxDefaultSize)
|
||||||
wxButton(self, 11102, ' Stop ', wxPoint(115, 75), wxDefaultSize)
|
wxButton(self, 11102, ' Stop ', wxPoint(77, 75), wxDefaultSize)
|
||||||
EVT_BUTTON(self, 11101, self.OnStart)
|
EVT_BUTTON(self, 11101, self.OnStart)
|
||||||
EVT_BUTTON(self, 11102, self.OnStop)
|
EVT_BUTTON(self, 11102, self.OnStop)
|
||||||
|
|
@@ -11,51 +11,48 @@ class TestToolBar(wxFrame):
|
|||||||
|
|
||||||
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
|
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
|
||||||
|
|
||||||
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER) #|wxTB_FLAT)
|
tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER)
|
||||||
#tb = wxToolBar(self, -1, wxDefaultPosition, wxDefaultSize,
|
#tb = wxToolBar(self, -1, wxDefaultPosition, wxDefaultSize,
|
||||||
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
|
# wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT)
|
||||||
#self.SetToolBar(tb)
|
#self.SetToolBar(tb)
|
||||||
|
|
||||||
self.CreateStatusBar()
|
self.CreateStatusBar()
|
||||||
|
|
||||||
tb.AddSimpleTool(10, wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP),
|
tb.AddTool(10, wxNoRefBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP),
|
||||||
"New", "Long help for 'New'")
|
wxNullBitmap, false, -1, -1, "New", "Long help for 'New'")
|
||||||
EVT_TOOL(self, 10, self.OnToolClick)
|
EVT_TOOL(self, 10, self.OnToolClick)
|
||||||
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
|
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
|
||||||
|
|
||||||
tb.AddSimpleTool(20, wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP), "Open")
|
tb.AddTool(20, wxNoRefBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP),
|
||||||
|
wxNullBitmap, false, -1, -1, "Open")
|
||||||
EVT_TOOL(self, 20, self.OnToolClick)
|
EVT_TOOL(self, 20, self.OnToolClick)
|
||||||
EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick)
|
EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick)
|
||||||
|
|
||||||
tb.AddSeparator()
|
tb.AddSeparator()
|
||||||
tb.AddSimpleTool(30, wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP), "Copy")
|
tb.AddTool(30, wxNoRefBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP),
|
||||||
|
wxNullBitmap, false, -1, -1, "Copy")
|
||||||
EVT_TOOL(self, 30, self.OnToolClick)
|
EVT_TOOL(self, 30, self.OnToolClick)
|
||||||
EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick)
|
EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick)
|
||||||
|
|
||||||
tb.AddSimpleTool(40, wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP), "Paste")
|
tb.AddTool(40, wxNoRefBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP),
|
||||||
|
wxNullBitmap, false, -1, -1, "Paste")
|
||||||
EVT_TOOL(self, 40, self.OnToolClick)
|
EVT_TOOL(self, 40, self.OnToolClick)
|
||||||
EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick)
|
EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick)
|
||||||
|
|
||||||
tb.AddSeparator()
|
tb.AddSeparator()
|
||||||
|
|
||||||
tool = tb.AddTool(50, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
|
tb.AddTool(50, wxNoRefBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
|
||||||
shortHelpString="Toggle this", toggle=true)
|
wxNullBitmap, true, -1, -1, "Toggle this")
|
||||||
EVT_TOOL(self, 50, self.OnToolClick)
|
EVT_TOOL(self, 50, self.OnToolClick)
|
||||||
EVT_TOOL_RCLICKED(self, 50, self.OnToolRClick)
|
EVT_TOOL_RCLICKED(self, 50, self.OnToolRClick)
|
||||||
|
|
||||||
tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
|
tb.AddTool(60, wxNoRefBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
|
||||||
wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP),
|
wxNoRefBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP),
|
||||||
shortHelpString="Toggle with 2 bitmaps", toggle=true)
|
true, -1, -1, "Toggle with 2 bitmaps")
|
||||||
EVT_TOOL(self, 60, self.OnToolClick)
|
EVT_TOOL(self, 60, self.OnToolClick)
|
||||||
EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick)
|
EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick)
|
||||||
|
|
||||||
|
|
||||||
tb.AddSeparator()
|
|
||||||
tb.AddControl(wxComboBox(tb, -1, "", choices=["", "This", "is a", "wxComboBox"],
|
|
||||||
size=(150,-1), style=wxCB_DROPDOWN))
|
|
||||||
|
|
||||||
tb.Realize()
|
tb.Realize()
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
|
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
118
utils/wxPython/demo/wxTreeCtrl.py
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class TestTreeCtrlPanel(wxPanel):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
|
self.log = log
|
||||||
|
tID = NewId()
|
||||||
|
|
||||||
|
self.tree = wxTreeCtrl(self, tID)
|
||||||
|
root = self.tree.AddRoot("The Root Item")
|
||||||
|
for x in range(15):
|
||||||
|
child = self.tree.AppendItem(root, "Item %d" % x)
|
||||||
|
for y in range(5):
|
||||||
|
last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
|
||||||
|
for z in range(5):
|
||||||
|
self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z))
|
||||||
|
|
||||||
|
self.tree.Expand(root)
|
||||||
|
EVT_TREE_ITEM_EXPANDED (self, tID, self.OnItemExpanded)
|
||||||
|
EVT_TREE_ITEM_COLLAPSED (self, tID, self.OnItemCollapsed)
|
||||||
|
EVT_TREE_SEL_CHANGED (self, tID, self.OnSelChanged)
|
||||||
|
|
||||||
|
EVT_LEFT_DCLICK(self.tree, self.OnLeftDClick)
|
||||||
|
EVT_RIGHT_DOWN(self.tree, self.OnRightClick)
|
||||||
|
EVT_RIGHT_UP(self.tree, self.OnRightUp)
|
||||||
|
|
||||||
|
def OnRightClick(self, event):
|
||||||
|
(x,y) = event.Position();
|
||||||
|
item = self.tree.HitTest(wxPoint(x,y))
|
||||||
|
self.log.WriteText("OnRightClick: %s\n" % self.tree.GetItemText(item))
|
||||||
|
self.tree.SelectItem(item)
|
||||||
|
|
||||||
|
def OnRightUp(self, event):
|
||||||
|
(x,y) = event.Position();
|
||||||
|
item = self.tree.HitTest(wxPoint(x,y))
|
||||||
|
self.log.WriteText("OnRightUp: %s\n" % self.tree.GetItemText(item))
|
||||||
|
|
||||||
|
def OnLeftDClick(self, event):
|
||||||
|
(x,y) = event.Position();
|
||||||
|
item = self.tree.HitTest(wxPoint(x,y))
|
||||||
|
self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item))
|
||||||
|
|
||||||
|
|
||||||
|
def OnSize(self, event):
|
||||||
|
w,h = self.GetClientSizeTuple()
|
||||||
|
self.tree.SetDimensions(0, 0, w, h)
|
||||||
|
|
||||||
|
|
||||||
|
def OnItemExpanded(self, event):
|
||||||
|
item = event.GetItem()
|
||||||
|
self.log.WriteText("OnItemExpanded: %s\n" % self.tree.GetItemText(item))
|
||||||
|
|
||||||
|
def OnItemCollapsed(self, event):
|
||||||
|
item = event.GetItem()
|
||||||
|
self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item))
|
||||||
|
|
||||||
|
def OnSelChanged(self, event):
|
||||||
|
item = event.GetItem()
|
||||||
|
self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(item))
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
win = TestTreeCtrlPanel(nb, log)
|
||||||
|
return win
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
overview = """\
|
||||||
|
A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles.
|
||||||
|
|
||||||
|
wxTreeCtrl()
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Default constructor.
|
||||||
|
|
||||||
|
wxTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
|
||||||
|
|
||||||
|
Constructor, creating and showing a tree control.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
parent = Parent window. Must not be NULL.
|
||||||
|
|
||||||
|
id = Window identifier. A value of -1 indicates a default value.
|
||||||
|
|
||||||
|
pos = Window position.
|
||||||
|
|
||||||
|
size = Window size. If the default size (-1, -1) is specified then the window is sized appropriately.
|
||||||
|
|
||||||
|
style = Window style. See wxTreeCtrl.
|
||||||
|
|
||||||
|
validator = Window validator.
|
||||||
|
|
||||||
|
name = Window name.
|
||||||
|
"""
|
@@ -1,6 +1,6 @@
|
|||||||
*.gz
|
*.gz
|
||||||
*.rpm
|
*.rpm
|
||||||
*.zip
|
*.zip
|
||||||
build.pyc
|
|
||||||
filelist
|
filelist
|
||||||
|
wxPython.spec
|
||||||
wxp2.wse
|
wxp2.wse
|
5
utils/wxPython/distrib/.rpmrc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
sourcedir : .
|
||||||
|
builddir : .
|
||||||
|
rpmdir : .
|
||||||
|
srcrpmdir : .
|
||||||
|
|
26
utils/wxPython/distrib/makerpm
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z $1 ]; then
|
||||||
|
echo "Please specify a version number on the command line."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f wxPython.spec.in ]; then
|
||||||
|
echo "Please run this script from the directory containing the wxPython.spec.in file."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
strip /usr/lib/python1.5/site-packages/wxPython/wxcmodule.so
|
||||||
|
|
||||||
|
cat wxPython.spec.in | sed s/__VERSION__/$1/g > wxPython.spec
|
||||||
|
|
||||||
|
mkdir /usr/doc/wxPython-$1
|
||||||
|
cp ../README.txt /usr/doc/wxPython-$1
|
||||||
|
|
||||||
|
rpm -bb wxPython.spec
|
||||||
|
|
||||||
|
mv /usr/src/redhat/RPMS/*/wxPython*.rpm .
|
||||||
|
|
||||||
|
rm -r /usr/doc/wxPython-$1
|
36
utils/wxPython/distrib/maketgz
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
# Make a source distribution as a tar.gz file. This script should be
|
||||||
|
# run from the directory that holds the wxPython dir (../..) and be
|
||||||
|
# given a version number as an parameter. The best way to do this is
|
||||||
|
# run "make dist" in the wxPython/src/ directory.
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z $1 ]; then
|
||||||
|
echo "Please specify a version number on the command line."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d wxPython ]; then
|
||||||
|
echo "Please run this script from the directory containing the wxPython sources."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
rm -f wxPython/distrib/filelist
|
||||||
|
for x in `cat wxPython/distrib/wxPython.rsp`; do
|
||||||
|
ls $x >> wxPython/distrib/filelist
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
tar cf wxPython/distrib/dist-temp.tar -T wxPython/distrib/filelist
|
||||||
|
cd wxPython/distrib
|
||||||
|
tar xf dist-temp.tar
|
||||||
|
rm dist-temp.tar
|
||||||
|
mv wxPython wxPython-$1
|
||||||
|
|
||||||
|
tar cvf wxPython-$1.tar wxPython-$1
|
||||||
|
gzip wxPython-$1.tar
|
||||||
|
|
||||||
|
rm -rf wxPython-$1
|
||||||
|
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
44
utils/wxPython/distrib/wxPython.rsp
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
wxPython/*.txt
|
||||||
|
|
||||||
|
wxPython/demo/*.py
|
||||||
|
wxPython/demo/bitmaps/*.bmp
|
||||||
|
wxPython/demo/bitmaps/*.ico
|
||||||
|
wxPython/demo/bitmaps/*.gif
|
||||||
|
wxPython/demo/bitmaps/*.png
|
||||||
|
wxPython/demo/bitmaps/*.jpg
|
||||||
|
wxPython/demo/README.txt
|
||||||
|
|
||||||
|
wxPython/lib/*.py
|
||||||
|
wxPython/lib/*.txt
|
||||||
|
wxPython/lib/sizers/*.py
|
||||||
|
wxPython/lib/sizers/*.txt
|
||||||
|
|
||||||
|
|
||||||
|
wxPython/src/*.i
|
||||||
|
wxPython/src/*.py
|
||||||
|
wxPython/src/*.cpp
|
||||||
|
wxPython/src/*.h
|
||||||
|
wxPython/src/*.ico
|
||||||
|
wxPython/src/*.def
|
||||||
|
wxPython/src/*.rc
|
||||||
|
wxPython/src/makefile.*
|
||||||
|
wxPython/src/Makefile.pre.in
|
||||||
|
wxPython/src/Setup.*
|
||||||
|
|
||||||
|
wxPython/src/msw/*.cpp
|
||||||
|
wxPython/src/msw/*.h
|
||||||
|
wxPython/src/msw/*.py
|
||||||
|
|
||||||
|
wxPython/src/gtk/*.cpp
|
||||||
|
wxPython/src/gtk/*.h
|
||||||
|
wxPython/src/gtk/*.py
|
||||||
|
|
||||||
|
wxpython/src/motif/*.cpp
|
||||||
|
wxPython/src/motif/*.h
|
||||||
|
wxPython/src/motif/*.py
|
||||||
|
|
||||||
|
wxPython/src/qt/*.cpp
|
||||||
|
wxPython/src/qt/*.h
|
||||||
|
wxPython/src/qt/*.py
|
||||||
|
|
||||||
|
wxPython/SWIG.patches/*.patch
|
41
utils/wxPython/distrib/wxPython.spec.in
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
Summary: Cross platform GUI toolkit for use with the Python language.
|
||||||
|
Name: wxPython
|
||||||
|
Version: __VERSION__
|
||||||
|
Release: 1
|
||||||
|
Copyright: wxWindows
|
||||||
|
Group: Development/Languages/Python
|
||||||
|
Source: http://alldunn.com/wxPython/wxPython-__VERSION__.tar.gz
|
||||||
|
Packager: Robin Dunn <robin@alldunn.com>
|
||||||
|
Vendor: Total Control Software
|
||||||
|
Requires: python >= 1.5.1
|
||||||
|
Prefix: /usr/lib/python1.5/site-packages
|
||||||
|
|
||||||
|
%description
|
||||||
|
|
||||||
|
This Python package consists of an extension module that wraps around the
|
||||||
|
wxWindows C++ class library and provides a cross platform GUI toolkit for
|
||||||
|
use with Python. Currently supported platforms are Win32 and Unix/GTK/X.
|
||||||
|
|
||||||
|
Python is an interpreted, interactive, object-oriented programming language.
|
||||||
|
Python combines remarkable power with very clear syntax. It has modules,
|
||||||
|
classes, exceptions, very high level dynamic data types, and dynamic typing.
|
||||||
|
There are interfaces to many system calls and libraries, and new built-in
|
||||||
|
modules are easily written in C or C++. Python is also usable as an
|
||||||
|
extension language for applications that need a programmable interface.
|
||||||
|
|
||||||
|
#%prep
|
||||||
|
#%setup
|
||||||
|
#cd wxPython-__VERSION__
|
||||||
|
#make -f Makefile.pre.in boot
|
||||||
|
#
|
||||||
|
#%build
|
||||||
|
#make
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#%install
|
||||||
|
#make install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc /usr/doc/wxPython-__VERSION__/README.txt
|
||||||
|
/usr/lib/python1.5/site-packages/wxPython
|
||||||
|
|
@@ -17,7 +17,7 @@ item: Global
|
|||||||
Patch Flags=0000000000001001
|
Patch Flags=0000000000001001
|
||||||
Patch Threshold=85
|
Patch Threshold=85
|
||||||
Patch Memory=4000
|
Patch Memory=4000
|
||||||
EXE Filename=wxPython-2.1.16.exe
|
EXE Filename=wxPython-2.1b1.exe
|
||||||
FTP Cluster Size=20
|
FTP Cluster Size=20
|
||||||
Per-User Version ID=1
|
Per-User Version ID=1
|
||||||
Dialogs Version=6
|
Dialogs Version=6
|
||||||
@@ -25,7 +25,7 @@ item: Global
|
|||||||
Variable Default1=C:\WINNT\System32
|
Variable Default1=C:\WINNT\System32
|
||||||
Variable Flags1=00001000
|
Variable Flags1=00001000
|
||||||
Variable Name2=_WISE_
|
Variable Name2=_WISE_
|
||||||
Variable Default2=C:\Tools\Wise
|
Variable Default2=E:\Tools\Wise
|
||||||
Variable Flags2=00001000
|
Variable Flags2=00001000
|
||||||
Variable Name3=_ODBC16_
|
Variable Name3=_ODBC16_
|
||||||
Variable Default3=C:\WINNT\System32
|
Variable Default3=C:\WINNT\System32
|
||||||
@@ -72,10 +72,6 @@ item: Set Variable
|
|||||||
Value=wxPython
|
Value=wxPython
|
||||||
Flags=10000000
|
Flags=10000000
|
||||||
end
|
end
|
||||||
item: Set Variable
|
|
||||||
Variable=DLLVER
|
|
||||||
Value=wx21_16
|
|
||||||
end
|
|
||||||
item: Check Configuration
|
item: Check Configuration
|
||||||
Flags=10111011
|
Flags=10111011
|
||||||
end
|
end
|
||||||
@@ -195,7 +191,7 @@ end
|
|||||||
item: End Block
|
item: End Block
|
||||||
end
|
end
|
||||||
item: Display Graphic
|
item: Display Graphic
|
||||||
Pathname=C:\PROJECTS\wx\wxPython\distrib\wxPython.bmp
|
Pathname=e:\Projects\wx\utils\wxPython\distrib\wxPython.BMP
|
||||||
X Position=32784
|
X Position=32784
|
||||||
Y Position=16
|
Y Position=16
|
||||||
Flags=0000001010000000
|
Flags=0000001010000000
|
||||||
@@ -318,9 +314,9 @@ item: Custom Dialog Set
|
|||||||
Text=
|
Text=
|
||||||
Text=Click Cancel to quit Setup and close any programs you have running. Click Next to continue with the Setup program .
|
Text=Click Cancel to quit Setup and close any programs you have running. Click Next to continue with the Setup program .
|
||||||
Text=
|
Text=
|
||||||
Text=WARNING: Although this program is OpenSource, it is still protected by copyright law and international treaties. See wxWindows Library Licence, Version 3 for details.
|
Text=WARNING: This program is protected by copyright law and international treaties.
|
||||||
Text=
|
|
||||||
Text=
|
Text=
|
||||||
|
Text=Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under law.
|
||||||
Text French=Il vous est fortement recommandé de fermer tous les programmes Windows avant d'exécuter le Programme d'Installation
|
Text French=Il vous est fortement recommandé de fermer tous les programmes Windows avant d'exécuter le Programme d'Installation
|
||||||
Text French=
|
Text French=
|
||||||
Text French=Cliquez sur Annuler pour quitter l'Installation et fermez tous les programmes actuellement utilisés. Cliquez sur Suivant pour continuer l'installation
|
Text French=Cliquez sur Annuler pour quitter l'Installation et fermez tous les programmes actuellement utilisés. Cliquez sur Suivant pour continuer l'installation
|
||||||
@@ -808,191 +804,123 @@ item: Check Disk Space
|
|||||||
end
|
end
|
||||||
item: Remark
|
item: Remark
|
||||||
end
|
end
|
||||||
|
remarked item: If/While Statement
|
||||||
|
Variable=COMPONENTS
|
||||||
|
Value=A
|
||||||
|
Flags=00001010
|
||||||
|
end
|
||||||
|
remarked item: End Block
|
||||||
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\WINNT\System32\Msvcirt.dll
|
Source=d:\WINNT\System32\Msvcirt.dll
|
||||||
Destination=%SYS%\Msvcirt.dll
|
Destination=%SYS%\Msvcirt.dll
|
||||||
Flags=0000001010000011
|
Flags=0000001010000011
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\WINNT\System32\Msvcrt.dll
|
Source=d:\WINNT\System32\Msvcrt.dll
|
||||||
Destination=%SYS%\Msvcrt.dll
|
Destination=%SYS%\Msvcrt.dll
|
||||||
Flags=0000001010000011
|
Flags=0000001010000011
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\projects\wx\lib\wx21_16.dll
|
Source=e:\projects\wx\lib\wx200.dll
|
||||||
Destination=%SYS%\wx21_16.dll
|
Destination=%SYS%\wx200.dll
|
||||||
Flags=0000001010010010
|
Flags=0000001010010010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\wxPython\*.py
|
Source=e:\Projects\wx\utils\wxPython\*.py
|
||||||
Destination=%MAINDIR%\wxPython
|
Destination=%MAINDIR%\wxPython
|
||||||
Description=wxPython shadow class modules
|
Description=wxPython shadow class modules
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\wxPython\*.pyd
|
Source=e:\Projects\wx\utils\wxPython\*.pyd
|
||||||
Destination=%MAINDIR%\wxPython
|
Destination=%MAINDIR%\wxPython\
|
||||||
Description=wxPython extension modules
|
Description=wxPython extension modules
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\wxPython\*.txt
|
Source=e:\Projects\wx\utils\wxPython\README.txt
|
||||||
Destination=%MAINDIR%\wxPython
|
Destination=%MAINDIR%\wxPython\README.txt
|
||||||
Description=README file
|
Description=README file
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\wxPython\lib\*.py
|
Source=e:\Projects\wx\utils\wxPython\lib\*.py
|
||||||
Destination=%MAINDIR%\wxPython\lib
|
Destination=%MAINDIR%\wxPython\lib
|
||||||
Description=wxPython Standard Library
|
Description=wxPython Standard Library
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\wxPython\lib\sizers\*.py
|
Source=e:\Projects\wx\utils\wxPython\lib\sizers\*.py
|
||||||
Destination=%MAINDIR%\wxPython\lib\sizers
|
Destination=%MAINDIR%\wxPython\lib\sizers
|
||||||
Description=wxPython Standard Library
|
Description=wxPython Standard Library
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\wxPython\lib\editor\*.py
|
Source=e:\Projects\wx\utils\wxPython\demo\*.py
|
||||||
Destination=%MAINDIR%\wxPython\lib\editor
|
|
||||||
Description=wxPython Standard Library
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\*.py
|
|
||||||
Destination=%MAINDIR%\wxPython\demo
|
Destination=%MAINDIR%\wxPython\demo
|
||||||
Description=Demos
|
Description=Demos
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\demo\README.txt
|
Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.bmp
|
||||||
Destination=%MAINDIR%\wxPython\demo\README.txt
|
|
||||||
Description=Demos
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\*.xml
|
|
||||||
Destination=%MAINDIR%\wxPython\demo
|
|
||||||
Description=Demos
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\bitmaps\*.bmp
|
|
||||||
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
||||||
Description=Demos
|
Description=Demos
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\demo\bitmaps\*.gif
|
Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.gif
|
||||||
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
||||||
Description=Demos
|
Description=Demos
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\demo\bitmaps\*.jpg
|
Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.jpg
|
||||||
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
||||||
Description=Demos
|
Description=Demos
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\demo\bitmaps\*.png
|
Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.png
|
||||||
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
||||||
Description=Demos
|
Description=Demos
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=c:\Projects\wx\wxPython\demo\bitmaps\*.ico
|
Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.ico
|
||||||
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
Destination=%MAINDIR%\wxPython\demo\bitmaps
|
||||||
Description=Demos
|
Description=Demos
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\data\*.htm
|
|
||||||
Destination=%MAINDIR%\wxPython\demo\data
|
|
||||||
Description=Demos
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\data\*.png
|
|
||||||
Destination=%MAINDIR%\wxPython\demo\data
|
|
||||||
Description=Demos
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\data\grid.i
|
|
||||||
Destination=%MAINDIR%\wxPython\demo\data\grid.i
|
|
||||||
Description=Demos
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\data\stc.h
|
|
||||||
Destination=%MAINDIR%\wxPython\demo\data\stc.h
|
|
||||||
Description=Demos
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\Projects\wx\wxPython\demo\data\tips.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\demo\data\tips.txt
|
|
||||||
Description=Demos
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=C:\PROJECTS\wx\wxPython\README.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\README.txt
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=C:\PROJECTS\wx\wxPython\CHANGES.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\CHANGES.txt
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Remark
|
item: Remark
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=C:\PROJECTS\wx\docs\htmlhelp\wx.chm
|
Source=E:\PROJECTS\wx\docs\html\wx\wx.chm
|
||||||
Destination=%MAINDIR%\wxPython\docs\wx.chm
|
Destination=%MAINDIR%\wxPython\docs\wx.chm
|
||||||
Description=wxPython documentation
|
Description=wxPython documentation
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
|
||||||
Source=c:\PROJECTS\wx\docs\html\ogl\ogl.chm
|
|
||||||
Destination=%MAINDIR%\wxPython\docs\ogl.chm
|
|
||||||
Description=wxPython documentation
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\PROJECTS\wx\docs\preamble.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\docs\preamble.txt
|
|
||||||
Description=wxPython documentation
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\PROJECTS\wx\docs\licence.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\docs\licence.txt
|
|
||||||
Description=wxPython documentation
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\PROJECTS\wx\docs\licendoc.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\docs\licendoc.txt
|
|
||||||
Description=wxPython documentation
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\PROJECTS\wx\docs\lgpl.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\docs\lgpl.txt
|
|
||||||
Description=wxPython documentation
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Install File
|
|
||||||
Source=c:\PROJECTS\wx\docs\gpl.txt
|
|
||||||
Destination=%MAINDIR%\wxPython\docs\gpl.txt
|
|
||||||
Description=wxPython documentation
|
|
||||||
Flags=0000000010000010
|
|
||||||
end
|
|
||||||
item: Remark
|
item: Remark
|
||||||
end
|
end
|
||||||
|
remarked item: If/While Statement
|
||||||
|
Variable=COMPONENTS
|
||||||
|
Value=B
|
||||||
|
Flags=00001010
|
||||||
|
end
|
||||||
|
remarked item: Install File
|
||||||
|
Source=e:\projects\wx\docs\html\wx\*.*
|
||||||
|
Destination=%MAINDIR%\wxPython\docs
|
||||||
|
Description=wxPython documentation
|
||||||
|
Flags=0000000010000010
|
||||||
|
end
|
||||||
|
remarked item: Install File
|
||||||
|
Source=e:\projects\wx\docs\html\wx\wx.htm
|
||||||
|
Destination=%MAINDIR%\wxPython\docs\index.htm
|
||||||
|
Description=wxPython documentation
|
||||||
|
Flags=0000000010000010
|
||||||
|
end
|
||||||
|
remarked item: End Block
|
||||||
|
end
|
||||||
item: Remark
|
item: Remark
|
||||||
end
|
end
|
||||||
item: Remark
|
item: Remark
|
||||||
@@ -1144,53 +1072,23 @@ item: Set Variable
|
|||||||
Value=%GROUPDIR%\%GROUP%
|
Value=%GROUPDIR%\%GROUP%
|
||||||
end
|
end
|
||||||
item: Create Shortcut
|
item: Create Shortcut
|
||||||
Source=%PYTHONDIR%\pythonw.exe
|
Source=%UNINSTALL_PATH%
|
||||||
|
Destination=%CGROUPDIR%\%CGROUP_SAVE%\Uninstall %APPTITLE%.lnk
|
||||||
|
Command Options=%INST_LOG_PATH%
|
||||||
|
Icon Number=0
|
||||||
|
end
|
||||||
|
item: Create Shortcut
|
||||||
|
Source=pythonw.exe
|
||||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\Run the DEMO.lnk
|
Destination=%CGROUPDIR%\%CGROUP_SAVE%\Run the DEMO.lnk
|
||||||
Command Options=demo.py
|
Command Options=demo.py
|
||||||
Working Directory=%MAINDIR%\wxPython\demo
|
Working Directory=%MAINDIR%\wxPython\demo
|
||||||
Icon Number=0
|
Icon Number=0
|
||||||
Key Type=1536
|
|
||||||
Flags=00000001
|
|
||||||
end
|
end
|
||||||
item: Create Shortcut
|
item: Create Shortcut
|
||||||
Source=%MAINDIR%\wxPython\docs\wx.chm
|
Source=%MAINDIR%\wxPython\docs\wx.chm
|
||||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\wxWindows User Guide.lnk
|
Destination=%CGROUPDIR%\%CGROUP_SAVE%\wxWindows User Guide.lnk
|
||||||
Icon Number=0
|
Icon Number=0
|
||||||
end
|
end
|
||||||
item: Create Shortcut
|
|
||||||
Source=%MAINDIR%\wxPython\docs\ogl.chm
|
|
||||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\wxOGL User Guide.lnk
|
|
||||||
Icon Number=0
|
|
||||||
Key Type=1536
|
|
||||||
Flags=00000001
|
|
||||||
end
|
|
||||||
item: Create Shortcut
|
|
||||||
Source=%MAINDIR%\wxPython\docs\licence.txt
|
|
||||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\License.lnk
|
|
||||||
Icon Number=0
|
|
||||||
Key Type=1536
|
|
||||||
Flags=00000001
|
|
||||||
end
|
|
||||||
item: Create Shortcut
|
|
||||||
Source=%MAINDIR%\wxPython\README.txt
|
|
||||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\ReadMe.lnk
|
|
||||||
Icon Number=0
|
|
||||||
Key Type=1536
|
|
||||||
Flags=00000001
|
|
||||||
end
|
|
||||||
item: Create Shortcut
|
|
||||||
Source=%MAINDIR%\wxPython\CHANGES.txt
|
|
||||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\Changes.lnk
|
|
||||||
Icon Number=0
|
|
||||||
Key Type=1536
|
|
||||||
Flags=00000001
|
|
||||||
end
|
|
||||||
item: Create Shortcut
|
|
||||||
Source=%UNINSTALL_PATH%
|
|
||||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\Uninstall %APPTITLE%.lnk
|
|
||||||
Command Options=%INST_LOG_PATH%
|
|
||||||
Icon Number=0
|
|
||||||
end
|
|
||||||
item: Else Statement
|
item: Else Statement
|
||||||
end
|
end
|
||||||
item: Add ProgMan Icon
|
item: Add ProgMan Icon
|
BIN
utils/wxPython/distrib/wxPython.wsm
Normal file
17
utils/wxPython/distrib/zipit.bat
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
zip -@ -r wxPython\wxPython-src-%1.zip < wxPython\distrib\wxPython.rsp
|
||||||
|
|
||||||
|
mkdir wxPython\docs
|
||||||
|
copy %WXWIN%\docs\html\wx\*.gif wxPython\docs
|
||||||
|
copy %WXWIN%\docs\html\wx\*.htm wxPython\docs
|
||||||
|
copy wxPython\docs\wx.htm wxPython\docs\index.htm
|
||||||
|
|
||||||
|
zip -r wxPython\wxPython-docs-%1.zip wxPython\docs
|
||||||
|
|
||||||
|
del /y wxPython\docs\*.*
|
||||||
|
rmdir wxPython\docs
|
||||||
|
|
||||||
|
move /R wxPython\*.zip wxPython\distrib
|
@@ -19,7 +19,7 @@ class wxScrolledMessageDialog(wxDialog):
|
|||||||
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
|
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
|
||||||
ok.SetConstraints(Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,)))
|
ok.SetConstraints(Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,)))
|
||||||
self.SetAutoLayout(TRUE)
|
self.SetAutoLayout(TRUE)
|
||||||
self.Layout()
|
|
||||||
|
|
||||||
|
|
||||||
class wxMultipleChoiceDialog(wxDialog):
|
class wxMultipleChoiceDialog(wxDialog):
|
||||||
@@ -47,8 +47,6 @@ class wxMultipleChoiceDialog(wxDialog):
|
|||||||
cancel.SetConstraints(Layoutf('b=b5#1;x%w75#1;w!80;h!25', (self,)))
|
cancel.SetConstraints(Layoutf('b=b5#1;x%w75#1;w!80;h!25', (self,)))
|
||||||
self.SetAutoLayout(TRUE)
|
self.SetAutoLayout(TRUE)
|
||||||
self.lst = lst
|
self.lst = lst
|
||||||
self.Layout()
|
|
||||||
EVT_SIZE(self, self.OnSize)
|
|
||||||
|
|
||||||
def OnSize(self, event):
|
def OnSize(self, event):
|
||||||
self.Layout()
|
self.Layout()
|
@@ -200,7 +200,6 @@ if __name__=='__main__':
|
|||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wxFrame.__init__(self, parent, -1, 'Test Layout Constraints',
|
wxFrame.__init__(self, parent, -1, 'Test Layout Constraints',
|
||||||
wxPyDefaultPosition, wxSize(500, 300))
|
wxPyDefaultPosition, wxSize(500, 300))
|
||||||
EVT_CLOSE(self, self.OnCloseWindow)
|
|
||||||
|
|
||||||
self.SetAutoLayout(true)
|
self.SetAutoLayout(true)
|
||||||
EVT_BUTTON(self, 100, self.OnButton)
|
EVT_BUTTON(self, 100, self.OnButton)
|
18
utils/wxPython/lib/sizers/__init__.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Name: __init__.py
|
||||||
|
# Purpose: The presence of this file turns this directory into a
|
||||||
|
# Python package.
|
||||||
|
#
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 18-May-1999
|
||||||
|
# RCS-ID: $Id$
|
||||||
|
# Copyright: (c) 1998 by Total Control Software
|
||||||
|
# Licence: wxWindows license
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
from sizer import *
|
||||||
|
from box import *
|
||||||
|
from border import *
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
@@ -55,8 +55,6 @@ class wxSizer:
|
|||||||
the Add method.
|
the Add method.
|
||||||
"""
|
"""
|
||||||
for childinfo in widgets:
|
for childinfo in widgets:
|
||||||
if type(childinfo) != type(()):
|
|
||||||
childinfo = (childinfo, )
|
|
||||||
apply(self.Add, childinfo)
|
apply(self.Add, childinfo)
|
||||||
|
|
||||||
|
|
@@ -176,7 +176,6 @@ class PlotCanvas(wx.wxWindow):
|
|||||||
self.SetBackgroundColour(wx.wxNamedColour("white"))
|
self.SetBackgroundColour(wx.wxNamedColour("white"))
|
||||||
|
|
||||||
wx.EVT_SIZE(self,self.reconfigure)
|
wx.EVT_SIZE(self,self.reconfigure)
|
||||||
wx.EVT_PAINT(self, self.OnPaint)
|
|
||||||
self._setsize()
|
self._setsize()
|
||||||
self.last_draw = None
|
self.last_draw = None
|
||||||
# self.font = self._testFont(font)
|
# self.font = self._testFont(font)
|
||||||
@@ -447,6 +446,8 @@ Are you sure you want to do this?""", "Danger!", wx.wxYES_NO)
|
|||||||
about = wx.wxMessageDialog(self, __doc__, "About...", wx.wxOK)
|
about = wx.wxMessageDialog(self, __doc__, "About...", wx.wxOK)
|
||||||
about.ShowModal()
|
about.ShowModal()
|
||||||
|
|
||||||
|
def OnCloseWindow(self, event):
|
||||||
|
self.Destroy()
|
||||||
|
|
||||||
|
|
||||||
class MyApp(wx.wxApp):
|
class MyApp(wx.wxApp):
|
@@ -6,33 +6,25 @@ Setup.in.new
|
|||||||
Setup.save
|
Setup.save
|
||||||
Setup.save
|
Setup.save
|
||||||
Setup.test
|
Setup.test
|
||||||
_make.bat
|
|
||||||
build.local
|
|
||||||
compile.py
|
compile.py
|
||||||
config.c
|
config.c
|
||||||
glcanvas.h
|
glcanvas.h
|
||||||
glcanvasc.exp
|
glcanvasc.exp
|
||||||
libwxPyHelpers.2.1.so.16.0.0
|
|
||||||
make.bat
|
make.bat
|
||||||
makefile.test
|
makefile.test
|
||||||
sedscript
|
sedscript
|
||||||
templates
|
templates
|
||||||
tests___Win32_Debug
|
|
||||||
transfer.zip
|
transfer.zip
|
||||||
utilsc.exp
|
utilsc.exp
|
||||||
vc50.pdb
|
vc50.pdb
|
||||||
vc60.pdb
|
vc60.pdb
|
||||||
wx.py
|
|
||||||
wxPython.001
|
wxPython.001
|
||||||
wxPython.dsp
|
wxPython.dsp
|
||||||
wxPython.dsw
|
wxPython.dsw
|
||||||
wxPython.ncb
|
wxPython.ncb
|
||||||
wxPython.opt
|
wxPython.opt
|
||||||
wxc.exp
|
wxc.exp
|
||||||
wxc.ilk
|
|
||||||
wxc.lib
|
wxc.lib
|
||||||
wxc.pch
|
|
||||||
wxc.pyd
|
|
||||||
wxc.res
|
wxc.res
|
||||||
wxp.pch
|
wxp.pch
|
||||||
wxpc.exp
|
wxpc.exp
|
429
utils/wxPython/src/Makefile.pre.in
Normal file
@@ -0,0 +1,429 @@
|
|||||||
|
# Universal Unix Makefile for Python extensions
|
||||||
|
# =============================================
|
||||||
|
|
||||||
|
# Short Instructions
|
||||||
|
# ------------------
|
||||||
|
|
||||||
|
# 1. Build and install Python (1.5 or newer).
|
||||||
|
# 2. "make -f Makefile.pre.in boot"
|
||||||
|
# 3. "make"
|
||||||
|
# You should now have a shared library.
|
||||||
|
|
||||||
|
# Long Instructions
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
# Build *and install* the basic Python 1.5 distribution. See the
|
||||||
|
# Python README for instructions. (This version of Makefile.pre.in
|
||||||
|
# only withs with Python 1.5, alpha 3 or newer.)
|
||||||
|
|
||||||
|
# Create a file Setup.in for your extension. This file follows the
|
||||||
|
# format of the Modules/Setup.in file; see the instructions there.
|
||||||
|
# For a simple module called "spam" on file "spammodule.c", it can
|
||||||
|
# contain a single line:
|
||||||
|
# spam spammodule.c
|
||||||
|
# You can build as many modules as you want in the same directory --
|
||||||
|
# just have a separate line for each of them in the Setup.in file.
|
||||||
|
|
||||||
|
# If you want to build your extension as a shared library, insert a
|
||||||
|
# line containing just the string
|
||||||
|
# *shared*
|
||||||
|
# at the top of your Setup.in file.
|
||||||
|
|
||||||
|
# Note that the build process copies Setup.in to Setup, and then works
|
||||||
|
# with Setup. It doesn't overwrite Setup when Setup.in is changed, so
|
||||||
|
# while you're in the process of debugging your Setup.in file, you may
|
||||||
|
# want to edit Setup instead, and copy it back to Setup.in later.
|
||||||
|
# (All this is done so you can distribute your extension easily and
|
||||||
|
# someone else can select the modules they actually want to build by
|
||||||
|
# commenting out lines in the Setup file, without editing the
|
||||||
|
# original. Editing Setup is also used to specify nonstandard
|
||||||
|
# locations for include or library files.)
|
||||||
|
|
||||||
|
# Copy this file (Misc/Makefile.pre.in) to the directory containing
|
||||||
|
# your extension.
|
||||||
|
|
||||||
|
# Run "make -f Makefile.pre.in boot". This creates Makefile
|
||||||
|
# (producing Makefile.pre and sedscript as intermediate files) and
|
||||||
|
# config.c, incorporating the values for sys.prefix, sys.exec_prefix
|
||||||
|
# and sys.version from the installed Python binary. For this to work,
|
||||||
|
# the python binary must be on your path. If this fails, try
|
||||||
|
# make -f Makefile.pre.in Makefile VERSION=1.5 installdir=<prefix>
|
||||||
|
# where <prefix> is the prefix used to install Python for installdir
|
||||||
|
# (and possibly similar for exec_installdir=<exec_prefix>).
|
||||||
|
|
||||||
|
# Note: "make boot" implies "make clobber" -- it assumes that when you
|
||||||
|
# bootstrap you may have changed platforms so it removes all previous
|
||||||
|
# output files.
|
||||||
|
|
||||||
|
# If you are building your extension as a shared library (your
|
||||||
|
# Setup.in file starts with *shared*), run "make" or "make sharedmods"
|
||||||
|
# to build the shared library files. If you are building a statically
|
||||||
|
# linked Python binary (the only solution of your platform doesn't
|
||||||
|
# support shared libraries, and sometimes handy if you want to
|
||||||
|
# distribute or install the resulting Python binary), run "make
|
||||||
|
# python".
|
||||||
|
|
||||||
|
# Note: Each time you edit Makefile.pre.in or Setup, you must run
|
||||||
|
# "make Makefile" before running "make".
|
||||||
|
|
||||||
|
# Hint: if you want to use VPATH, you can start in an empty
|
||||||
|
# subdirectory and say (e.g.):
|
||||||
|
# make -f ../Makefile.pre.in boot srcdir=.. VPATH=..
|
||||||
|
|
||||||
|
|
||||||
|
# === Bootstrap variables (edited through "make boot") ===
|
||||||
|
|
||||||
|
# The prefix used by "make inclinstall libainstall" of core python
|
||||||
|
installdir= /usr/local
|
||||||
|
|
||||||
|
# The exec_prefix used by the same
|
||||||
|
exec_installdir=$(installdir)
|
||||||
|
|
||||||
|
# Source directory and VPATH in case you want to use VPATH.
|
||||||
|
# (You will have to edit these two lines yourself -- there is no
|
||||||
|
# automatic support as the Makefile is not generated by
|
||||||
|
# config.status.)
|
||||||
|
srcdir= .
|
||||||
|
VPATH= .
|
||||||
|
|
||||||
|
# === Variables that you may want to customize (rarely) ===
|
||||||
|
|
||||||
|
# (Static) build target
|
||||||
|
TARGET= python
|
||||||
|
|
||||||
|
# Installed python binary (used only by boot target)
|
||||||
|
PYTHON= python
|
||||||
|
|
||||||
|
# Add more -I and -D options here
|
||||||
|
CFLAGS= $(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS)
|
||||||
|
|
||||||
|
# These two variables can be set in Setup to merge extensions.
|
||||||
|
# See example[23].
|
||||||
|
BASELIB=
|
||||||
|
BASESETUP=
|
||||||
|
|
||||||
|
# === Variables set by makesetup ===
|
||||||
|
|
||||||
|
MODOBJS= _MODOBJS_
|
||||||
|
MODLIBS= _MODLIBS_
|
||||||
|
|
||||||
|
# === Definitions added by makesetup ===
|
||||||
|
|
||||||
|
# === Variables from configure (through sedscript) ===
|
||||||
|
|
||||||
|
VERSION= @VERSION@
|
||||||
|
CC= @CC@
|
||||||
|
LINKCC= @LINKCC@
|
||||||
|
SGI_ABI= @SGI_ABI@
|
||||||
|
OPT= @OPT@
|
||||||
|
LDFLAGS= @LDFLAGS@
|
||||||
|
LDLAST= @LDLAST@
|
||||||
|
DEFS= @DEFS@
|
||||||
|
LIBS= @LIBS@
|
||||||
|
LIBM= @LIBM@
|
||||||
|
LIBC= @LIBC@
|
||||||
|
RANLIB= @RANLIB@
|
||||||
|
MACHDEP= @MACHDEP@
|
||||||
|
SO= @SO@
|
||||||
|
LDSHARED= @LDSHARED@
|
||||||
|
CCSHARED= @CCSHARED@
|
||||||
|
LINKFORSHARED= @LINKFORSHARED@
|
||||||
|
#@SET_CCC@
|
||||||
|
|
||||||
|
# Install prefix for architecture-independent files
|
||||||
|
prefix= /usr/local
|
||||||
|
|
||||||
|
# Install prefix for architecture-dependent files
|
||||||
|
exec_prefix= $(prefix)
|
||||||
|
|
||||||
|
# === Fixed definitions ===
|
||||||
|
|
||||||
|
# Shell used by make (some versions default to the login shell, which is bad)
|
||||||
|
SHELL= /bin/sh
|
||||||
|
|
||||||
|
# Expanded directories
|
||||||
|
BINDIR= $(exec_installdir)/bin
|
||||||
|
LIBDIR= $(exec_prefix)/lib
|
||||||
|
MANDIR= $(installdir)/man
|
||||||
|
INCLUDEDIR= $(installdir)/include
|
||||||
|
SCRIPTDIR= $(prefix)/lib
|
||||||
|
|
||||||
|
# Detailed destination directories
|
||||||
|
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||||
|
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
|
||||||
|
INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
|
||||||
|
EXECINCLUDEPY= $(exec_installdir)/include/python$(VERSION)
|
||||||
|
LIBP= $(exec_installdir)/lib/python$(VERSION)
|
||||||
|
DESTSHARED= $(BINLIBDEST)/site-packages
|
||||||
|
|
||||||
|
LIBPL= $(LIBP)/config
|
||||||
|
|
||||||
|
PYTHONLIBS= $(LIBPL)/libpython$(VERSION).a
|
||||||
|
|
||||||
|
MAKESETUP= $(LIBPL)/makesetup
|
||||||
|
MAKEFILE= $(LIBPL)/Makefile
|
||||||
|
CONFIGC= $(LIBPL)/config.c
|
||||||
|
CONFIGCIN= $(LIBPL)/config.c.in
|
||||||
|
SETUP= $(LIBPL)/Setup
|
||||||
|
|
||||||
|
SYSLIBS= $(LIBM) $(LIBC)
|
||||||
|
|
||||||
|
ADDOBJS= $(LIBPL)/python.o config.o
|
||||||
|
|
||||||
|
# Portable install script (configure doesn't always guess right)
|
||||||
|
INSTALL= $(LIBPL)/install-sh -c
|
||||||
|
# Shared libraries must be installed with executable mode on some systems;
|
||||||
|
# rather than figuring out exactly which, we always give them executable mode.
|
||||||
|
# Also, making them read-only seems to be a good idea...
|
||||||
|
INSTALL_SHARED= ${INSTALL} -m 555
|
||||||
|
|
||||||
|
#---------------------------------------------------
|
||||||
|
# Possibly change some definintions for C++
|
||||||
|
ifdef MY_LDSHARED
|
||||||
|
LDSHARED=$(MY_LDSHARED)
|
||||||
|
endif
|
||||||
|
ifdef MY_LINKCC
|
||||||
|
LINKCC=$(MY_LINKCC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# === Fixed rules ===
|
||||||
|
|
||||||
|
# Default target. This builds shared libraries only
|
||||||
|
default: sharedmods
|
||||||
|
|
||||||
|
# Build everything
|
||||||
|
all: static sharedmods
|
||||||
|
|
||||||
|
# Build shared libraries from our extension modules
|
||||||
|
sharedmods: $(SHAREDMODS)
|
||||||
|
|
||||||
|
# Build a static Python binary containing our extension modules
|
||||||
|
static: $(TARGET)
|
||||||
|
$(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB)
|
||||||
|
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) \
|
||||||
|
$(ADDOBJS) lib.a $(PYTHONLIBS) \
|
||||||
|
$(LINKPATH) $(BASELIB) $(MODLIBS) $(LIBS) $(SYSLIBS) \
|
||||||
|
-o $(TARGET) $(LDLAST)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
# This is a default version of the install target for wxPython. It just
|
||||||
|
# redirects to wxInstall below...
|
||||||
|
|
||||||
|
install: wxInstall
|
||||||
|
|
||||||
|
#install: sharedmods
|
||||||
|
# if test ! -d $(DESTSHARED) ; then \
|
||||||
|
# mkdir $(DESTSHARED) ; else true ; fi
|
||||||
|
# -for i in X $(SHAREDMODS); do \
|
||||||
|
# if test $$i != X; \
|
||||||
|
# then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
|
||||||
|
# fi; \
|
||||||
|
# done
|
||||||
|
|
||||||
|
|
||||||
|
# Build the library containing our extension modules
|
||||||
|
lib.a: $(MODOBJS)
|
||||||
|
-rm -f lib.a
|
||||||
|
ar cr lib.a $(MODOBJS)
|
||||||
|
-$(RANLIB) lib.a
|
||||||
|
|
||||||
|
# This runs makesetup *twice* to use the BASESETUP definition from Setup
|
||||||
|
config.c Makefile: Makefile.pre Setup $(BASESETUP) $(MAKESETUP)
|
||||||
|
$(MAKESETUP) \
|
||||||
|
-m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
|
||||||
|
$(MAKE) -f Makefile do-it-again
|
||||||
|
|
||||||
|
# Internal target to run makesetup for the second time
|
||||||
|
do-it-again:
|
||||||
|
$(MAKESETUP) \
|
||||||
|
-m Makefile.pre -c $(CONFIGCIN) Setup -n $(BASESETUP) $(SETUP)
|
||||||
|
|
||||||
|
# Make config.o from the config.c created by makesetup
|
||||||
|
config.o: config.c
|
||||||
|
$(CC) $(CFLAGS) -c config.c
|
||||||
|
|
||||||
|
# Setup is copied from Setup.in *only* if it doesn't yet exist
|
||||||
|
Setup:
|
||||||
|
cp Setup.in Setup
|
||||||
|
|
||||||
|
# Make the intermediate Makefile.pre from Makefile.pre.in
|
||||||
|
Makefile.pre: Makefile.pre.in sedscript
|
||||||
|
sed -f sedscript Makefile.pre.in >Makefile.pre
|
||||||
|
|
||||||
|
# Shortcuts to make the sed arguments on one line
|
||||||
|
P=prefix
|
||||||
|
E=exec_prefix
|
||||||
|
H=Generated automatically from Makefile.pre.in by sedscript.
|
||||||
|
L=LINKFORSHARED
|
||||||
|
|
||||||
|
# Make the sed script used to create Makefile.pre from Makefile.pre.in
|
||||||
|
sedscript: $(MAKEFILE)
|
||||||
|
sed -n \
|
||||||
|
-e '1s/.*/1i\\/p' \
|
||||||
|
-e '2s%.*%# $H%p' \
|
||||||
|
-e '/^VERSION=/s/^VERSION=[ ]*\(.*\)/s%@VERSION[@]%\1%/p' \
|
||||||
|
-e '/^CC=/s/^CC=[ ]*\(.*\)/s%@CC[@]%\1%/p' \
|
||||||
|
-e '/^CCC=/s/^CCC=[ ]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
|
||||||
|
-e '/^LINKCC=/s/^LINKCC=[ ]*\(.*\)/s%@LINKCC[@]%\1%/p' \
|
||||||
|
-e '/^OPT=/s/^OPT=[ ]*\(.*\)/s%@OPT[@]%\1%/p' \
|
||||||
|
-e '/^LDFLAGS=/s/^LDFLAGS=[ ]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
|
||||||
|
-e '/^DEFS=/s/^DEFS=[ ]*\(.*\)/s%@DEFS[@]%\1%/p' \
|
||||||
|
-e '/^LIBS=/s/^LIBS=[ ]*\(.*\)/s%@LIBS[@]%\1%/p' \
|
||||||
|
-e '/^LIBM=/s/^LIBM=[ ]*\(.*\)/s%@LIBM[@]%\1%/p' \
|
||||||
|
-e '/^LIBC=/s/^LIBC=[ ]*\(.*\)/s%@LIBC[@]%\1%/p' \
|
||||||
|
-e '/^RANLIB=/s/^RANLIB=[ ]*\(.*\)/s%@RANLIB[@]%\1%/p' \
|
||||||
|
-e '/^MACHDEP=/s/^MACHDEP=[ ]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
|
||||||
|
-e '/^SO=/s/^SO=[ ]*\(.*\)/s%@SO[@]%\1%/p' \
|
||||||
|
-e '/^LDSHARED=/s/^LDSHARED=[ ]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
|
||||||
|
-e '/^CCSHARED=/s/^CCSHARED=[ ]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
|
||||||
|
-e '/^$L=/s/^$L=[ ]*\(.*\)/s%@$L[@]%\1%/p' \
|
||||||
|
-e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
|
||||||
|
-e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \
|
||||||
|
$(MAKEFILE) >sedscript
|
||||||
|
echo "/^#@SET_CCC@/d" >>sedscript
|
||||||
|
echo "/^installdir=/s%=.*%= $(installdir)%" >>sedscript
|
||||||
|
echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript
|
||||||
|
echo "/^srcdir=/s%=.*%= $(srcdir)%" >>sedscript
|
||||||
|
echo "/^VPATH=/s%=.*%= $(VPATH)%" >>sedscript
|
||||||
|
echo "/^LINKPATH=/s%=.*%= $(LINKPATH)%" >>sedscript
|
||||||
|
echo "/^BASELIB=/s%=.*%= $(BASELIB)%" >>sedscript
|
||||||
|
echo "/^BASESETUP=/s%=.*%= $(BASESETUP)%" >>sedscript
|
||||||
|
|
||||||
|
# Bootstrap target
|
||||||
|
boot: clobber
|
||||||
|
VERSION=`$(PYTHON) -c "import sys; print sys.version[:3]"`; \
|
||||||
|
installdir=`$(PYTHON) -c "import sys; print sys.prefix"`; \
|
||||||
|
exec_installdir=`$(PYTHON) -c "import sys; print sys.exec_prefix"`; \
|
||||||
|
$(MAKE) -f Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \
|
||||||
|
VERSION=$$VERSION \
|
||||||
|
installdir=$$installdir \
|
||||||
|
exec_installdir=$$exec_installdir \
|
||||||
|
Makefile
|
||||||
|
|
||||||
|
# Handy target to remove intermediate files and backups
|
||||||
|
clean:
|
||||||
|
-rm -f *.o *~
|
||||||
|
|
||||||
|
# Handy target to remove everything that is easily regenerated
|
||||||
|
clobber: clean
|
||||||
|
-rm -f *.a tags TAGS config.c Makefile.pre $(TARGET) sedscript
|
||||||
|
-rm -f *.so *.sl so_locations
|
||||||
|
|
||||||
|
|
||||||
|
# Handy target to remove everything you don't want to distribute
|
||||||
|
distclean: clobber
|
||||||
|
-rm -f Makefile Setup
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
# Custom rules and dependencies added for wxPython
|
||||||
|
#
|
||||||
|
|
||||||
|
WXP_VERSION=2.1b1
|
||||||
|
|
||||||
|
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__ $(SEPARATE)
|
||||||
|
|
||||||
|
|
||||||
|
PYMODULES = $(GENCODEDIR)/wx.py $(GENCODEDIR)/events.py \
|
||||||
|
$(GENCODEDIR)/windows.py $(GENCODEDIR)/misc.py \
|
||||||
|
$(GENCODEDIR)/gdi.py $(GENCODEDIR)/mdi.py \
|
||||||
|
$(GENCODEDIR)/controls.py $(GENCODEDIR)/controls2.py \
|
||||||
|
$(GENCODEDIR)/windows2.py $(GENCODEDIR)/cmndlgs.py \
|
||||||
|
$(GENCODEDIR)/stattool.py $(GENCODEDIR)/frames.py \
|
||||||
|
$(GENCODEDIR)/windows3.py __init__.py \
|
||||||
|
$(GENCODEDIR)/utils.py $(GENCODEDIR)/image.py \
|
||||||
|
$(GENCODEDIR)/printfw.py $(GENCODEDIR)/misc2.py \
|
||||||
|
$(GENCODEDIR)/glcanvas.py
|
||||||
|
|
||||||
|
|
||||||
|
# Implicit rules to run SWIG
|
||||||
|
$(GENCODEDIR)/%.cpp : %.i
|
||||||
|
swig $(SWIGFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
$(GENCODEDIR)/%.py : %.i
|
||||||
|
swig $(SWIGFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
|
# This one must leave out the -c flag so we define the whole rule
|
||||||
|
$(GENCODEDIR)/wx.cpp $(GENCODEDIR)/wx.py : wx.i my_typemaps.i _defs.i _extras.py
|
||||||
|
swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i
|
||||||
|
|
||||||
|
|
||||||
|
# define some dependencies
|
||||||
|
$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/misc2.cpp $(GENCODEDIR)/misc2.py : misc2.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py : image.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/printfw.cpp $(GENCODEDIR)/printfw.py : printfw.i my_typemaps.i _defs.i
|
||||||
|
$(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py : glcanvas.i my_typemaps.i _defs.i
|
||||||
|
|
||||||
|
$(GENCODEDIR)/helpers.cpp:
|
||||||
|
ln -s `pwd`/helpers.cpp $@
|
||||||
|
|
||||||
|
$(GENCODEDIR)/_glcanvas.cpp:
|
||||||
|
-cp $(WXWIN)/utils/glcanvas/$(GENCODEDIR)/glcanvas.cpp $@
|
||||||
|
-cp $(WXWIN)/utils/glcanvas/$(GENCODEDIR)/glcanvas.h ./glcanvas.h
|
||||||
|
|
||||||
|
|
||||||
|
wxInstall : sharedmods $(PYMODULES)
|
||||||
|
if test ! -d $(TARGETDIR) ; then \
|
||||||
|
mkdir $(TARGETDIR) ; else true ; fi
|
||||||
|
if [ "$(SHAREDMODS)" != "" ]; then \
|
||||||
|
chmod 755 $(SHAREDMODS); \
|
||||||
|
cp $(SHAREDMODS) $(TARGETDIR); fi
|
||||||
|
-for i in $(PYMODULES); do \
|
||||||
|
cp $$i $(TARGETDIR); \
|
||||||
|
done
|
||||||
|
if [ "$(TARGETDIR)" != ".." ]; then \
|
||||||
|
mkdir $(TARGETDIR)/lib; \
|
||||||
|
mkdir $(TARGETDIR)/lib/sizers; \
|
||||||
|
mkdir $(TARGETDIR)/demo; \
|
||||||
|
mkdir $(TARGETDIR)/demo/bitmaps; \
|
||||||
|
cp ../lib/*.py $(TARGETDIR)/lib; \
|
||||||
|
cp ../lib/sizers/*.py $(TARGETDIR)/lib/sizers; \
|
||||||
|
cp ../demo/*.py $(TARGETDIR)/demo; \
|
||||||
|
cp ../lib/*.txt $(TARGETDIR)/lib; \
|
||||||
|
cp ../lib/sizers/*.txt $(TARGETDIR)/lib/sizers; \
|
||||||
|
cp ../demo/*.txt $(TARGETDIR)/demo; \
|
||||||
|
cp ../demo/bitmaps/[a-z]* $(TARGETDIR)/demo/bitmaps; \
|
||||||
|
fi
|
||||||
|
if [ "$(TARGETDIR)" != ".." ]; then \
|
||||||
|
python $(LIBDEST)/compileall.py $(TARGETDIR); \
|
||||||
|
python -O $(LIBDEST)/compileall.py $(TARGETDIR); \
|
||||||
|
else \
|
||||||
|
python $(LIBDEST)/compileall.py -l $(TARGETDIR); \
|
||||||
|
python -O $(LIBDEST)/compileall.py -l $(TARGETDIR);\
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lib : libwxPython.a
|
||||||
|
|
||||||
|
libwxPython.a : lib.a
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
|
dist: tgz rpm
|
||||||
|
|
||||||
|
tgz:
|
||||||
|
cd ../..; wxPython/distrib/maketgz $(WXP_VERSION)
|
||||||
|
|
||||||
|
rpm:
|
||||||
|
cd ../distrib; ./makerpm $(WXP_VERSION)
|
||||||
|
|
45
utils/wxPython/src/Setup.in
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
## This file gives the details of what is needed to build this extension
|
||||||
|
## module so the Makefile can be created.
|
||||||
|
|
||||||
|
## If you have not done "make install" for wxWindows then see Setup.in.linux
|
||||||
|
## for a more verbose version of this file.
|
||||||
|
|
||||||
|
*shared*
|
||||||
|
|
||||||
|
CCC=c++
|
||||||
|
WXWIN=../../..
|
||||||
|
GENCODEDIR=gtk
|
||||||
|
srcdir=$(GENCODEDIR)
|
||||||
|
WX_CONFIG_CFLAGS=`wx-config --cflags`
|
||||||
|
WX_CONFIG_LIBS=`wx-config --libs`
|
||||||
|
|
||||||
|
|
||||||
|
## Depending on how your Python was built, you may have to set this
|
||||||
|
## value to use the C++ driver to link with instead of the default
|
||||||
|
## C driver. For example:
|
||||||
|
MY_LDSHARED=$(CCC) -shared
|
||||||
|
|
||||||
|
## Same as above, but for statically linking Python and wxPython together,
|
||||||
|
## in other words, if you comment out the *shared* above. If this is the
|
||||||
|
## case then you should ensure that the main() function is Python's, not
|
||||||
|
## wxWindows'. You can rebuild $(WXWIN)/src/gtk/app.cpp with NOMAIN defined
|
||||||
|
## to force this...
|
||||||
|
MY_LINKCC=$(CCC)
|
||||||
|
|
||||||
|
|
||||||
|
## Pick one of these, or set your own. This is where the wxPython module
|
||||||
|
## should be installed. It should be a subdirectory named wxPython.
|
||||||
|
#TARGETDIR=..
|
||||||
|
TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
|
||||||
|
|
||||||
|
|
||||||
|
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp misc2.cpp gdi.cpp \
|
||||||
|
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
|
||||||
|
frames.cpp stattool.cpp windows3.cpp image.cpp printfw.cpp \
|
||||||
|
utils.cpp \
|
||||||
|
## comment out the next line to disable wxGLCanvas
|
||||||
|
_glcanvas.cpp glcanvas.cpp -DWITH_GLCANVAS -lGL -lGLU \
|
||||||
|
-I. $(WX_CONFIG_CFLAGS) -I/usr/local/lib/glib/include \
|
||||||
|
-DSWIG_GLOBAL -DWXP_USE_THREAD $(SEPARATE) -Xlinker $(WX_CONFIG_LIBS)
|
||||||
|
|
||||||
|
##-Xlinker -Bstatic
|
56
utils/wxPython/src/Setup.in.linux
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# This file gives the details of what is needed to build this extension
|
||||||
|
# module so the Makefile can be created.
|
||||||
|
|
||||||
|
###
|
||||||
|
### This file should be created by configure. Currently it is tweaked by hand.
|
||||||
|
###
|
||||||
|
|
||||||
|
*shared*
|
||||||
|
|
||||||
|
CCC=c++
|
||||||
|
WXWIN=../../..
|
||||||
|
GENCODEDIR=gtk
|
||||||
|
srcdir=$(GENCODEDIR)
|
||||||
|
|
||||||
|
# Depending on how your Python was built, you may have to set this
|
||||||
|
# value to use the C++ driver to link with instead of the default
|
||||||
|
# C driver. For example:
|
||||||
|
MY_LDSHARED=$(CCC) -shared
|
||||||
|
|
||||||
|
# Same as above, but for statically linking Python and wxPython together,
|
||||||
|
# in other words, if you comment out the *shared* above. If this is the
|
||||||
|
# case then you should ensure that the main() function is Python's, not
|
||||||
|
# wxWindows'. You can rebuild $(WXWIN)/src/gtk/app.cpp with NOMAIN defined
|
||||||
|
# to force this...
|
||||||
|
MY_LINKCC=$(CCC)
|
||||||
|
|
||||||
|
|
||||||
|
## Pick one of these, or set your own. This is where the
|
||||||
|
## wxPython module should be installed. It should be a
|
||||||
|
## subdirectory named wxPython.
|
||||||
|
TARGETDIR=..
|
||||||
|
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
|
||||||
|
|
||||||
|
SEPARATE=-DSEPARATE
|
||||||
|
|
||||||
|
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
||||||
|
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
|
||||||
|
frames.cpp stattool.cpp windows3.cpp \
|
||||||
|
# CFLAGS
|
||||||
|
-I. -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
|
||||||
|
-I/usr/X11R6/include -DSWIG_GLOBAL -D__WXGTK__ \
|
||||||
|
-DWXP_WITH_THREAD $(SEPARATE) \
|
||||||
|
#-D__WXDEBUG__ \
|
||||||
|
# LFLAGS
|
||||||
|
-L$(WXWIN)/lib/Linux -L/usr/X11R6/lib \
|
||||||
|
-lwx_gtk2 -lgtk -lgdk -lglib -lXext -lX11
|
||||||
|
|
||||||
|
utilsc utils.cpp \
|
||||||
|
# CFLAGS
|
||||||
|
-I. -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
|
||||||
|
-I/usr/X11R6/include -DSWIG_GLOBAL -D__WXGTK__ \
|
||||||
|
-DWXP_WITH_THREAD $(SEPARATE) \
|
||||||
|
#-D__WXDEBUG__ \
|
||||||
|
# LFLAGS
|
||||||
|
-L$(WXWIN)/lib/Linux -L/usr/X11R6/lib \
|
||||||
|
-lwx_gtk2 -lgtk -lgdk -lglib -lXext -lX11
|
45
utils/wxPython/src/Setup.in.solaris
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# This file gives the details of what is needed to build this extension
|
||||||
|
# module so the Makefile can be created.
|
||||||
|
|
||||||
|
###
|
||||||
|
### This file should be created by configure. Currently it is tweaked by hand.
|
||||||
|
###
|
||||||
|
|
||||||
|
#*shared*
|
||||||
|
|
||||||
|
CCC=c++
|
||||||
|
WXWIN=../../..
|
||||||
|
GENCODEDIR=gtk
|
||||||
|
srcdir=$(GENCODEDIR)
|
||||||
|
|
||||||
|
# Depending on how your Python was built, you may have to set this
|
||||||
|
# value to use the C++ driver to link with instead of the default
|
||||||
|
# C driver. For example:
|
||||||
|
#MY_LDSHARED=$(CCC) -shared
|
||||||
|
|
||||||
|
# Same as above, but for statically linking Python and wxPython together,
|
||||||
|
# in other words, if you comment out the *shared* above. If this is the
|
||||||
|
# case then you should ensure that the main() function is Python's, not
|
||||||
|
# wxWindows'. You can rebuild $(WXWIN)/src/gtk/app.cpp with NOMAIN defined
|
||||||
|
# to force this...
|
||||||
|
MY_LINKCC=$(CCC)
|
||||||
|
|
||||||
|
|
||||||
|
## Pick one of these, or set your own. This is where the
|
||||||
|
## wxPython module should be installed. It should be a
|
||||||
|
## subdirectory named wxPython.
|
||||||
|
TARGETDIR=..
|
||||||
|
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
|
||||||
|
|
||||||
|
|
||||||
|
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
||||||
|
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
|
||||||
|
frames.cpp stattool.cpp utils.cpp windows3.cpp \
|
||||||
|
# CFLAGS
|
||||||
|
-I. -I$(WXWIN)/include -I/usr/local/lib/glib/include -I$(WXWIN)/src \
|
||||||
|
-I/usr/X/include -DSWIG_GLOBAL -D__WXGTK__ \
|
||||||
|
#-D__WXDEBUG__ \
|
||||||
|
# LFLAGS
|
||||||
|
-L$(WXWIN)/lib/solaris2.6 -L/usr/X/lib \
|
||||||
|
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 \
|
||||||
|
-lwx_gtk2 -lgtk -lgdk -lglib -lXext -lX11 -lstdc++ -lgcc
|
@@ -11,14 +11,9 @@
|
|||||||
# Licence: wxWindows license
|
# Licence: wxWindows license
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
import __version__
|
# ensure the main extension module is loaded, in case the embedded modules
|
||||||
__version__ = __version__.ver
|
# (such as utils,) are used standalone. This hack should go away soon.
|
||||||
|
|
||||||
|
|
||||||
# Ensure the main extension module is loaded, in case the add-on modules
|
|
||||||
# (such as utils,) are used standalone.
|
|
||||||
import wxc
|
import wxc
|
||||||
wxc.__version__ = __version__
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
@@ -23,7 +23,6 @@ class wxBitmap;
|
|||||||
class wxBrush;
|
class wxBrush;
|
||||||
class wxButton;
|
class wxButton;
|
||||||
class wxCalculateLayoutEvent;
|
class wxCalculateLayoutEvent;
|
||||||
class wxCaret;
|
|
||||||
class wxCheckBox;
|
class wxCheckBox;
|
||||||
class wxCheckListBox;
|
class wxCheckListBox;
|
||||||
class wxChoice;
|
class wxChoice;
|
||||||
@@ -110,7 +109,6 @@ class wxSashWindow;
|
|||||||
class wxScreenDC;
|
class wxScreenDC;
|
||||||
class wxScrollBar;
|
class wxScrollBar;
|
||||||
class wxScrollEvent;
|
class wxScrollEvent;
|
||||||
class wxScrollWinEvent;
|
|
||||||
class wxScrolledWindow;
|
class wxScrolledWindow;
|
||||||
class wxShowEvent;
|
class wxShowEvent;
|
||||||
class wxSingleChoiceDialog;
|
class wxSingleChoiceDialog;
|
||||||
@@ -139,9 +137,6 @@ class wxTreeItemId;
|
|||||||
class wxUpdateUIEvent;
|
class wxUpdateUIEvent;
|
||||||
class wxWindowDC;
|
class wxWindowDC;
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
class wxSizer;
|
|
||||||
class wxBoxSizer;
|
|
||||||
class wxStaticBoxSizer;
|
|
||||||
|
|
||||||
class wxPyApp;
|
class wxPyApp;
|
||||||
class wxPyMenu;
|
class wxPyMenu;
|
||||||
@@ -158,9 +153,6 @@ typedef unsigned int uint;
|
|||||||
typedef signed int EBool;
|
typedef signed int EBool;
|
||||||
typedef unsigned int size_t
|
typedef unsigned int size_t
|
||||||
typedef int wxPrintQuality;
|
typedef int wxPrintQuality;
|
||||||
typedef int wxCoord;
|
|
||||||
typedef char wxChar;
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -189,14 +181,10 @@ enum {
|
|||||||
wxNO_3D,
|
wxNO_3D,
|
||||||
//wxOVERRIDE_KEY_TRANSLATIONS,
|
//wxOVERRIDE_KEY_TRANSLATIONS,
|
||||||
wxTAB_TRAVERSAL,
|
wxTAB_TRAVERSAL,
|
||||||
wxWANTS_CHARS,
|
|
||||||
wxHORIZONTAL,
|
wxHORIZONTAL,
|
||||||
wxVERTICAL,
|
wxVERTICAL,
|
||||||
wxBOTH,
|
wxBOTH,
|
||||||
wxCENTER_FRAME,
|
wxCENTER_FRAME,
|
||||||
wxCENTRE_ON_SCREEN,
|
|
||||||
wxCENTER_ON_SCREEN,
|
|
||||||
|
|
||||||
wxSTAY_ON_TOP,
|
wxSTAY_ON_TOP,
|
||||||
wxICONIZE,
|
wxICONIZE,
|
||||||
wxMINIMIZE,
|
wxMINIMIZE,
|
||||||
@@ -216,12 +204,6 @@ enum {
|
|||||||
|
|
||||||
wxFRAME_TOOL_WINDOW,
|
wxFRAME_TOOL_WINDOW,
|
||||||
wxFRAME_FLOAT_ON_PARENT,
|
wxFRAME_FLOAT_ON_PARENT,
|
||||||
wxFRAME_NO_WINDOW_MENU,
|
|
||||||
wxED_CLIENT_MARGIN,
|
|
||||||
wxED_BUTTONS_BOTTOM,
|
|
||||||
wxED_BUTTONS_RIGHT,
|
|
||||||
wxED_STATIC_LINE,
|
|
||||||
wxEXT_DIALOG_STYLE,
|
|
||||||
|
|
||||||
wxCLIP_CHILDREN,
|
wxCLIP_CHILDREN,
|
||||||
|
|
||||||
@@ -231,20 +213,12 @@ enum {
|
|||||||
wxTB_HORIZONTAL,
|
wxTB_HORIZONTAL,
|
||||||
wxTB_VERTICAL,
|
wxTB_VERTICAL,
|
||||||
wxTB_FLAT,
|
wxTB_FLAT,
|
||||||
wxTB_DOCKABLE,
|
|
||||||
wxCOLOURED,
|
wxCOLOURED,
|
||||||
wxFIXED_LENGTH,
|
wxFIXED_LENGTH,
|
||||||
wxALIGN_LEFT,
|
wxALIGN_LEFT,
|
||||||
wxALIGN_CENTER_HORIZONTAL,
|
|
||||||
wxALIGN_CENTRE_HORIZONTAL,
|
|
||||||
wxALIGN_RIGHT,
|
|
||||||
wxALIGN_BOTTOM,
|
|
||||||
wxALIGN_CENTER_VERTICAL,
|
|
||||||
wxALIGN_CENTRE_VERTICAL,
|
|
||||||
wxALIGN_TOP,
|
|
||||||
wxALIGN_CENTER,
|
wxALIGN_CENTER,
|
||||||
wxALIGN_CENTRE,
|
wxALIGN_CENTRE,
|
||||||
wxSHAPED,
|
wxALIGN_RIGHT,
|
||||||
wxLB_NEEDED_SB,
|
wxLB_NEEDED_SB,
|
||||||
wxLB_ALWAYS_SB,
|
wxLB_ALWAYS_SB,
|
||||||
wxLB_SORT,
|
wxLB_SORT,
|
||||||
@@ -256,13 +230,9 @@ enum {
|
|||||||
wxPROCESS_ENTER,
|
wxPROCESS_ENTER,
|
||||||
wxPASSWORD,
|
wxPASSWORD,
|
||||||
wxTE_PROCESS_ENTER,
|
wxTE_PROCESS_ENTER,
|
||||||
wxTE_PROCESS_TAB,
|
|
||||||
wxTE_PASSWORD,
|
wxTE_PASSWORD,
|
||||||
wxTE_READONLY,
|
wxTE_READONLY,
|
||||||
wxTE_RICH,
|
|
||||||
wxTE_MULTILINE,
|
wxTE_MULTILINE,
|
||||||
wxTE_AUTO_SCROLL,
|
|
||||||
wxTE_NO_VSCROLL,
|
|
||||||
wxCB_SIMPLE,
|
wxCB_SIMPLE,
|
||||||
wxCB_DROPDOWN,
|
wxCB_DROPDOWN,
|
||||||
wxCB_SORT,
|
wxCB_SORT,
|
||||||
@@ -289,15 +259,11 @@ enum {
|
|||||||
wxSB_HORIZONTAL,
|
wxSB_HORIZONTAL,
|
||||||
wxSB_VERTICAL,
|
wxSB_VERTICAL,
|
||||||
wxST_SIZEGRIP,
|
wxST_SIZEGRIP,
|
||||||
wxST_NO_AUTORESIZE,
|
|
||||||
wxBU_AUTODRAW,
|
wxBU_AUTODRAW,
|
||||||
wxBU_NOAUTODRAW,
|
wxBU_NOAUTODRAW,
|
||||||
wxTR_HAS_BUTTONS,
|
wxTR_HAS_BUTTONS,
|
||||||
wxTR_EDIT_LABELS,
|
wxTR_EDIT_LABELS,
|
||||||
wxTR_LINES_AT_ROOT,
|
wxTR_LINES_AT_ROOT,
|
||||||
wxTR_MULTIPLE,
|
|
||||||
wxTR_SINGLE,
|
|
||||||
wxTR_HAS_VARIABLE_ROW_HEIGHT,
|
|
||||||
wxLC_ICON,
|
wxLC_ICON,
|
||||||
wxLC_SMALL_ICON,
|
wxLC_SMALL_ICON,
|
||||||
wxLC_LIST,
|
wxLC_LIST,
|
||||||
@@ -322,8 +288,6 @@ enum {
|
|||||||
wxSP_NOBORDER,
|
wxSP_NOBORDER,
|
||||||
wxSP_3D,
|
wxSP_3D,
|
||||||
wxSP_BORDER,
|
wxSP_BORDER,
|
||||||
wxSP_LIVE_UPDATE,
|
|
||||||
wxSP_PERMIT_UNSPLIT,
|
|
||||||
wxFLOOD_SURFACE,
|
wxFLOOD_SURFACE,
|
||||||
wxFLOOD_BORDER,
|
wxFLOOD_BORDER,
|
||||||
wxODDEVEN_RULE,
|
wxODDEVEN_RULE,
|
||||||
@@ -337,8 +301,6 @@ enum {
|
|||||||
wxCANCEL,
|
wxCANCEL,
|
||||||
wxYES,
|
wxYES,
|
||||||
wxNO,
|
wxNO,
|
||||||
wxNO_DEFAULT,
|
|
||||||
wxYES_DEFAULT,
|
|
||||||
wxICON_EXCLAMATION,
|
wxICON_EXCLAMATION,
|
||||||
wxICON_HAND,
|
wxICON_HAND,
|
||||||
wxICON_QUESTION,
|
wxICON_QUESTION,
|
||||||
@@ -346,16 +308,6 @@ enum {
|
|||||||
wxICON_STOP,
|
wxICON_STOP,
|
||||||
wxICON_ASTERISK,
|
wxICON_ASTERISK,
|
||||||
wxICON_MASK,
|
wxICON_MASK,
|
||||||
wxICON_WARNING,
|
|
||||||
wxICON_ERROR,
|
|
||||||
|
|
||||||
wxFORWARD,
|
|
||||||
wxBACKWARD,
|
|
||||||
wxRESET,
|
|
||||||
wxHELP,
|
|
||||||
wxMORE,
|
|
||||||
wxSETUP,
|
|
||||||
|
|
||||||
wxCENTRE,
|
wxCENTRE,
|
||||||
wxCENTER,
|
wxCENTER,
|
||||||
wxSIZE_AUTO_WIDTH,
|
wxSIZE_AUTO_WIDTH,
|
||||||
@@ -363,6 +315,14 @@ enum {
|
|||||||
wxSIZE_AUTO,
|
wxSIZE_AUTO,
|
||||||
wxSIZE_USE_EXISTING,
|
wxSIZE_USE_EXISTING,
|
||||||
wxSIZE_ALLOW_MINUS_ONE,
|
wxSIZE_ALLOW_MINUS_ONE,
|
||||||
|
#ifndef __WXGTK__
|
||||||
|
wxDF_TEXT,
|
||||||
|
wxDF_BITMAP,
|
||||||
|
wxDF_METAFILE,
|
||||||
|
wxDF_DIB,
|
||||||
|
wxDF_OEMTEXT,
|
||||||
|
wxDF_FILENAME,
|
||||||
|
#endif
|
||||||
wxPORTRAIT,
|
wxPORTRAIT,
|
||||||
wxLANDSCAPE,
|
wxLANDSCAPE,
|
||||||
wxPRINT_QUALITY_HIGH,
|
wxPRINT_QUALITY_HIGH,
|
||||||
@@ -407,8 +367,6 @@ enum {
|
|||||||
wxID_YES,
|
wxID_YES,
|
||||||
wxID_NO,
|
wxID_NO,
|
||||||
wxID_STATIC,
|
wxID_STATIC,
|
||||||
wxID_SEPARATOR,
|
|
||||||
|
|
||||||
wxBITMAP_TYPE_BMP,
|
wxBITMAP_TYPE_BMP,
|
||||||
wxBITMAP_TYPE_BMP_RESOURCE,
|
wxBITMAP_TYPE_BMP_RESOURCE,
|
||||||
wxBITMAP_TYPE_ICO,
|
wxBITMAP_TYPE_ICO,
|
||||||
@@ -428,19 +386,15 @@ enum {
|
|||||||
wxBITMAP_TYPE_ANY,
|
wxBITMAP_TYPE_ANY,
|
||||||
wxBITMAP_TYPE_RESOURCE,
|
wxBITMAP_TYPE_RESOURCE,
|
||||||
wxBITMAP_TYPE_JPEG,
|
wxBITMAP_TYPE_JPEG,
|
||||||
wxBITMAP_TYPE_PCX,
|
|
||||||
|
|
||||||
wxOPEN,
|
wxOPEN,
|
||||||
wxSAVE,
|
wxSAVE,
|
||||||
wxHIDE_READONLY,
|
wxHIDE_READONLY,
|
||||||
wxOVERWRITE_PROMPT,
|
wxOVERWRITE_PROMPT,
|
||||||
wxFILE_MUST_EXIST,
|
|
||||||
wxMULTIPLE,
|
|
||||||
|
|
||||||
wxACCEL_ALT,
|
wxACCEL_ALT,
|
||||||
wxACCEL_CTRL,
|
wxACCEL_CTRL,
|
||||||
wxACCEL_SHIFT,
|
wxACCEL_SHIFT,
|
||||||
wxACCEL_NORMAL,
|
|
||||||
|
|
||||||
wxPD_AUTO_HIDE,
|
wxPD_AUTO_HIDE,
|
||||||
wxPD_APP_MODAL,
|
wxPD_APP_MODAL,
|
||||||
@@ -449,39 +403,7 @@ enum {
|
|||||||
wxPD_ESTIMATED_TIME,
|
wxPD_ESTIMATED_TIME,
|
||||||
wxPD_REMAINING_TIME,
|
wxPD_REMAINING_TIME,
|
||||||
|
|
||||||
wxMENU_TEAROFF,
|
wxNO_DEFAULT,
|
||||||
wxMB_DOCKABLE,
|
|
||||||
wxNO_FULL_REPAINT_ON_RESIZE,
|
|
||||||
|
|
||||||
wxLEFT,
|
|
||||||
wxRIGHT,
|
|
||||||
wxUP,
|
|
||||||
wxDOWN,
|
|
||||||
wxALL,
|
|
||||||
wxTOP,
|
|
||||||
wxBOTTOM,
|
|
||||||
|
|
||||||
wxNORTH,
|
|
||||||
wxSOUTH,
|
|
||||||
wxEAST,
|
|
||||||
wxWEST,
|
|
||||||
|
|
||||||
wxSTRETCH_NOT,
|
|
||||||
wxSHRINK,
|
|
||||||
wxGROW,
|
|
||||||
wxEXPAND,
|
|
||||||
|
|
||||||
wxNB_FIXEDWIDTH,
|
|
||||||
wxNB_LEFT,
|
|
||||||
wxNB_RIGHT,
|
|
||||||
wxNB_BOTTOM,
|
|
||||||
|
|
||||||
wxLI_HORIZONTAL,
|
|
||||||
wxLI_VERTICAL,
|
|
||||||
|
|
||||||
wxHW_SCROLLBAR_NEVER,
|
|
||||||
wxHW_SCROLLBAR_AUTO,
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -549,8 +471,8 @@ typedef enum {
|
|||||||
wxNAND, // (NOT src) OR (NOT dst)
|
wxNAND, // (NOT src) OR (NOT dst)
|
||||||
wxOR, // src OR dst
|
wxOR, // src OR dst
|
||||||
wxSET, // 1
|
wxSET, // 1
|
||||||
// wxSRC_OR, // source _bitmap_ OR destination
|
wxSRC_OR, // source _bitmap_ OR destination
|
||||||
// wxSRC_AND // source _bitmap_ AND destination
|
wxSRC_AND // source _bitmap_ AND destination
|
||||||
} form_ops_t;
|
} form_ops_t;
|
||||||
|
|
||||||
enum _Virtual_keycodes {
|
enum _Virtual_keycodes {
|
||||||
@@ -775,7 +697,6 @@ enum wxEventType {
|
|||||||
wxEVT_COMMAND_LISTBOX_SELECTED,
|
wxEVT_COMMAND_LISTBOX_SELECTED,
|
||||||
wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
|
wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
|
||||||
wxEVT_COMMAND_CHECKLISTBOX_TOGGLED,
|
wxEVT_COMMAND_CHECKLISTBOX_TOGGLED,
|
||||||
wxEVT_COMMAND_SPINCTRL_UPDATED,
|
|
||||||
wxEVT_COMMAND_TEXT_UPDATED,
|
wxEVT_COMMAND_TEXT_UPDATED,
|
||||||
wxEVT_COMMAND_TEXT_ENTER,
|
wxEVT_COMMAND_TEXT_ENTER,
|
||||||
wxEVT_COMMAND_MENU_SELECTED,
|
wxEVT_COMMAND_MENU_SELECTED,
|
||||||
@@ -822,9 +743,6 @@ enum wxEventType {
|
|||||||
|
|
||||||
/* Character input event type */
|
/* Character input event type */
|
||||||
wxEVT_CHAR,
|
wxEVT_CHAR,
|
||||||
wxEVT_KEY_DOWN,
|
|
||||||
wxEVT_KEY_UP,
|
|
||||||
wxEVT_CHAR_HOOK,
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scrollbar event identifiers
|
* Scrollbar event identifiers
|
||||||
@@ -836,7 +754,6 @@ enum wxEventType {
|
|||||||
wxEVT_SCROLL_PAGEUP,
|
wxEVT_SCROLL_PAGEUP,
|
||||||
wxEVT_SCROLL_PAGEDOWN,
|
wxEVT_SCROLL_PAGEDOWN,
|
||||||
wxEVT_SCROLL_THUMBTRACK,
|
wxEVT_SCROLL_THUMBTRACK,
|
||||||
wxEVT_SCROLL_THUMBRELEASE,
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scrolled Window
|
* Scrolled Window
|
||||||
@@ -848,7 +765,6 @@ enum wxEventType {
|
|||||||
wxEVT_SCROLLWIN_PAGEUP,
|
wxEVT_SCROLLWIN_PAGEUP,
|
||||||
wxEVT_SCROLLWIN_PAGEDOWN,
|
wxEVT_SCROLLWIN_PAGEDOWN,
|
||||||
wxEVT_SCROLLWIN_THUMBTRACK,
|
wxEVT_SCROLLWIN_THUMBTRACK,
|
||||||
wxEVT_SCROLLWIN_THUMBRELEASE,
|
|
||||||
|
|
||||||
wxEVT_SIZE = wxEVT_FIRST + 200,
|
wxEVT_SIZE = wxEVT_FIRST + 200,
|
||||||
wxEVT_MOVE,
|
wxEVT_MOVE,
|
||||||
@@ -857,6 +773,8 @@ enum wxEventType {
|
|||||||
wxEVT_QUERY_END_SESSION,
|
wxEVT_QUERY_END_SESSION,
|
||||||
wxEVT_ACTIVATE_APP,
|
wxEVT_ACTIVATE_APP,
|
||||||
wxEVT_POWER,
|
wxEVT_POWER,
|
||||||
|
wxEVT_CHAR_HOOK,
|
||||||
|
wxEVT_KEY_UP,
|
||||||
wxEVT_ACTIVATE,
|
wxEVT_ACTIVATE,
|
||||||
wxEVT_CREATE,
|
wxEVT_CREATE,
|
||||||
wxEVT_DESTROY,
|
wxEVT_DESTROY,
|
||||||
@@ -916,9 +834,6 @@ enum wxEventType {
|
|||||||
wxEVT_COMMAND_TREE_SEL_CHANGED,
|
wxEVT_COMMAND_TREE_SEL_CHANGED,
|
||||||
wxEVT_COMMAND_TREE_SEL_CHANGING,
|
wxEVT_COMMAND_TREE_SEL_CHANGING,
|
||||||
wxEVT_COMMAND_TREE_KEY_DOWN,
|
wxEVT_COMMAND_TREE_KEY_DOWN,
|
||||||
wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
|
|
||||||
wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK,
|
|
||||||
wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK,
|
|
||||||
|
|
||||||
/* List control event types */
|
/* List control event types */
|
||||||
wxEVT_COMMAND_LIST_BEGIN_DRAG,
|
wxEVT_COMMAND_LIST_BEGIN_DRAG,
|
||||||
@@ -935,9 +850,6 @@ enum wxEventType {
|
|||||||
wxEVT_COMMAND_LIST_INSERT_ITEM,
|
wxEVT_COMMAND_LIST_INSERT_ITEM,
|
||||||
wxEVT_COMMAND_LIST_COL_CLICK,
|
wxEVT_COMMAND_LIST_COL_CLICK,
|
||||||
wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
|
wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
|
||||||
wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
|
|
||||||
wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK,
|
|
||||||
|
|
||||||
|
|
||||||
/* Tab and notebook control event types */
|
/* Tab and notebook control event types */
|
||||||
wxEVT_COMMAND_TAB_SEL_CHANGED,
|
wxEVT_COMMAND_TAB_SEL_CHANGED,
|
||||||
@@ -951,10 +863,6 @@ enum wxEventType {
|
|||||||
wxEVT_COMMAND_SPLITTER_UNSPLIT,
|
wxEVT_COMMAND_SPLITTER_UNSPLIT,
|
||||||
wxEVT_COMMAND_SPLITTER_DOUBLECLICKED,
|
wxEVT_COMMAND_SPLITTER_DOUBLECLICKED,
|
||||||
|
|
||||||
wxEVT_NAVIGATION_KEY,
|
|
||||||
|
|
||||||
wxEVT_TIMER,
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|