From 8bf5d46efb26ab22575ca9bc0d0ca5d32d6b77a3 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 31 Jul 1999 07:56:15 +0000 Subject: [PATCH] wxPython 2.1b1: Added the missing wxWindow.GetUpdateRegion() method. Made a new change in SWIG (update your patches everybody) that provides a fix for global shadow objects that get an exception in their __del__ when their extension module has already been deleted. It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about line 496 if you want to do it by hand. It is now possible to run through MainLoop more than once in any one process. The cleanup that used to happen as MainLoop completed (and prevented it from running again) has been delayed until the wxc module is being unloaded by Python. wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added wxWindow.PopupMenuXY to be consistent with some other methods. Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. You can now provide your own app.MainLoop method. See wxPython/demo/demoMainLoop.py for an example and some explaination. Got the in-place-edit for the wxTreeCtrl fixed and added some demo code to show how to use it. Put the wxIcon constructor back in for GTK as it now has one that matches MSW's. Added wxGrid.GetCells Added wxSystemSettings static methods as functions with names like wxSystemSettings_GetSystemColour. Removed wxPyMenu since using menu callbacks have been depreciated in wxWindows. Use wxMenu and events instead. Added alternate wxBitmap constructor (for MSW only) as wxBitmapFromData(data, type, width, height, depth = 1) Added a helper function named wxPyTypeCast that can convert shadow objects of one type into shadow objects of another type. (Like doing a down-cast.) See the implementation in wx.py for some docs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxPython/README.txt | 51 + utils/wxPython/SWIG.patches/Include.patch | 80 +- utils/wxPython/SWIG.patches/Modules.patch | 144 +- utils/wxPython/SWIG.patches/SWIG.patch | 247 +- utils/wxPython/demo/ColorPanel.py | 14 +- utils/wxPython/demo/DialogUnits.py | 5 +- utils/wxPython/demo/Main.py | 7 +- utils/wxPython/demo/Sizers.py | 33 +- utils/wxPython/demo/XMLtreeview.py | 66 + utils/wxPython/demo/demo.py | 2 +- utils/wxPython/demo/demoMainLoop.py | 119 + utils/wxPython/demo/paper.xml | 85 + utils/wxPython/demo/quotes.xml | 13 + utils/wxPython/demo/wxComboBox.py | 4 +- utils/wxPython/demo/wxGrid.py | 2 + utils/wxPython/demo/wxListCtrl.py | 13 +- utils/wxPython/demo/wxRadioBox.py | 5 + utils/wxPython/demo/wxTreeCtrl.py | 43 +- utils/wxPython/distrib/makexferzip.bat | 9 + utils/wxPython/distrib/wxPython.rsp | 1 + utils/wxPython/distrib/wxPython.wse | 12 + utils/wxPython/distrib/wxPython.wsm | Bin 33 -> 19 bytes utils/wxPython/lib/dialogs.py | 3 +- utils/wxPython/lib/sizers/sizer.py | 2 + utils/wxPython/src/Makefile.pre.in | 2 +- utils/wxPython/src/_defs.i | 11 +- utils/wxPython/src/_extras.py | 45 + utils/wxPython/src/controls.i | 55 +- utils/wxPython/src/controls2.i | 14 +- utils/wxPython/src/gdi.i | 17 +- utils/wxPython/src/gtk/cmndlgs.cpp | 2 - utils/wxPython/src/gtk/cmndlgs.py | 4 +- utils/wxPython/src/gtk/controls.cpp | 72 +- utils/wxPython/src/gtk/controls.py | 6 +- utils/wxPython/src/gtk/controls2.cpp | 155 +- utils/wxPython/src/gtk/controls2.py | 24 +- utils/wxPython/src/gtk/events.py | 2 +- utils/wxPython/src/gtk/frames.cpp | 2 - utils/wxPython/src/gtk/gdi.cpp | 45 + utils/wxPython/src/gtk/gdi.py | 21 +- utils/wxPython/src/gtk/glcanvas.cpp | 4 +- utils/wxPython/src/gtk/glcanvas.py | 2 +- utils/wxPython/src/gtk/image.cpp | 28 + utils/wxPython/src/gtk/image.py | 5 +- utils/wxPython/src/gtk/mdi.cpp | 2 - utils/wxPython/src/gtk/misc.cpp | 232 + utils/wxPython/src/gtk/misc.py | 124 +- utils/wxPython/src/gtk/misc2.cpp | 2 - utils/wxPython/src/gtk/printfw.cpp | 2 - utils/wxPython/src/gtk/printfw.py | 8 +- utils/wxPython/src/gtk/stattool.cpp | 2 - utils/wxPython/src/gtk/stattool.py | 2 +- utils/wxPython/src/gtk/utils.py | 2 +- utils/wxPython/src/gtk/windows.cpp | 183 +- utils/wxPython/src/gtk/windows.py | 36 +- utils/wxPython/src/gtk/windows2.cpp | 108 +- utils/wxPython/src/gtk/windows2.py | 11 +- utils/wxPython/src/gtk/windows3.cpp | 2 - utils/wxPython/src/gtk/windows3.py | 2 +- utils/wxPython/src/gtk/wx.cpp | 846 ++- utils/wxPython/src/gtk/wx.py | 95 +- utils/wxPython/src/helpers.cpp | 182 +- utils/wxPython/src/helpers.h | 22 +- utils/wxPython/src/image.i | 1 + utils/wxPython/src/makefile.vc | 29 +- utils/wxPython/src/mdi.i | 4 - utils/wxPython/src/misc.i | 123 + utils/wxPython/src/msw/cmndlgs.cpp | 4 +- utils/wxPython/src/msw/cmndlgs.py | 4 +- utils/wxPython/src/msw/controls.cpp | 123 +- utils/wxPython/src/msw/controls.py | 23 + utils/wxPython/src/msw/controls2.cpp | 61 +- utils/wxPython/src/msw/controls2.py | 13 +- utils/wxPython/src/msw/events.py | 2 +- utils/wxPython/src/msw/frames.cpp | 4 +- utils/wxPython/src/msw/gdi.cpp | 33 + utils/wxPython/src/msw/gdi.py | 7226 +++++++++++++++++++-- utils/wxPython/src/msw/glcanvas.cpp | 6 +- utils/wxPython/src/msw/glcanvas.py | 2 +- utils/wxPython/src/msw/image.cpp | 28 + utils/wxPython/src/msw/image.py | 5 +- utils/wxPython/src/msw/mdi.cpp | 13 +- utils/wxPython/src/msw/mdi.py | 4 +- utils/wxPython/src/msw/misc.cpp | 232 + utils/wxPython/src/msw/misc.py | 124 +- utils/wxPython/src/msw/misc2.cpp | 2 - utils/wxPython/src/msw/printfw.cpp | 4 +- utils/wxPython/src/msw/printfw.py | 8 +- utils/wxPython/src/msw/stattool.cpp | 4 +- utils/wxPython/src/msw/stattool.py | 2 +- utils/wxPython/src/msw/utils.cpp | 46 +- utils/wxPython/src/msw/utils.py | 2 +- utils/wxPython/src/msw/windows.cpp | 183 +- utils/wxPython/src/msw/windows.py | 36 +- utils/wxPython/src/msw/windows2.cpp | 110 +- utils/wxPython/src/msw/windows2.py | 13 +- utils/wxPython/src/msw/windows3.cpp | 4 +- utils/wxPython/src/msw/windows3.py | 2 +- utils/wxPython/src/msw/wx.cpp | 873 ++- utils/wxPython/src/msw/wx.py | 98 +- utils/wxPython/src/windows.i | 73 +- utils/wxPython/src/windows2.i | 33 + utils/wxPython/src/wx.i | 37 +- utils/wxPython/tests/README.txt | 2 + utils/wxPython/tests/TstLstIcon.py | 108 + utils/wxPython/tests/atom.bmp | Bin 0 -> 630 bytes utils/wxPython/tests/getvalues.py | 48 + utils/wxPython/tests/info.bmp | Bin 0 -> 370 bytes utils/wxPython/tests/memleak.py | 157 + utils/wxPython/tests/paul.py | 28 + utils/wxPython/tests/paul.pyc | Bin 0 -> 1091 bytes utils/wxPython/tests/popup.py | 123 + utils/wxPython/tests/pytree.py | 203 + utils/wxPython/tests/query.bmp | Bin 0 -> 630 bytes utils/wxPython/tests/scroll_paint.py | 38 + utils/wxPython/tests/spies.py | 136 + utils/wxPython/tests/spies2.py | 69 + utils/wxPython/tests/table.bmp | Bin 0 -> 630 bytes utils/wxPython/tests/tabs.py | 38 + utils/wxPython/tests/test1.py | 68 +- utils/wxPython/tests/thtest.py | 29 + utils/wxPython/tests/txml.py | 87 + utils/wxPython/tests/zigron.py | 75 + 123 files changed, 12555 insertions(+), 1587 deletions(-) create mode 100644 utils/wxPython/demo/XMLtreeview.py create mode 100755 utils/wxPython/demo/demoMainLoop.py create mode 100644 utils/wxPython/demo/paper.xml create mode 100644 utils/wxPython/demo/quotes.xml create mode 100755 utils/wxPython/distrib/makexferzip.bat create mode 100644 utils/wxPython/tests/TstLstIcon.py create mode 100644 utils/wxPython/tests/atom.bmp create mode 100644 utils/wxPython/tests/getvalues.py create mode 100644 utils/wxPython/tests/info.bmp create mode 100644 utils/wxPython/tests/memleak.py create mode 100644 utils/wxPython/tests/paul.py create mode 100644 utils/wxPython/tests/paul.pyc create mode 100644 utils/wxPython/tests/popup.py create mode 100644 utils/wxPython/tests/pytree.py create mode 100644 utils/wxPython/tests/query.bmp create mode 100644 utils/wxPython/tests/scroll_paint.py create mode 100644 utils/wxPython/tests/spies.py create mode 100644 utils/wxPython/tests/spies2.py create mode 100644 utils/wxPython/tests/table.bmp create mode 100644 utils/wxPython/tests/tabs.py create mode 100644 utils/wxPython/tests/thtest.py create mode 100644 utils/wxPython/tests/txml.py create mode 100644 utils/wxPython/tests/zigron.py diff --git a/utils/wxPython/README.txt b/utils/wxPython/README.txt index d4b90b7ac5..054a77bdc8 100644 --- a/utils/wxPython/README.txt +++ b/utils/wxPython/README.txt @@ -45,6 +45,57 @@ Or you can send mail directly to the list using this address: ---------------------------------------------------------------------- +What's new in 2.1b2 +-------------------- + +Added the missing wxWindow.GetUpdateRegion() method. + +Made a new change in SWIG (update your patches everybody) that +provides a fix for global shadow objects that get an exception in +their __del__ when their extension module has already been deleted. +It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about +line 496 if you want to do it by hand. + +It is now possible to run through MainLoop more than once in any one +process. The cleanup that used to happen as MainLoop completed (and +prevented it from running again) has been delayed until the wxc module +is being unloaded by Python. + +I fixed a bunch of stuff in the C++ version of wxGrid so it wouldn't +make wxPython look bad. + +wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added +wxWindow.PopupMenuXY to be consistent with some other methods. + +Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. + +You can now provide your own app.MainLoop method. See +wxPython/demo/demoMainLoop.py for an example and some explaination. + +Got the in-place-edit for the wxTreeCtrl fixed and added some demo +code to show how to use it. + +Put the wxIcon constructor back in for GTK as it now has one that +matches MSW's. + +Added wxGrid.GetCells + +Added wxSystemSettings static methods as functions with names like +wxSystemSettings_GetSystemColour. + +Removed wxPyMenu since using menu callbacks have been depreciated in +wxWindows. Use wxMenu and events instead. + +Added alternate wxBitmap constructor (for MSW only) as + wxBitmapFromData(data, type, width, height, depth = 1) + +Added a helper function named wxPyTypeCast that can convert shadow +objects of one type into shadow objects of another type. (Like doing +a down-cast.) See the implementation in wx.py for some docs. + + + + What's new in 2.1b1 -------------------- diff --git a/utils/wxPython/SWIG.patches/Include.patch b/utils/wxPython/SWIG.patches/Include.patch index 7d4b9521d6..7012b56d59 100644 --- a/utils/wxPython/SWIG.patches/Include.patch +++ b/utils/wxPython/SWIG.patches/Include.patch @@ -1,38 +1,38 @@ -*** swig.h.old Wed Feb 04 14:59:40 1998 ---- swig.h Fri Aug 28 14:46:32 1998 +*** swig.h.old Wed Feb 04 15:59:40 1998 +--- swig.h Fri Aug 28 15: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 * @@ -44,15 +44,15 @@ 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 @@ -74,9 +74,9 @@ + 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); @@ -86,12 +86,54 @@ + 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 *** + * Revision 1.2 1999/07/31 07:54:05 RD + * wxPython 2.1b1: + * + * Added the missing wxWindow.GetUpdateRegion() method. + * + * Made a new change in SWIG (update your patches everybody) that + * provides a fix for global shadow objects that get an exception in + * their __del__ when their extension module has already been deleted. + * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about + * line 496 if you want to do it by hand. + * + * It is now possible to run through MainLoop more than once in any one + * process. The cleanup that used to happen as MainLoop completed (and + * prevented it from running again) has been delayed until the wxc module + * is being unloaded by Python. + * + * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added + * wxWindow.PopupMenuXY to be consistent with some other methods. + * + * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. + * + * You can now provide your own app.MainLoop method. See + * wxPython/demo/demoMainLoop.py for an example and some explaination. + * + * Got the in-place-edit for the wxTreeCtrl fixed and added some demo + * code to show how to use it. + * + * Put the wxIcon constructor back in for GTK as it now has one that + * matches MSW's. + * + * Added wxGrid.GetCells + * + * Added wxSystemSettings static methods as functions with names like + * wxSystemSettings_GetSystemColour. + * + * Removed wxPyMenu since using menu callbacks have been depreciated in + * wxWindows. Use wxMenu and events instead. + * + * Added alternate wxBitmap constructor (for MSW only) as + * wxBitmapFromData(data, type, width, height, depth = 1) + * + * Added a helper function named wxPyTypeCast that can convert shadow + * objects of one type into shadow objects of another type. (Like doing + * a down-cast.) See the implementation in wx.py for some docs. * diff --git a/utils/wxPython/SWIG.patches/Modules.patch b/utils/wxPython/SWIG.patches/Modules.patch index b26b407ef0..0cbc44f0f2 100644 --- a/utils/wxPython/SWIG.patches/Modules.patch +++ b/utils/wxPython/SWIG.patches/Modules.patch @@ -1,8 +1,9 @@ -*** python.cxx.old Fri Jan 02 22:17:40 1998 ---- python.cxx Fri Aug 28 14:49:18 1998 +*** python.cxx.old Fri Jan 02 23:17:40 1998 +--- python.cxx Fri Aug 28 15:49:18 1998 *************** -*** 1679,1684 **** ---- 1679,1701 ---- +*** 1678,1685 **** +--- 1678,1702 ---- + fprintf(stderr,"%s : Line %d. Unable to locate file %s\n", input_file, line_number, value); } } } @@ -15,7 +16,7 @@ + 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); @@ -26,65 +27,80 @@ } 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 + } +*** python.h.old Thu Jul 24 23:18:50 1997 +--- python.h Fri Aug 28 15:46:08 1998 *************** -*** 185,191 **** ---- 185,203 ---- +*** 184,191 **** +--- 184,203 ---- + void cpp_declare_const(char *name, char *iname, DataType *type, char *value); 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 + +*** pycpp.cxx.old Fri Jan 02 21:23:22 1998 +--- pycpp.cxx Tue Jul 20 14:34:36 1999 *************** -*** 276,281 **** ---- 276,282 ---- +*** 275,282 **** +--- 275,283 ---- + #endif } } // 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 ---- +*** 393,400 **** +--- 394,402 ---- + } } *construct << ")\n"; *construct << tab8 << "self.thisown = 1\n"; + emitAddPragmas(*construct, "__init__", tab8); have_constructor = 1; } else { - + + // Hmmm. We seem to be creating a different constructor. We're just going to create a *************** -*** 494,502 **** - *pyclass << tab4 << "def __del__(self):\n" +*** 490,503 **** + if (class_renamed) realname = class_name; + else realname = name; + } + +! *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" + } +--- 492,504 ---- + if (class_renamed) realname = class_name; + else realname = name; + } + +! *pyclass << tab4 << "def __del__(self, " << module << "=" << module << "):\n" << tab8 << "if self.thisown == 1 :\n" << tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n"; ! emitAddPragmas(*pyclass, "__del__", tab8); @@ -92,23 +108,27 @@ if (doc_entry) { doc_entry->usage = ""; doc_entry->usage << "del this"; + } *************** -*** 552,557 **** ---- 553,560 ---- +*** 551,558 **** +--- 552,561 ---- + repr << tab4 << "def __repr__(self):\n" << tab8 << "return \"\"\n"; - + classes << repr; + emitAddPragmas(classes, "__class__", tab4); -+ ++ } - + // Now build the real class with a normal constructor + *************** -*** 747,752 **** ---- 750,777 ---- +*** 746,753 **** +--- 749,778 ---- + hash.add(name,copy_string((char *) hash.lookup(t->name))); } } - + + // -------------------------------------------------------------------------------- + // PYTHON::emitAddPragmas(String& output, char* name, char* spacing); + // @@ -116,13 +136,13 @@ + // 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; iaddPragmas[i]; @@ -131,6 +151,52 @@ + } + } + } - + /********************************************************************************* * + * $Log$ + * Revision 1.2 1999/07/31 07:54:05 RD + * wxPython 2.1b1: + * + * Added the missing wxWindow.GetUpdateRegion() method. + * + * Made a new change in SWIG (update your patches everybody) that + * provides a fix for global shadow objects that get an exception in + * their __del__ when their extension module has already been deleted. + * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about + * line 496 if you want to do it by hand. + * + * It is now possible to run through MainLoop more than once in any one + * process. The cleanup that used to happen as MainLoop completed (and + * prevented it from running again) has been delayed until the wxc module + * is being unloaded by Python. + * + * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added + * wxWindow.PopupMenuXY to be consistent with some other methods. + * + * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. + * + * You can now provide your own app.MainLoop method. See + * wxPython/demo/demoMainLoop.py for an example and some explaination. + * + * Got the in-place-edit for the wxTreeCtrl fixed and added some demo + * code to show how to use it. + * + * Put the wxIcon constructor back in for GTK as it now has one that + * matches MSW's. + * + * Added wxGrid.GetCells + * + * Added wxSystemSettings static methods as functions with names like + * wxSystemSettings_GetSystemColour. + * + * Removed wxPyMenu since using menu callbacks have been depreciated in + * wxWindows. Use wxMenu and events instead. + * + * Added alternate wxBitmap constructor (for MSW only) as + * wxBitmapFromData(data, type, width, height, depth = 1) + * + * Added a helper function named wxPyTypeCast that can convert shadow + * objects of one type into shadow objects of another type. (Like doing + * a down-cast.) See the implementation in wx.py for some docs. + * diff --git a/utils/wxPython/SWIG.patches/SWIG.patch b/utils/wxPython/SWIG.patches/SWIG.patch index 6eb496c61e..a50235c64b 100644 --- a/utils/wxPython/SWIG.patches/SWIG.patch +++ b/utils/wxPython/SWIG.patches/SWIG.patch @@ -1,12 +1,12 @@ -*** cplus.cxx.old Mon Feb 02 14:55:42 1998 ---- cplus.cxx Fri Aug 28 12:02:50 1998 +*** cplus.cxx.old Mon Feb 02 15:55:42 1998 +--- cplus.cxx Fri Aug 28 13: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 @@ -28,7 +28,7 @@ - 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); @@ -37,12 +37,12 @@ --- 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); @@ -53,20 +53,20 @@ // ------------------------------------------------------------------------------ // 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) + 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) *************** @@ -74,7 +74,7 @@ // ------------------------------------------------------------------------------ // 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; @@ -84,7 +84,7 @@ // ------------------------------------------------------------------------------ // 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; @@ -95,7 +95,7 @@ // ------------------------------------------------------------------------------ // Inherit. Put all the declarations associated with this class into the current // ------------------------------------------------------------------------------ - + ! void inherit_decls(int mode) { CPP_member *m; m = members; @@ -105,7 +105,7 @@ // ------------------------------------------------------------------------------ // Inherit. Put all the declarations associated with this class into the current // ------------------------------------------------------------------------------ - + ! void CPP_class::inherit_decls(int mode) { CPP_member *m; m = members; @@ -114,9 +114,9 @@ *************** *** 696,704 **** // ------------------------------------------------------------------------------ - // Emit all of the declarations associated with this class + // Emit all of the declarations associated with this class // ------------------------------------------------------------------------------ - + ! void emit_decls() { CPP_member *m = members; int last_scope = name_scope(0); @@ -126,7 +126,7 @@ // ------------------------------------------------------------------------------ // Emit all of the declarations associated with this class // ------------------------------------------------------------------------------ - + ! void CPP_class::emit_decls() { CPP_member *m = members; int last_scope = name_scope(0); @@ -134,10 +134,10 @@ while (m) { *************** *** 713,721 **** - // ------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ // Search for a given class in the list // ------------------------------------------------------------------------------ - + ! static CPP_class *search(char *name) { CPP_class *c; c = classlist; @@ -147,7 +147,7 @@ // ------------------------------------------------------------------------------ // Search for a given class in the list // ------------------------------------------------------------------------------ - + ! CPP_class *CPP_class::search(char *name) { CPP_class *c; c = classlist; @@ -158,22 +158,22 @@ // 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 **** // ------------------------------------------------------------------------------ @@ -182,21 +182,21 @@ // ------------------------------------------------------------------------------ - 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 +*** vector.cxx.old Fri Aug 28 15:23:16 1998 +--- vector.cxx Fri Aug 28 15:46:52 1998 *************** *** 0 **** --- 1,182 ---- -+ ++ + /******************************************************************************* + * Simplified Wrapper and Interface Generator (SWIG) + * @@ -237,9 +237,9 @@ + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + *******************************************************************************/ -+ ++ + #include "internal.h" -+ ++ + /******************************************************************************* + * $Header$ + * @@ -249,9 +249,9 @@ + * successful. Should be made more robust... + * + *******************************************************************************/ -+ ++ + void* Vector::s_nullPtr = NULL; -+ ++ + // ----------------------------------------------------------------------------- + // Vector::Vector(size_t allocSize = 8) + // @@ -263,7 +263,7 @@ + // + // Side Effects : None + // ----------------------------------------------------------------------------- -+ ++ + Vector::Vector(size_t allocSize) + : m_size(allocSize), + m_count(0), @@ -276,27 +276,27 @@ + 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) + // @@ -306,48 +306,48 @@ + // 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= m_size) { + extend(m_count + 1); + } -+ ++ + m_data[m_count] = object; + m_count += 1; -+ ++ + return m_count; + } -+ -+ ++ ++ + // ----------------------------------------------------------------------------- + // Vector::operator[] (size_t idx) + // @@ -355,145 +355,176 @@ + // 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.3 1999/07/31 07:54:05 RD ++ * wxPython 2.1b1: ++ * ++ * Added the missing wxWindow.GetUpdateRegion() method. ++ * ++ * Made a new change in SWIG (update your patches everybody) that ++ * provides a fix for global shadow objects that get an exception in ++ * their __del__ when their extension module has already been deleted. ++ * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about ++ * line 496 if you want to do it by hand. ++ * ++ * It is now possible to run through MainLoop more than once in any one ++ * process. The cleanup that used to happen as MainLoop completed (and ++ * prevented it from running again) has been delayed until the wxc module ++ * is being unloaded by Python. ++ * ++ * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added ++ * wxWindow.PopupMenuXY to be consistent with some other methods. ++ * ++ * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. ++ * ++ * You can now provide your own app.MainLoop method. See ++ * wxPython/demo/demoMainLoop.py for an example and some explaination. ++ * ++ * Got the in-place-edit for the wxTreeCtrl fixed and added some demo ++ * code to show how to use it. ++ * ++ * Put the wxIcon constructor back in for GTK as it now has one that ++ * matches MSW's. ++ * ++ * Added wxGrid.GetCells ++ * ++ * Added wxSystemSettings static methods as functions with names like ++ * wxSystemSettings_GetSystemColour. + * -+ * Revision 1.1.4.1 1999/03/27 23:28:59 RD ++ * Removed wxPyMenu since using menu callbacks have been depreciated in ++ * wxWindows. Use wxMenu and events instead. + * -+ * wxPython 2.0b8 -+ * Python thread support -+ * various minor additions -+ * various minor fixes ++ * Added alternate wxBitmap constructor (for MSW only) as ++ * wxBitmapFromData(data, type, width, height, depth = 1) + * -+ * Revision 1.1 1998/10/03 05:56:03 RD -+ * *** empty log message *** ++ * Added a helper function named wxPyTypeCast that can convert shadow ++ * objects of one type into shadow objects of another type. (Like doing ++ * a down-cast.) See the implementation in wx.py for some docs. + * + * + ***********************************************************************/ -+ -+ -+ -+ -+ -+ -*** makefile.msc.old Mon Jun 23 15:15:32 1997 ---- makefile.msc Fri Aug 28 10:21:58 1998 ++ ++ ++ ++ ++ ++ +*** makefile.msc.old Mon Jun 23 16:15:32 1997 +--- makefile.msc Fri Aug 28 11: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 +*** makefile.bc.old Sun Jan 04 13:49:24 1998 +--- makefile.bc Fri Aug 28 15: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 +*** Makefile.in.old Wed May 28 23:56:56 1997 +--- Makefile.in Fri Aug 28 15: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 diff --git a/utils/wxPython/demo/ColorPanel.py b/utils/wxPython/demo/ColorPanel.py index 42332ac9ec..f90a8b0e73 100644 --- a/utils/wxPython/demo/ColorPanel.py +++ b/utils/wxPython/demo/ColorPanel.py @@ -1,15 +1,3 @@ -#!/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 * @@ -22,4 +10,4 @@ class ColoredPanel(wxWindow): wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER) self.SetBackgroundColour(color) -#--------------------------------------------------------------------------- \ No newline at end of file +#--------------------------------------------------------------------------- diff --git a/utils/wxPython/demo/DialogUnits.py b/utils/wxPython/demo/DialogUnits.py index cb4cf2c860..8d293c2007 100644 --- a/utils/wxPython/demo/DialogUnits.py +++ b/utils/wxPython/demo/DialogUnits.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python #---------------------------------------------------------------------------- # Name: DialogUnits.py # Purpose: A minimal wxPython program that is a bit smarter than test1. @@ -46,6 +46,9 @@ class MyFrame(wxFrame): wxDLG_SZE(panel, wxSize(36, -1)), 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 # sent to this window diff --git a/utils/wxPython/demo/Main.py b/utils/wxPython/demo/Main.py index 949d747105..69dc714e46 100644 --- a/utils/wxPython/demo/Main.py +++ b/utils/wxPython/demo/Main.py @@ -43,7 +43,7 @@ _treeList = [ ('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog', 'wxMultipleChoiceDialog', 'wxPlotCanvas']), - ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot']), + ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']), ] @@ -153,7 +153,8 @@ class wxPythonDemo(wxFrame): 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.ShowPosition(self.log.XYToPosition(x, y-numLines)) +## self.log.ShowPosition(self.log.GetLastPosition()) self.log.SetInsertionPointEnd() def write(self, txt): @@ -218,7 +219,7 @@ class wxPythonDemo(wxFrame): # self.txt.WriteText("Cannot open %s file." % filename) try: self.txt.SetValue(open(filename).read()) - except IOException: + except IOError: self.txt.WriteText("Cannot open %s file." % filename) diff --git a/utils/wxPython/demo/Sizers.py b/utils/wxPython/demo/Sizers.py index ea76aec68c..02befadba1 100644 --- a/utils/wxPython/demo/Sizers.py +++ b/utils/wxPython/demo/Sizers.py @@ -111,21 +111,17 @@ def makeSimpleBorder3(win): def makeBoxInBox(win): box = wxBoxSizer(wxVERTICAL) - btn = wxButton(win, 1010, "one") - box.Add(btn) + box.Add(wxButton(win, 1010, "one")) box2 = wxBoxSizer(wxHORIZONTAL) - btn = wxButton(win, 1010, "two") - box2.Add(btn) - btn = wxButton(win, 1010, "three") - box2.Add(btn) - btn = wxButton(win, 1010, "four") - box2.Add(btn) - btn = wxButton(win, 1010, "five") - box2.Add(btn) + box2.AddMany([ wxButton(win, 1010, "two"), + wxButton(win, 1010, "three"), + wxButton(win, 1010, "four"), + wxButton(win, 1010, "five"), + ]) box3 = wxBoxSizer(wxVERTICAL) - box3.AddMany([ (wxButton(win, 1010, "six"), 1), + box3.AddMany([ (wxButton(win, 1010, "six"), 0), (wxButton(win, 1010, "seven"), 2), (wxButton(win, 1010, "eight"), 1), (wxButton(win, 1010, "nine"), 1), @@ -134,8 +130,7 @@ def makeBoxInBox(win): box2.Add(box3, 1) box.Add(box2, 1) - btn = wxButton(win, 1010, "ten") - box.Add(btn) + box.Add(wxButton(win, 1010, "ten")) return box @@ -154,11 +149,11 @@ def makeBorderInBox(win): insideBox = wxBoxSizer(wxHORIZONTAL) box2 = wxBoxSizer(wxHORIZONTAL) - box2.AddMany([ (wxButton(win, 1010, "one"), 0), - (wxButton(win, 1010, "two"), 0), - (wxButton(win, 1010, "three"), 0), - (wxButton(win, 1010, "four"), 0), - (wxButton(win, 1010, "five"), 0), + box2.AddMany([ wxButton(win, 1010, "one"), + wxButton(win, 1010, "two"), + wxButton(win, 1010, "three"), + wxButton(win, 1010, "four"), + wxButton(win, 1010, "five"), ]) insideBox.Add(box2, 0) @@ -168,7 +163,7 @@ def makeBorderInBox(win): insideBox.Add(bdr, 1) box3 = wxBoxSizer(wxVERTICAL) - box3.AddMany([ (wxButton(win, 1010, "six"), 1), + box3.AddMany([ (wxButton(win, 1010, "six"), 0), (wxButton(win, 1010, "seven"), 2), (wxButton(win, 1010, "eight"), 1), (wxButton(win, 1010, "nine"), 1), diff --git a/utils/wxPython/demo/XMLtreeview.py b/utils/wxPython/demo/XMLtreeview.py new file mode 100644 index 0000000000..3815f014cc --- /dev/null +++ b/utils/wxPython/demo/XMLtreeview.py @@ -0,0 +1,66 @@ + +import string + +from wxPython.wx import * +try: + from xml.parsers import pyexpat + haveXML = true +except ImportError: + haveXML = false + +#---------------------------------------------------------------------- + +if not haveXML: + def runTest(frame, nb, log): + dlg = wxMessageDialog(frame, 'This demo requires the XML package. See http://www.python.org/sigs/xml-sig/', + 'Sorry', wxOK | wxICON_INFORMATION) + dlg.ShowModal() + dlg.Destroy() + +else: + + class XMLTree(wxTreeCtrl): + def __init__(self, parent, ID): + wxTreeCtrl.__init__(self, parent, ID) + self.nodeStack = [self.AddRoot("Root")] + + # Define a handler for start element events + def StartElement(self, name, attrs ): + self.nodeStack.append(self.AppendItem(self.nodeStack[-1], name)) + + def EndElement(self, name ): + self.nodeStack = self.nodeStack[:-1] + + def CharacterData(self, data ): + if string.strip(data): + self.AppendItem(self.nodeStack[-1], data) + + + def LoadTree(self, filename): + # Create a parser + Parser = pyexpat.ParserCreate() + + # Tell the parser what the start element handler is + Parser.StartElementHandler = self.StartElement + Parser.EndElementHandler = self.EndElement + Parser.CharacterDataHandler = self.CharacterData + + # Parse the XML File + ParserStatus = Parser.Parse(open(filename,'r').read(), 1) + + + def runTest(frame, nb, log): + win = XMLTree(nb, -1) + win.LoadTree("paper.xml") + return win + +#---------------------------------------------------------------------- + + + + + + +overview = """\ +""" + diff --git a/utils/wxPython/demo/demo.py b/utils/wxPython/demo/demo.py index 94eee26481..99f75a1aa7 100755 --- a/utils/wxPython/demo/demo.py +++ b/utils/wxPython/demo/demo.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import Main Main.main() diff --git a/utils/wxPython/demo/demoMainLoop.py b/utils/wxPython/demo/demoMainLoop.py new file mode 100755 index 0000000000..9073f7ab64 --- /dev/null +++ b/utils/wxPython/demo/demoMainLoop.py @@ -0,0 +1,119 @@ +""" +This demo attempts to override the C++ MainLoop and implement it +in Python. This is not part of the demo framework. + + + THIS FEATURE IS STILL EXPERIMENTAL... +""" + + +from wxPython.wx import * +import time + + +#--------------------------------------------------------------------------- + +class MyFrame(wxFrame): + + def __init__(self, parent, id, title): + wxFrame.__init__(self, parent, id, title, + wxPoint(100, 100), wxSize(160, 150)) + + EVT_SIZE(self, self.OnSize) + EVT_MOVE(self, self.OnMove) + EVT_CLOSE(self, self.OnCloseWindow) + EVT_IDLE(self, self.OnIdle) + + self.count = 0 + + panel = wxPanel(self, -1) + wxStaticText(panel, -1, "Size:", + wxDLG_PNT(panel, wxPoint(4, 4)), wxDefaultSize) + wxStaticText(panel, -1, "Pos:", + wxDLG_PNT(panel, wxPoint(4, 16)), wxDefaultSize) + + wxStaticText(panel, -1, "Idle:", + wxDLG_PNT(panel, wxPoint(4, 28)), wxDefaultSize) + + self.sizeCtrl = wxTextCtrl(panel, -1, "", + wxDLG_PNT(panel, wxPoint(24, 4)), + wxDLG_SZE(panel, wxSize(36, -1)), + wxTE_READONLY) + + self.posCtrl = wxTextCtrl(panel, -1, "", + wxDLG_PNT(panel, wxPoint(24, 16)), + wxDLG_SZE(panel, wxSize(36, -1)), + wxTE_READONLY) + + self.idleCtrl = wxTextCtrl(panel, -1, "", + wxDLG_PNT(panel, wxPoint(24, 28)), + wxDLG_SZE(panel, wxSize(36, -1)), + wxTE_READONLY) + + + def OnCloseWindow(self, event): + app.keepGoing = false + self.Destroy() + + def OnIdle(self, event): + self.idleCtrl.SetValue(str(self.count)) + self.count = self.count + 1 + + def OnSize(self, event): + size = event.GetSize() + self.sizeCtrl.SetValue("%s, %s" % (size.width, size.height)) + event.Skip() + + def OnMove(self, event): + pos = event.GetPosition() + self.posCtrl.SetValue("%s, %s" % (pos.x, pos.y)) + + + +#--------------------------------------------------------------------------- + +class MyApp(wxApp): + def MainLoop(self): + # This outer loop determines when to exit the application, for + # this example we let the main frame reset this flag when it + # closes. + while self.keepGoing: + # At this point in the outer loop you could do whatever you + # implemented your own MainLoop for. It should be quick and + # non-blocking, otherwise your GUI will freeze. For example, + # call Fnorb's reactor.do_one_event(0), etc. + + # call_your_code_here() + + + # This inner loop will process any GUI events until there + # are no more waiting. + while self.Pending(): + self.Dispatch() + + # Send idle events to idle handlers. You may want to throtle + # this back a bit so there is not too much CPU time spent in + # the idle handlers. For this example, I'll just snooze a + # little... + time.sleep(0.25) + self.ProcessIdle() + + + + def OnInit(self): + frame = MyFrame(NULL, -1, "This is a test") + frame.Show(true) + self.SetTopWindow(frame) + + self.keepGoing = true + + return true + + +app = MyApp(0) +app.MainLoop() + + + + + diff --git a/utils/wxPython/demo/paper.xml b/utils/wxPython/demo/paper.xml new file mode 100644 index 0000000000..8bf6254b54 --- /dev/null +++ b/utils/wxPython/demo/paper.xml @@ -0,0 +1,85 @@ + + + + + +]> + +Using SGML to make footprints in the sand +footprintssand +JaneDoe +Empress +
Universe Corporation +1 Main Street +Perfect City +Dorado +Neutral999999 ++55 555 555 5550 ++55 555 555 5555 +jane@universe.com +www.universe.com +
+Jane Doe is the Empress of the Universe , a position to which she has always aspired. +
+FredBloggs +Designer +
Fred (The Shoe) Bloggs Ltd +1 Shoe Lane +Perfect City +Dorado +Neutral999999 ++55 555 555 1122 ++55 555 555 1133 +fred@shoebloggs.com +www.shoebloggs.com
+Fred has always wanted to create the perfect shoe for making footprints in the sand. Now with SGML and XML, he has been able to document his design. +
+ +easedocumentationIt's not easy being an Empress of the Universe (), but with the right pair of shoes and the right documentation on how to make footprints in the sand of life, it's easier than it was. Since the introduction of SGMLStandard Generalized Markup Language and XMLExtensible Markup Language it is now possible to identify and manage the key bits of information on this process. + +
+
Introduction +documentationSince its inception, the Universe has always had sand, now it has an Empress, a good shoe design, and SGML / XML documentation. The time is now ripe for making footprints in the sand.
+
Footprints - truly a push technologypush +One could safely say that making footprints is a push technology. This is even more true when the footprint maker is the Empress of the Universe. +The sands of timetime +The 1st think to remember about the Universe is the time/space continuum to which it conforms. This then confuses the sands of time to be something more like the sands of time/space continuum because if you wait on those sands long enough they may be somewhere else - not necessarily because of the time/space continuum but because the winds will push them down the beach. +Identifying the footprints +In order to truly understand who has walked on the sands and left the footprints, it is important to identify the characteristicscharacteristics of the footprint. In the graphic , we can see the footprints are large, well shaped, and evenly distributed from front to back and side to side. +
Footprint in SandNote the evenly distributed shape and indention
+This footprint begs the question, 'What kind of remarkable shoeshoe could make such a wonderful footprint?' + + +Shoe TypeRemarkability Rating +Acme ShoeUnremarkable +Budget ShoeNot worth remarking on +Super Duper ShoeAbsolutely Remarkable +
+The Shoe What Made the Footprint +The remarkable footprint is made by a combination of a terrific shoe worn on a fantastic foot propelled by a one-of-a-kind Empress. As can be seen in Figure , the shoe is worthy of an Empress. +
The Terrific Shoe
+The design goals of the shoe were: + +
  • to minimize time-consuming manual tasks such as shoelace tying;
  • +
  • to allow different decorations to be placed on the toes; and
  • +
  • to enforce a good arch.
  • +
    Documenting the Shoe +Documenting the shoe was the best part for Fred Bloggs. His superior design could be captured for all time in a neutrally-encoded, content-specific manner. An excerpt from his DTD gives an insight into the type of information he captured in his documentation. +<!DOCTYPE shoedoc [ +<!ELEMENT shoedoc - - (design, mfg, care, recycle) > +<!ATTLIST shoedoc designer CDATA #REQUIRED + date CDATA #REQUIRED> +<!ELEMENT design - - (specs, desc) > +etc. + +An excerpt from the documentation also gives us insights. + + +The arch shall be high. The toe shall be narrow, but not pinch. The heel shall not come off in grates. Sand shall not get in.]]> + +
    + +The authors wish to express our thanks to the Universe for being there and to gravity for holding the sand down long enough to see the footprints. + +Barrett 00Barrett, B., Being Empress Made Easy, Galaxy Division of Universal Publishers. 0000
    diff --git a/utils/wxPython/demo/quotes.xml b/utils/wxPython/demo/quotes.xml new file mode 100644 index 0000000000..b8f56e34d3 --- /dev/null +++ b/utils/wxPython/demo/quotes.xml @@ -0,0 +1,13 @@ + + + + + + + + + + +]> +We will perhaps eventually be writing only small modules which are identified by name as they are used to build larger ones, so that devices like indentation, rather than delimiters, might become feasible for expressing local structure in the source language. Donald E. Knuth, "Structured Programming with goto Statements", Computing Surveys, Vol 6 No 4, Dec. 1974 The infinities aren't contagious except in that they often appear that way due to to their large size. Tim Peters on the IEEE 754 floating point standard, 27 Apr 1998 diff --git a/utils/wxPython/demo/wxComboBox.py b/utils/wxPython/demo/wxComboBox.py index 4415d2f64e..3934bc18b3 100644 --- a/utils/wxPython/demo/wxComboBox.py +++ b/utils/wxPython/demo/wxComboBox.py @@ -15,9 +15,9 @@ class TestComboBox(wxPanel): wxPoint(8, 10)) wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18)) - wxComboBox(self, 50, "default value", wxPoint(80, 50), wxSize(95, 20), + wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, 20), sampleList, wxCB_DROPDOWN) - EVT_COMBOBOX(self, 50, self.EvtComboBox) + EVT_COMBOBOX(self, 500, self.EvtComboBox) def EvtComboBox(self, event): diff --git a/utils/wxPython/demo/wxGrid.py b/utils/wxPython/demo/wxGrid.py index 78431ca6c2..e61e30ee05 100644 --- a/utils/wxPython/demo/wxGrid.py +++ b/utils/wxPython/demo/wxGrid.py @@ -25,6 +25,8 @@ class TestGrid(wxGrid): EVT_GRID_CELL_LCLICK(self, self.OnCellClick) EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick) + self.SetEditInPlace(true) + #print self.GetCells() def OnSelectCell(self, event): diff --git a/utils/wxPython/demo/wxListCtrl.py b/utils/wxPython/demo/wxListCtrl.py index 54477934b2..790a88ce23 100644 --- a/utils/wxPython/demo/wxListCtrl.py +++ b/utils/wxPython/demo/wxListCtrl.py @@ -48,6 +48,7 @@ class TestListCtrlPanel(wxPanel): self.currentItem = 0 EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected) + EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete) EVT_LEFT_DCLICK(self.list, self.OnDoubleClick) EVT_RIGHT_DOWN(self.list, self.OnRightDown) @@ -68,6 +69,10 @@ class TestListCtrlPanel(wxPanel): self.currentItem = event.m_itemIndex self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem)) + def OnItemDelete(self, event): + self.log.WriteText("OnItemDelete\n") + + def OnDoubleClick(self, event): self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem)) @@ -78,13 +83,16 @@ class TestListCtrlPanel(wxPanel): tPopupID1 = 0 tPopupID2 = 1 tPopupID3 = 2 + tPopupID4 = 3 self.menu.Append(tPopupID1, "One") self.menu.Append(tPopupID2, "Two") self.menu.Append(tPopupID3, "Three") + self.menu.Append(tPopupID4, "DeleteAllItems") EVT_MENU(self, tPopupID1, self.OnPopupOne) EVT_MENU(self, tPopupID2, self.OnPopupTwo) EVT_MENU(self, tPopupID3, self.OnPopupThree) - self.PopupMenu(self.menu, self.x, self.y) + EVT_MENU(self, tPopupID4, self.OnPopupFour) + self.PopupMenu(self.menu, wxPoint(self.x, self.y)) def OnPopupOne(self, event): self.log.WriteText("Popup one\n") @@ -95,6 +103,9 @@ class TestListCtrlPanel(wxPanel): def OnPopupThree(self, event): self.log.WriteText("Popup three\n") + def OnPopupFour(self, event): + self.list.DeleteAllItems() + def OnSize(self, event): w,h = self.GetClientSizeTuple() self.list.SetDimensions(0, 0, w, h) diff --git a/utils/wxPython/demo/wxRadioBox.py b/utils/wxPython/demo/wxRadioBox.py index dbd28fd597..e20db49a6d 100644 --- a/utils/wxPython/demo/wxRadioBox.py +++ b/utils/wxPython/demo/wxRadioBox.py @@ -12,6 +12,11 @@ class TestRadioButtons(wxPanel): 'six', 'seven', 'eight'] rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 30), wxDefaultSize, + sampleList, 3, wxRA_SPECIFY_COLS) + EVT_RADIOBOX(self, 30, self.EvtRadioBox) + + + rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 120), wxDefaultSize, sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER) EVT_RADIOBOX(self, 30, self.EvtRadioBox) diff --git a/utils/wxPython/demo/wxTreeCtrl.py b/utils/wxPython/demo/wxTreeCtrl.py index f728bb36f5..1facf191a2 100644 --- a/utils/wxPython/demo/wxTreeCtrl.py +++ b/utils/wxPython/demo/wxTreeCtrl.py @@ -1,6 +1,8 @@ from wxPython.wx import * +import string + #--------------------------------------------------------------------------- class TestTreeCtrlPanel(wxPanel): @@ -10,19 +12,23 @@ class TestTreeCtrlPanel(wxPanel): self.log = log tID = NewId() - self.tree = wxTreeCtrl(self, tID) - root = self.tree.AddRoot("The Root Item") + self.tree = wxTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize, + wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS) + + self.root = self.tree.AddRoot("The Root Item") for x in range(15): - child = self.tree.AppendItem(root, "Item %d" % x) + child = self.tree.AppendItem(self.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) + self.tree.Expand(self.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_TREE_BEGIN_LABEL_EDIT(self, tID, self.OnBeginEdit) + EVT_TREE_END_LABEL_EDIT (self, tID, self.OnEndEdit) EVT_LEFT_DCLICK(self.tree, self.OnLeftDClick) EVT_RIGHT_DOWN(self.tree, self.OnRightClick) @@ -37,7 +43,30 @@ class TestTreeCtrlPanel(wxPanel): 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)) + self.log.WriteText("OnRightUp: %s (manually starting label edit)\n" + % self.tree.GetItemText(item)) + self.tree.EditLabel(item) + + + + def OnBeginEdit(self, event): + self.log.WriteText("OnBeginEdit\n") + # show how to prevent edit... + if self.tree.GetItemText(event.GetItem()) == "The Root Item": + wxBell() + self.log.WriteText("You can't edit this one...\n") + event.Veto() + + def OnEndEdit(self, event): + self.log.WriteText("OnEndEdit\n") + # show how to reject edit, we'll not allow any digits + for x in event.GetLabel(): + if x in string.digits: + self.log.WriteText("You can't enter digits...\n") + event.Veto() + return + + def OnLeftDClick(self, event): (x,y) = event.Position(); @@ -59,8 +88,8 @@ class TestTreeCtrlPanel(wxPanel): 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)) + self.item = event.GetItem() + self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(self.item)) #--------------------------------------------------------------------------- diff --git a/utils/wxPython/distrib/makexferzip.bat b/utils/wxPython/distrib/makexferzip.bat new file mode 100755 index 0000000000..133ecb15d9 --- /dev/null +++ b/utils/wxPython/distrib/makexferzip.bat @@ -0,0 +1,9 @@ + + +cd %WXWIN%\utils\wxPython +find . -name "*.py" > filelist +find . -name "*.i" >> filelist +find . -name "*.h" >> filelist +find . -name "*.cpp" >> filelist + +cat filelist | zip -r -u -@ xfer.zip diff --git a/utils/wxPython/distrib/wxPython.rsp b/utils/wxPython/distrib/wxPython.rsp index bf6e6ce26f..63342115bb 100644 --- a/utils/wxPython/distrib/wxPython.rsp +++ b/utils/wxPython/distrib/wxPython.rsp @@ -7,6 +7,7 @@ wxPython/demo/bitmaps/*.gif wxPython/demo/bitmaps/*.png wxPython/demo/bitmaps/*.jpg wxPython/demo/README.txt +wxPython/demo/*.xml wxPython/lib/*.py wxPython/lib/*.txt diff --git a/utils/wxPython/distrib/wxPython.wse b/utils/wxPython/distrib/wxPython.wse index 72b1b7d76d..8cc2b90ef4 100644 --- a/utils/wxPython/distrib/wxPython.wse +++ b/utils/wxPython/distrib/wxPython.wse @@ -862,6 +862,18 @@ item: Install File Description=Demos Flags=0000000010000010 end +item: Install File + Source=E:\Projects\wx\utils\wxPython\demo\README.txt + Destination=%MAINDIR%\wxPython\demo + Description=Demos + Flags=0000000010000010 +end +item: Install File + Source=e:\Projects\wx\utils\wxPython\demo\*.xml + Destination=%MAINDIR%\wxPython\demo + Description=Demos + Flags=0000000010000010 +end item: Install File Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.bmp Destination=%MAINDIR%\wxPython\demo\bitmaps diff --git a/utils/wxPython/distrib/wxPython.wsm b/utils/wxPython/distrib/wxPython.wsm index 49c7671da1794e515576f772c3ac5403a27ff7aa..b553b915a70169b4c72fb58a20ddadbe6e50cab0 100644 GIT binary patch literal 19 acmWF!_BDGZ$-uzKa9eHG2BW8%4DkRuUj`Te literal 33 mcmWF!_BDGZ$-uzKa9d4i-j+w241dI#7(jqAv|J_8mjM8s!w6CU diff --git a/utils/wxPython/lib/dialogs.py b/utils/wxPython/lib/dialogs.py index 1af300f716..27584d516d 100644 --- a/utils/wxPython/lib/dialogs.py +++ b/utils/wxPython/lib/dialogs.py @@ -19,7 +19,7 @@ class wxScrolledMessageDialog(wxDialog): 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,))) self.SetAutoLayout(TRUE) - + self.Layout() class wxMultipleChoiceDialog(wxDialog): @@ -47,6 +47,7 @@ class wxMultipleChoiceDialog(wxDialog): cancel.SetConstraints(Layoutf('b=b5#1;x%w75#1;w!80;h!25', (self,))) self.SetAutoLayout(TRUE) self.lst = lst + self.Layout() def OnSize(self, event): self.Layout() diff --git a/utils/wxPython/lib/sizers/sizer.py b/utils/wxPython/lib/sizers/sizer.py index 88814262ac..5cca29cbfe 100644 --- a/utils/wxPython/lib/sizers/sizer.py +++ b/utils/wxPython/lib/sizers/sizer.py @@ -55,6 +55,8 @@ class wxSizer: the Add method. """ for childinfo in widgets: + if type(childinfo) != type(()): + childinfo = (childinfo, ) apply(self.Add, childinfo) diff --git a/utils/wxPython/src/Makefile.pre.in b/utils/wxPython/src/Makefile.pre.in index 9fdee4768a..ebdfe36721 100644 --- a/utils/wxPython/src/Makefile.pre.in +++ b/utils/wxPython/src/Makefile.pre.in @@ -324,7 +324,7 @@ distclean: clobber # Custom rules and dependencies added for wxPython # -WXP_VERSION=2.1b1 +WXP_VERSION=2.1b2 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__ $(SEPARATE) diff --git a/utils/wxPython/src/_defs.i b/utils/wxPython/src/_defs.i index f005f8a785..8473d0cc79 100644 --- a/utils/wxPython/src/_defs.i +++ b/utils/wxPython/src/_defs.i @@ -232,6 +232,7 @@ enum { wxTE_PROCESS_ENTER, wxTE_PASSWORD, wxTE_READONLY, + wxTE_RICH, wxTE_MULTILINE, wxCB_SIMPLE, wxCB_DROPDOWN, @@ -264,6 +265,8 @@ enum { wxTR_HAS_BUTTONS, wxTR_EDIT_LABELS, wxTR_LINES_AT_ROOT, + wxTR_MULTIPLE, + wxTR_HAS_VARIABLE_ROW_HEIGHT, wxLC_ICON, wxLC_SMALL_ICON, wxLC_LIST, @@ -404,6 +407,9 @@ enum { wxPD_REMAINING_TIME, wxNO_DEFAULT, + wxMENU_TEAROFF, + wxNO_FULL_REPAINT_ON_RESIZE, + }; @@ -743,6 +749,9 @@ enum wxEventType { /* Character input event type */ wxEVT_CHAR, + wxEVT_KEY_DOWN, + wxEVT_KEY_UP, + wxEVT_CHAR_HOOK, /* * Scrollbar event identifiers @@ -773,8 +782,6 @@ enum wxEventType { wxEVT_QUERY_END_SESSION, wxEVT_ACTIVATE_APP, wxEVT_POWER, - wxEVT_CHAR_HOOK, - wxEVT_KEY_UP, wxEVT_ACTIVATE, wxEVT_CREATE, wxEVT_DESTROY, diff --git a/utils/wxPython/src/_extras.py b/utils/wxPython/src/_extras.py index 09d5e2b9f6..46bea0855f 100644 --- a/utils/wxPython/src/_extras.py +++ b/utils/wxPython/src/_extras.py @@ -95,6 +95,12 @@ def EVT_CHAR(win, func): def EVT_CHAR_HOOK(win, func): win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) +def EVT_KEY_DOWN(win, func): + win.Connect(-1, -1, wxEVT_KEY_DOWN, func) + +def EVT_KEY_UP(win, func): + win.Connect(-1, -1, wxEVT_KEY_UP, func) + def EVT_MENU_HIGHLIGHT(win, id, func): win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) @@ -586,6 +592,38 @@ class wxAcceleratorTable(wxAcceleratorTablePtr): self.this = miscc.new_wxAcceleratorTable(arg0) self.thisown = 1 +#---------------------------------------------------------------------- +# This helper function will take a wxPython object and convert it to +# another wxPython object type. This will not be able to create objects +# user that are derived from wxPython classes, only those that are +# actually part of wxPython and directly corespond to C++ objects. +# +# This is useful in situations where some method returns a generic +# type such as wxWindow, but you know that it is actually some +# derived type such as a wxTextCtrl. You can't call wxTextCtrl specific +# methods on a wxWindow object, but you can use this function to +# create a wxTextCtrl object that will pass the same pointer to +# the C++ code. You use it like this: +# +# textCtrl = wxPyTypeCast(window, "wxTextCtrl") +# +# +# WARNING: Using this function to type cast objects into types that +# they are not is not recommended and is likely to cause your +# program to crash... Hard. +# + +def wxPyTypeCast(obj, typeStr): + if hasattr(obj, "this"): + newPtr = ptrcast(obj.this, typeStr+"_p") + else: + newPtr = ptrcast(obj, typeStr+"_p") + theClass = globals()[typeStr+"Ptr"] + theObj = theClass(newPtr) + theObj.thisown = obj.thisown + return theObj + + #---------------------------------------------------------------------- ## class wxPyStdOutWindow: @@ -654,3 +692,10 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- +# DO NOT hold any other references to this object. This is how we know when +# to cleanup system resources that wxWin is holding... +__cleanMeUp = __wxPyCleanup() +#---------------------------------------------------------------------------- + + + diff --git a/utils/wxPython/src/controls.i b/utils/wxPython/src/controls.i index cffa62eb18..3d894ebd21 100644 --- a/utils/wxPython/src/controls.i +++ b/utils/wxPython/src/controls.i @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef __WXMSW__ #if wxUSE_OWNER_DRAWN @@ -26,7 +27,6 @@ #ifdef __WXGTK__ #include -#include #endif %} @@ -55,7 +55,9 @@ wxValidator wxPyDefaultValidator; // Non-const default because of SWIG class wxControl : public wxWindow { public: +#ifdef __WXMSW__ void Command(wxCommandEvent& event); +#endif wxString GetLabel(); void SetLabel(const wxString& label); }; @@ -222,7 +224,7 @@ public: //---------------------------------------------------------------------- -#ifdef __WXGTK__ + class wxStaticLine : public wxControl { public: wxStaticLine( wxWindow *parent, wxWindowID id, @@ -231,7 +233,7 @@ public: long style = wxLI_HORIZONTAL, const char* name = "staticLine" ); }; -#endif + //---------------------------------------------------------------------- @@ -424,6 +426,7 @@ public: const wxBitmap& GetBitmap(); void SetBitmap(const wxBitmap& bitmap); + void SetIcon(const wxIcon& icon); }; //---------------------------------------------------------------------- @@ -521,7 +524,53 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.16 1999/07/31 07:54:35 RD +// wxPython 2.1b1: +// +// Added the missing wxWindow.GetUpdateRegion() method. +// +// Made a new change in SWIG (update your patches everybody) that +// provides a fix for global shadow objects that get an exception in +// their __del__ when their extension module has already been deleted. +// It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about +// line 496 if you want to do it by hand. +// +// It is now possible to run through MainLoop more than once in any one +// process. The cleanup that used to happen as MainLoop completed (and +// prevented it from running again) has been delayed until the wxc module +// is being unloaded by Python. +// +// wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added +// wxWindow.PopupMenuXY to be consistent with some other methods. +// +// Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. +// +// You can now provide your own app.MainLoop method. See +// wxPython/demo/demoMainLoop.py for an example and some explaination. +// +// Got the in-place-edit for the wxTreeCtrl fixed and added some demo +// code to show how to use it. +// +// Put the wxIcon constructor back in for GTK as it now has one that +// matches MSW's. +// +// Added wxGrid.GetCells +// +// Added wxSystemSettings static methods as functions with names like +// wxSystemSettings_GetSystemColour. +// +// Removed wxPyMenu since using menu callbacks have been depreciated in +// wxWindows. Use wxMenu and events instead. +// +// Added alternate wxBitmap constructor (for MSW only) as +// wxBitmapFromData(data, type, width, height, depth = 1) +// +// Added a helper function named wxPyTypeCast that can convert shadow +// objects of one type into shadow objects of another type. (Like doing +// a down-cast.) See the implementation in wx.py for some docs. +// // Revision 1.15 1999/06/22 17:45:18 RD +// // wxPython 2.1b1: Very minor changes needed for wxGTK // // Revision 1.14 1999/06/22 07:03:02 RD diff --git a/utils/wxPython/src/controls2.i b/utils/wxPython/src/controls2.i index 3b4527f54c..8a8f6b72bc 100644 --- a/utils/wxPython/src/controls2.i +++ b/utils/wxPython/src/controls2.i @@ -143,6 +143,8 @@ public: wxTextCtrl* EditLabel(long item); bool EndEditLabel(bool cancel); wxTextCtrl* GetEditControl(); +#else + void EditLabel(long item); #endif bool EnsureVisible(long item); long FindItem(long start, const wxString& str, bool partial = FALSE); @@ -284,13 +286,13 @@ public: -class wxTreeEvent : public wxCommandEvent { +class wxTreeEvent : public wxNotifyEvent { public: wxTreeItemId GetItem(); wxTreeItemId GetOldItem(); wxPoint GetPoint(); int GetCode(); - void Veto(); + const wxString& GetLabel(); }; @@ -412,15 +414,17 @@ public: void Toggle(const wxTreeItemId& item); void Unselect(); + void UnselectAll(); void SelectItem(const wxTreeItemId& item); void EnsureVisible(const wxTreeItemId& item); void ScrollTo(const wxTreeItemId& item); - +#ifdef __WXMSW__ wxTextCtrl* EditLabel(const wxTreeItemId& item); - // **** figure out how to do this - // wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl)); wxTextCtrl* GetEditControl(); void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE); +#else + void EditLabel(const wxTreeItemId& item); +#endif // void SortChildren(const wxTreeItemId& item); // **** And this too diff --git a/utils/wxPython/src/gdi.i b/utils/wxPython/src/gdi.i index 05a5de9351..ba3a8aa788 100644 --- a/utils/wxPython/src/gdi.i +++ b/utils/wxPython/src/gdi.i @@ -61,6 +61,11 @@ public: %new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1); wxBitmap* wxNoRefBitmap(char* name, long flags); +#ifdef __WXMSW__ +%new wxBitmap* wxBitmapFromData(char* data, long type, + int width, int height, int depth = 1); +#endif + %{ // Alternate 'constructor' wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { return new wxBitmap(width, height, depth); @@ -73,6 +78,13 @@ wxBitmap* wxNoRefBitmap(char* name, long flags); wxBitmap* wxNoRefBitmap(char* name, long flags) { return new wxBitmap(name, flags); } + +#ifdef __WXMSW__ + wxBitmap* wxBitmapFromData(char* data, long type, + int width, int height, int depth = 1) { + return new wxBitmap((void*)data, type, width, height, depth); + } +#endif %} //--------------------------------------------------------------------------- @@ -96,10 +108,8 @@ public: class wxIcon : public wxBitmap { public: -#ifdef __WXMSW__ wxIcon(const wxString& name, long flags, int desiredWidth = -1, int desiredHeight = -1); -#endif ~wxIcon(); int GetDepth(); @@ -112,6 +122,7 @@ public: void SetWidth(int width); }; + //--------------------------------------------------------------------------- class wxCursor : public wxBitmap { @@ -348,8 +359,10 @@ public: void DrawBitmap(wxBitmap& bitmap, long x, long y, bool swapPalette=TRUE) { wxMemoryDC* memDC = new wxMemoryDC; memDC->SelectObject(bitmap); +#ifdef __WXMSW__ if (swapPalette) self->SetPalette(*bitmap.GetPalette()); +#endif self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC, 0, 0, self->GetLogicalFunction()); memDC->SelectObject(wxNullBitmap); diff --git a/utils/wxPython/src/gtk/cmndlgs.cpp b/utils/wxPython/src/gtk/cmndlgs.cpp index be99f56a67..b4c0404ccf 100644 --- a/utils/wxPython/src/gtk/cmndlgs.cpp +++ b/utils/wxPython/src/gtk/cmndlgs.cpp @@ -2516,7 +2516,6 @@ SWIGEXPORT(void,initcmndlgsc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); @@ -2743,7 +2742,6 @@ SWIGEXPORT(void,initcmndlgsc)() { SWIG_RegisterMapping("_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/gtk/cmndlgs.py b/utils/wxPython/src/gtk/cmndlgs.py index f8fa89db18..beea9f3dd3 100644 --- a/utils/wxPython/src/gtk/cmndlgs.py +++ b/utils/wxPython/src/gtk/cmndlgs.py @@ -19,7 +19,7 @@ class wxColourDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, cmndlgsc=cmndlgsc): if self.thisown == 1 : cmndlgsc.delete_wxColourData(self.this) def GetChooseFull(self): @@ -243,7 +243,7 @@ class wxFontDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, cmndlgsc=cmndlgsc): if self.thisown == 1 : cmndlgsc.delete_wxFontData(self.this) def EnableEffects(self,arg0): diff --git a/utils/wxPython/src/gtk/controls.cpp b/utils/wxPython/src/gtk/controls.cpp index 82c0087901..f3b06272b0 100644 --- a/utils/wxPython/src/gtk/controls.cpp +++ b/utils/wxPython/src/gtk/controls.cpp @@ -57,6 +57,7 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include #ifdef __WXMSW__ #if wxUSE_OWNER_DRAWN @@ -66,7 +67,6 @@ extern PyObject *SWIG_newvarlink(void); #ifdef __WXGTK__ #include -#include #endif @@ -147,39 +147,6 @@ static void *SwigwxControlTowxEvtHandler(void *ptr) { return (void *) dest; } -#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) -static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxControl * _arg0; - wxCommandEvent * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxControl_Command",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxControl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_Command. Expected _wxControl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Command. Expected _wxCommandEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxControl_Command(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxControl_GetLabel(_swigobj) (_swigobj->GetLabel()) static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -4994,6 +4961,39 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args) return _resultobj; } +#define wxStaticBitmap_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0)) +static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxStaticBitmap * _arg0; + wxIcon * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxStaticBitmap_SetIcon",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_SetIcon. Expected _wxStaticBitmap_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStaticBitmap_SetIcon(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxRadioBoxTowxControl(void *ptr) { wxRadioBox *src; wxControl *dest; @@ -6253,6 +6253,7 @@ static PyMethodDef controlscMethods[] = { { "wxRadioBox_EnableItem", _wrap_wxRadioBox_EnableItem, 1 }, { "wxRadioBox_Enable", _wrap_wxRadioBox_Enable, 1 }, { "new_wxRadioBox", _wrap_new_wxRadioBox, 1 }, + { "wxStaticBitmap_SetIcon", _wrap_wxStaticBitmap_SetIcon, 1 }, { "wxStaticBitmap_SetBitmap", _wrap_wxStaticBitmap_SetBitmap, 1 }, { "wxStaticBitmap_GetBitmap", _wrap_wxStaticBitmap_GetBitmap, 1 }, { "new_wxStaticBitmap", _wrap_new_wxStaticBitmap, 1 }, @@ -6388,7 +6389,6 @@ static PyMethodDef controlscMethods[] = { { "new_wxButton", _wrap_new_wxButton, 1 }, { "wxControl_SetLabel", _wrap_wxControl_SetLabel, 1 }, { "wxControl_GetLabel", _wrap_wxControl_GetLabel, 1 }, - { "wxControl_Command", _wrap_wxControl_Command, 1 }, { NULL, NULL } }; static PyObject *SWIG_globals; @@ -6462,7 +6462,6 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -6680,7 +6679,6 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/gtk/controls.py b/utils/wxPython/src/gtk/controls.py index 1c6ec4a5f5..fcfa6056e7 100644 --- a/utils/wxPython/src/gtk/controls.py +++ b/utils/wxPython/src/gtk/controls.py @@ -13,9 +13,6 @@ class wxControlPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 - def Command(self,arg0): - val = controlsc.wxControl_Command(self.this,arg0.this) - return val def GetLabel(self): val = controlsc.wxControl_GetLabel(self.this) return val @@ -685,6 +682,9 @@ class wxStaticBitmapPtr(wxControlPtr): def SetBitmap(self,arg0): val = controlsc.wxStaticBitmap_SetBitmap(self.this,arg0.this) return val + def SetIcon(self,arg0): + val = controlsc.wxStaticBitmap_SetIcon(self.this,arg0.this) + return val def __repr__(self): return "" class wxStaticBitmap(wxStaticBitmapPtr): diff --git a/utils/wxPython/src/gtk/controls2.cpp b/utils/wxPython/src/gtk/controls2.cpp index 8917e0d194..6ebf7a9772 100644 --- a/utils/wxPython/src/gtk/controls2.cpp +++ b/utils/wxPython/src/gtk/controls2.cpp @@ -1349,6 +1349,32 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args) { return _resultobj; } +#define wxListCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) +static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxListCtrl * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxListCtrl_EditLabel",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EditLabel. Expected _wxListCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListCtrl_EditLabel(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxListCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -2814,6 +2840,14 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args) { return _resultobj; } +static void *SwigwxTreeEventTowxNotifyEvent(void *ptr) { + wxTreeEvent *src; + wxNotifyEvent *dest; + src = (wxTreeEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + static void *SwigwxTreeEventTowxCommandEvent(void *ptr) { wxTreeEvent *src; wxCommandEvent *dest; @@ -2936,28 +2970,31 @@ static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args) { return _resultobj; } -#define wxTreeEvent_Veto(_swigobj) (_swigobj->Veto()) -static PyObject *_wrap_wxTreeEvent_Veto(PyObject *self, PyObject *args) { +#define wxTreeEvent_GetLabel(_swigobj) (_swigobj->GetLabel()) +static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args) { PyObject * _resultobj; + wxString * _result; wxTreeEvent * _arg0; char * _argc0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_Veto",&_argc0)) + if(!PyArg_ParseTuple(args,"s:wxTreeEvent_GetLabel",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_Veto. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetLabel. Expected _wxTreeEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeEvent_Veto(_arg0); + const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); + _result = (wxString *) &_result_ref; wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ + _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); +} return _resultobj; } @@ -4659,6 +4696,31 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args) { return _resultobj; } +#define wxTreeCtrl_UnselectAll(_swigobj) (_swigobj->UnselectAll()) +static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxTreeCtrl * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_UnselectAll",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxTreeCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTreeCtrl_UnselectAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -4761,12 +4823,10 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args) { #define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args) { PyObject * _resultobj; - wxTextCtrl * _result; wxTreeCtrl * _arg0; wxTreeItemId * _arg1; char * _argc0 = 0; char * _argc1 = 0; - char _ptemp[128]; self = self; if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_EditLabel",&_argc0,&_argc1)) @@ -4785,70 +4845,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args) { } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) -static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxTreeCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_GetEditControl",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxTreeCtrl_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxTreeCtrl_EndEditLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->EndEditLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - wxTreeItemId * _arg1; - bool _arg2 = (0); - char * _argc0 = 0; - char * _argc1 = 0; - int tempbool2; - - self = self; - if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_EndEditLabel",&_argc0,&_argc1,&tempbool2)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EndEditLabel. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItemId_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EndEditLabel. Expected _wxTreeItemId_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_EndEditLabel(_arg0,*_arg1,_arg2); + wxTreeCtrl_EditLabel(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4964,12 +4961,11 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_HitTest", _wrap_wxTreeCtrl_HitTest, 1 }, { "wxTreeCtrl_IsBold", _wrap_wxTreeCtrl_IsBold, 1 }, { "wxTreeCtrl_SetItemBold", _wrap_wxTreeCtrl_SetItemBold, 1 }, - { "wxTreeCtrl_EndEditLabel", _wrap_wxTreeCtrl_EndEditLabel, 1 }, - { "wxTreeCtrl_GetEditControl", _wrap_wxTreeCtrl_GetEditControl, 1 }, { "wxTreeCtrl_EditLabel", _wrap_wxTreeCtrl_EditLabel, 1 }, { "wxTreeCtrl_ScrollTo", _wrap_wxTreeCtrl_ScrollTo, 1 }, { "wxTreeCtrl_EnsureVisible", _wrap_wxTreeCtrl_EnsureVisible, 1 }, { "wxTreeCtrl_SelectItem", _wrap_wxTreeCtrl_SelectItem, 1 }, + { "wxTreeCtrl_UnselectAll", _wrap_wxTreeCtrl_UnselectAll, 1 }, { "wxTreeCtrl_Unselect", _wrap_wxTreeCtrl_Unselect, 1 }, { "wxTreeCtrl_Toggle", _wrap_wxTreeCtrl_Toggle, 1 }, { "wxTreeCtrl_CollapseAndReset", _wrap_wxTreeCtrl_CollapseAndReset, 1 }, @@ -5016,7 +5012,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_GetIndent", _wrap_wxTreeCtrl_GetIndent, 1 }, { "wxTreeCtrl_GetCount", _wrap_wxTreeCtrl_GetCount, 1 }, { "new_wxTreeCtrl", _wrap_new_wxTreeCtrl, 1 }, - { "wxTreeEvent_Veto", _wrap_wxTreeEvent_Veto, 1 }, + { "wxTreeEvent_GetLabel", _wrap_wxTreeEvent_GetLabel, 1 }, { "wxTreeEvent_GetCode", _wrap_wxTreeEvent_GetCode, 1 }, { "wxTreeEvent_GetPoint", _wrap_wxTreeEvent_GetPoint, 1 }, { "wxTreeEvent_GetOldItem", _wrap_wxTreeEvent_GetOldItem, 1 }, @@ -5069,6 +5065,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_FindItemData", _wrap_wxListCtrl_FindItemData, 1 }, { "wxListCtrl_FindItem", _wrap_wxListCtrl_FindItem, 1 }, { "wxListCtrl_EnsureVisible", _wrap_wxListCtrl_EnsureVisible, 1 }, + { "wxListCtrl_EditLabel", _wrap_wxListCtrl_EditLabel, 1 }, { "wxListCtrl_ClearAll", _wrap_wxListCtrl_ClearAll, 1 }, { "wxListCtrl_DeleteAllColumns", _wrap_wxListCtrl_DeleteAllColumns, 1 }, { "wxListCtrl_DeleteColumn", _wrap_wxListCtrl_DeleteColumn, 1 }, @@ -5197,10 +5194,11 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); + SWIG_RegisterMapping("_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); + SWIG_RegisterMapping("_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -5269,6 +5267,8 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0); SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); + SWIG_RegisterMapping("_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); + SWIG_RegisterMapping("_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0); SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0); SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); @@ -5357,7 +5357,6 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/gtk/controls2.py b/utils/wxPython/src/gtk/controls2.py index 24bcc25d57..8d89ad09c2 100644 --- a/utils/wxPython/src/gtk/controls2.py +++ b/utils/wxPython/src/gtk/controls2.py @@ -15,7 +15,7 @@ class wxListItemPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, controls2c=controls2c): if self.thisown == 1 : controls2c.delete_wxListItem(self.this) def __setattr__(self,name,value): @@ -156,6 +156,9 @@ class wxListCtrlPtr(wxControlPtr): def ClearAll(self): val = controls2c.wxListCtrl_ClearAll(self.this) return val + def EditLabel(self,arg0): + val = controls2c.wxListCtrl_EditLabel(self.this,arg0) + return val def EnsureVisible(self,arg0): val = controls2c.wxListCtrl_EnsureVisible(self.this,arg0) return val @@ -304,7 +307,7 @@ class wxTreeItemIdPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, controls2c=controls2c): if self.thisown == 1 : controls2c.delete_wxTreeItemId(self.this) def IsOk(self): @@ -347,7 +350,7 @@ class wxTreeItemData(wxTreeItemDataPtr): -class wxTreeEventPtr(wxCommandEventPtr): +class wxTreeEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -369,8 +372,8 @@ class wxTreeEventPtr(wxCommandEventPtr): def GetCode(self): val = controls2c.wxTreeEvent_GetCode(self.this) return val - def Veto(self): - val = controls2c.wxTreeEvent_Veto(self.this) + def GetLabel(self): + val = controls2c.wxTreeEvent_GetLabel(self.this) return val def __repr__(self): return "" @@ -563,6 +566,9 @@ class wxTreeCtrlPtr(wxControlPtr): def Unselect(self): val = controls2c.wxTreeCtrl_Unselect(self.this) return val + def UnselectAll(self): + val = controls2c.wxTreeCtrl_UnselectAll(self.this) + return val def SelectItem(self,arg0): val = controls2c.wxTreeCtrl_SelectItem(self.this,arg0.this) return val @@ -574,14 +580,6 @@ class wxTreeCtrlPtr(wxControlPtr): return val def EditLabel(self,arg0): val = controls2c.wxTreeCtrl_EditLabel(self.this,arg0.this) - val = wxTextCtrlPtr(val) - return val - def GetEditControl(self): - val = controls2c.wxTreeCtrl_GetEditControl(self.this) - val = wxTextCtrlPtr(val) - return val - def EndEditLabel(self,arg0,*args): - val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self.this,arg0.this,)+args) return val def SetItemBold(self,arg0,*args): val = apply(controls2c.wxTreeCtrl_SetItemBold,(self.this,arg0.this,)+args) diff --git a/utils/wxPython/src/gtk/events.py b/utils/wxPython/src/gtk/events.py index 243b0480b6..c0f57d9f44 100644 --- a/utils/wxPython/src/gtk/events.py +++ b/utils/wxPython/src/gtk/events.py @@ -609,7 +609,7 @@ class wxPyEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, eventsc=eventsc): if self.thisown == 1 : eventsc.delete_wxPyEvent(self.this) def SetUserData(self,arg0): diff --git a/utils/wxPython/src/gtk/frames.cpp b/utils/wxPython/src/gtk/frames.cpp index d8150a9ee2..5afffb657c 100644 --- a/utils/wxPython/src/gtk/frames.cpp +++ b/utils/wxPython/src/gtk/frames.cpp @@ -900,7 +900,6 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -1047,7 +1046,6 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/gtk/gdi.cpp b/utils/wxPython/src/gtk/gdi.cpp index 860f822f62..570ce62791 100644 --- a/utils/wxPython/src/gtk/gdi.cpp +++ b/utils/wxPython/src/gtk/gdi.cpp @@ -132,6 +132,13 @@ static char* wxStringErrorMsg = "string type is required for parameter"; return new wxBitmap(name, flags); } +#ifdef __WXMSW__ + wxBitmap* wxBitmapFromData(char* data, long type, + int width, int height, int depth = 1) { + return new wxBitmap((void*)data, type, width, height, depth); + } +#endif + wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) { return new wxMask(bitmap, colour); } @@ -1443,6 +1450,41 @@ static void *SwigwxIconTowxBitmap(void *ptr) { return (void *) dest; } +#define new_wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxIcon * _result; + wxString * _arg0; + long _arg1; + int _arg2 = -1; + int _arg3 = -1; + PyObject * _obj0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"Ol|ii:new_wxIcon",&_obj0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + #define delete_wxIcon(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -5012,8 +5054,10 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) { static void wxDC_DrawBitmap(wxDC *self,wxBitmap & bitmap,long x,long y,bool swapPalette) { wxMemoryDC* memDC = new wxMemoryDC; memDC->SelectObject(bitmap); +#ifdef __WXMSW__ if (swapPalette) self->SetPalette(*bitmap.GetPalette()); +#endif self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC, 0, 0, self->GetLogicalFunction()); memDC->SelectObject(wxNullBitmap); @@ -5959,6 +6003,7 @@ static PyMethodDef gdicMethods[] = { { "wxIcon_GetHeight", _wrap_wxIcon_GetHeight, 1 }, { "wxIcon_GetDepth", _wrap_wxIcon_GetDepth, 1 }, { "delete_wxIcon", _wrap_delete_wxIcon, 1 }, + { "new_wxIcon", _wrap_new_wxIcon, 1 }, { "delete_wxMask", _wrap_delete_wxMask, 1 }, { "new_wxMask", _wrap_new_wxMask, 1 }, { "wxBitmap_SetWidth", _wrap_wxBitmap_SetWidth, 1 }, diff --git a/utils/wxPython/src/gtk/gdi.py b/utils/wxPython/src/gtk/gdi.py index 75790253bb..7f21ffe6ee 100644 --- a/utils/wxPython/src/gtk/gdi.py +++ b/utils/wxPython/src/gtk/gdi.py @@ -6,7 +6,7 @@ class wxBitmapPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxBitmap(self.this) def GetDepth(self): @@ -65,7 +65,7 @@ class wxMaskPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxMask(self.this) def __repr__(self): @@ -82,7 +82,7 @@ class wxIconPtr(wxBitmapPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxIcon(self.this) def GetDepth(self): @@ -112,8 +112,9 @@ class wxIconPtr(wxBitmapPtr): def __repr__(self): return "" class wxIcon(wxIconPtr): - def __init__(self,this): - self.this = this + def __init__(self,arg0,arg1,*args) : + self.this = apply(gdic.new_wxIcon,(arg0,arg1,)+args) + self.thisown = 1 @@ -122,7 +123,7 @@ class wxCursorPtr(wxBitmapPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxCursor(self.this) def Ok(self): @@ -191,7 +192,7 @@ class wxColourPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxColour(self.this) def Red(self): @@ -311,7 +312,7 @@ class wxDCPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxDC(self.this) def BeginDrawing(self): @@ -664,7 +665,7 @@ class wxPalettePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxPalette(self.this) def GetPixel(self,arg0,arg1,arg2): @@ -690,7 +691,7 @@ class wxImageListPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxImageList(self.this) def Add(self,arg0): diff --git a/utils/wxPython/src/gtk/glcanvas.cpp b/utils/wxPython/src/gtk/glcanvas.cpp index cf3f38ee64..f6d1c1b138 100644 --- a/utils/wxPython/src/gtk/glcanvas.cpp +++ b/utils/wxPython/src/gtk/glcanvas.cpp @@ -9014,6 +9014,7 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_wxPrintQuality","_EBool",0); SWIG_RegisterMapping("_wxPrintQuality","_size_t",0); SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); + SWIG_RegisterMapping("___wxPyCleanup","_class___wxPyCleanup",0); SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0); @@ -9043,7 +9044,6 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); SWIG_RegisterMapping("_wxPNGHandler","_class_wxPNGHandler",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0); SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0); @@ -9170,6 +9170,7 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_class_wxButton","_wxButton",0); SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); + SWIG_RegisterMapping("_class___wxPyCleanup","___wxPyCleanup",0); SWIG_RegisterMapping("_GLclampf","_float",0); SWIG_RegisterMapping("_GLclampf","_GLfloat",0); SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); @@ -9332,7 +9333,6 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); SWIG_RegisterMapping("_GLdouble","_GLclampd",0); SWIG_RegisterMapping("_GLdouble","_double",0); diff --git a/utils/wxPython/src/gtk/glcanvas.py b/utils/wxPython/src/gtk/glcanvas.py index 0524d4851b..fb8e97224b 100644 --- a/utils/wxPython/src/gtk/glcanvas.py +++ b/utils/wxPython/src/gtk/glcanvas.py @@ -35,7 +35,7 @@ class wxGLContextPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, glcanvasc=glcanvasc): if self.thisown == 1 : glcanvasc.delete_wxGLContext(self.this) def SetCurrent(self): diff --git a/utils/wxPython/src/gtk/image.cpp b/utils/wxPython/src/gtk/image.cpp index 028ced725f..145f538b4b 100644 --- a/utils/wxPython/src/gtk/image.cpp +++ b/utils/wxPython/src/gtk/image.cpp @@ -815,6 +815,33 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args) { return _resultobj; } +#define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxImage * _arg0; + int _arg1; + int _arg2; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sii:wxImage_Rescale",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImage_Rescale(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_wxImage_SetRGB(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1417,6 +1444,7 @@ static PyMethodDef imagecMethods[] = { { "wxImage_GetGreen", _wrap_wxImage_GetGreen, 1 }, { "wxImage_GetRed", _wrap_wxImage_GetRed, 1 }, { "wxImage_SetRGB", _wrap_wxImage_SetRGB, 1 }, + { "wxImage_Rescale", _wrap_wxImage_Rescale, 1 }, { "wxImage_Scale", _wrap_wxImage_Scale, 1 }, { "wxImage_Destroy", _wrap_wxImage_Destroy, 1 }, { "wxImage_Create", _wrap_wxImage_Create, 1 }, diff --git a/utils/wxPython/src/gtk/image.py b/utils/wxPython/src/gtk/image.py index 6743bf9b5c..103d98f488 100644 --- a/utils/wxPython/src/gtk/image.py +++ b/utils/wxPython/src/gtk/image.py @@ -102,7 +102,7 @@ class wxImagePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, imagec=imagec): if self.thisown == 1 : imagec.delete_wxImage(self.this) def ConvertToBitmap(self): @@ -121,6 +121,9 @@ class wxImagePtr : val = wxImagePtr(val) val.thisown = 1 return val + def Rescale(self,arg0,arg1): + val = imagec.wxImage_Rescale(self.this,arg0,arg1) + return val def SetRGB(self,arg0,arg1,arg2,arg3,arg4): val = imagec.wxImage_SetRGB(self.this,arg0,arg1,arg2,arg3,arg4) return val diff --git a/utils/wxPython/src/gtk/mdi.cpp b/utils/wxPython/src/gtk/mdi.cpp index 97967b0bf2..f980e5b4fb 100644 --- a/utils/wxPython/src/gtk/mdi.cpp +++ b/utils/wxPython/src/gtk/mdi.cpp @@ -664,7 +664,6 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -817,7 +816,6 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/gtk/misc.cpp b/utils/wxPython/src/gtk/misc.cpp index 177b66103e..1c0293e5ac 100644 --- a/utils/wxPython/src/gtk/misc.cpp +++ b/utils/wxPython/src/gtk/misc.cpp @@ -122,6 +122,19 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxGetResource(section, entry, &retval, file); return retval; } + + + wxColour wxSystemSettings_GetSystemColour(int index) { + return wxSystemSettings::GetSystemColour(index); + } + + wxFont wxSystemSettings_GetSystemFont(int index) { + return wxSystemSettings::GetSystemFont(index); + } + + int wxSystemSettings_GetSystemMetric(int index) { + return wxSystemSettings::GetSystemMetric(index); + } static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) { PyObject * _resultobj; wxString * _result; @@ -449,6 +462,80 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args) { return _resultobj; } +static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + long _arg3; + long _arg4 = 0; + long _arg5 = 100; + wxWindow * _arg6 = NULL; + wxPoint * _arg7 = &wxPyDefaultPosition; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char * _argc6 = 0; + char * _argc7 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"OOOl|llss:wxGetNumberFromUser",&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argc6,&_argc7)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} + if (_argc6) { + if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc7) { + if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxGetNumberFromUser. Expected _wxPoint_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args) { PyObject * _resultobj; bool _result; @@ -1038,6 +1125,61 @@ static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args) { return _resultobj; } +static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + int _arg0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemColour",&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxSystemSettings_GetSystemColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _result; + int _arg0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemFont",&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxSystemSettings_GetSystemFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + int _arg0; + + self = self; + if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemMetric",&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSystemSettings_GetSystemMetric(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -3982,6 +4124,9 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", _wrap_wxSize_y_set, 1 }, { "wxSize_x_get", _wrap_wxSize_x_get, 1 }, { "wxSize_x_set", _wrap_wxSize_x_set, 1 }, + { "wxSystemSettings_GetSystemMetric", _wrap_wxSystemSettings_GetSystemMetric, 1 }, + { "wxSystemSettings_GetSystemFont", _wrap_wxSystemSettings_GetSystemFont, 1 }, + { "wxSystemSettings_GetSystemColour", _wrap_wxSystemSettings_GetSystemColour, 1 }, { "wxResourceParseString", _wrap_wxResourceParseString, 1 }, { "wxResourceParseFile", _wrap_wxResourceParseFile, 1 }, { "wxResourceParseData", _wrap_wxResourceParseData, 1 }, @@ -4011,6 +4156,7 @@ static PyMethodDef misccMethods[] = { { "wxSetCursor", _wrap_wxSetCursor, 1 }, { "wxDisplayDepth", _wrap_wxDisplayDepth, 1 }, { "wxColourDisplay", _wrap_wxColourDisplay, 1 }, + { "wxGetNumberFromUser", _wrap_wxGetNumberFromUser, 1 }, { "wxMessageBox", _wrap_wxMessageBox, 1 }, { "wxGetSingleChoiceIndex", _wrap_wxGetSingleChoiceIndex, 1 }, { "wxGetSingleChoice", _wrap_wxGetSingleChoice, 1 }, @@ -4049,6 +4195,92 @@ SWIGEXPORT(void,initmiscc)() { PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); + PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH)); + PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH)); + PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH)); + PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH)); + PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN)); + PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN)); + PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN)); + PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT)); + PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); + PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); + PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); + PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); + PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X)); + PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y)); + PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X)); + PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y)); + PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X)); + PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y)); + PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X)); + PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X)); + PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X)); + PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y)); + PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X)); + PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y)); + PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y)); + PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y)); + PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT)); + PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT)); + PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS)); + PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS)); /* * These are the pointer type-equivalency mappings. * (Used by the SWIG pointer type-checker). diff --git a/utils/wxPython/src/gtk/misc.py b/utils/wxPython/src/gtk/misc.py index d72a369b9d..55cefb5ce4 100644 --- a/utils/wxPython/src/gtk/misc.py +++ b/utils/wxPython/src/gtk/misc.py @@ -4,7 +4,7 @@ class wxSizePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxSize(self.this) def Set(self,arg0,arg1): @@ -71,7 +71,7 @@ class wxRealPointPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRealPoint(self.this) def __setattr__(self,name,value): @@ -102,7 +102,7 @@ class wxPointPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxPoint(self.this) def Set(self,arg0,arg1): @@ -141,7 +141,7 @@ class wxRectPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRect(self.this) def GetX(self): @@ -233,7 +233,7 @@ class wxPyTimerPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxPyTimer(self.this) def Interval(self): @@ -360,7 +360,7 @@ class wxRegionPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRegion(self.this) def Clear(self): @@ -406,7 +406,7 @@ class wxRegionIteratorPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRegionIterator(self.this) def GetX(self): @@ -535,6 +535,16 @@ def wxMessageBox(arg0,*args): val = apply(miscc.wxMessageBox,(arg0,)+args) return val +def wxGetNumberFromUser(arg0,arg1,arg2,arg3,*args): + argl = map(None,args) + try: argl[2] = argl[2].this + except: pass + try: argl[3] = argl[3].this + except: pass + args = tuple(argl) + val = apply(miscc.wxGetNumberFromUser,(arg0,arg1,arg2,arg3,)+args) + return val + wxColourDisplay = miscc.wxColourDisplay wxDisplayDepth = miscc.wxDisplayDepth @@ -612,6 +622,20 @@ wxResourceParseFile = miscc.wxResourceParseFile wxResourceParseString = miscc.wxResourceParseString +def wxSystemSettings_GetSystemColour(arg0): + val = miscc.wxSystemSettings_GetSystemColour(arg0) + val = wxColourPtr(val) + val.thisown = 1 + return val + +def wxSystemSettings_GetSystemFont(arg0): + val = miscc.wxSystemSettings_GetSystemFont(arg0) + val = wxFontPtr(val) + val.thisown = 1 + return val + +wxSystemSettings_GetSystemMetric = miscc.wxSystemSettings_GetSystemMetric + #-------------- VARIABLE WRAPPERS ------------------ @@ -638,3 +662,89 @@ wxAbsolute = miscc.wxAbsolute wxOutRegion = miscc.wxOutRegion wxPartRegion = miscc.wxPartRegion wxInRegion = miscc.wxInRegion +wxSYS_WHITE_BRUSH = miscc.wxSYS_WHITE_BRUSH +wxSYS_LTGRAY_BRUSH = miscc.wxSYS_LTGRAY_BRUSH +wxSYS_GRAY_BRUSH = miscc.wxSYS_GRAY_BRUSH +wxSYS_DKGRAY_BRUSH = miscc.wxSYS_DKGRAY_BRUSH +wxSYS_BLACK_BRUSH = miscc.wxSYS_BLACK_BRUSH +wxSYS_NULL_BRUSH = miscc.wxSYS_NULL_BRUSH +wxSYS_HOLLOW_BRUSH = miscc.wxSYS_HOLLOW_BRUSH +wxSYS_WHITE_PEN = miscc.wxSYS_WHITE_PEN +wxSYS_BLACK_PEN = miscc.wxSYS_BLACK_PEN +wxSYS_NULL_PEN = miscc.wxSYS_NULL_PEN +wxSYS_OEM_FIXED_FONT = miscc.wxSYS_OEM_FIXED_FONT +wxSYS_ANSI_FIXED_FONT = miscc.wxSYS_ANSI_FIXED_FONT +wxSYS_ANSI_VAR_FONT = miscc.wxSYS_ANSI_VAR_FONT +wxSYS_SYSTEM_FONT = miscc.wxSYS_SYSTEM_FONT +wxSYS_DEVICE_DEFAULT_FONT = miscc.wxSYS_DEVICE_DEFAULT_FONT +wxSYS_DEFAULT_PALETTE = miscc.wxSYS_DEFAULT_PALETTE +wxSYS_SYSTEM_FIXED_FONT = miscc.wxSYS_SYSTEM_FIXED_FONT +wxSYS_DEFAULT_GUI_FONT = miscc.wxSYS_DEFAULT_GUI_FONT +wxSYS_COLOUR_SCROLLBAR = miscc.wxSYS_COLOUR_SCROLLBAR +wxSYS_COLOUR_BACKGROUND = miscc.wxSYS_COLOUR_BACKGROUND +wxSYS_COLOUR_ACTIVECAPTION = miscc.wxSYS_COLOUR_ACTIVECAPTION +wxSYS_COLOUR_INACTIVECAPTION = miscc.wxSYS_COLOUR_INACTIVECAPTION +wxSYS_COLOUR_MENU = miscc.wxSYS_COLOUR_MENU +wxSYS_COLOUR_WINDOW = miscc.wxSYS_COLOUR_WINDOW +wxSYS_COLOUR_WINDOWFRAME = miscc.wxSYS_COLOUR_WINDOWFRAME +wxSYS_COLOUR_MENUTEXT = miscc.wxSYS_COLOUR_MENUTEXT +wxSYS_COLOUR_WINDOWTEXT = miscc.wxSYS_COLOUR_WINDOWTEXT +wxSYS_COLOUR_CAPTIONTEXT = miscc.wxSYS_COLOUR_CAPTIONTEXT +wxSYS_COLOUR_ACTIVEBORDER = miscc.wxSYS_COLOUR_ACTIVEBORDER +wxSYS_COLOUR_INACTIVEBORDER = miscc.wxSYS_COLOUR_INACTIVEBORDER +wxSYS_COLOUR_APPWORKSPACE = miscc.wxSYS_COLOUR_APPWORKSPACE +wxSYS_COLOUR_HIGHLIGHT = miscc.wxSYS_COLOUR_HIGHLIGHT +wxSYS_COLOUR_HIGHLIGHTTEXT = miscc.wxSYS_COLOUR_HIGHLIGHTTEXT +wxSYS_COLOUR_BTNFACE = miscc.wxSYS_COLOUR_BTNFACE +wxSYS_COLOUR_BTNSHADOW = miscc.wxSYS_COLOUR_BTNSHADOW +wxSYS_COLOUR_GRAYTEXT = miscc.wxSYS_COLOUR_GRAYTEXT +wxSYS_COLOUR_BTNTEXT = miscc.wxSYS_COLOUR_BTNTEXT +wxSYS_COLOUR_INACTIVECAPTIONTEXT = miscc.wxSYS_COLOUR_INACTIVECAPTIONTEXT +wxSYS_COLOUR_BTNHIGHLIGHT = miscc.wxSYS_COLOUR_BTNHIGHLIGHT +wxSYS_COLOUR_3DDKSHADOW = miscc.wxSYS_COLOUR_3DDKSHADOW +wxSYS_COLOUR_3DLIGHT = miscc.wxSYS_COLOUR_3DLIGHT +wxSYS_COLOUR_INFOTEXT = miscc.wxSYS_COLOUR_INFOTEXT +wxSYS_COLOUR_INFOBK = miscc.wxSYS_COLOUR_INFOBK +wxSYS_COLOUR_DESKTOP = miscc.wxSYS_COLOUR_DESKTOP +wxSYS_COLOUR_3DFACE = miscc.wxSYS_COLOUR_3DFACE +wxSYS_COLOUR_3DSHADOW = miscc.wxSYS_COLOUR_3DSHADOW +wxSYS_COLOUR_3DHIGHLIGHT = miscc.wxSYS_COLOUR_3DHIGHLIGHT +wxSYS_COLOUR_3DHILIGHT = miscc.wxSYS_COLOUR_3DHILIGHT +wxSYS_COLOUR_BTNHILIGHT = miscc.wxSYS_COLOUR_BTNHILIGHT +wxSYS_MOUSE_BUTTONS = miscc.wxSYS_MOUSE_BUTTONS +wxSYS_BORDER_X = miscc.wxSYS_BORDER_X +wxSYS_BORDER_Y = miscc.wxSYS_BORDER_Y +wxSYS_CURSOR_X = miscc.wxSYS_CURSOR_X +wxSYS_CURSOR_Y = miscc.wxSYS_CURSOR_Y +wxSYS_DCLICK_X = miscc.wxSYS_DCLICK_X +wxSYS_DCLICK_Y = miscc.wxSYS_DCLICK_Y +wxSYS_DRAG_X = miscc.wxSYS_DRAG_X +wxSYS_DRAG_Y = miscc.wxSYS_DRAG_Y +wxSYS_EDGE_X = miscc.wxSYS_EDGE_X +wxSYS_EDGE_Y = miscc.wxSYS_EDGE_Y +wxSYS_HSCROLL_ARROW_X = miscc.wxSYS_HSCROLL_ARROW_X +wxSYS_HSCROLL_ARROW_Y = miscc.wxSYS_HSCROLL_ARROW_Y +wxSYS_HTHUMB_X = miscc.wxSYS_HTHUMB_X +wxSYS_ICON_X = miscc.wxSYS_ICON_X +wxSYS_ICON_Y = miscc.wxSYS_ICON_Y +wxSYS_ICONSPACING_X = miscc.wxSYS_ICONSPACING_X +wxSYS_ICONSPACING_Y = miscc.wxSYS_ICONSPACING_Y +wxSYS_WINDOWMIN_X = miscc.wxSYS_WINDOWMIN_X +wxSYS_WINDOWMIN_Y = miscc.wxSYS_WINDOWMIN_Y +wxSYS_SCREEN_X = miscc.wxSYS_SCREEN_X +wxSYS_SCREEN_Y = miscc.wxSYS_SCREEN_Y +wxSYS_FRAMESIZE_X = miscc.wxSYS_FRAMESIZE_X +wxSYS_FRAMESIZE_Y = miscc.wxSYS_FRAMESIZE_Y +wxSYS_SMALLICON_X = miscc.wxSYS_SMALLICON_X +wxSYS_SMALLICON_Y = miscc.wxSYS_SMALLICON_Y +wxSYS_HSCROLL_Y = miscc.wxSYS_HSCROLL_Y +wxSYS_VSCROLL_X = miscc.wxSYS_VSCROLL_X +wxSYS_VSCROLL_ARROW_X = miscc.wxSYS_VSCROLL_ARROW_X +wxSYS_VSCROLL_ARROW_Y = miscc.wxSYS_VSCROLL_ARROW_Y +wxSYS_VTHUMB_Y = miscc.wxSYS_VTHUMB_Y +wxSYS_CAPTION_Y = miscc.wxSYS_CAPTION_Y +wxSYS_MENU_Y = miscc.wxSYS_MENU_Y +wxSYS_NETWORK_PRESENT = miscc.wxSYS_NETWORK_PRESENT +wxSYS_PENWINDOWS_PRESENT = miscc.wxSYS_PENWINDOWS_PRESENT +wxSYS_SHOW_SOUNDS = miscc.wxSYS_SHOW_SOUNDS +wxSYS_SWAP_BUTTONS = miscc.wxSYS_SWAP_BUTTONS diff --git a/utils/wxPython/src/gtk/misc2.cpp b/utils/wxPython/src/gtk/misc2.cpp index d5481d086b..164c8ea94e 100644 --- a/utils/wxPython/src/gtk/misc2.cpp +++ b/utils/wxPython/src/gtk/misc2.cpp @@ -405,7 +405,6 @@ SWIGEXPORT(void,initmisc2c)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); SWIG_RegisterMapping("_long","_wxDash",0); @@ -488,7 +487,6 @@ SWIGEXPORT(void,initmisc2c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/gtk/printfw.cpp b/utils/wxPython/src/gtk/printfw.cpp index c050c58566..e112c9e6f6 100644 --- a/utils/wxPython/src/gtk/printfw.cpp +++ b/utils/wxPython/src/gtk/printfw.cpp @@ -4007,7 +4007,6 @@ SWIGEXPORT(void,initprintfwc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0); SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0); @@ -4197,7 +4196,6 @@ SWIGEXPORT(void,initprintfwc)() { SWIG_RegisterMapping("_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/gtk/printfw.py b/utils/wxPython/src/gtk/printfw.py index 635c46ff05..ad4d201aac 100644 --- a/utils/wxPython/src/gtk/printfw.py +++ b/utils/wxPython/src/gtk/printfw.py @@ -21,7 +21,7 @@ class wxPrintDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPrintData(self.this) def GetNoCopies(self): @@ -93,7 +93,7 @@ class wxPageSetupDialogDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPageSetupDialogData(self.this) def EnableHelp(self,arg0): @@ -232,7 +232,7 @@ class wxPrintDialogDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPrintDialogData(self.this) def EnableHelp(self,arg0): @@ -409,7 +409,7 @@ class wxPrinterPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPrinter(self.this) def CreateAbortWindow(self,arg0,arg1): diff --git a/utils/wxPython/src/gtk/stattool.cpp b/utils/wxPython/src/gtk/stattool.cpp index db1c000fad..220f57b565 100644 --- a/utils/wxPython/src/gtk/stattool.cpp +++ b/utils/wxPython/src/gtk/stattool.cpp @@ -1947,7 +1947,6 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -2095,7 +2094,6 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/gtk/stattool.py b/utils/wxPython/src/gtk/stattool.py index 6b7a740521..13000573d4 100644 --- a/utils/wxPython/src/gtk/stattool.py +++ b/utils/wxPython/src/gtk/stattool.py @@ -65,7 +65,7 @@ class wxToolBarToolPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, stattoolc=stattoolc): if self.thisown == 1 : stattoolc.delete_wxToolBarTool(self.this) def __setattr__(self,name,value): diff --git a/utils/wxPython/src/gtk/utils.py b/utils/wxPython/src/gtk/utils.py index 321e6ed069..5d437af207 100644 --- a/utils/wxPython/src/gtk/utils.py +++ b/utils/wxPython/src/gtk/utils.py @@ -4,7 +4,7 @@ class wxConfigPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, utilsc=utilsc): if self.thisown == 1 : utilsc.delete_wxConfig(self.this) def DontCreateOnDemand(self): diff --git a/utils/wxPython/src/gtk/windows.cpp b/utils/wxPython/src/gtk/windows.cpp index 771b423e92..bfeb6148ba 100644 --- a/utils/wxPython/src/gtk/windows.cpp +++ b/utils/wxPython/src/gtk/windows.cpp @@ -270,7 +270,7 @@ static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -296,7 +296,7 @@ static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -322,7 +322,7 @@ static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -348,7 +348,7 @@ static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -1482,6 +1482,33 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args) { return _resultobj; } +#define wxWindow_GetUpdateRegion(_swigobj) (_swigobj->GetUpdateRegion()) +static PyObject *_wrap_wxWindow_GetUpdateRegion(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxRegion * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxWindow_GetUpdateRegion",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetUpdateRegion. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRegion (wxWindow_GetUpdateRegion(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRegion_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxWindow_GetWindowStyleFlag(_swigobj) (_swigobj->GetWindowStyleFlag()) static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1849,8 +1876,8 @@ static PyObject *_wrap_wxWindow_Move(PyObject *self, PyObject *args) { return _resultobj; } -#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { +#define wxWindow_PopupMenuXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args) { PyObject * _resultobj; bool _result; wxWindow * _arg0; @@ -1861,7 +1888,42 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { char * _argc1 = 0; self = self; - if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenu",&_argc0,&_argc1,&_arg2,&_arg3)) + if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenuXY",&_argc0,&_argc1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_PopupMenuXY. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_PopupMenuXY. Expected _wxMenu_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxWindow_PopupMenuXY(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1) (_swigobj->PopupMenu(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + wxMenu * _arg1; + wxPoint * _arg2; + char * _argc0 = 0; + char * _argc1 = 0; + char * _argc2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sss:wxWindow_PopupMenu",&_argc0,&_argc1,&_argc2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { @@ -1875,9 +1937,15 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { return NULL; } } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxWindow_PopupMenu. Expected _wxPoint_p."); + return NULL; + } + } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -4016,16 +4084,17 @@ static void *SwigwxMenuTowxEvtHandler(void *ptr) { return (void *) dest; } -#define new_wxMenu(_swigarg0) (new wxMenu(_swigarg0)) +#define new_wxMenu(_swigarg0,_swigarg1) (new wxMenu(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) { PyObject * _resultobj; wxMenu * _result; wxString * _arg0 = &wxPyEmptyStr; + long _arg1 = 0; PyObject * _obj0 = 0; char _ptemp[128]; self = self; - if(!PyArg_ParseTuple(args,"|O:new_wxMenu",&_obj0)) + if(!PyArg_ParseTuple(args,"|Ol:new_wxMenu",&_obj0,&_arg1)) return NULL; if (_obj0) { @@ -4037,7 +4106,7 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) { } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenu *)new_wxMenu(*_arg0); + _result = (wxMenu *)new_wxMenu(*_arg0,_arg1); wxPy_END_ALLOW_THREADS; } SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); @@ -4598,79 +4667,32 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args) { return _resultobj; } -static void *SwigwxPyMenuTowxMenu(void *ptr) { - wxPyMenu *src; - wxMenu *dest; - src = (wxPyMenu *) ptr; - dest = (wxMenu *) src; - return (void *) dest; -} - -static void *SwigwxPyMenuTowxEvtHandler(void *ptr) { - wxPyMenu *src; - wxEvtHandler *dest; - src = (wxPyMenu *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPyMenu(_swigarg0,_swigarg1) (new wxPyMenu(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPyMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyMenu * _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _arg1 = NULL; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|OO:new_wxPyMenu",&_obj0,&_obj1)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - _arg1 = _obj1; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyMenu *)new_wxPyMenu(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxPyMenu(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyMenu(PyObject *self, PyObject *args) { +#define wxMenu_UpdateUI(_swigobj,_swigarg0) (_swigobj->UpdateUI(_swigarg0)) +static PyObject *_wrap_wxMenu_UpdateUI(PyObject *self, PyObject *args) { PyObject * _resultobj; - wxPyMenu * _arg0; + wxMenu * _arg0; + wxEvtHandler * _arg1 = NULL; char * _argc0 = 0; + char * _argc1 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPyMenu",&_argc0)) + if(!PyArg_ParseTuple(args,"s|s:wxMenu_UpdateUI",&_argc0,&_argc1)) return NULL; if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyMenu. Expected _wxPyMenu_p."); + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_UpdateUI. Expected _wxMenu_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenu_UpdateUI. Expected _wxEvtHandler_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - delete_wxPyMenu(_arg0); + wxMenu_UpdateUI(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -5380,8 +5402,7 @@ static PyMethodDef windowscMethods[] = { { "wxMenuBar_Check", _wrap_wxMenuBar_Check, 1 }, { "wxMenuBar_Append", _wrap_wxMenuBar_Append, 1 }, { "new_wxMenuBar", _wrap_new_wxMenuBar, 1 }, - { "delete_wxPyMenu", _wrap_delete_wxPyMenu, 1 }, - { "new_wxPyMenu", _wrap_new_wxPyMenu, 1 }, + { "wxMenu_UpdateUI", _wrap_wxMenu_UpdateUI, 1 }, { "wxMenu_SetLabel", _wrap_wxMenu_SetLabel, 1 }, { "wxMenu_IsEnabled", _wrap_wxMenu_IsEnabled, 1 }, { "wxMenu_IsChecked", _wrap_wxMenu_IsChecked, 1 }, @@ -5466,6 +5487,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Refresh", _wrap_wxWindow_Refresh, 1 }, { "wxWindow_Raise", _wrap_wxWindow_Raise, 1 }, { "wxWindow_PopupMenu", _wrap_wxWindow_PopupMenu, 1 }, + { "wxWindow_PopupMenuXY", _wrap_wxWindow_PopupMenuXY, 1 }, { "wxWindow_Move", _wrap_wxWindow_Move, 1 }, { "wxWindow_MoveXY", _wrap_wxWindow_MoveXY, 1 }, { "wxWindow_MakeModal", _wrap_wxWindow_MakeModal, 1 }, @@ -5479,6 +5501,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_InitDialog", _wrap_wxWindow_InitDialog, 1 }, { "wxWindow_Hide", _wrap_wxWindow_Hide, 1 }, { "wxWindow_GetWindowStyleFlag", _wrap_wxWindow_GetWindowStyleFlag, 1 }, + { "wxWindow_GetUpdateRegion", _wrap_wxWindow_GetUpdateRegion, 1 }, { "wxWindow_GetTitle", _wrap_wxWindow_GetTitle, 1 }, { "wxWindow_GetFullTextExtent", _wrap_wxWindow_GetFullTextExtent, 1 }, { "wxWindow_GetTextExtent", _wrap_wxWindow_GetTextExtent, 1 }, @@ -5549,8 +5572,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); @@ -5565,7 +5586,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); SWIG_RegisterMapping("_long","_wxDash",0); @@ -5624,8 +5644,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_signed_int","_wxWindowID",0); SWIG_RegisterMapping("_signed_int","_int",0); SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); SWIG_RegisterMapping("_WXTYPE","_short",0); @@ -5655,8 +5673,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_class_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0); SWIG_RegisterMapping("_unsigned_int","_size_t",0); @@ -5665,7 +5681,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); @@ -5701,8 +5716,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); diff --git a/utils/wxPython/src/gtk/windows.py b/utils/wxPython/src/gtk/windows.py index 85ae8f4dd0..4d3c176ca2 100644 --- a/utils/wxPython/src/gtk/windows.py +++ b/utils/wxPython/src/gtk/windows.py @@ -182,6 +182,11 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetTitle(self): val = windowsc.wxWindow_GetTitle(self.this) return val + def GetUpdateRegion(self): + val = windowsc.wxWindow_GetUpdateRegion(self.this) + val = wxRegionPtr(val) + val.thisown = 1 + return val def GetWindowStyleFlag(self): val = windowsc.wxWindow_GetWindowStyleFlag(self.this) return val @@ -221,8 +226,11 @@ class wxWindowPtr(wxEvtHandlerPtr): def Move(self,arg0): val = windowsc.wxWindow_Move(self.this,arg0.this) return val - def PopupMenu(self,arg0,arg1,arg2): - val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1,arg2) + def PopupMenuXY(self,arg0,arg1,arg2): + val = windowsc.wxWindow_PopupMenuXY(self.this,arg0.this,arg1,arg2) + return val + def PopupMenu(self,arg0,arg1): + val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1.this) return val def Raise(self): val = windowsc.wxWindow_Raise(self.this) @@ -578,6 +586,13 @@ class wxMenuPtr(wxEvtHandlerPtr): def SetLabel(self,arg0,arg1): val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1) return val + def UpdateUI(self,*args): + argl = map(None,args) + try: argl[0] = argl[0].this + except: pass + args = tuple(argl) + val = apply(windowsc.wxMenu_UpdateUI,(self.this,)+args) + return val def __repr__(self): return "" class wxMenu(wxMenuPtr): @@ -588,23 +603,6 @@ class wxMenu(wxMenuPtr): -class wxPyMenuPtr(wxMenuPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - windowsc.delete_wxPyMenu(self.this) - def __repr__(self): - return "" -class wxPyMenu(wxPyMenuPtr): - def __init__(self,*args) : - self.this = apply(windowsc.new_wxPyMenu,()+args) - self.thisown = 1 - - - - class wxMenuBarPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this diff --git a/utils/wxPython/src/gtk/windows2.cpp b/utils/wxPython/src/gtk/windows2.cpp index fc355cf067..cd89efa478 100644 --- a/utils/wxPython/src/gtk/windows2.cpp +++ b/utils/wxPython/src/gtk/windows2.cpp @@ -1083,6 +1083,58 @@ static PyObject *_wrap_wxGrid_GetDefCellBackgroundColour(PyObject *self, PyObjec return _resultobj; } +static PyObject * wxGrid_GetCells(wxGrid *self) { + int row, col; + PyObject* rows = PyList_New(0); + for (row=0; row < self->GetRows(); row++) { + PyObject* rowList = PyList_New(0); + for (col=0; col < self->GetCols(); col++) { + wxGridCell* cell = self->GetCell(row, col); + +#ifdef WXP_WITH_THREAD + PyEval_RestoreThread(wxPyEventThreadState); + wxPyInEvent = true; +#endif + PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell"); +#ifdef WXP_WITH_THREAD + PyEval_SaveThread(); + wxPyInEvent = false; +#endif + + if (PyList_Append(rowList, pyCell) == -1) + return NULL; + } + if (PyList_Append(rows, rowList) == -1) + return NULL; + } + return rows; + } +static PyObject *_wrap_wxGrid_GetCells(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + wxGrid * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxGrid_GetCells",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCells. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxGrid_GetCells(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + #define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1)) static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -2476,6 +2528,57 @@ static PyObject *_wrap_wxGrid_UpdateDimensions(PyObject *self, PyObject *args) { return _resultobj; } +#define wxGrid_GetEditInPlace(_swigobj) (_swigobj->GetEditInPlace()) +static PyObject *_wrap_wxGrid_GetEditInPlace(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxGrid_GetEditInPlace",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetEditInPlace. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_GetEditInPlace(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetEditInPlace(_swigobj,_swigarg0) (_swigobj->SetEditInPlace(_swigarg0)) +static PyObject *_wrap_wxGrid_SetEditInPlace(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1 = (1); + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:wxGrid_SetEditInPlace",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetEditInPlace. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetEditInPlace(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxGridEventTowxEvent(void *ptr) { wxGridEvent *src; wxEvent *dest; @@ -4296,6 +4399,8 @@ static PyMethodDef windows2cMethods[] = { { "wxGridEvent_m_col_set", _wrap_wxGridEvent_m_col_set, 1 }, { "wxGridEvent_m_row_get", _wrap_wxGridEvent_m_row_get, 1 }, { "wxGridEvent_m_row_set", _wrap_wxGridEvent_m_row_set, 1 }, + { "wxGrid_SetEditInPlace", _wrap_wxGrid_SetEditInPlace, 1 }, + { "wxGrid_GetEditInPlace", _wrap_wxGrid_GetEditInPlace, 1 }, { "wxGrid_UpdateDimensions", _wrap_wxGrid_UpdateDimensions, 1 }, { "wxGrid_SetRowHeight", _wrap_wxGrid_SetRowHeight, 1 }, { "wxGrid_SetLabelValue", _wrap_wxGrid_SetLabelValue, 1 }, @@ -4344,6 +4449,7 @@ static PyMethodDef windows2cMethods[] = { { "wxGrid_GetCellTextFont", _wrap_wxGrid_GetCellTextFont, 1 }, { "wxGrid_GetDefCellTextColour", _wrap_wxGrid_GetDefCellTextColour, 1 }, { "wxGrid_GetCellTextColour", _wrap_wxGrid_GetCellTextColour, 1 }, + { "wxGrid_GetCells", _wrap_wxGrid_GetCells, 1 }, { "wxGrid_GetDefCellBackgroundColour", _wrap_wxGrid_GetDefCellBackgroundColour, 1 }, { "wxGrid_GetCellBackgroundColour", _wrap_wxGrid_GetCellBackgroundColour, 1 }, { "wxGrid_GetDefCellAlignment", _wrap_wxGrid_GetDefCellAlignment, 1 }, @@ -4438,7 +4544,6 @@ SWIGEXPORT(void,initwindows2c)() { SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -4607,7 +4712,6 @@ SWIGEXPORT(void,initwindows2c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/gtk/windows2.py b/utils/wxPython/src/gtk/windows2.py index ab118d1a50..62e3031e7d 100644 --- a/utils/wxPython/src/gtk/windows2.py +++ b/utils/wxPython/src/gtk/windows2.py @@ -15,7 +15,7 @@ class wxGridCellPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, windows2c=windows2c): if self.thisown == 1 : windows2c.delete_wxGridCell(self.this) def GetTextValue(self): @@ -127,6 +127,9 @@ class wxGridPtr(wxPanelPtr): val = windows2c.wxGrid_GetDefCellBackgroundColour(self.this) val = wxColourPtr(val) return val + def GetCells(self): + val = windows2c.wxGrid_GetCells(self.this) + return val def GetCellTextColour(self,arg0,arg1): val = windows2c.wxGrid_GetCellTextColour(self.this,arg0,arg1) val = wxColourPtr(val) @@ -283,6 +286,12 @@ class wxGridPtr(wxPanelPtr): def UpdateDimensions(self): val = windows2c.wxGrid_UpdateDimensions(self.this) return val + def GetEditInPlace(self): + val = windows2c.wxGrid_GetEditInPlace(self.this) + return val + def SetEditInPlace(self,*args): + val = apply(windows2c.wxGrid_SetEditInPlace,(self.this,)+args) + return val def __repr__(self): return "" class wxGrid(wxGridPtr): diff --git a/utils/wxPython/src/gtk/windows3.cpp b/utils/wxPython/src/gtk/windows3.cpp index 7a188e5dfc..2a4c5edb8d 100644 --- a/utils/wxPython/src/gtk/windows3.cpp +++ b/utils/wxPython/src/gtk/windows3.cpp @@ -1675,7 +1675,6 @@ SWIGEXPORT(void,initwindows3c)() { SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -1855,7 +1854,6 @@ SWIGEXPORT(void,initwindows3c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/gtk/windows3.py b/utils/wxPython/src/gtk/windows3.py index cf20a91997..c6fc7bc4da 100644 --- a/utils/wxPython/src/gtk/windows3.py +++ b/utils/wxPython/src/gtk/windows3.py @@ -238,7 +238,7 @@ class wxLayoutAlgorithmPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, windows3c=windows3c): if self.thisown == 1 : windows3c.delete_wxLayoutAlgorithm(self.this) def LayoutMDIFrame(self,arg0,*args): diff --git a/utils/wxPython/src/gtk/wx.cpp b/utils/wxPython/src/gtk/wx.cpp index 058428de6b..54efdb5112 100644 --- a/utils/wxPython/src/gtk/wx.cpp +++ b/utils/wxPython/src/gtk/wx.cpp @@ -33,8 +33,50 @@ * and things like that. * * $Log$ - * Revision 1.14 1999/06/28 04:08:58 RD - * Final tweaks for 2.1b1 + * Revision 1.15 1999/07/31 07:55:17 RD + * wxPython 2.1b1: + * + * Added the missing wxWindow.GetUpdateRegion() method. + * + * Made a new change in SWIG (update your patches everybody) that + * provides a fix for global shadow objects that get an exception in + * their __del__ when their extension module has already been deleted. + * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about + * line 496 if you want to do it by hand. + * + * It is now possible to run through MainLoop more than once in any one + * process. The cleanup that used to happen as MainLoop completed (and + * prevented it from running again) has been delayed until the wxc module + * is being unloaded by Python. + * + * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added + * wxWindow.PopupMenuXY to be consistent with some other methods. + * + * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. + * + * You can now provide your own app.MainLoop method. See + * wxPython/demo/demoMainLoop.py for an example and some explaination. + * + * Got the in-place-edit for the wxTreeCtrl fixed and added some demo + * code to show how to use it. + * + * Put the wxIcon constructor back in for GTK as it now has one that + * matches MSW's. + * + * Added wxGrid.GetCells + * + * Added wxSystemSettings static methods as functions with names like + * wxSystemSettings_GetSystemColour. + * + * Removed wxPyMenu since using menu callbacks have been depreciated in + * wxWindows. Use wxMenu and events instead. + * + * Added alternate wxBitmap constructor (for MSW only) as + * wxBitmapFromData(data, type, width, height, depth = 1) + * + * Added a helper function named wxPyTypeCast that can convert shadow + * objects of one type into shadow objects of another type. (Like doing + * a down-cast.) See the implementation in wx.py for some docs. * ************************************************************************/ @@ -618,6 +660,522 @@ extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); static char* wxStringErrorMsg = "string type is required for parameter"; + +#include + +/*------------------------------------------------------------------ + ptrcast(value,type) + + Constructs a new pointer value. Value may either be a string + or an integer. Type is a string corresponding to either the + C datatype or mangled datatype. + + ptrcast(0,"Vector *") + or + ptrcast(0,"Vector_p") + ------------------------------------------------------------------ */ + +static PyObject *ptrcast(PyObject *_PTRVALUE, char *type) { + + char *r,*s; + void *ptr; + PyObject *obj; + char *typestr,*c; + + /* Produce a "mangled" version of the type string. */ + + typestr = (char *) malloc(strlen(type)+2); + + /* Go through and munge the typestring */ + + r = typestr; + *(r++) = '_'; + c = type; + while (*c) { + if (!isspace(*c)) { + if ((*c == '*') || (*c == '&')) { + *(r++) = 'p'; + } + else *(r++) = *c; + } else { + *(r++) = '_'; + } + c++; + } + *(r++) = 0; + + /* Check to see what kind of object _PTRVALUE is */ + + if (PyInt_Check(_PTRVALUE)) { + ptr = (void *) PyInt_AsLong(_PTRVALUE); + /* Received a numerical value. Make a pointer out of it */ + r = (char *) malloc(strlen(typestr)+22); + if (ptr) { + SWIG_MakePtr(r, ptr, typestr); + } else { + sprintf(r,"_0%s",typestr); + } + obj = PyString_FromString(r); + free(r); + } else if (PyString_Check(_PTRVALUE)) { + /* Have a real pointer value now. Try to strip out the pointer + value */ + s = PyString_AsString(_PTRVALUE); + r = (char *) malloc(strlen(type)+22); + + /* Now extract the pointer value */ + if (!SWIG_GetPtr(s,&ptr,0)) { + if (ptr) { + SWIG_MakePtr(r,ptr,typestr); + } else { + sprintf(r,"_0%s",typestr); + } + obj = PyString_FromString(r); + } else { + obj = NULL; + } + free(r); + } else { + obj = NULL; + } + free(typestr); + if (!obj) + PyErr_SetString(PyExc_TypeError,"Type error in ptrcast. Argument is not a valid pointer value."); + return obj; +} + +/*------------------------------------------------------------------ + ptrvalue(ptr,type = 0) + + Attempts to dereference a pointer value. If type is given, it + will try to use that type. Otherwise, this function will attempt + to "guess" the proper datatype by checking against all of the + builtin C datatypes. + ------------------------------------------------------------------ */ + +static PyObject *ptrvalue(PyObject *_PTRVALUE, int index, char *type) { + void *ptr; + char *s; + PyObject *obj; + + if (!PyString_Check(_PTRVALUE)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrvalue. Argument is not a valid pointer value."); + return NULL; + } + s = PyString_AsString(_PTRVALUE); + if (SWIG_GetPtr(s,&ptr,0)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrvalue. Argument is not a valid pointer value."); + return NULL; + } + + /* If no datatype was passed, try a few common datatypes first */ + + if (!type) { + + /* No datatype was passed. Type to figure out if it's a common one */ + + if (!SWIG_GetPtr(s,&ptr,"_int_p")) { + type = "int"; + } else if (!SWIG_GetPtr(s,&ptr,"_double_p")) { + type = "double"; + } else if (!SWIG_GetPtr(s,&ptr,"_short_p")) { + type = "short"; + } else if (!SWIG_GetPtr(s,&ptr,"_long_p")) { + type = "long"; + } else if (!SWIG_GetPtr(s,&ptr,"_float_p")) { + type = "float"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_p")) { + type = "char"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_pp")) { + type = "char *"; + } else { + type = "unknown"; + } + } + + if (!ptr) { + PyErr_SetString(PyExc_TypeError,"Unable to dereference NULL pointer."); + return NULL; + } + + /* Now we have a datatype. Try to figure out what to do about it */ + if (strcmp(type,"int") == 0) { + obj = PyInt_FromLong((long) *(((int *) ptr) + index)); + } else if (strcmp(type,"double") == 0) { + obj = PyFloat_FromDouble((double) *(((double *) ptr)+index)); + } else if (strcmp(type,"short") == 0) { + obj = PyInt_FromLong((long) *(((short *) ptr)+index)); + } else if (strcmp(type,"long") == 0) { + obj = PyInt_FromLong((long) *(((long *) ptr)+index)); + } else if (strcmp(type,"float") == 0) { + obj = PyFloat_FromDouble((double) *(((float *) ptr)+index)); + } else if (strcmp(type,"char") == 0) { + obj = PyString_FromString(((char *) ptr)+index); + } else if (strcmp(type,"char *") == 0) { + char *c = *(((char **) ptr)+index); + if (c) obj = PyString_FromString(c); + else obj = PyString_FromString("NULL"); + } else { + PyErr_SetString(PyExc_TypeError,"Unable to dereference unsupported datatype."); + return NULL; + } + return obj; +} + +/*------------------------------------------------------------------ + ptrcreate(type,value = 0,numelements = 1) + + Attempts to create a new object of given type. Type must be + a basic C datatype. Will not create complex objects. + ------------------------------------------------------------------ */ + +static PyObject *ptrcreate(char *type, PyObject *_PYVALUE, int numelements) { + void *ptr; + PyObject *obj; + int sz; + char *cast; + char temp[40]; + + /* Check the type string against a variety of possibilities */ + + if (strcmp(type,"int") == 0) { + sz = sizeof(int)*numelements; + cast = "_int_p"; + } else if (strcmp(type,"short") == 0) { + sz = sizeof(short)*numelements; + cast = "_short_p"; + } else if (strcmp(type,"long") == 0) { + sz = sizeof(long)*numelements; + cast = "_long_p"; + } else if (strcmp(type,"double") == 0) { + sz = sizeof(double)*numelements; + cast = "_double_p"; + } else if (strcmp(type,"float") == 0) { + sz = sizeof(float)*numelements; + cast = "_float_p"; + } else if (strcmp(type,"char") == 0) { + sz = sizeof(char)*numelements; + cast = "_char_p"; + } else if (strcmp(type,"char *") == 0) { + sz = sizeof(char *)*(numelements+1); + cast = "_char_pp"; + } else { + PyErr_SetString(PyExc_TypeError,"Unable to create unknown datatype."); + return NULL; + } + + /* Create the new object */ + + ptr = (void *) malloc(sz); + if (!ptr) { + PyErr_SetString(PyExc_MemoryError,"Out of memory in swig_create."); + return NULL; + } + + /* Now try to set its default value */ + + if (_PYVALUE) { + if (strcmp(type,"int") == 0) { + int *ip,i,ivalue; + ivalue = (int) PyInt_AsLong(_PYVALUE); + ip = (int *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"short") == 0) { + short *ip,ivalue; + int i; + ivalue = (short) PyInt_AsLong(_PYVALUE); + ip = (short *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"long") == 0) { + long *ip,ivalue; + int i; + ivalue = (long) PyInt_AsLong(_PYVALUE); + ip = (long *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"double") == 0) { + double *ip,ivalue; + int i; + ivalue = (double) PyFloat_AsDouble(_PYVALUE); + ip = (double *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"float") == 0) { + float *ip,ivalue; + int i; + ivalue = (float) PyFloat_AsDouble(_PYVALUE); + ip = (float *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"char") == 0) { + char *ip,*ivalue; + ivalue = (char *) PyString_AsString(_PYVALUE); + ip = (char *) ptr; + strncpy(ip,ivalue,numelements-1); + } else if (strcmp(type,"char *") == 0) { + char **ip, *ivalue; + int i; + ivalue = (char *) PyString_AsString(_PYVALUE); + ip = (char **) ptr; + for (i = 0; i < numelements; i++) { + if (ivalue) { + ip[i] = (char *) malloc(strlen(ivalue)+1); + strcpy(ip[i],ivalue); + } else { + ip[i] = 0; + } + } + ip[numelements] = 0; + } + } + /* Create the pointer value */ + + SWIG_MakePtr(temp,ptr,cast); + obj = PyString_FromString(temp); + return obj; +} + + +/*------------------------------------------------------------------ + ptrset(ptr,value,index = 0,type = 0) + + Attempts to set the value of a pointer variable. If type is + given, we will use that type. Otherwise, we'll guess the datatype. + ------------------------------------------------------------------ */ + +static PyObject *ptrset(PyObject *_PTRVALUE, PyObject *_PYVALUE, int index, char *type) { + void *ptr; + char *s; + PyObject *obj; + + if (!PyString_Check(_PTRVALUE)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrset. Argument is not a valid pointer value."); + return NULL; + } + s = PyString_AsString(_PTRVALUE); + if (SWIG_GetPtr(s,&ptr,0)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrset. Argument is not a valid pointer value."); + return NULL; + } + + /* If no datatype was passed, try a few common datatypes first */ + + if (!type) { + + /* No datatype was passed. Type to figure out if it's a common one */ + + if (!SWIG_GetPtr(s,&ptr,"_int_p")) { + type = "int"; + } else if (!SWIG_GetPtr(s,&ptr,"_double_p")) { + type = "double"; + } else if (!SWIG_GetPtr(s,&ptr,"_short_p")) { + type = "short"; + } else if (!SWIG_GetPtr(s,&ptr,"_long_p")) { + type = "long"; + } else if (!SWIG_GetPtr(s,&ptr,"_float_p")) { + type = "float"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_p")) { + type = "char"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_pp")) { + type = "char *"; + } else { + type = "unknown"; + } + } + + if (!ptr) { + PyErr_SetString(PyExc_TypeError,"Unable to set NULL pointer."); + return NULL; + } + + /* Now we have a datatype. Try to figure out what to do about it */ + if (strcmp(type,"int") == 0) { + *(((int *) ptr)+index) = (int) PyInt_AsLong(_PYVALUE); + } else if (strcmp(type,"double") == 0) { + *(((double *) ptr)+index) = (double) PyFloat_AsDouble(_PYVALUE); + } else if (strcmp(type,"short") == 0) { + *(((short *) ptr)+index) = (short) PyInt_AsLong(_PYVALUE); + } else if (strcmp(type,"long") == 0) { + *(((long *) ptr)+index) = (long) PyInt_AsLong(_PYVALUE); + } else if (strcmp(type,"float") == 0) { + *(((float *) ptr)+index) = (float) PyFloat_AsDouble(_PYVALUE); + } else if (strcmp(type,"char") == 0) { + char *c = PyString_AsString(_PYVALUE); + strcpy(((char *) ptr)+index, c); + } else if (strcmp(type,"char *") == 0) { + char *c = PyString_AsString(_PYVALUE); + char **ca = (char **) ptr; + if (ca[index]) free(ca[index]); + if (strcmp(c,"NULL") == 0) { + ca[index] = 0; + } else { + ca[index] = (char *) malloc(strlen(c)+1); + strcpy(ca[index],c); + } + } else { + PyErr_SetString(PyExc_TypeError,"Unable to set unsupported datatype."); + return NULL; + } + Py_INCREF(Py_None); + return Py_None; +} + + +/*------------------------------------------------------------------ + ptradd(ptr,offset) + + Adds a value to an existing pointer value. Will do a type-dependent + add for basic datatypes. For other datatypes, will do a byte-add. + ------------------------------------------------------------------ */ + +static PyObject *ptradd(PyObject *_PTRVALUE, int offset) { + + char *r,*s; + void *ptr,*junk; + PyObject *obj; + char *type; + + /* Check to see what kind of object _PTRVALUE is */ + + if (PyString_Check(_PTRVALUE)) { + /* Have a potential pointer value now. Try to strip out the value */ + s = PyString_AsString(_PTRVALUE); + + /* Try to handle a few common datatypes first */ + + if (!SWIG_GetPtr(s,&ptr,"_int_p")) { + ptr = (void *) (((int *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_double_p")) { + ptr = (void *) (((double *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_short_p")) { + ptr = (void *) (((short *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_long_p")) { + ptr = (void *) (((long *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_float_p")) { + ptr = (void *) (((float *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_char_p")) { + ptr = (void *) (((char *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,0)) { + ptr = (void *) (((char *) ptr) + offset); + } else { + PyErr_SetString(PyExc_TypeError,"Type error in ptradd. Argument is not a valid pointer value."); + return NULL; + } + type = SWIG_GetPtr(s,&junk,"INVALID POINTER"); + r = (char *) malloc(strlen(type)+20); + if (ptr) { + SWIG_MakePtr(r,ptr,type); + } else { + sprintf(r,"_0%s",type); + } + obj = PyString_FromString(r); + free(r); + } + return obj; +} + +/*------------------------------------------------------------------ + ptrmap(type1,type2) + + Allows a mapping between type1 and type2. (Like a typedef) + ------------------------------------------------------------------ */ + +static void ptrmap(char *type1, char *type2) { + + char *typestr1,*typestr2,*c,*r; + + /* Produce a "mangled" version of the type string. */ + + typestr1 = (char *) malloc(strlen(type1)+2); + + /* Go through and munge the typestring */ + + r = typestr1; + *(r++) = '_'; + c = type1; + while (*c) { + if (!isspace(*c)) { + if ((*c == '*') || (*c == '&')) { + *(r++) = 'p'; + } + else *(r++) = *c; + } else { + *(r++) = '_'; + } + c++; + } + *(r++) = 0; + + typestr2 = (char *) malloc(strlen(type2)+2); + + /* Go through and munge the typestring */ + + r = typestr2; + *(r++) = '_'; + c = type2; + while (*c) { + if (!isspace(*c)) { + if ((*c == '*') || (*c == '&')) { + *(r++) = 'p'; + } + else *(r++) = *c; + } else { + *(r++) = '_'; + } + c++; + } + *(r++) = 0; + SWIG_RegisterMapping(typestr1,typestr2,0); + SWIG_RegisterMapping(typestr2,typestr1,0); +} + +/*------------------------------------------------------------------ + ptrfree(ptr) + + Destroys a pointer value + ------------------------------------------------------------------ */ + +PyObject *ptrfree(PyObject *_PTRVALUE) { + void *ptr, *junk; + char *s; + + if (!PyString_Check(_PTRVALUE)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrfree. Argument is not a valid pointer value."); + return NULL; + } + s = PyString_AsString(_PTRVALUE); + if (SWIG_GetPtr(s,&ptr,0)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrfree. Argument is not a valid pointer value."); + return NULL; + } + + /* Check to see if this pointer is a char ** */ + if (!SWIG_GetPtr(s,&junk,"_char_pp")) { + char **c = (char **) ptr; + if (c) { + int i = 0; + while (c[i]) { + free(c[i]); + i++; + } + } + } + if (ptr) + free((char *) ptr); + + Py_INCREF(Py_None); + return Py_None; +} + + +class __wxPyCleanup { +public: + __wxPyCleanup() { } + ~__wxPyCleanup() { wxApp::CleanUp(); } +}; + extern "C" SWIGEXPORT(void,initwindowsc)(); extern "C" SWIGEXPORT(void,initwindows2c)(); extern "C" SWIGEXPORT(void,initeventsc)(); @@ -635,8 +1193,179 @@ extern "C" SWIGEXPORT(void,initimagec)(); extern "C" SWIGEXPORT(void,initprintfwc)(); #ifndef SEPARATE extern "C" SWIGEXPORT(void,initutilsc)(); +//extern "C" SWIGEXPORT(void,initoglc)(); extern "C" SWIGEXPORT(void,initglcanvasc)(); #endif +static PyObject *_wrap_ptrcast(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + char * _arg1; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"Os:ptrcast",&_obj0,&_arg1)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrcast(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrvalue(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + int _arg1 = 0; + char * _arg2 = 0; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"O|is:ptrvalue",&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrset(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + PyObject * _arg1; + int _arg2 = 0; + char * _arg3 = 0; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"OO|is:ptrset",&_obj0,&_obj1,&_arg2,&_arg3)) + return NULL; +{ + _arg0 = _obj0; +} +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrcreate(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + char * _arg0; + PyObject * _arg1 = 0; + int _arg2 = 1; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s|Oi:ptrcreate",&_arg0,&_obj1,&_arg2)) + return NULL; + if (_obj1) +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrfree(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"O:ptrfree",&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrfree(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptradd(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + int _arg1; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"Oi:ptradd",&_obj0,&_arg1)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptradd(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + char * _arg0; + char * _arg1; + + self = self; + if(!PyArg_ParseTuple(args,"ss:ptrmap",&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + ptrmap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static int _wrap_wxPyDefaultPosition_set(PyObject *val) { char * tval; wxPoint * temp; @@ -724,6 +1453,31 @@ static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args) { return _resultobj; } +#define delete_wxPyApp(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPyApp(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPyApp * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxPyApp",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyApp. Expected _wxPyApp_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyApp(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxPyApp_GetAppName(_swigobj) (_swigobj->GetAppName()) static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1016,6 +1770,31 @@ static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args) { return _resultobj; } +#define wxPyApp_ProcessIdle(_swigobj) (_swigobj->ProcessIdle()) +static PyObject *_wrap_wxPyApp_ProcessIdle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxPyApp * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPyApp_ProcessIdle",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_ProcessIdle. Expected _wxPyApp_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyApp_ProcessIdle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPyApp_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1217,24 +1996,43 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args) { return _resultobj; } -#define wxPyApp_AfterMainLoop(_swigobj) (_swigobj->AfterMainLoop()) -static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { +#define new___wxPyCleanup() (new __wxPyCleanup()) +static PyObject *_wrap_new___wxPyCleanup(PyObject *self, PyObject *args) { PyObject * _resultobj; - wxPyApp * _arg0; + __wxPyCleanup * _result; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,":new___wxPyCleanup")) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (__wxPyCleanup *)new___wxPyCleanup(); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"___wxPyCleanup_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define delete___wxPyCleanup(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete___wxPyCleanup(PyObject *self, PyObject *args) { + PyObject * _resultobj; + __wxPyCleanup * _arg0; char * _argc0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_AfterMainLoop",&_argc0)) + if(!PyArg_ParseTuple(args,"s:delete___wxPyCleanup",&_argc0)) return NULL; if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_AfterMainLoop. Expected _wxPyApp_p."); + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"___wxPyCleanup_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete___wxPyCleanup. Expected ___wxPyCleanup_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxPyApp_AfterMainLoop(_arg0); + delete___wxPyCleanup(_arg0); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1243,13 +2041,15 @@ static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { } static PyMethodDef wxcMethods[] = { - { "wxPyApp_AfterMainLoop", _wrap_wxPyApp_AfterMainLoop, 1 }, + { "delete___wxPyCleanup", _wrap_delete___wxPyCleanup, 1 }, + { "new___wxPyCleanup", _wrap_new___wxPyCleanup, 1 }, { "wxPyApp_SetVendorName", _wrap_wxPyApp_SetVendorName, 1 }, { "wxPyApp_SetTopWindow", _wrap_wxPyApp_SetTopWindow, 1 }, { "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 }, { "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 }, { "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 }, { "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 }, + { "wxPyApp_ProcessIdle", _wrap_wxPyApp_ProcessIdle, 1 }, { "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 }, { "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 }, { "wxPyApp_Initialized", _wrap_wxPyApp_Initialized, 1 }, @@ -1261,9 +2061,17 @@ static PyMethodDef wxcMethods[] = { { "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 }, { "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 }, { "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 }, + { "delete_wxPyApp", _wrap_delete_wxPyApp, 1 }, { "new_wxPyApp", _wrap_new_wxPyApp, 1 }, { "_wxSetDictionary", __wxSetDictionary, 1 }, { "_wxStart", __wxStart, 1 }, + { "ptrmap", _wrap_ptrmap, 1 }, + { "ptradd", _wrap_ptradd, 1 }, + { "ptrfree", _wrap_ptrfree, 1 }, + { "ptrcreate", _wrap_ptrcreate, 1 }, + { "ptrset", _wrap_ptrset, 1 }, + { "ptrvalue", _wrap_ptrvalue, 1 }, + { "ptrcast", _wrap_ptrcast, 1 }, { NULL, NULL } }; static PyObject *SWIG_globals; @@ -1341,6 +2149,7 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); + PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE)); PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE)); PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN)); @@ -1373,6 +2182,8 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS)); PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS)); PyDict_SetItemString(d,"wxTR_LINES_AT_ROOT", PyInt_FromLong((long) wxTR_LINES_AT_ROOT)); + PyDict_SetItemString(d,"wxTR_MULTIPLE", PyInt_FromLong((long) wxTR_MULTIPLE)); + PyDict_SetItemString(d,"wxTR_HAS_VARIABLE_ROW_HEIGHT", PyInt_FromLong((long) wxTR_HAS_VARIABLE_ROW_HEIGHT)); PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON)); PyDict_SetItemString(d,"wxLC_SMALL_ICON", PyInt_FromLong((long) wxLC_SMALL_ICON)); PyDict_SetItemString(d,"wxLC_LIST", PyInt_FromLong((long) wxLC_LIST)); @@ -1501,6 +2312,8 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxPD_ESTIMATED_TIME", PyInt_FromLong((long) wxPD_ESTIMATED_TIME)); PyDict_SetItemString(d,"wxPD_REMAINING_TIME", PyInt_FromLong((long) wxPD_REMAINING_TIME)); PyDict_SetItemString(d,"wxNO_DEFAULT", PyInt_FromLong((long) wxNO_DEFAULT)); + PyDict_SetItemString(d,"wxMENU_TEAROFF", PyInt_FromLong((long) wxMENU_TEAROFF)); + PyDict_SetItemString(d,"wxNO_FULL_REPAINT_ON_RESIZE", PyInt_FromLong((long) wxNO_FULL_REPAINT_ON_RESIZE)); PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); @@ -1776,6 +2589,9 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK)); PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK)); PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR)); + PyDict_SetItemString(d,"wxEVT_KEY_DOWN", PyInt_FromLong((long) wxEVT_KEY_DOWN)); + PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); + PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); PyDict_SetItemString(d,"wxEVT_SCROLL_TOP", PyInt_FromLong((long) wxEVT_SCROLL_TOP)); PyDict_SetItemString(d,"wxEVT_SCROLL_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLL_BOTTOM)); PyDict_SetItemString(d,"wxEVT_SCROLL_LINEUP", PyInt_FromLong((long) wxEVT_SCROLL_LINEUP)); @@ -1797,8 +2613,6 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxEVT_QUERY_END_SESSION", PyInt_FromLong((long) wxEVT_QUERY_END_SESSION)); PyDict_SetItemString(d,"wxEVT_ACTIVATE_APP", PyInt_FromLong((long) wxEVT_ACTIVATE_APP)); PyDict_SetItemString(d,"wxEVT_POWER", PyInt_FromLong((long) wxEVT_POWER)); - PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); - PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); PyDict_SetItemString(d,"wxEVT_ACTIVATE", PyInt_FromLong((long) wxEVT_ACTIVATE)); PyDict_SetItemString(d,"wxEVT_CREATE", PyInt_FromLong((long) wxEVT_CREATE)); PyDict_SetItemString(d,"wxEVT_DESTROY", PyInt_FromLong((long) wxEVT_DESTROY)); @@ -1873,7 +2687,7 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_UNSPLIT", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_UNSPLIT)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)); - PyDict_SetItemString(d,"__version__", PyString_FromString("2.1b1")); + PyDict_SetItemString(d,"__version__", PyString_FromString("2.1b2")); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); @@ -1881,7 +2695,6 @@ SWIGEXPORT(void,initwxc)() { __wxPreStart(); // initialize the GUI toolkit, if needed. -// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); // Since these modules are all linked together, initialize them now // because python won't be able to find their shared library files, @@ -1903,6 +2716,7 @@ SWIGEXPORT(void,initwxc)() { initprintfwc(); #ifndef SEPARATE initutilsc(); +// initoglc(); #ifdef WITH_GLCANVAS initglcanvasc(); #endif @@ -1927,6 +2741,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_wxPrintQuality","_EBool",0); SWIG_RegisterMapping("_wxPrintQuality","_size_t",0); SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); + SWIG_RegisterMapping("___wxPyCleanup","_class___wxPyCleanup",0); SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0); @@ -1944,7 +2759,6 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); SWIG_RegisterMapping("_wxPNGHandler","_class_wxPNGHandler",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0); SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0); @@ -2030,6 +2844,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_class_wxButton","_wxButton",0); SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); + SWIG_RegisterMapping("_class___wxPyCleanup","___wxPyCleanup",0); SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); SWIG_RegisterMapping("_wxPrintDialog","_class_wxPrintDialog",0); SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); @@ -2145,7 +2960,6 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); diff --git a/utils/wxPython/src/gtk/wx.py b/utils/wxPython/src/gtk/wx.py index e36f5d0779..b617e5a5a8 100644 --- a/utils/wxPython/src/gtk/wx.py +++ b/utils/wxPython/src/gtk/wx.py @@ -34,6 +34,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self, wxc=wxc): + if self.thisown == 1 : + wxc.delete_wxPyApp(self.this) def GetAppName(self): val = wxc.wxPyApp_GetAppName(self.this) return val @@ -68,6 +71,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def Pending(self): val = wxc.wxPyApp_Pending(self.this) return val + def ProcessIdle(self): + val = wxc.wxPyApp_ProcessIdle(self.this) + return val def SetAppName(self,arg0): val = wxc.wxPyApp_SetAppName(self.this,arg0) return val @@ -86,9 +92,6 @@ class wxPyAppPtr(wxEvtHandlerPtr): def SetVendorName(self,arg0): val = wxc.wxPyApp_SetVendorName(self.this,arg0) return val - def AfterMainLoop(self): - val = wxc.wxPyApp_AfterMainLoop(self.this) - return val def __repr__(self): return "" class wxPyApp(wxPyAppPtr): @@ -99,10 +102,41 @@ class wxPyApp(wxPyAppPtr): +class __wxPyCleanupPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self, wxc=wxc): + if self.thisown == 1 : + wxc.delete___wxPyCleanup(self.this) + def __repr__(self): + return "" +class __wxPyCleanup(__wxPyCleanupPtr): + def __init__(self) : + self.this = wxc.new___wxPyCleanup() + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ +ptrcast = wxc.ptrcast + +ptrvalue = wxc.ptrvalue + +ptrset = wxc.ptrset + +ptrcreate = wxc.ptrcreate + +ptrfree = wxc.ptrfree + +ptradd = wxc.ptradd + +ptrmap = wxc.ptrmap + _wxStart = wxc._wxStart _wxSetDictionary = wxc._wxSetDictionary @@ -177,6 +211,7 @@ wxPASSWORD = wxc.wxPASSWORD wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_READONLY = wxc.wxTE_READONLY +wxTE_RICH = wxc.wxTE_RICH wxTE_MULTILINE = wxc.wxTE_MULTILINE wxCB_SIMPLE = wxc.wxCB_SIMPLE wxCB_DROPDOWN = wxc.wxCB_DROPDOWN @@ -209,6 +244,8 @@ wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW wxTR_HAS_BUTTONS = wxc.wxTR_HAS_BUTTONS wxTR_EDIT_LABELS = wxc.wxTR_EDIT_LABELS wxTR_LINES_AT_ROOT = wxc.wxTR_LINES_AT_ROOT +wxTR_MULTIPLE = wxc.wxTR_MULTIPLE +wxTR_HAS_VARIABLE_ROW_HEIGHT = wxc.wxTR_HAS_VARIABLE_ROW_HEIGHT wxLC_ICON = wxc.wxLC_ICON wxLC_SMALL_ICON = wxc.wxLC_SMALL_ICON wxLC_LIST = wxc.wxLC_LIST @@ -337,6 +374,8 @@ wxPD_ELAPSED_TIME = wxc.wxPD_ELAPSED_TIME wxPD_ESTIMATED_TIME = wxc.wxPD_ESTIMATED_TIME wxPD_REMAINING_TIME = wxc.wxPD_REMAINING_TIME wxNO_DEFAULT = wxc.wxNO_DEFAULT +wxMENU_TEAROFF = wxc.wxMENU_TEAROFF +wxNO_FULL_REPAINT_ON_RESIZE = wxc.wxNO_FULL_REPAINT_ON_RESIZE wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE wxROMAN = wxc.wxROMAN @@ -612,6 +651,9 @@ wxEVT_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK wxEVT_CHAR = wxc.wxEVT_CHAR +wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN +wxEVT_KEY_UP = wxc.wxEVT_KEY_UP +wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK wxEVT_SCROLL_TOP = wxc.wxEVT_SCROLL_TOP wxEVT_SCROLL_BOTTOM = wxc.wxEVT_SCROLL_BOTTOM wxEVT_SCROLL_LINEUP = wxc.wxEVT_SCROLL_LINEUP @@ -633,8 +675,6 @@ wxEVT_END_SESSION = wxc.wxEVT_END_SESSION wxEVT_QUERY_END_SESSION = wxc.wxEVT_QUERY_END_SESSION wxEVT_ACTIVATE_APP = wxc.wxEVT_ACTIVATE_APP wxEVT_POWER = wxc.wxEVT_POWER -wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK -wxEVT_KEY_UP = wxc.wxEVT_KEY_UP wxEVT_ACTIVATE = wxc.wxEVT_ACTIVATE wxEVT_CREATE = wxc.wxEVT_CREATE wxEVT_DESTROY = wxc.wxEVT_DESTROY @@ -814,6 +854,12 @@ def EVT_CHAR(win, func): def EVT_CHAR_HOOK(win, func): win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) +def EVT_KEY_DOWN(win, func): + win.Connect(-1, -1, wxEVT_KEY_DOWN, func) + +def EVT_KEY_UP(win, func): + win.Connect(-1, -1, wxEVT_KEY_UP, func) + def EVT_MENU_HIGHLIGHT(win, id, func): win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) @@ -1305,6 +1351,38 @@ class wxAcceleratorTable(wxAcceleratorTablePtr): self.this = miscc.new_wxAcceleratorTable(arg0) self.thisown = 1 +#---------------------------------------------------------------------- +# This helper function will take a wxPython object and convert it to +# another wxPython object type. This will not be able to create objects +# user that are derived from wxPython classes, only those that are +# actually part of wxPython and directly corespond to C++ objects. +# +# This is useful in situations where some method returns a generic +# type such as wxWindow, but you know that it is actually some +# derived type such as a wxTextCtrl. You can't call wxTextCtrl specific +# methods on a wxWindow object, but you can use this function to +# create a wxTextCtrl object that will pass the same pointer to +# the C++ code. You use it like this: +# +# textCtrl = wxPyTypeCast(window, "wxTextCtrl") +# +# +# WARNING: Using this function to type cast objects into types that +# they are not is not recommended and is likely to cause your +# program to crash... Hard. +# + +def wxPyTypeCast(obj, typeStr): + if hasattr(obj, "this"): + newPtr = ptrcast(obj.this, typeStr+"_p") + else: + newPtr = ptrcast(obj, typeStr+"_p") + theClass = globals()[typeStr+"Ptr"] + theObj = theClass(newPtr) + theObj.thisown = obj.thisown + return theObj + + #---------------------------------------------------------------------- ## class wxPyStdOutWindow: @@ -1373,3 +1451,10 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- +# DO NOT hold any other references to this object. This is how we know when +# to cleanup system resources that wxWin is holding... +__cleanMeUp = __wxPyCleanup() +#---------------------------------------------------------------------------- + + + diff --git a/utils/wxPython/src/helpers.cpp b/utils/wxPython/src/helpers.cpp index 38aaa25ec0..3d5e345026 100644 --- a/utils/wxPython/src/helpers.cpp +++ b/utils/wxPython/src/helpers.cpp @@ -79,35 +79,36 @@ bool wxPyApp::OnInit(void) { int wxPyApp::MainLoop(void) { int retval = wxApp::MainLoop(); - AfterMainLoop(); +//# AfterMainLoop(); + wxPythonApp->OnExit(); //# return retval; } -void wxPyApp::AfterMainLoop(void) { - // more stuff from wxEntry... +//# void wxPyApp::AfterMainLoop(void) { +// // more stuff from wxEntry... - if (wxPythonApp->GetTopWindow()) { - // Forcibly delete the window. - if (wxPythonApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame)) || - wxPythonApp->GetTopWindow()->IsKindOf(CLASSINFO(wxDialog))) { +// if (wxPythonApp->GetTopWindow()) { +// // Forcibly delete the window. +// if (wxPythonApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame)) || +// wxPythonApp->GetTopWindow()->IsKindOf(CLASSINFO(wxDialog))) { - wxPythonApp->GetTopWindow()->Close(TRUE); - wxPythonApp->DeletePendingObjects(); - } - else { - delete wxPythonApp->GetTopWindow(); - wxPythonApp->SetTopWindow(NULL); - } - } -#ifdef __WXGTK__ - wxPythonApp->DeletePendingObjects(); -#endif +// wxPythonApp->GetTopWindow()->Close(TRUE); +// wxPythonApp->DeletePendingObjects(); +// } +// else { +// delete wxPythonApp->GetTopWindow(); +// wxPythonApp->SetTopWindow(NULL); +// } +// } +// #ifdef __WXGTK__ +// wxPythonApp->DeletePendingObjects(); +// #endif - wxPythonApp->OnExit(); - wxApp::CleanUp(); -// delete wxPythonApp; -} +// wxPythonApp->OnExit(); +// wxApp::CleanUp(); +// // delete wxPythonApp; +// } //--------------------------------------------------------------------- @@ -117,7 +118,7 @@ void wxPyApp::AfterMainLoop(void) { // This is where we pick up the first part of the wxEntry functionality... // The rest is in __wxStart and AfterMainLoop. This function is called when -// wxpc is imported. (Before there is a wxApp object.) +// wxcmodule is imported. (Before there is a wxApp object.) void __wxPreStart() { // Bail out if there is already windows created. This means that the @@ -140,7 +141,9 @@ void __wxPreStart() argv[argc] = NULL; gtk_set_locale(); + if (!wxOKlibc()) wxConvCurrent = &wxConvLocal; gtk_init( &argc, &argv ); + wxSetDetectableAutoRepeat( TRUE ); delete [] argv; wxApp::Initialize(); // may return FALSE. Should we check? @@ -155,6 +158,8 @@ bool wxPyInEvent = false; #endif static char* __nullArgv[1] = { 0 }; + + // Start the user application, user App's OnInit method is a parameter here PyObject* __wxStart(PyObject* /* self */, PyObject* args) { @@ -184,15 +189,9 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) // Call the Python App's OnInit function arglist = PyTuple_New(0); - - // Py_END_ALLOW_THREADS; **** __wxStart was called from Python, - // should already have the lock result = PyEval_CallObject(onInitFunc, arglist); - // Py_BEGIN_ALLOW_THREADS; - - if (!result) { - PyErr_Print(); - exit(1); + if (!result) { // an exception was raised. + return NULL; } if (! PyInt_Check(result)) { @@ -201,9 +200,6 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) } bResult = PyInt_AS_LONG(result); if (! bResult) { - wxPythonApp->DeletePendingObjects(); - wxPythonApp->OnExit(); - wxApp::CleanUp(); PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting..."); return NULL; } @@ -256,8 +252,6 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) //--------------------------------------------------------------------------- - -static PyObject* wxPyConstructObject(void* ptr, char* className) { char buff[64]; // should always be big enough... @@ -338,64 +332,64 @@ void wxPyCallback::EventThunker(wxEvent& event) { //--------------------------------------------------------------------------- -wxPyMenu::wxPyMenu(const wxString& title, PyObject* _func) - : wxMenu(title, (wxFunction)(func ? MenuCallback : NULL)), func(0) { - - if (_func) { - func = _func; - Py_INCREF(func); - } -} - -wxPyMenu::~wxPyMenu() { -#ifdef WXP_WITH_THREAD - //if (! wxPyInEvent) - PyEval_RestoreThread(wxPyEventThreadState); -#endif - - if (func) - Py_DECREF(func); - -#ifdef WXP_WITH_THREAD - //if (! wxPyInEvent) - PyEval_SaveThread(); -#endif -} - - -void wxPyMenu::MenuCallback(wxMenu& menu, wxCommandEvent& evt) { - PyObject* evtobj; - PyObject* menuobj; - PyObject* func; - PyObject* args; - PyObject* res; - -#ifdef WXP_WITH_THREAD - PyEval_RestoreThread(wxPyEventThreadState); - wxPyInEvent = true; -#endif - evtobj = wxPyConstructObject((void*)&evt, "wxCommandEvent"); - menuobj = wxPyConstructObject((void*)&menu, "wxMenu"); - if (PyErr_Occurred()) { - // bail out if a problem - PyErr_Print(); - goto done; - } - // Now call the callback... - func = ((wxPyMenu*)&menu)->func; - args = PyTuple_New(2); - PyTuple_SET_ITEM(args, 0, menuobj); - PyTuple_SET_ITEM(args, 1, evtobj); - res = PyEval_CallObject(func, args); - Py_DECREF(args); - Py_XDECREF(res); /* In case res is a NULL pointer */ - done: -#ifdef WXP_WITH_THREAD - PyEval_SaveThread(); - wxPyInEvent = false; -#endif - return; -} +// wxPyMenu::wxPyMenu(const wxString& title, PyObject* _func) +// : wxMenu(title, (wxFunction)(func ? MenuCallback : NULL)), func(0) { + +// if (_func) { +// func = _func; +// Py_INCREF(func); +// } +// } + +// wxPyMenu::~wxPyMenu() { +// #ifdef WXP_WITH_THREAD +// //if (! wxPyInEvent) +// PyEval_RestoreThread(wxPyEventThreadState); +// #endif + +// if (func) +// Py_DECREF(func); + +// #ifdef WXP_WITH_THREAD +// //if (! wxPyInEvent) +// PyEval_SaveThread(); +// #endif +// } + + +// void wxPyMenu::MenuCallback(wxMenu& menu, wxCommandEvent& evt) { +// PyObject* evtobj; +// PyObject* menuobj; +// PyObject* func; +// PyObject* args; +// PyObject* res; + +// #ifdef WXP_WITH_THREAD +// PyEval_RestoreThread(wxPyEventThreadState); +// wxPyInEvent = true; +// #endif +// evtobj = wxPyConstructObject((void*)&evt, "wxCommandEvent"); +// menuobj = wxPyConstructObject((void*)&menu, "wxMenu"); +// if (PyErr_Occurred()) { +// // bail out if a problem +// PyErr_Print(); +// goto done; +// } +// // Now call the callback... +// func = ((wxPyMenu*)&menu)->func; +// args = PyTuple_New(2); +// PyTuple_SET_ITEM(args, 0, menuobj); +// PyTuple_SET_ITEM(args, 1, evtobj); +// res = PyEval_CallObject(func, args); +// Py_DECREF(args); +// Py_XDECREF(res); /* In case res is a NULL pointer */ +// done: +// #ifdef WXP_WITH_THREAD +// PyEval_SaveThread(); +// wxPyInEvent = false; +// #endif +// return; +// } //--------------------------------------------------------------------------- diff --git a/utils/wxPython/src/helpers.h b/utils/wxPython/src/helpers.h index 849625a4bf..bac46a2a96 100644 --- a/utils/wxPython/src/helpers.h +++ b/utils/wxPython/src/helpers.h @@ -45,7 +45,7 @@ public: ~wxPyApp(); int MainLoop(void); bool OnInit(void); - void AfterMainLoop(void); +//# void AfterMainLoop(void); }; extern wxPyApp *wxPythonApp; @@ -58,10 +58,8 @@ PyObject* __wxStart(PyObject*, PyObject* args); extern PyObject* wxPython_dict; PyObject* __wxSetDictionary(PyObject*, PyObject* args); -extern wxHashTable* wxPyWindows; // keep track of all windows so we - // don't accidentally delete them twice. - void wxPyEventThunker(wxObject*, wxEvent& event); +PyObject* wxPyConstructObject(void* ptr, char* className); //---------------------------------------------------------------------- @@ -98,15 +96,15 @@ public: //--------------------------------------------------------------------------- -class wxPyMenu : public wxMenu { -public: - wxPyMenu(const wxString& title = "", PyObject* func=NULL); - ~wxPyMenu(); +// class wxPyMenu : public wxMenu { +// public: +// wxPyMenu(const wxString& title = "", PyObject* func=NULL); +// ~wxPyMenu(); -private: - static void MenuCallback(wxMenu& menu, wxCommandEvent& evt); - PyObject* func; -}; +// private: +// static void MenuCallback(wxMenu& menu, wxCommandEvent& evt); +// PyObject* func; +// }; //--------------------------------------------------------------------------- diff --git a/utils/wxPython/src/image.i b/utils/wxPython/src/image.i index 0674cb8e22..c87d3ddb4a 100644 --- a/utils/wxPython/src/image.i +++ b/utils/wxPython/src/image.i @@ -85,6 +85,7 @@ public: void Create( int width, int height ); void Destroy(); wxImage Scale( int width, int height ); + void Rescale(int width, int height); void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b ); unsigned char GetRed( int x, int y ); diff --git a/utils/wxPython/src/makefile.vc b/utils/wxPython/src/makefile.vc index 4a4b0c59e1..693f9693c1 100644 --- a/utils/wxPython/src/makefile.vc +++ b/utils/wxPython/src/makefile.vc @@ -1,3 +1,4 @@ +# -*- makefile -*- #---------------------------------------------------------------------------- # Name: makefile.nt # Purpose: Win32, VC++ 5/6 makefile for wxPython @@ -9,7 +10,7 @@ # Copyright: (c) 1998 by Total Control Software # Licence: wxWindows license #---------------------------------------------------------------------------- -VERSION=2.1b1 +VERSION=2.1b2 # Set WXDIR to the root wxWindows directory for your system WXDIR = $(WXWIN) @@ -84,9 +85,9 @@ OBJECTS = wx.obj helpers.obj windows.obj events.obj \ misc.obj gdi.obj mdi.obj controls.obj \ controls2.obj windows2.obj cmndlgs.obj stattool.obj \ frames.obj windows3.obj image.obj printfw.obj \ - misc2.obj \ + misc2.obj \ !if "$(SEPARATE)" == "0" - utils.obj \ + utils.obj \ !if "$(WITH_GLCANVAS)" == "1" glcanvas.obj !endif @@ -101,6 +102,10 @@ target2=$(TARGETDIR)\$(TARGET2).pyd TARGET3 = glcanvasc OBJECTS3 = glcanvas.obj target3=$(TARGETDIR)\$(TARGET3).pyd + +TARGET4 = oglcc +OBJECTS4 = ogl.obj +target4=$(TARGETDIR)\$(TARGET4).pyd !endif PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \ @@ -176,6 +181,15 @@ $(LIBS) $(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib wxc.lib << +$(TARGETDIR)\$(TARGET4).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS4) + $(link) @<< +/out:$@ /dll +$(LFLAGS) /def:$(TARGET4).def /implib:./$(TARGET4).lib +$(DUMMYOBJ) $(OBJECTS4) +$(LIBS) wxc.lib $(WXDIR)\lib\ogl$(LIBEXT).lib +<< + + $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc @@ -211,6 +225,9 @@ clean: -erase $(TARGET3).exp -erase $(TARGET3).lib -erase $(TARGETDIR)\$(TARGET3).* + -erase $(TARGET4).exp + -erase $(TARGET4).lib + -erase $(TARGETDIR)\$(TARGET4).* !endif -erase $(TARGETDIR)\$(TARGET).pyd -erase $(TARGETDIR)\*.py @@ -272,12 +289,15 @@ $(GENCODEDIR)/printfw.cpp $(GENCODEDIR)/printfw.py : printfw.i my_typemap $(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i +$(GENCODEDIR)\ogl.cpp $(GENCODEDIR)\ogl.py : ogl.i my_typemaps.i + swig $(SWIGFLAGS) -o $(GENCODEDIR)/ogl.cpp ogl.i + !if "$(WITH_GLCANVAS)" == "1" $(GENCODEDIR)\glcanvas.cpp $(GENCODEDIR)\glcanvas.py : glcanvas.i my_typemaps.i swig $(SWIGFLAGS) -c -o $(GENCODEDIR)/glcanvas.cpp glcanvas.i !endif !else -$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i +$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i !if "$(WITH_GLCANVAS)" == "1" $(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py : glcanvas.i my_typemaps.i _defs.i !endif @@ -302,6 +322,7 @@ $(TARGETDIR)\__init__.py : __init__.py $(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py $(TARGETDIR)\image.py : $(GENCODEDIR)\image.py $(TARGETDIR)\printfw.py : $(GENCODEDIR)\printfw.py + !if "$(WITH_GLCANVAS)" == "1" $(TARGETDIR)\glcanvas.py : $(GENCODEDIR)\glcanvas.py !endif diff --git a/utils/wxPython/src/mdi.i b/utils/wxPython/src/mdi.i index 52abcab5c3..41de685303 100644 --- a/utils/wxPython/src/mdi.i +++ b/utils/wxPython/src/mdi.i @@ -76,11 +76,7 @@ public: %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" void Activate(); -#ifdef __WXMSW__ - void Maximize(); -#else void Maximize(bool maximize); -#endif void Restore(); }; diff --git a/utils/wxPython/src/misc.i b/utils/wxPython/src/misc.i index 6999c3f6ea..faef0a7a9a 100644 --- a/utils/wxPython/src/misc.i +++ b/utils/wxPython/src/misc.i @@ -186,6 +186,14 @@ int wxMessageBox(const wxString& message, wxWindow *parent = NULL, int x = -1, int y = -1); +long wxGetNumberFromUser(const wxString& message, + const wxString& prompt, + const wxString& caption, + long value, + long min = 0, long max = 100, + wxWindow *parent = NULL, + const wxPoint& pos = wxPyDefaultPosition); + //--------------------------------------------------------------------------- // GDI Functions @@ -387,3 +395,118 @@ public: }; //--------------------------------------------------------------------------- + +enum { + wxSYS_WHITE_BRUSH, + wxSYS_LTGRAY_BRUSH, + wxSYS_GRAY_BRUSH, + wxSYS_DKGRAY_BRUSH, + wxSYS_BLACK_BRUSH, + wxSYS_NULL_BRUSH, + wxSYS_HOLLOW_BRUSH, + wxSYS_WHITE_PEN, + wxSYS_BLACK_PEN, + wxSYS_NULL_PEN, + wxSYS_OEM_FIXED_FONT, + wxSYS_ANSI_FIXED_FONT, + wxSYS_ANSI_VAR_FONT, + wxSYS_SYSTEM_FONT, + wxSYS_DEVICE_DEFAULT_FONT, + wxSYS_DEFAULT_PALETTE, + wxSYS_SYSTEM_FIXED_FONT, + wxSYS_DEFAULT_GUI_FONT, + + wxSYS_COLOUR_SCROLLBAR, + wxSYS_COLOUR_BACKGROUND, + wxSYS_COLOUR_ACTIVECAPTION, + wxSYS_COLOUR_INACTIVECAPTION, + wxSYS_COLOUR_MENU, + wxSYS_COLOUR_WINDOW, + wxSYS_COLOUR_WINDOWFRAME, + wxSYS_COLOUR_MENUTEXT, + wxSYS_COLOUR_WINDOWTEXT, + wxSYS_COLOUR_CAPTIONTEXT, + wxSYS_COLOUR_ACTIVEBORDER, + wxSYS_COLOUR_INACTIVEBORDER, + wxSYS_COLOUR_APPWORKSPACE, + wxSYS_COLOUR_HIGHLIGHT, + wxSYS_COLOUR_HIGHLIGHTTEXT, + wxSYS_COLOUR_BTNFACE, + wxSYS_COLOUR_BTNSHADOW, + wxSYS_COLOUR_GRAYTEXT, + wxSYS_COLOUR_BTNTEXT, + wxSYS_COLOUR_INACTIVECAPTIONTEXT, + wxSYS_COLOUR_BTNHIGHLIGHT, + + wxSYS_COLOUR_3DDKSHADOW, + wxSYS_COLOUR_3DLIGHT, + wxSYS_COLOUR_INFOTEXT, + wxSYS_COLOUR_INFOBK, + + wxSYS_COLOUR_DESKTOP, + wxSYS_COLOUR_3DFACE, + wxSYS_COLOUR_3DSHADOW, + wxSYS_COLOUR_3DHIGHLIGHT, + wxSYS_COLOUR_3DHILIGHT, + wxSYS_COLOUR_BTNHILIGHT, + + wxSYS_MOUSE_BUTTONS, + wxSYS_BORDER_X, + wxSYS_BORDER_Y, + wxSYS_CURSOR_X, + wxSYS_CURSOR_Y, + wxSYS_DCLICK_X, + wxSYS_DCLICK_Y, + wxSYS_DRAG_X, + wxSYS_DRAG_Y, + wxSYS_EDGE_X, + wxSYS_EDGE_Y, + wxSYS_HSCROLL_ARROW_X, + wxSYS_HSCROLL_ARROW_Y, + wxSYS_HTHUMB_X, + wxSYS_ICON_X, + wxSYS_ICON_Y, + wxSYS_ICONSPACING_X, + wxSYS_ICONSPACING_Y, + wxSYS_WINDOWMIN_X, + wxSYS_WINDOWMIN_Y, + wxSYS_SCREEN_X, + wxSYS_SCREEN_Y, + wxSYS_FRAMESIZE_X, + wxSYS_FRAMESIZE_Y, + wxSYS_SMALLICON_X, + wxSYS_SMALLICON_Y, + wxSYS_HSCROLL_Y, + wxSYS_VSCROLL_X, + wxSYS_VSCROLL_ARROW_X, + wxSYS_VSCROLL_ARROW_Y, + wxSYS_VTHUMB_Y, + wxSYS_CAPTION_Y, + wxSYS_MENU_Y, + wxSYS_NETWORK_PRESENT, + wxSYS_PENWINDOWS_PRESENT, + wxSYS_SHOW_SOUNDS, + wxSYS_SWAP_BUTTONS, +}; + + + +%inline %{ + + wxColour wxSystemSettings_GetSystemColour(int index) { + return wxSystemSettings::GetSystemColour(index); + } + + wxFont wxSystemSettings_GetSystemFont(int index) { + return wxSystemSettings::GetSystemFont(index); + } + + int wxSystemSettings_GetSystemMetric(int index) { + return wxSystemSettings::GetSystemMetric(index); + } +%} + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- + + diff --git a/utils/wxPython/src/msw/cmndlgs.cpp b/utils/wxPython/src/msw/cmndlgs.cpp index 3e6f2caf74..f5a35172ff 100644 --- a/utils/wxPython/src/msw/cmndlgs.cpp +++ b/utils/wxPython/src/msw/cmndlgs.cpp @@ -2515,7 +2515,6 @@ SWIGEXPORT(void,initcmndlgsc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); @@ -2586,6 +2585,7 @@ SWIGEXPORT(void,initcmndlgsc)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); @@ -2618,6 +2618,7 @@ SWIGEXPORT(void,initcmndlgsc)() { SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -2741,7 +2742,6 @@ SWIGEXPORT(void,initcmndlgsc)() { SWIG_RegisterMapping("_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/msw/cmndlgs.py b/utils/wxPython/src/msw/cmndlgs.py index f8fa89db18..beea9f3dd3 100644 --- a/utils/wxPython/src/msw/cmndlgs.py +++ b/utils/wxPython/src/msw/cmndlgs.py @@ -19,7 +19,7 @@ class wxColourDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, cmndlgsc=cmndlgsc): if self.thisown == 1 : cmndlgsc.delete_wxColourData(self.this) def GetChooseFull(self): @@ -243,7 +243,7 @@ class wxFontDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, cmndlgsc=cmndlgsc): if self.thisown == 1 : cmndlgsc.delete_wxFontData(self.this) def EnableEffects(self,arg0): diff --git a/utils/wxPython/src/msw/controls.cpp b/utils/wxPython/src/msw/controls.cpp index 81de691160..cf3caafc35 100644 --- a/utils/wxPython/src/msw/controls.cpp +++ b/utils/wxPython/src/msw/controls.cpp @@ -57,6 +57,7 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include #ifdef __WXMSW__ #if wxUSE_OWNER_DRAWN @@ -66,7 +67,6 @@ extern PyObject *SWIG_newvarlink(void); #ifdef __WXGTK__ #include -#include #endif @@ -2321,6 +2321,76 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args) { return _resultobj; } +static void *SwigwxStaticLineTowxControl(void *ptr) { + wxStaticLine *src; + wxControl *dest; + src = (wxStaticLine *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxStaticLineTowxWindow(void *ptr) { + wxStaticLine *src; + wxWindow *dest; + src = (wxStaticLine *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxStaticLineTowxEvtHandler(void *ptr) { + wxStaticLine *src; + wxEvtHandler *dest; + src = (wxStaticLine *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxStaticLine(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxStaticLine(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxStaticLine * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxPoint * _arg2 = &wxPyDefaultPosition; + wxSize * _arg3 = &wxPyDefaultSize; + long _arg4 = wxLI_HORIZONTAL; + char * _arg5 = "staticLine"; + char * _argc0 = 0; + char * _argc2 = 0; + char * _argc3 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"si|ssls:new_wxStaticLine",&_argc0,&_arg1,&_argc2,&_argc3,&_arg4,&_arg5)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticLine. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxStaticLine. Expected _wxPoint_p."); + return NULL; + } + } + if (_argc3) { + if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxSize_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxStaticLine. Expected _wxSize_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticLine_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static void *SwigwxStaticTextTowxControl(void *ptr) { wxStaticText *src; wxControl *dest; @@ -4923,6 +4993,39 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args) return _resultobj; } +#define wxStaticBitmap_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0)) +static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxStaticBitmap * _arg0; + wxIcon * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxStaticBitmap_SetIcon",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxStaticBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_SetIcon. Expected _wxStaticBitmap_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStaticBitmap_SetIcon(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxRadioBoxTowxControl(void *ptr) { wxRadioBox *src; wxControl *dest; @@ -6182,6 +6285,7 @@ static PyMethodDef controlscMethods[] = { { "wxRadioBox_EnableItem", _wrap_wxRadioBox_EnableItem, 1 }, { "wxRadioBox_Enable", _wrap_wxRadioBox_Enable, 1 }, { "new_wxRadioBox", _wrap_new_wxRadioBox, 1 }, + { "wxStaticBitmap_SetIcon", _wrap_wxStaticBitmap_SetIcon, 1 }, { "wxStaticBitmap_SetBitmap", _wrap_wxStaticBitmap_SetBitmap, 1 }, { "wxStaticBitmap_GetBitmap", _wrap_wxStaticBitmap_GetBitmap, 1 }, { "new_wxStaticBitmap", _wrap_new_wxStaticBitmap, 1 }, @@ -6257,6 +6361,7 @@ static PyMethodDef controlscMethods[] = { { "wxStaticText_SetLabel", _wrap_wxStaticText_SetLabel, 1 }, { "wxStaticText_GetLabel", _wrap_wxStaticText_GetLabel, 1 }, { "new_wxStaticText", _wrap_new_wxStaticText, 1 }, + { "new_wxStaticLine", _wrap_new_wxStaticLine, 1 }, { "new_wxStaticBox", _wrap_new_wxStaticBox, 1 }, { "wxGauge_SetValue", _wrap_wxGauge_SetValue, 1 }, { "wxGauge_SetShadowWidth", _wrap_wxGauge_SetShadowWidth, 1 }, @@ -6366,6 +6471,8 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_class_wxEvtHandler","_wxListBox",SwigwxListBoxTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticText",SwigwxStaticTextTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticText",SwigwxStaticTextTowxEvtHandler); + SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticLine",SwigwxStaticLineTowxEvtHandler); + SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticLine",SwigwxStaticLineTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxGauge",SwigwxGaugeTowxEvtHandler); @@ -6388,7 +6495,6 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -6428,6 +6534,7 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); SWIG_RegisterMapping("_uint","_wxPrintQuality",0); @@ -6455,6 +6562,7 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0); SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -6517,6 +6625,8 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_class_wxWindow","_wxListBox",SwigwxListBoxTowxWindow); SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticText",SwigwxStaticTextTowxWindow); SWIG_RegisterMapping("_class_wxWindow","_wxStaticText",SwigwxStaticTextTowxWindow); + SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticLine",SwigwxStaticLineTowxWindow); + SWIG_RegisterMapping("_class_wxWindow","_wxStaticLine",SwigwxStaticLineTowxWindow); SWIG_RegisterMapping("_class_wxWindow","_class_wxStaticBox",SwigwxStaticBoxTowxWindow); SWIG_RegisterMapping("_class_wxWindow","_wxStaticBox",SwigwxStaticBoxTowxWindow); SWIG_RegisterMapping("_class_wxWindow","_class_wxGauge",SwigwxGaugeTowxWindow); @@ -6576,6 +6686,8 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_wxControl","_wxListBox",SwigwxListBoxTowxControl); SWIG_RegisterMapping("_wxControl","_class_wxStaticText",SwigwxStaticTextTowxControl); SWIG_RegisterMapping("_wxControl","_wxStaticText",SwigwxStaticTextTowxControl); + SWIG_RegisterMapping("_wxControl","_class_wxStaticLine",SwigwxStaticLineTowxControl); + SWIG_RegisterMapping("_wxControl","_wxStaticLine",SwigwxStaticLineTowxControl); SWIG_RegisterMapping("_wxControl","_class_wxStaticBox",SwigwxStaticBoxTowxControl); SWIG_RegisterMapping("_wxControl","_wxStaticBox",SwigwxStaticBoxTowxControl); SWIG_RegisterMapping("_wxControl","_class_wxGauge",SwigwxGaugeTowxControl); @@ -6601,7 +6713,6 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); @@ -6664,6 +6775,8 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_class_wxControl","_wxListBox",SwigwxListBoxTowxControl); SWIG_RegisterMapping("_class_wxControl","_class_wxStaticText",SwigwxStaticTextTowxControl); SWIG_RegisterMapping("_class_wxControl","_wxStaticText",SwigwxStaticTextTowxControl); + SWIG_RegisterMapping("_class_wxControl","_class_wxStaticLine",SwigwxStaticLineTowxControl); + SWIG_RegisterMapping("_class_wxControl","_wxStaticLine",SwigwxStaticLineTowxControl); SWIG_RegisterMapping("_class_wxControl","_class_wxStaticBox",SwigwxStaticBoxTowxControl); SWIG_RegisterMapping("_class_wxControl","_wxStaticBox",SwigwxStaticBoxTowxControl); SWIG_RegisterMapping("_class_wxControl","_class_wxGauge",SwigwxGaugeTowxControl); @@ -6719,6 +6832,8 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_wxEvtHandler","_wxListBox",SwigwxListBoxTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticText",SwigwxStaticTextTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_wxStaticText",SwigwxStaticTextTowxEvtHandler); + SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticLine",SwigwxStaticLineTowxEvtHandler); + SWIG_RegisterMapping("_wxEvtHandler","_wxStaticLine",SwigwxStaticLineTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_class_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_wxStaticBox",SwigwxStaticBoxTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_class_wxGauge",SwigwxGaugeTowxEvtHandler); @@ -6765,6 +6880,8 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_wxWindow","_wxListBox",SwigwxListBoxTowxWindow); SWIG_RegisterMapping("_wxWindow","_class_wxStaticText",SwigwxStaticTextTowxWindow); SWIG_RegisterMapping("_wxWindow","_wxStaticText",SwigwxStaticTextTowxWindow); + SWIG_RegisterMapping("_wxWindow","_class_wxStaticLine",SwigwxStaticLineTowxWindow); + SWIG_RegisterMapping("_wxWindow","_wxStaticLine",SwigwxStaticLineTowxWindow); SWIG_RegisterMapping("_wxWindow","_class_wxStaticBox",SwigwxStaticBoxTowxWindow); SWIG_RegisterMapping("_wxWindow","_wxStaticBox",SwigwxStaticBoxTowxWindow); SWIG_RegisterMapping("_wxWindow","_class_wxGauge",SwigwxGaugeTowxWindow); diff --git a/utils/wxPython/src/msw/controls.py b/utils/wxPython/src/msw/controls.py index 8afe9f145a..fb759a799e 100644 --- a/utils/wxPython/src/msw/controls.py +++ b/utils/wxPython/src/msw/controls.py @@ -331,6 +331,26 @@ class wxStaticBox(wxStaticBoxPtr): +class wxStaticLinePtr(wxControlPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" +class wxStaticLine(wxStaticLinePtr): + def __init__(self,arg0,arg1,*args) : + argl = map(None,args) + try: argl[0] = argl[0].this + except: pass + try: argl[1] = argl[1].this + except: pass + args = tuple(argl) + self.this = apply(controlsc.new_wxStaticLine,(arg0.this,arg1,)+args) + self.thisown = 1 + + + + class wxStaticTextPtr(wxControlPtr): def __init__(self,this): self.this = this @@ -665,6 +685,9 @@ class wxStaticBitmapPtr(wxControlPtr): def SetBitmap(self,arg0): val = controlsc.wxStaticBitmap_SetBitmap(self.this,arg0.this) return val + def SetIcon(self,arg0): + val = controlsc.wxStaticBitmap_SetIcon(self.this,arg0.this) + return val def __repr__(self): return "" class wxStaticBitmap(wxStaticBitmapPtr): diff --git a/utils/wxPython/src/msw/controls2.cpp b/utils/wxPython/src/msw/controls2.cpp index 90abd41b62..ef9d14c0d9 100644 --- a/utils/wxPython/src/msw/controls2.cpp +++ b/utils/wxPython/src/msw/controls2.cpp @@ -2956,6 +2956,14 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args) { return _resultobj; } +static void *SwigwxTreeEventTowxNotifyEvent(void *ptr) { + wxTreeEvent *src; + wxNotifyEvent *dest; + src = (wxTreeEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + static void *SwigwxTreeEventTowxCommandEvent(void *ptr) { wxTreeEvent *src; wxCommandEvent *dest; @@ -3078,28 +3086,31 @@ static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args) { return _resultobj; } -#define wxTreeEvent_Veto(_swigobj) (_swigobj->Veto()) -static PyObject *_wrap_wxTreeEvent_Veto(PyObject *self, PyObject *args) { +#define wxTreeEvent_GetLabel(_swigobj) (_swigobj->GetLabel()) +static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args) { PyObject * _resultobj; + wxString * _result; wxTreeEvent * _arg0; char * _argc0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxTreeEvent_Veto",&_argc0)) + if(!PyArg_ParseTuple(args,"s:wxTreeEvent_GetLabel",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_Veto. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetLabel. Expected _wxTreeEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeEvent_Veto(_arg0); + const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); + _result = (wxString *) &_result_ref; wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ + _resultobj = PyString_FromString(WXSTRINGCAST (*_result)); +} return _resultobj; } @@ -4801,6 +4812,31 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args) { return _resultobj; } +#define wxTreeCtrl_UnselectAll(_swigobj) (_swigobj->UnselectAll()) +static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxTreeCtrl * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxTreeCtrl_UnselectAll",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxTreeCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTreeCtrl_UnselectAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -5112,6 +5148,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_ScrollTo", _wrap_wxTreeCtrl_ScrollTo, 1 }, { "wxTreeCtrl_EnsureVisible", _wrap_wxTreeCtrl_EnsureVisible, 1 }, { "wxTreeCtrl_SelectItem", _wrap_wxTreeCtrl_SelectItem, 1 }, + { "wxTreeCtrl_UnselectAll", _wrap_wxTreeCtrl_UnselectAll, 1 }, { "wxTreeCtrl_Unselect", _wrap_wxTreeCtrl_Unselect, 1 }, { "wxTreeCtrl_Toggle", _wrap_wxTreeCtrl_Toggle, 1 }, { "wxTreeCtrl_CollapseAndReset", _wrap_wxTreeCtrl_CollapseAndReset, 1 }, @@ -5158,7 +5195,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_GetIndent", _wrap_wxTreeCtrl_GetIndent, 1 }, { "wxTreeCtrl_GetCount", _wrap_wxTreeCtrl_GetCount, 1 }, { "new_wxTreeCtrl", _wrap_new_wxTreeCtrl, 1 }, - { "wxTreeEvent_Veto", _wrap_wxTreeEvent_Veto, 1 }, + { "wxTreeEvent_GetLabel", _wrap_wxTreeEvent_GetLabel, 1 }, { "wxTreeEvent_GetCode", _wrap_wxTreeEvent_GetCode, 1 }, { "wxTreeEvent_GetPoint", _wrap_wxTreeEvent_GetPoint, 1 }, { "wxTreeEvent_GetOldItem", _wrap_wxTreeEvent_GetOldItem, 1 }, @@ -5344,10 +5381,11 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); + SWIG_RegisterMapping("_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); + SWIG_RegisterMapping("_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -5386,6 +5424,7 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); SWIG_RegisterMapping("_uint","_wxPrintQuality",0); @@ -5415,11 +5454,14 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0); SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); + SWIG_RegisterMapping("_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); + SWIG_RegisterMapping("_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent); SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0); SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0); SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -5503,7 +5545,6 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/msw/controls2.py b/utils/wxPython/src/msw/controls2.py index 895358d569..57e57efdec 100644 --- a/utils/wxPython/src/msw/controls2.py +++ b/utils/wxPython/src/msw/controls2.py @@ -15,7 +15,7 @@ class wxListItemPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, controls2c=controls2c): if self.thisown == 1 : controls2c.delete_wxListItem(self.this) def __setattr__(self,name,value): @@ -323,7 +323,7 @@ class wxTreeItemIdPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, controls2c=controls2c): if self.thisown == 1 : controls2c.delete_wxTreeItemId(self.this) def IsOk(self): @@ -366,7 +366,7 @@ class wxTreeItemData(wxTreeItemDataPtr): -class wxTreeEventPtr(wxCommandEventPtr): +class wxTreeEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -388,8 +388,8 @@ class wxTreeEventPtr(wxCommandEventPtr): def GetCode(self): val = controls2c.wxTreeEvent_GetCode(self.this) return val - def Veto(self): - val = controls2c.wxTreeEvent_Veto(self.this) + def GetLabel(self): + val = controls2c.wxTreeEvent_GetLabel(self.this) return val def __repr__(self): return "" @@ -582,6 +582,9 @@ class wxTreeCtrlPtr(wxControlPtr): def Unselect(self): val = controls2c.wxTreeCtrl_Unselect(self.this) return val + def UnselectAll(self): + val = controls2c.wxTreeCtrl_UnselectAll(self.this) + return val def SelectItem(self,arg0): val = controls2c.wxTreeCtrl_SelectItem(self.this,arg0.this) return val diff --git a/utils/wxPython/src/msw/events.py b/utils/wxPython/src/msw/events.py index 243b0480b6..c0f57d9f44 100644 --- a/utils/wxPython/src/msw/events.py +++ b/utils/wxPython/src/msw/events.py @@ -609,7 +609,7 @@ class wxPyEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, eventsc=eventsc): if self.thisown == 1 : eventsc.delete_wxPyEvent(self.this) def SetUserData(self,arg0): diff --git a/utils/wxPython/src/msw/frames.cpp b/utils/wxPython/src/msw/frames.cpp index 4b5606b175..b05bf8a39d 100644 --- a/utils/wxPython/src/msw/frames.cpp +++ b/utils/wxPython/src/msw/frames.cpp @@ -926,7 +926,6 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -966,6 +965,7 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); @@ -994,6 +994,7 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -1072,7 +1073,6 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/msw/gdi.cpp b/utils/wxPython/src/msw/gdi.cpp index 1d579b608a..b91e6382f4 100644 --- a/utils/wxPython/src/msw/gdi.cpp +++ b/utils/wxPython/src/msw/gdi.cpp @@ -131,6 +131,13 @@ static char* wxStringErrorMsg = "string type is required for parameter"; return new wxBitmap(name, flags); } +#ifdef __WXMSW__ + wxBitmap* wxBitmapFromData(char* data, long type, + int width, int height, int depth = 1) { + return new wxBitmap((void*)data, type, width, height, depth); + } +#endif + wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) { return new wxMask(bitmap, colour); } @@ -233,6 +240,29 @@ static PyObject *_wrap_wxNoRefBitmap(PyObject *self, PyObject *args) { return _resultobj; } +static PyObject *_wrap_wxBitmapFromData(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + char * _arg0; + long _arg1; + int _arg2; + int _arg3; + int _arg4 = 1; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"slii|i:wxBitmapFromData",&_arg0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmap *)wxBitmapFromData(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args) { PyObject * _resultobj; wxMask * _result; @@ -5306,8 +5336,10 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) { static void wxDC_DrawBitmap(wxDC *self,wxBitmap & bitmap,long x,long y,bool swapPalette) { wxMemoryDC* memDC = new wxMemoryDC; memDC->SelectObject(bitmap); +#ifdef __WXMSW__ if (swapPalette) self->SetPalette(*bitmap.GetPalette()); +#endif self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC, 0, 0, self->GetLogicalFunction()); memDC->SelectObject(wxNullBitmap); @@ -6498,6 +6530,7 @@ static PyMethodDef gdicMethods[] = { { "wxNamedColour", _wrap_wxNamedColour, 1 }, { "wxStockCursor", _wrap_wxStockCursor, 1 }, { "wxMaskColour", _wrap_wxMaskColour, 1 }, + { "wxBitmapFromData", _wrap_wxBitmapFromData, 1 }, { "wxNoRefBitmap", _wrap_wxNoRefBitmap, 1 }, { "wxEmptyBitmap", _wrap_wxEmptyBitmap, 1 }, { NULL, NULL } diff --git a/utils/wxPython/src/msw/gdi.py b/utils/wxPython/src/msw/gdi.py index c3c059266f..1cff1ad3eb 100644 --- a/utils/wxPython/src/msw/gdi.py +++ b/utils/wxPython/src/msw/gdi.py @@ -6,7 +6,7 @@ class wxBitmapPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxBitmap(self.this) def Create(self,arg0,arg1,*args): @@ -71,7 +71,7 @@ class wxMaskPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxMask(self.this) def __repr__(self): @@ -88,7 +88,7 @@ class wxIconPtr(wxBitmapPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxIcon(self.this) def GetDepth(self): @@ -129,7 +129,7 @@ class wxCursorPtr(wxBitmapPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, gdic=gdic): if self.thisown == 1 : gdic.delete_wxCursor(self.this) def Ok(self): @@ -138,733 +138,6615 @@ class wxCursorPtr(wxBitmapPtr): def __repr__(self): return "" class wxCursor(wxCursorPtr): - def __init__(self,arg0,arg1,*args) : - self.this = apply(gdic.new_wxCursor,(arg0,arg1,)+args) - self.thisown = 1 + def __init__(self,arg0,arg1,*arg // Alternate 'constructor' + wxColour* wxNamedColour(const wxString& colorName) { + return new wxColour(colorName); + } + // Alternate 'constructor' + wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) { + return new wxMemoryDC(oldDC); + } + +#if 0 +extern wxFont * wxNORMAL_FONT; +extern wxFont * wxSMALL_FONT; +extern wxFont * wxITALIC_FONT; +extern wxFont * wxSWISS_FONT; +extern wxPen * wxRED_PEN; +extern wxPen * wxCYAN_PEN; +extern wxPen * wxGREEN_PEN; +extern wxPen * wxBLACK_PEN; +extern wxPen * wxWHITE_PEN; +extern wxPen * wxTRANSPARENT_PEN; +extern wxPen * wxBLACK_DASHED_PEN; +extern wxPen * wxGREY_PEN; +extern wxPen * wxMEDIUM_GREY_PEN; +extern wxPen * wxLIGHT_GREY_PEN; +extern wxBrush * wxBLUE_BRUSH; +extern wxBrush * wxGREEN_BRUSH; +extern wxBrush * wxWHITE_BRUSH; +extern wxBrush * wxBLACK_BRUSH; +extern wxBrush * wxTRANSPARENT_BRUSH; +extern wxBrush * wxCYAN_BRUSH; +extern wxBrush * wxRED_BRUSH; +extern wxBrush * wxGREY_BRUSH; +extern wxBrush * wxMEDIUM_GREY_BRUSH; +extern wxBrush * wxLIGHT_GREY_BRUSH; +extern wxColour * wxBLACK; +extern wxColour * wxWHITE; +extern wxColour * wxRED; +extern wxColour * wxBLUE; +extern wxColour * wxGREEN; +extern wxColour * wxCYAN; +extern wxColour * wxLIGHT_GREY; +extern wxCursor * wxSTANDARD_CURSOR; +extern wxCursor * wxHOURGLASS_CURSOR; +extern wxCursor * wxCROSS_CURSOR; +extern wxBitmap wxNullBitmap; +extern wxIcon wxNullIcon; +extern wxCursor wxNullCursor; +extern wxPen wxNullPen; +extern wxBrush wxNullBrush; +extern wxPalette wxNullPalette; +extern wxFont wxNullFont; +extern wxColour wxNullColour; + +#endif +static PyObject *_wrap_wxEmptyBitmap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + int _arg0; + int _arg1; + int _arg2 = -1; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"ii|i:wxEmptyBitmap",&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmap *)wxEmptyBitmap(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxNoRefBitmap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + char * _arg0; + long _arg1; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxNoRefBitmap",&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmap *)wxNoRefBitmap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxBitmapFromData(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + char * _arg0; + long _arg1; + int _arg2; + int _arg3; + int _arg4 = 1; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"slii|i:wxBitmapFromData",&_arg0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmap *)wxBitmapFromData(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMask * _result; + wxBitmap * _arg0; + wxColour * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxMaskColour",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMaskColour. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMaskColour. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxCursor * _result; + int _arg0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"i:wxStockCursor",&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCursor *)wxPyStockCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"O:wxNamedColour",&_obj0)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxColour *)wxNamedColour(*_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxMemoryDCFromDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMemoryDC * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxMemoryDCFromDC",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryDCFromDC. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMemoryDC *)wxMemoryDCFromDC(_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int _wrap_wxNORMAL_FONT_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNORMAL_FONT is read-only."); + return 1; +} + +static PyObject *_wrap_wxNORMAL_FONT_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxNORMAL_FONT,"_wxFont_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxSMALL_FONT_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxSMALL_FONT is read-only."); + return 1; +} + +static PyObject *_wrap_wxSMALL_FONT_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxSMALL_FONT,"_wxFont_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxITALIC_FONT_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxITALIC_FONT is read-only."); + return 1; +} + +static PyObject *_wrap_wxITALIC_FONT_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxITALIC_FONT,"_wxFont_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxSWISS_FONT_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxSWISS_FONT is read-only."); + return 1; +} + +static PyObject *_wrap_wxSWISS_FONT_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxSWISS_FONT,"_wxFont_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxRED_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxRED_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxRED_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxRED_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxCYAN_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxCYAN_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxCYAN_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxCYAN_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxGREEN_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGREEN_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxGREEN_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxGREEN_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxBLACK_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxBLACK_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxBLACK_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxWHITE_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxWHITE_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxWHITE_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxWHITE_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxTRANSPARENT_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxTRANSPARENT_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxTRANSPARENT_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxTRANSPARENT_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxBLACK_DASHED_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_DASHED_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxBLACK_DASHED_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxBLACK_DASHED_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxGREY_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGREY_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxGREY_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxGREY_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxMEDIUM_GREY_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxMEDIUM_GREY_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxMEDIUM_GREY_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxMEDIUM_GREY_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxLIGHT_GREY_PEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY_PEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxLIGHT_GREY_PEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY_PEN,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxBLUE_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxBLUE_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxBLUE_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxBLUE_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxGREEN_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGREEN_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxGREEN_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxGREEN_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxWHITE_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxWHITE_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxWHITE_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxWHITE_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxBLACK_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxBLACK_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxBLACK_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxBLACK_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxTRANSPARENT_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxTRANSPARENT_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxTRANSPARENT_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxTRANSPARENT_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxCYAN_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxCYAN_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxCYAN_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxCYAN_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxRED_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxRED_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxRED_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxRED_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxGREY_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGREY_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxGREY_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxGREY_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxMEDIUM_GREY_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxMEDIUM_GREY_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxMEDIUM_GREY_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxMEDIUM_GREY_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxLIGHT_GREY_BRUSH_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY_BRUSH is read-only."); + return 1; +} + +static PyObject *_wrap_wxLIGHT_GREY_BRUSH_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY_BRUSH,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxBLACK_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxBLACK is read-only."); + return 1; +} + +static PyObject *_wrap_wxBLACK_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxBLACK,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxWHITE_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxWHITE is read-only."); + return 1; +} + +static PyObject *_wrap_wxWHITE_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxWHITE,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxRED_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxRED is read-only."); + return 1; +} + +static PyObject *_wrap_wxRED_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxRED,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxBLUE_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxBLUE is read-only."); + return 1; +} + +static PyObject *_wrap_wxBLUE_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxBLUE,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxGREEN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGREEN is read-only."); + return 1; +} + +static PyObject *_wrap_wxGREEN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxGREEN,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxCYAN_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxCYAN is read-only."); + return 1; +} + +static PyObject *_wrap_wxCYAN_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxCYAN,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxLIGHT_GREY_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxLIGHT_GREY is read-only."); + return 1; +} + +static PyObject *_wrap_wxLIGHT_GREY_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxLIGHT_GREY,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxSTANDARD_CURSOR_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxSTANDARD_CURSOR is read-only."); + return 1; +} + +static PyObject *_wrap_wxSTANDARD_CURSOR_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxSTANDARD_CURSOR,"_wxCursor_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxHOURGLASS_CURSOR_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxHOURGLASS_CURSOR is read-only."); + return 1; +} + +static PyObject *_wrap_wxHOURGLASS_CURSOR_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxHOURGLASS_CURSOR,"_wxCursor_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxCROSS_CURSOR_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxCROSS_CURSOR is read-only."); + return 1; +} + +static PyObject *_wrap_wxCROSS_CURSOR_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxCROSS_CURSOR,"_wxCursor_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullBitmap_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullBitmap is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullBitmap_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullBitmap,"_wxBitmap_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullIcon_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullIcon is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullIcon_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullIcon,"_wxIcon_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullCursor_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullCursor is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullCursor_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullCursor,"_wxCursor_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullPen_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullPen is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullPen_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullPen,"_wxPen_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullBrush_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullBrush is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullBrush_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullBrush,"_wxBrush_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullPalette_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullPalette is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullPalette_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullPalette,"_wxPalette_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullFont_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullFont is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullFont_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullFont,"_wxFont_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxNullColour_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullColour is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullColour_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullColour,"_wxColour_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +#define new_wxBitmap(_swigarg0,_swigarg1) (new wxBitmap(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + wxString * _arg0; + long _arg1; + PyObject * _obj0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"Ol:new_wxBitmap",&_obj0,&_arg1)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmap *)new_wxBitmap(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define delete_wxBitmap(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxBitmap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxBitmap",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxBitmap(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmap_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxBitmap_Create(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _arg0; + int _arg1; + int _arg2; + int _arg3 = -1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sii|i:wxBitmap_Create",&_argc0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_Create. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmap_Create(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmap_GetDepth(_swigobj) (_swigobj->GetDepth()) +static PyObject *_wrap_wxBitmap_GetDepth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxBitmap * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBitmap_GetDepth",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetDepth. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmap_GetDepth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmap_GetHeight(_swigobj) (_swigobj->GetHeight()) +static PyObject *_wrap_wxBitmap_GetHeight(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxBitmap * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBitmap_GetHeight",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetHeight. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmap_GetHeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmap_GetPalette(_swigobj) (_swigobj->GetPalette()) +static PyObject *_wrap_wxBitmap_GetPalette(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPalette * _result; + wxBitmap * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBitmap_GetPalette",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetPalette. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPalette *)wxBitmap_GetPalette(_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxBitmap_GetMask(_swigobj) (_swigobj->GetMask()) +static PyObject *_wrap_wxBitmap_GetMask(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMask * _result; + wxBitmap * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBitmap_GetMask",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetMask. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMask *)wxBitmap_GetMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxBitmap_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxBitmap_GetWidth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxBitmap * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBitmap_GetWidth",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetWidth. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmap_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmap_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxBitmap * _arg0; + wxString * _arg1; + long _arg2; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sOl:wxBitmap_LoadFile",&_argc0,&_obj1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_LoadFile. Expected _wxBitmap_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxBitmap_LoadFile(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxBitmap_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxBitmap_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxBitmap * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBitmap_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_Ok. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxBitmap_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmap_SaveFile(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SaveFile(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxBitmap * _arg0; + wxString * _arg1; + int _arg2; + wxPalette * _arg3 = NULL; + char * _argc0 = 0; + PyObject * _obj1 = 0; + char * _argc3 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sOi|s:wxBitmap_SaveFile",&_argc0,&_obj1,&_arg2,&_argc3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SaveFile. Expected _wxBitmap_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} + if (_argc3) { + if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxBitmap_SaveFile. Expected _wxPalette_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxBitmap_SaveFile(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxBitmap_SetDepth(_swigobj,_swigarg0) (_swigobj->SetDepth(_swigarg0)) +static PyObject *_wrap_wxBitmap_SetDepth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxBitmap_SetDepth",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetDepth. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmap_SetDepth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmap_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) +static PyObject *_wrap_wxBitmap_SetHeight(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxBitmap_SetHeight",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetHeight. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmap_SetHeight(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmap_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0)) +static PyObject *_wrap_wxBitmap_SetMask(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _arg0; + wxMask * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxBitmap_SetMask",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetMask. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMask_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_SetMask. Expected _wxMask_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmap_SetMask(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmap_SetPalette(_swigobj,_swigarg0) (_swigobj->SetPalette(_swigarg0)) +static PyObject *_wrap_wxBitmap_SetPalette(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _arg0; + wxPalette * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxBitmap_SetPalette",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetPalette. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_SetPalette. Expected _wxPalette_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmap_SetPalette(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmap_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) +static PyObject *_wrap_wxBitmap_SetWidth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxBitmap_SetWidth",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetWidth. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmap_SetWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxMask(_swigarg0) (new wxMask(_swigarg0)) +static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMask * _result; + wxBitmap * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:new_wxMask",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMask. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMask *)new_wxMask(*_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMask_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define delete_wxMask(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxMask(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMask * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxMask",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMask_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxMask. Expected _wxMask_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxIconTowxBitmap(void *ptr) { + wxIcon *src; + wxBitmap *dest; + src = (wxIcon *) ptr; + dest = (wxBitmap *) src; + return (void *) dest; +} + +#define new_wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxIcon(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxIcon * _result; + wxString * _arg0; + long _arg1; + int _arg2 = -1; + int _arg3 = -1; + PyObject * _obj0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"Ol|ii:new_wxIcon",&_obj0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxIcon *)new_wxIcon(*_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define delete_wxIcon(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxIcon * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxIcon",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxIcon(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxIcon_GetDepth(_swigobj) (_swigobj->GetDepth()) +static PyObject *_wrap_wxIcon_GetDepth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxIcon * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxIcon_GetDepth",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetDepth. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxIcon_GetDepth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxIcon_GetHeight(_swigobj) (_swigobj->GetHeight()) +static PyObject *_wrap_wxIcon_GetHeight(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxIcon * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxIcon_GetHeight",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetHeight. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxIcon_GetHeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxIcon_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxIcon_GetWidth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxIcon * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxIcon_GetWidth",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_GetWidth. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxIcon_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxIcon_LoadFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxIcon * _arg0; + wxString * _arg1; + long _arg2; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sOl:wxIcon_LoadFile",&_argc0,&_obj1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_LoadFile. Expected _wxIcon_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxIcon_LoadFile(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxIcon_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxIcon_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxIcon * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxIcon_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_Ok. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxIcon_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxIcon_SetDepth(_swigobj,_swigarg0) (_swigobj->SetDepth(_swigarg0)) +static PyObject *_wrap_wxIcon_SetDepth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxIcon * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxIcon_SetDepth",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetDepth. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxIcon_SetDepth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxIcon_SetHeight(_swigobj,_swigarg0) (_swigobj->SetHeight(_swigarg0)) +static PyObject *_wrap_wxIcon_SetHeight(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxIcon * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxIcon_SetHeight",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetHeight. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxIcon_SetHeight(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxIcon_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) +static PyObject *_wrap_wxIcon_SetWidth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxIcon * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxIcon_SetWidth",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIcon_SetWidth. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxIcon_SetWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxCursorTowxBitmap(void *ptr) { + wxCursor *src; + wxBitmap *dest; + src = (wxCursor *) ptr; + dest = (wxBitmap *) src; + return (void *) dest; +} + +#define new_wxCursor(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxCursor(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxCursor(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxCursor * _result; + wxString * _arg0; + long _arg1; + int _arg2 = 0; + int _arg3 = 0; + PyObject * _obj0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"Ol|ii:new_wxCursor",&_obj0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCursor *)new_wxCursor(*_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define delete_wxCursor(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxCursor(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxCursor * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxCursor",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCursor_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxCursor * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxCursor_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCursor_Ok. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCursor_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static wxFont *new_wxFont(int pointSize,int family,int style,int weight,int underline,char *faceName) { + + return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, + underline, faceName); + } + +static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _result; + int _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4 = (0); + char * _arg5 = ""; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"iiii|is:new_wxFont",&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxFont_GetFaceName(_swigobj) (_swigobj->GetFaceName()) +static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxString * _result; + wxFont * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxFont_GetFaceName",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFaceName. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFont_GetFaceName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFont_GetFamily(_swigobj) (_swigobj->GetFamily()) +static PyObject *_wrap_wxFont_GetFamily(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxFont * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxFont_GetFamily",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamily. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFont_GetFamily(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFont_GetFontId(_swigobj) (_swigobj->GetFontId()) +static PyObject *_wrap_wxFont_GetFontId(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxFont * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxFont_GetFontId",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFontId. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFont_GetFontId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFont_GetPointSize(_swigobj) (_swigobj->GetPointSize()) +static PyObject *_wrap_wxFont_GetPointSize(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxFont * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxFont_GetPointSize",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetPointSize. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFont_GetPointSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFont_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxFont_GetStyle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxFont * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxFont_GetStyle",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyle. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFont_GetStyle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFont_GetUnderlined(_swigobj) (_swigobj->GetUnderlined()) +static PyObject *_wrap_wxFont_GetUnderlined(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxFont * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxFont_GetUnderlined",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetUnderlined. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFont_GetUnderlined(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFont_GetWeight(_swigobj) (_swigobj->GetWeight()) +static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxFont * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxFont_GetWeight",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeight. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxFont_GetWeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0)) +static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxFont_SetFaceName",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFaceName. Expected _wxFont_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFont_SetFaceName(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFont_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0)) +static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxFont_SetFamily",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFamily. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFont_SetFamily(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFont_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0)) +static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxFont_SetPointSize",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetPointSize. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFont_SetPointSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFont_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxFont_SetStyle",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetStyle. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFont_SetStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFont_SetUnderlined(_swigobj,_swigarg0) (_swigobj->SetUnderlined(_swigarg0)) +static PyObject *_wrap_wxFont_SetUnderlined(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _arg0; + bool _arg1; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxFont_SetUnderlined",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetUnderlined. Expected _wxFont_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFont_SetUnderlined(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFont_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0)) +static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxFont_SetWeight",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetWeight. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFont_SetWeight(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + unsigned char _arg0 = 0; + unsigned char _arg1 = 0; + unsigned char _arg2 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"|bbb:new_wxColour",&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxColour *)new_wxColour(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define delete_wxColour(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxColour",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxColour. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxColour_Red(_swigobj) (_swigobj->Red()) +static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args) { + PyObject * _resultobj; + unsigned char _result; + wxColour * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxColour_Red",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Red. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (unsigned char )wxColour_Red(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("b",_result); + return _resultobj; +} + +#define wxColour_Green(_swigobj) (_swigobj->Green()) +static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args) { + PyObject * _resultobj; + unsigned char _result; + wxColour * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxColour_Green",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Green. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (unsigned char )wxColour_Green(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("b",_result); + return _resultobj; +} + +#define wxColour_Blue(_swigobj) (_swigobj->Blue()) +static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args) { + PyObject * _resultobj; + unsigned char _result; + wxColour * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxColour_Blue",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Blue. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (unsigned char )wxColour_Blue(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("b",_result); + return _resultobj; +} + +#define wxColour_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxColour * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxColour_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Ok. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxColour_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxColour_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _arg0; + unsigned char _arg1; + unsigned char _arg2; + unsigned char _arg3; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sbbb:wxColour_Set",&_argc0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Set. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxColour_Set(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject * wxColour_Get(wxColour *self) { + PyObject* rv = PyTuple_New(3); + PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red())); + PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green())); + PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue())); + return rv; + } +static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + wxColour * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxColour_Get",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Get. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxColour_Get(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static wxPen *new_wxPen(wxColour *colour,int width,int style) { + return wxThePenList->FindOrCreatePen(*colour, width, style); + } + +static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _result; + wxColour * _arg0; + int _arg1 = 1; + int _arg2 = (wxSOLID); + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s|ii:new_wxPen",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPen. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPen *)new_wxPen(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxPen_GetCap(_swigobj) (_swigobj->GetCap()) +static PyObject *_wrap_wxPen_GetCap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxPen * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_GetCap",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetCap. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPen_GetCap(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPen_GetColour(_swigobj) (_swigobj->GetColour()) +static PyObject *_wrap_wxPen_GetColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + wxPen * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_GetColour",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetColour. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxColour & _result_ref = wxPen_GetColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxPen_GetJoin(_swigobj) (_swigobj->GetJoin()) +static PyObject *_wrap_wxPen_GetJoin(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxPen * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_GetJoin",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetJoin. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPen_GetJoin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPen_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxPen_GetStyle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxPen * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_GetStyle",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetStyle. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPen_GetStyle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPen_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxPen_GetWidth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxPen * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_GetWidth",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetWidth. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPen_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPen_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxPen_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxPen * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_Ok. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPen_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPen_SetCap(_swigobj,_swigarg0) (_swigobj->SetCap(_swigarg0)) +static PyObject *_wrap_wxPen_SetCap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxPen_SetCap",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetCap. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen_SetCap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPen_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) +static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + wxColour * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxPen_SetColour",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetColour. Expected _wxPen_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetColour. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen_SetColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPen_SetJoin(_swigobj,_swigarg0) (_swigobj->SetJoin(_swigarg0)) +static PyObject *_wrap_wxPen_SetJoin(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxPen_SetJoin",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetJoin. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen_SetJoin(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPen_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxPen_SetStyle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxPen_SetStyle",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetStyle. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen_SetStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPen_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) +static PyObject *_wrap_wxPen_SetWidth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxPen_SetWidth",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetWidth. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen_SetWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPen_GetDashes(_swigobj,_swigarg0) (_swigobj->GetDashes(_swigarg0)) +static PyObject *_wrap_wxPen_GetDashes(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxPen * _arg0; + wxDash ** _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxPen_GetDashes",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetDashes. Expected _wxPen_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxDash_pp")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_GetDashes. Expected _wxDash_pp."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPen_GetDashes(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPen_GetStipple(_swigobj) (_swigobj->GetStipple()) +static PyObject *_wrap_wxPen_GetStipple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + wxPen * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPen_GetStipple",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetStipple. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmap *)wxPen_GetStipple(_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + int _arg1; + wxDash * _arg2; + char * _argc0 = 0; + PyObject * _obj2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxPen_SetDashes",&_argc0,&_obj2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetDashes. Expected _wxPen_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = (unsigned long*)long_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + if (_obj2) { + _arg1 = PyList_Size(_obj2); + } + else { + _arg1 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen_SetDashes(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + +#define wxPen_SetStipple(_swigobj,_swigarg0) (_swigobj->SetStipple(_swigarg0)) +static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _arg0; + wxBitmap * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxPen_SetStipple",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_SetStipple. Expected _wxPen_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetStipple. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen_SetStipple(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static wxBrush *new_wxBrush(wxColour *colour,int style) { + return wxTheBrushList->FindOrCreateBrush(*colour, style); + } + +static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBrush * _result; + wxColour * _arg0; + int _arg1 = (wxSOLID); + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:new_wxBrush",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBrush. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBrush *)new_wxBrush(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxBrush_GetColour(_swigobj) (_swigobj->GetColour()) +static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + wxBrush * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBrush_GetColour",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetColour. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxColour & _result_ref = wxBrush_GetColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxBrush_GetStipple(_swigobj) (_swigobj->GetStipple()) +static PyObject *_wrap_wxBrush_GetStipple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBitmap * _result; + wxBrush * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBrush_GetStipple",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetStipple. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmap *)wxBrush_GetStipple(_arg0); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxBrush_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxBrush_GetStyle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxBrush * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBrush_GetStyle",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_GetStyle. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBrush_GetStyle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBrush_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxBrush_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxBrush * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxBrush_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_Ok. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxBrush_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBrush_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0)) +static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBrush * _arg0; + wxColour * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxBrush_SetColour",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_SetColour. Expected _wxBrush_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrush_SetColour. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBrush_SetColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBrush_SetStipple(_swigobj,_swigarg0) (_swigobj->SetStipple(_swigarg0)) +static PyObject *_wrap_wxBrush_SetStipple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBrush * _arg0; + wxBitmap * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxBrush_SetStipple",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_SetStipple. Expected _wxBrush_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrush_SetStipple. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBrush_SetStipple(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBrush_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxBrush_SetStyle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBrush * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxBrush_SetStyle",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrush_SetStyle. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBrush_SetStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define delete_wxDC(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxDC",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDC. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxDC(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_BeginDrawing(_swigobj) (_swigobj->BeginDrawing()) +static PyObject *_wrap_wxDC_BeginDrawing(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_BeginDrawing",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_BeginDrawing. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_BeginDrawing(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_Blit(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Blit(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + wxDC * _arg5; + long _arg6; + long _arg7; + long _arg8; + char * _argc0 = 0; + char * _argc5 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllllslll:wxDC_Blit",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_argc5,&_arg6,&_arg7,&_arg8)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Blit. Expected _wxDC_p."); + return NULL; + } + } + if (_argc5) { + if (SWIG_GetPtr(_argc5,(void **) &_arg5,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxDC_Blit. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDC_Blit(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDC_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxDC_Clear(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_Clear",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Clear. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_CrossHair(_swigobj,_swigarg0,_swigarg1) (_swigobj->CrossHair(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_CrossHair(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sll:wxDC_CrossHair",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_CrossHair. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_CrossHair(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DestroyClippingRegion(_swigobj) (_swigobj->DestroyClippingRegion()) +static PyObject *_wrap_wxDC_DestroyClippingRegion(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_DestroyClippingRegion",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DestroyClippingRegion. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DestroyClippingRegion(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DeviceToLogicalX(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalX(_swigarg0)) +static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalX",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalX. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_DeviceToLogicalXRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalXRel(_swigarg0)) +static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalXRel",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalXRel. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_DeviceToLogicalY(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalY(_swigarg0)) +static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalY",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalY. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_DeviceToLogicalYRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalYRel(_swigarg0)) +static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_DeviceToLogicalYRel",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DeviceToLogicalYRel. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_DrawArc(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->DrawArc(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + long _arg5; + long _arg6; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllllll:wxDC_DrawArc",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawArc. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawCircle(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawCircle(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDC_DrawCircle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"slll:wxDC_DrawCircle",&_argc0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawCircle. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawEllipse(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawEllipse(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawEllipse",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawEllipse. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawEllipse(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawEllipticArc(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->DrawEllipticArc(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxDC_DrawEllipticArc(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + long _arg5; + long _arg6; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllllll:wxDC_DrawEllipticArc",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawEllipticArc. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawEllipticArc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawIcon(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawIcon(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxIcon * _arg1; + long _arg2; + long _arg3; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ssll:wxDC_DrawIcon",&_argc0,&_argc1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawIcon. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_DrawIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawIcon(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawLine(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawLine(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_DrawLine(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawLine",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawLine. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawLine(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawLines(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawLines(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_DrawLines(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + wxPoint * _arg2; + long _arg3 = 0; + long _arg4 = 0; + char * _argc0 = 0; + PyObject * _obj2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO|ll:wxDC_DrawLines",&_argc0,&_obj2,&_arg3,&_arg4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawLines. Expected _wxDC_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = wxPoint_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + if (_obj2) { + _arg1 = PyList_Size(_obj2); + } + else { + _arg1 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawLines(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + +#define wxDC_DrawPolygon(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawPolygon(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + wxPoint * _arg2; + long _arg3 = 0; + long _arg4 = 0; + int _arg5 = (wxODDEVEN_RULE); + char * _argc0 = 0; + PyObject * _obj2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO|lli:wxDC_DrawPolygon",&_argc0,&_obj2,&_arg3,&_arg4,&_arg5)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawPolygon. Expected _wxDC_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = wxPoint_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + if (_obj2) { + _arg1 = PyList_Size(_obj2); + } + else { + _arg1 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawPolygon(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + +#define wxDC_DrawPoint(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawPoint(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sll:wxDC_DrawPoint",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawPoint. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawPoint(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_DrawRectangle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllll:wxDC_DrawRectangle",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawRectangle. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawRectangle(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawRoundedRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawRoundedRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxDC_DrawRoundedRectangle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + long _arg5 = 20; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllll|l:wxDC_DrawRoundedRectangle",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawRoundedRectangle. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawRoundedRectangle(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_DrawSpline(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawSpline(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_DrawSpline(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + wxPoint * _arg2; + char * _argc0 = 0; + PyObject * _obj2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxDC_DrawSpline",&_argc0,&_obj2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawSpline. Expected _wxDC_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = wxPoint_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + if (_obj2) { + _arg1 = PyList_Size(_obj2); + } + else { + _arg1 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawSpline(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + +#define wxDC_DrawText(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawText(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxString * _arg1; + long _arg2; + long _arg3; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sOll:wxDC_DrawText",&_argc0,&_obj1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawText. Expected _wxDC_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawText(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDC_EndDoc(_swigobj) (_swigobj->EndDoc()) +static PyObject *_wrap_wxDC_EndDoc(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_EndDoc",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndDoc. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_EndDoc(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_EndDrawing(_swigobj) (_swigobj->EndDrawing()) +static PyObject *_wrap_wxDC_EndDrawing(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_EndDrawing",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndDrawing. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_EndDrawing(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_EndPage(_swigobj) (_swigobj->EndPage()) +static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_EndPage",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_EndPage. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_EndPage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_FloodFill(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->FloodFill(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + wxColour * _arg3; + int _arg4 = (wxFLOOD_SURFACE); + char * _argc0 = 0; + char * _argc3 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"slls|i:wxDC_FloodFill",&_argc0,&_arg1,&_arg2,&_argc3,&_arg4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_FloodFill. Expected _wxDC_p."); + return NULL; + } + } + if (_argc3) { + if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDC_FloodFill. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_GetBackground(_swigobj) (_swigobj->GetBackground()) +static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBrush * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetBackground",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetBackground. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBrush & _result_ref = wxDC_GetBackground(_arg0); + _result = (wxBrush *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_GetBrush(_swigobj) (_swigobj->GetBrush()) +static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxBrush * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetBrush",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetBrush. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBrush & _result_ref = wxDC_GetBrush(_arg0); + _result = (wxBrush *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_GetCharHeight(_swigobj) (_swigobj->GetCharHeight()) +static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetCharHeight",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetCharHeight. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_GetCharHeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_GetCharWidth(_swigobj) (_swigobj->GetCharWidth()) +static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetCharWidth",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetCharWidth. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_GetCharWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_GetClippingBox(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetClippingBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_GetClippingBox(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long * _arg1; + long temp; + long * _arg2; + long temp0; + long * _arg3; + long temp1; + long * _arg4; + long temp2; + char * _argc0 = 0; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} +{ + _arg3 = &temp1; +} +{ + _arg4 = &temp2; +} + if(!PyArg_ParseTuple(args,"s:wxDC_GetClippingBox",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetClippingBox. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_GetClippingBox(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxDC_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetFont",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetFont. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFont & _result_ref = wxDC_GetFont(_arg0); + _result = (wxFont *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_GetLogicalFunction(_swigobj) (_swigobj->GetLogicalFunction()) +static PyObject *_wrap_wxDC_GetLogicalFunction(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetLogicalFunction",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetLogicalFunction. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDC_GetLogicalFunction(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDC_GetMapMode(_swigobj) (_swigobj->GetMapMode()) +static PyObject *_wrap_wxDC_GetMapMode(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetMapMode",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetMapMode. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDC_GetMapMode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDC_GetOptimization(_swigobj) (_swigobj->GetOptimization()) +static PyObject *_wrap_wxDC_GetOptimization(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetOptimization",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetOptimization. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDC_GetOptimization(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDC_GetPen(_swigobj) (_swigobj->GetPen()) +static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPen * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetPen",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetPen. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPen & _result_ref = wxDC_GetPen(_arg0); + _result = (wxPen *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxColour * wxDC_GetPixel(wxDC *self,long x,long y) { + wxColour* wc = new wxColour(); + self->GetPixel(x, y, wc); + return wc; + } +static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + wxDC * _arg0; + long _arg1; + long _arg2; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"sll:wxDC_GetPixel",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetPixel. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxColour *)wxDC_GetPixel(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_GetSizeTuple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + char * _argc0 = 0; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTuple(args,"s:wxDC_GetSizeTuple",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetSizeTuple. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_GetSizeTuple(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxDC_GetSize(_swigobj) (_swigobj->GetSize()) +static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxSize * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetSize",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetSize. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxDC_GetSize(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_GetTextBackground(_swigobj) (_swigobj->GetTextBackground()) +static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetTextBackground",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextBackground. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxColour & _result_ref = wxDC_GetTextBackground(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_GetTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetTextExtent(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxString * _arg1; + long * _arg2; + long temp; + long * _arg3; + long temp0; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; +{ + _arg2 = &temp; +} +{ + _arg3 = &temp0; +} + if(!PyArg_ParseTuple(args,"sO:wxDC_GetTextExtent",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextExtent. Expected _wxDC_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_GetTextExtent(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDC_GetFullTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->GetTextExtent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxString * _arg1; + long * _arg2; + long temp; + long * _arg3; + long temp0; + long * _arg4; + long temp1; + long * _arg5; + long temp2; + wxFont * _arg6 = NULL; + char * _argc0 = 0; + PyObject * _obj1 = 0; + char * _argc6 = 0; + + self = self; +{ + _arg2 = &temp; +} +{ + _arg3 = &temp0; +} +{ + _arg4 = &temp1; +} +{ + _arg5 = &temp2; +} + if(!PyArg_ParseTuple(args,"sO|s:wxDC_GetFullTextExtent",&_argc0,&_obj1,&_argc6)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetFullTextExtent. Expected _wxDC_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} + if (_argc6) { + if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxDC_GetFullTextExtent. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_GetFullTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg5)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDC_GetTextForeground(_swigobj) (_swigobj->GetTextForeground()) +static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + wxDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_GetTextForeground",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextForeground. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxColour & _result_ref = wxDC_GetTextForeground(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_LogicalToDeviceX(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceX(_swigarg0)) +static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceX",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceX. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_LogicalToDeviceXRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceXRel(_swigarg0)) +static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceXRel",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceXRel. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_LogicalToDeviceY(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceY(_swigarg0)) +static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceY",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceY. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_LogicalToDeviceYRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceYRel(_swigarg0)) +static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxDC_LogicalToDeviceYRel",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_LogicalToDeviceYRel. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_MaxX(_swigobj) (_swigobj->MaxX()) +static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_MaxX",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MaxX. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_MaxX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_MaxY(_swigobj) (_swigobj->MaxY()) +static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_MaxY",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MaxY. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_MaxY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_MinX(_swigobj) (_swigobj->MinX()) +static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_MinX",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MinX. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_MinX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_MinY(_swigobj) (_swigobj->MinY()) +static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_MinY",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_MinY. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxDC_MinY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxDC_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxDC_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_Ok. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDC_Ok(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDC_SetDeviceOrigin(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDeviceOrigin(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_SetDeviceOrigin(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sll:wxDC_SetDeviceOrigin",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetDeviceOrigin. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetDeviceOrigin(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetBackground(_swigobj,_swigarg0) (_swigobj->SetBackground(_swigarg0)) +static PyObject *_wrap_wxDC_SetBackground(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxBrush * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxDC_SetBackground",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBackground. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBackground. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetBackground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetBackgroundMode(_swigobj,_swigarg0) (_swigobj->SetBackgroundMode(_swigarg0)) +static PyObject *_wrap_wxDC_SetBackgroundMode(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxDC_SetBackgroundMode",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBackgroundMode. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetBackgroundMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetClippingRegion(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetClippingRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + long _arg3; + long _arg4; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sllll:wxDC_SetClippingRegion",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetClippingRegion. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetClippingRegion(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetPalette(_swigobj,_swigarg0) (_swigobj->SetPalette(_swigarg0)) +static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxPalette * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxDC_SetPalette",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetPalette. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPalette. Expected _wxPalette_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetPalette(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetBrush(_swigobj,_swigarg0) (_swigobj->SetBrush(_swigarg0)) +static PyObject *_wrap_wxDC_SetBrush(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxBrush * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxDC_SetBrush",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetBrush. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBrush. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetBrush(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxDC_SetFont(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxFont * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxDC_SetFont",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetFont. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetLogicalFunction(_swigobj,_swigarg0) (_swigobj->SetLogicalFunction(_swigarg0)) +static PyObject *_wrap_wxDC_SetLogicalFunction(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxDC_SetLogicalFunction",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetLogicalFunction. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetLogicalFunction(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetMapMode(_swigobj,_swigarg0) (_swigobj->SetMapMode(_swigarg0)) +static PyObject *_wrap_wxDC_SetMapMode(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxDC_SetMapMode",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetMapMode. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetMapMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetOptimization(_swigobj,_swigarg0) (_swigobj->SetOptimization(_swigarg0)) +static PyObject *_wrap_wxDC_SetOptimization(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + bool _arg1; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxDC_SetOptimization",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetOptimization. Expected _wxDC_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetOptimization(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetPen(_swigobj,_swigarg0) (_swigobj->SetPen(_swigarg0)) +static PyObject *_wrap_wxDC_SetPen(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxPen * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxDC_SetPen",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetPen. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPen. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetPen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetTextBackground(_swigobj,_swigarg0) (_swigobj->SetTextBackground(_swigarg0)) +static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxColour * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxDC_SetTextBackground",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetTextBackground. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextBackground. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetTextBackground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetTextForeground(_swigobj,_swigarg0) (_swigobj->SetTextForeground(_swigarg0)) +static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxColour * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxDC_SetTextForeground",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetTextForeground. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextForeground. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetTextForeground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_SetUserScale(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetUserScale(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_SetUserScale(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + double _arg1; + double _arg2; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sdd:wxDC_SetUserScale",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_SetUserScale. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_SetUserScale(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_StartDoc(_swigobj,_swigarg0) (_swigobj->StartDoc(_swigarg0)) +static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxDC * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxDC_StartDoc",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartDoc. Expected _wxDC_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDC_StartDoc(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDC_StartPage(_swigobj) (_swigobj->StartPage()) +static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxDC_StartPage",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_StartPage. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_StartPage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxDC_DrawBitmap(wxDC *self,wxBitmap & bitmap,long x,long y,bool swapPalette) { + wxMemoryDC* memDC = new wxMemoryDC; + memDC->SelectObject(bitmap); +#ifdef __WXMSW__ + if (swapPalette) + self->SetPalette(*bitmap.GetPalette()); +#endif + self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC, + 0, 0, self->GetLogicalFunction()); + memDC->SelectObject(wxNullBitmap); + delete memDC; + } +static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + wxBitmap * _arg1; + long _arg2; + long _arg3; + bool _arg4 = (1); + char * _argc0 = 0; + char * _argc1 = 0; + int tempbool4; + + self = self; + if(!PyArg_ParseTuple(args,"ssll|i:wxDC_DrawBitmap",&_argc0,&_argc1,&_arg2,&_arg3,&tempbool4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawBitmap. Expected _wxDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_DrawBitmap. Expected _wxBitmap_p."); + return NULL; + } + } + _arg4 = (bool ) tempbool4; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxMemoryDCTowxDC(void *ptr) { + wxMemoryDC *src; + wxDC *dest; + src = (wxMemoryDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +#define new_wxMemoryDC() (new wxMemoryDC()) +static PyObject *_wrap_new_wxMemoryDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMemoryDC * _result; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,":new_wxMemoryDC")) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMemoryDC *)new_wxMemoryDC(); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxMemoryDC_SelectObject(_swigobj,_swigarg0) (_swigobj->SelectObject(_swigarg0)) +static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMemoryDC * _arg0; + wxBitmap * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxMemoryDC_SelectObject",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMemoryDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryDC_SelectObject. Expected _wxMemoryDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryDC_SelectObject. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMemoryDC_SelectObject(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxScreenDCTowxDC(void *ptr) { + wxScreenDC *src; + wxDC *dest; + src = (wxScreenDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +#define new_wxScreenDC() (new wxScreenDC()) +static PyObject *_wrap_new_wxScreenDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxScreenDC * _result; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,":new_wxScreenDC")) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxScreenDC *)new_wxScreenDC(); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxScreenDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxScreenDC_StartDrawingOnTop(_swigobj,_swigarg0) (_swigobj->StartDrawingOnTop(_swigarg0)) +static PyObject *_wrap_wxScreenDC_StartDrawingOnTop(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxScreenDC * _arg0; + wxWindow * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxScreenDC_StartDrawingOnTop",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_StartDrawingOnTop. Expected _wxScreenDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScreenDC_StartDrawingOnTop. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxScreenDC_StartDrawingOnTop(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxScreenDC_StartDrawingOnTopRect(_swigobj,_swigarg0) (_swigobj->StartDrawingOnTop(_swigarg0)) +static PyObject *_wrap_wxScreenDC_StartDrawingOnTopRect(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxScreenDC * _arg0; + wxRect * _arg1 = NULL; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s|s:wxScreenDC_StartDrawingOnTopRect",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_StartDrawingOnTopRect. Expected _wxScreenDC_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxRect_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScreenDC_StartDrawingOnTopRect. Expected _wxRect_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxScreenDC_StartDrawingOnTopRect(_arg0,_arg1); + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} +#define wxScreenDC_EndDrawingOnTop(_swigobj) (_swigobj->EndDrawingOnTop()) +static PyObject *_wrap_wxScreenDC_EndDrawingOnTop(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxScreenDC * _arg0; + char * _argc0 = 0; + self = self; + if(!PyArg_ParseTuple(args,"s:wxScreenDC_EndDrawingOnTop",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScreenDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScreenDC_EndDrawingOnTop. Expected _wxScreenDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxScreenDC_EndDrawingOnTop(_arg0); -class wxFontPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetFaceName(self): - val = gdic.wxFont_GetFaceName(self.this) - return val - def GetFamily(self): - val = gdic.wxFont_GetFamily(self.this) - return val - def GetFontId(self): - val = gdic.wxFont_GetFontId(self.this) - return val - def GetPointSize(self): - val = gdic.wxFont_GetPointSize(self.this) - return val - def GetStyle(self): - val = gdic.wxFont_GetStyle(self.this) - return val - def GetUnderlined(self): - val = gdic.wxFont_GetUnderlined(self.this) - return val - def GetWeight(self): - val = gdic.wxFont_GetWeight(self.this) - return val - def SetFaceName(self,arg0): - val = gdic.wxFont_SetFaceName(self.this,arg0) - return val - def SetFamily(self,arg0): - val = gdic.wxFont_SetFamily(self.this,arg0) - return val - def SetPointSize(self,arg0): - val = gdic.wxFont_SetPointSize(self.this,arg0) - return val - def SetStyle(self,arg0): - val = gdic.wxFont_SetStyle(self.this,arg0) - return val - def SetUnderlined(self,arg0): - val = gdic.wxFont_SetUnderlined(self.this,arg0) - return val - def SetWeight(self,arg0): - val = gdic.wxFont_SetWeight(self.this,arg0) - return val - def __repr__(self): - return "" -class wxFont(wxFontPtr): - def __init__(self,arg0,arg1,arg2,arg3,*args) : - self.this = apply(gdic.new_wxFont,(arg0,arg1,arg2,arg3,)+args) - self.thisown = 1 + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} +static void *SwigwxClientDCTowxDC(void *ptr) { + wxClientDC *src; + wxDC *dest; + src = (wxClientDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} +#define new_wxClientDC(_swigarg0) (new wxClientDC(_swigarg0)) +static PyObject *_wrap_new_wxClientDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxClientDC * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTuple(args,"s:new_wxClientDC",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxClientDC. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxClientDC *)new_wxClientDC(_arg0); -class wxColourPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxColour(self.this) - def Red(self): - val = gdic.wxColour_Red(self.this) - return val - def Green(self): - val = gdic.wxColour_Green(self.this) - return val - def Blue(self): - val = gdic.wxColour_Blue(self.this) - return val - def Ok(self): - val = gdic.wxColour_Ok(self.this) - return val - def Set(self,arg0,arg1,arg2): - val = gdic.wxColour_Set(self.this,arg0,arg1,arg2) - return val - def Get(self): - val = gdic.wxColour_Get(self.this) - return val - def __repr__(self): - return "" -class wxColour(wxColourPtr): - def __init__(self,*args) : - self.this = apply(gdic.new_wxColour,()+args) - self.thisown = 1 + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxClientDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} +static void *SwigwxPaintDCTowxDC(void *ptr) { + wxPaintDC *src; + wxDC *dest; + src = (wxPaintDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} +#define new_wxPaintDC(_swigarg0) (new wxPaintDC(_swigarg0)) +static PyObject *_wrap_new_wxPaintDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPaintDC * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTuple(args,"s:new_wxPaintDC",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPaintDC. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPaintDC *)new_wxPaintDC(_arg0); -class wxPenPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetCap(self): - val = gdic.wxPen_GetCap(self.this) - return val - def GetColour(self): - val = gdic.wxPen_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetJoin(self): - val = gdic.wxPen_GetJoin(self.this) - return val - def GetStyle(self): - val = gdic.wxPen_GetStyle(self.this) - return val - def GetWidth(self): - val = gdic.wxPen_GetWidth(self.this) - return val - def Ok(self): - val = gdic.wxPen_Ok(self.this) - return val - def SetCap(self,arg0): - val = gdic.wxPen_SetCap(self.this,arg0) - return val - def SetColour(self,arg0): - val = gdic.wxPen_SetColour(self.this,arg0.this) - return val - def SetJoin(self,arg0): - val = gdic.wxPen_SetJoin(self.this,arg0) - return val - def SetStyle(self,arg0): - val = gdic.wxPen_SetStyle(self.this,arg0) - return val - def SetWidth(self,arg0): - val = gdic.wxPen_SetWidth(self.this,arg0) - return val - def GetDashes(self,arg0): - val = gdic.wxPen_GetDashes(self.this,arg0) - return val - def GetStipple(self): - val = gdic.wxPen_GetStipple(self.this) - val = wxBitmapPtr(val) - return val - def SetDashes(self,arg0,*args): - val = apply(gdic.wxPen_SetDashes,(self.this,arg0,)+args) - return val - def SetStipple(self,arg0): - val = gdic.wxPen_SetStipple(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxPen(wxPenPtr): - def __init__(self,arg0,*args) : - self.this = apply(gdic.new_wxPen,(arg0.this,)+args) - self.thisown = 1 + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPaintDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} +static void *SwigwxWindowDCTowxDC(void *ptr) { + wxWindowDC *src; + wxDC *dest; + src = (wxWindowDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} +#define new_wxWindowDC(_swigarg0) (new wxWindowDC(_swigarg0)) +static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxWindowDC * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTuple(args,"s:new_wxWindowDC",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxWindowDC. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindowDC *)new_wxWindowDC(_arg0); -class wxBrushPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetColour(self): - val = gdic.wxBrush_GetColour(self.this) - val = wxColourPtr(val) - return val - def GetStipple(self): - val = gdic.wxBrush_GetStipple(self.this) - val = wxBitmapPtr(val) - return val - def GetStyle(self): - val = gdic.wxBrush_GetStyle(self.this) - return val - def Ok(self): - val = gdic.wxBrush_Ok(self.this) - return val - def SetColour(self,arg0): - val = gdic.wxBrush_SetColour(self.this,arg0.this) - return val - def SetStipple(self,arg0): - val = gdic.wxBrush_SetStipple(self.this,arg0.this) - return val - def SetStyle(self,arg0): - val = gdic.wxBrush_SetStyle(self.this,arg0) - return val - def __repr__(self): - return "" -class wxBrush(wxBrushPtr): - def __init__(self,arg0,*args) : - self.this = apply(gdic.new_wxBrush,(arg0.this,)+args) - self.thisown = 1 + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindowDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} +static void *SwigwxPrinterDCTowxDC(void *ptr) { + wxPrinterDC *src; + wxDC *dest; + src = (wxPrinterDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} +#define new_wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPrinterDC * _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + bool _arg3 = (1); + int _arg4 = (wxPORTRAIT); + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + int tempbool3; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTuple(args,"OOO|ii:new_wxPrinterDC",&_obj0,&_obj1,&_obj2,&tempbool3,&_arg4)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPrinterDC *)new_wxPrinterDC(*_arg0,*_arg1,*_arg2,_arg3,_arg4); -class wxDCPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxDC(self.this) - def BeginDrawing(self): - val = gdic.wxDC_BeginDrawing(self.this) - return val - def Blit(self,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7): - val = gdic.wxDC_Blit(self.this,arg0,arg1,arg2,arg3,arg4.this,arg5,arg6,arg7) - return val - def Clear(self): - val = gdic.wxDC_Clear(self.this) - return val - def CrossHair(self,arg0,arg1): - val = gdic.wxDC_CrossHair(self.this,arg0,arg1) - return val - def DestroyClippingRegion(self): - val = gdic.wxDC_DestroyClippingRegion(self.this) - return val - def DeviceToLogicalX(self,arg0): - val = gdic.wxDC_DeviceToLogicalX(self.this,arg0) - return val - def DeviceToLogicalXRel(self,arg0): - val = gdic.wxDC_DeviceToLogicalXRel(self.this,arg0) - return val - def DeviceToLogicalY(self,arg0): - val = gdic.wxDC_DeviceToLogicalY(self.this,arg0) - return val - def DeviceToLogicalYRel(self,arg0): - val = gdic.wxDC_DeviceToLogicalYRel(self.this,arg0) - return val - def DrawArc(self,arg0,arg1,arg2,arg3,arg4,arg5): - val = gdic.wxDC_DrawArc(self.this,arg0,arg1,arg2,arg3,arg4,arg5) - return val - def DrawCircle(self,arg0,arg1,arg2): - val = gdic.wxDC_DrawCircle(self.this,arg0,arg1,arg2) - return val - def DrawEllipse(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawEllipse(self.this,arg0,arg1,arg2,arg3) - return val - def DrawEllipticArc(self,arg0,arg1,arg2,arg3,arg4,arg5): - val = gdic.wxDC_DrawEllipticArc(self.this,arg0,arg1,arg2,arg3,arg4,arg5) - return val - def DrawIcon(self,arg0,arg1,arg2): - val = gdic.wxDC_DrawIcon(self.this,arg0.this,arg1,arg2) - return val - def DrawLine(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawLine(self.this,arg0,arg1,arg2,arg3) - return val - def DrawLines(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawLines,(self.this,arg0,)+args) - return val - def DrawPolygon(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawPolygon,(self.this,arg0,)+args) - return val - def DrawPoint(self,arg0,arg1): - val = gdic.wxDC_DrawPoint(self.this,arg0,arg1) - return val - def DrawRectangle(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_DrawRectangle(self.this,arg0,arg1,arg2,arg3) - return val - def DrawRoundedRectangle(self,arg0,arg1,arg2,arg3,*args): - val = apply(gdic.wxDC_DrawRoundedRectangle,(self.this,arg0,arg1,arg2,arg3,)+args) - return val - def DrawSpline(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_DrawSpline,(self.this,arg0,)+args) - return val - def DrawText(self,arg0,arg1,arg2): - val = gdic.wxDC_DrawText(self.this,arg0,arg1,arg2) - return val - def EndDoc(self): - val = gdic.wxDC_EndDoc(self.this) - return val - def EndDrawing(self): - val = gdic.wxDC_EndDrawing(self.this) - return val - def EndPage(self): - val = gdic.wxDC_EndPage(self.this) - return val - def FloodFill(self,arg0,arg1,arg2,*args): - val = apply(gdic.wxDC_FloodFill,(self.this,arg0,arg1,arg2.this,)+args) - return val - def GetBackground(self): - val = gdic.wxDC_GetBackground(self.this) - val = wxBrushPtr(val) - return val - def GetBrush(self): - val = gdic.wxDC_GetBrush(self.this) - val = wxBrushPtr(val) - return val - def GetCharHeight(self): - val = gdic.wxDC_GetCharHeight(self.this) - return val - def GetCharWidth(self): - val = gdic.wxDC_GetCharWidth(self.this) - return val - def GetClippingBox(self): - val = gdic.wxDC_GetClippingBox(self.this) - return val - def GetFont(self): - val = gdic.wxDC_GetFont(self.this) - val = wxFontPtr(val) - return val - def GetLogicalFunction(self): - val = gdic.wxDC_GetLogicalFunction(self.this) - return val - def GetMapMode(self): - val = gdic.wxDC_GetMapMode(self.this) - return val - def GetOptimization(self): - val = gdic.wxDC_GetOptimization(self.this) - return val - def GetPen(self): - val = gdic.wxDC_GetPen(self.this) - val = wxPenPtr(val) - return val - def GetPixel(self,arg0,arg1): - val = gdic.wxDC_GetPixel(self.this,arg0,arg1) - val = wxColourPtr(val) - val.thisown = 1 - return val - def GetSizeTuple(self): - val = gdic.wxDC_GetSizeTuple(self.this) - return val - def GetSize(self): - val = gdic.wxDC_GetSize(self.this) - val = wxSizePtr(val) - val.thisown = 1 - return val - def GetTextBackground(self): - val = gdic.wxDC_GetTextBackground(self.this) - val = wxColourPtr(val) - return val - def GetTextExtent(self,arg0): - val = gdic.wxDC_GetTextExtent(self.this,arg0) - return val - def GetFullTextExtent(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxDC_GetFullTextExtent,(self.this,arg0,)+args) - return val - def GetTextForeground(self): - val = gdic.wxDC_GetTextForeground(self.this) - val = wxColourPtr(val) - return val - def LogicalToDeviceX(self,arg0): - val = gdic.wxDC_LogicalToDeviceX(self.this,arg0) - return val - def LogicalToDeviceXRel(self,arg0): - val = gdic.wxDC_LogicalToDeviceXRel(self.this,arg0) - return val - def LogicalToDeviceY(self,arg0): - val = gdic.wxDC_LogicalToDeviceY(self.this,arg0) - return val - def LogicalToDeviceYRel(self,arg0): - val = gdic.wxDC_LogicalToDeviceYRel(self.this,arg0) - return val - def MaxX(self): - val = gdic.wxDC_MaxX(self.this) - return val - def MaxY(self): - val = gdic.wxDC_MaxY(self.this) - return val - def MinX(self): - val = gdic.wxDC_MinX(self.this) - return val - def MinY(self): - val = gdic.wxDC_MinY(self.this) - return val - def Ok(self): - val = gdic.wxDC_Ok(self.this) - return val - def SetDeviceOrigin(self,arg0,arg1): - val = gdic.wxDC_SetDeviceOrigin(self.this,arg0,arg1) - return val - def SetBackground(self,arg0): - val = gdic.wxDC_SetBackground(self.this,arg0.this) - return val - def SetBackgroundMode(self,arg0): - val = gdic.wxDC_SetBackgroundMode(self.this,arg0) - return val - def SetClippingRegion(self,arg0,arg1,arg2,arg3): - val = gdic.wxDC_SetClippingRegion(self.this,arg0,arg1,arg2,arg3) - return val - def SetPalette(self,arg0): - val = gdic.wxDC_SetPalette(self.this,arg0.this) - return val - def SetBrush(self,arg0): - val = gdic.wxDC_SetBrush(self.this,arg0.this) - return val - def SetFont(self,arg0): - val = gdic.wxDC_SetFont(self.this,arg0.this) - return val - def SetLogicalFunction(self,arg0): - val = gdic.wxDC_SetLogicalFunction(self.this,arg0) - return val - def SetMapMode(self,arg0): - val = gdic.wxDC_SetMapMode(self.this,arg0) - return val - def SetOptimization(self,arg0): - val = gdic.wxDC_SetOptimization(self.this,arg0) - return val - def SetPen(self,arg0): - val = gdic.wxDC_SetPen(self.this,arg0.this) - return val - def SetTextBackground(self,arg0): - val = gdic.wxDC_SetTextBackground(self.this,arg0.this) - return val - def SetTextForeground(self,arg0): - val = gdic.wxDC_SetTextForeground(self.this,arg0.this) - return val - def SetUserScale(self,arg0,arg1): - val = gdic.wxDC_SetUserScale(self.this,arg0,arg1) - return val - def StartDoc(self,arg0): - val = gdic.wxDC_StartDoc(self.this,arg0) - return val - def StartPage(self): - val = gdic.wxDC_StartPage(self.this) - return val - def DrawBitmap(self,arg0,arg1,arg2,*args): - val = apply(gdic.wxDC_DrawBitmap,(self.this,arg0.this,arg1,arg2,)+args) - return val - def __repr__(self): - return "" -class wxDC(wxDCPtr): - def __init__(self,this): - self.this = this + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrinterDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} +static void *SwigwxMetaFileDCTowxDC(void *ptr) { + wxMetaFileDC *src; + wxDC *dest; + src = (wxMetaFileDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} +#define new_wxMetaFileDC(_swigarg0) (new wxMetaFileDC(_swigarg0)) +static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMetaFileDC * _result; + wxString * _arg0 = &wxPyEmptyStr; + PyObject * _obj0 = 0; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTuple(args,"|O:new_wxMetaFileDC",&_obj0)) + return NULL; + if (_obj0) +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0); -class wxMemoryDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def SelectObject(self,arg0): - val = gdic.wxMemoryDC_SelectObject(self.this,arg0.this) - return val - def __repr__(self): - return "" -class wxMemoryDC(wxMemoryDCPtr): - def __init__(self) : - self.this = gdic.new_wxMemoryDC() - self.thisown = 1 + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetaFileDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} +#define wxMetaFileDC_Close(_swigobj) (_swigobj->Close()) +static PyObject *_wrap_wxMetaFileDC_Close(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMetaFile * _result; + wxMetaFileDC * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTuple(args,"s:wxMetaFileDC_Close",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMetaFileDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFileDC_Close. Expected _wxMetaFileDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMetaFile *)wxMetaFileDC_Close(_arg0); + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetaFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} -class wxScreenDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def StartDrawingOnTop(self,arg0): - val = gdic.wxScreenDC_StartDrawingOnTop(self.this,arg0.this) - return val - def StartDrawingOnTopRect(self,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxScreenDC_StartDrawingOnTopRect,(self.this,)+args) - return val - def EndDrawingOnTop(self): - val = gdic.wxScreenDC_EndDrawingOnTop(self.this) - return val - def __repr__(self): - return "" -class wxScreenDC(wxScreenDCPtr): - def __init__(self) : - self.this = gdic.new_wxScreenDC() - self.thisown = 1 +#define new_wxPalette(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxPalette(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxPalette(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPalette * _result; + int _arg0; + byte * _arg1; + byte * _arg2; + byte * _arg3; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTuple(args,"OOO:new_wxPalette",&_obj1,&_obj2,&_obj3)) + return NULL; +{ + _arg1 = byte_LIST_helper(_obj1); + if (_arg1 == NULL) { + return NULL; + } +} +{ + _arg2 = byte_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} + if (_obj3) +{ + _arg3 = byte_LIST_helper(_obj3); + if (_arg3 == NULL) { + return NULL; + } +} +{ + if (_obj1) { + _arg0 = PyList_Size(_obj1); + } + else { + _arg0 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPalette *)new_wxPalette(_arg0,_arg1,_arg2,_arg3); + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + delete [] _arg1; +} +{ + delete [] _arg2; +} +{ + delete [] _arg3; +} + return _resultobj; +} +#define delete_wxPalette(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPalette(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPalette * _arg0; + char * _argc0 = 0; -class wxClientDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxClientDC(wxClientDCPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxClientDC(arg0.this) - self.thisown = 1 + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxPalette",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPalette. Expected _wxPalette_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPalette(_arg0); + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} +#define wxPalette_GetPixel(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetPixel(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPalette_GetPixel(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxPalette * _arg0; + byte _arg1; + byte _arg2; + byte _arg3; + char * _argc0 = 0; + self = self; + if(!PyArg_ParseTuple(args,"sbbb:wxPalette_GetPixel",&_argc0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPalette_GetPixel. Expected _wxPalette_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPalette_GetPixel(_arg0,_arg1,_arg2,_arg3); -class wxPaintDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPaintDC(wxPaintDCPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxPaintDC(arg0.this) - self.thisown = 1 + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} +#define wxPalette_GetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxPalette * _arg0; + int _arg1; + byte * _arg2; + byte * _arg3; + byte * _arg4; + char * _argc0 = 0; + char * _argc2 = 0; + char * _argc3 = 0; + char * _argc4 = 0; + self = self; + if(!PyArg_ParseTuple(args,"sisss:wxPalette_GetRGB",&_argc0,&_arg1,&_argc2,&_argc3,&_argc4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPalette_GetRGB. Expected _wxPalette_p."); + return NULL; + } + } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_byte_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPalette_GetRGB. Expected _byte_p."); + return NULL; + } + } + if (_argc3) { + if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_byte_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxPalette_GetRGB. Expected _byte_p."); + return NULL; + } + } + if (_argc4) { + if (SWIG_GetPtr(_argc4,(void **) &_arg4,"_byte_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxPalette_GetRGB. Expected _byte_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} -class wxWindowDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxWindowDC(wxWindowDCPtr): - def __init__(self,arg0) : - self.this = gdic.new_wxWindowDC(arg0.this) - self.thisown = 1 +#define wxPalette_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxPalette_Ok(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxPalette * _arg0; + char * _argc0 = 0; + self = self; + if(!PyArg_ParseTuple(args,"s:wxPalette_Ok",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPalette_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPalette_Ok. Expected _wxPalette_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPalette_Ok(_arg0); + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} +#define new_wxImageList(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxImageList(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxImageList(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxImageList * _result; + int _arg0; + int _arg1; + bool _arg2 = (1); + int _arg3 = 1; + int tempbool2; + char _ptemp[128]; -class wxPrinterDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" -class wxPrinterDC(wxPrinterDCPtr): - def __init__(self,arg0,arg1,arg2,*args) : - self.this = apply(gdic.new_wxPrinterDC,(arg0,arg1,arg2,)+args) - self.thisown = 1 + self = self; + if(!PyArg_ParseTuple(args,"ii|ii:new_wxImageList",&_arg0,&_arg1,&tempbool2,&_arg3)) + return NULL; + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxImageList *)new_wxImageList(_arg0,_arg1,_arg2,_arg3); + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} +#define delete_wxImageList(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxImageList(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxImageList * _arg0; + char * _argc0 = 0; + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxImageList",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxImageList. Expected _wxImageList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxImageList(_arg0); -class wxMetaFileDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Close(self): - val = gdic.wxMetaFileDC_Close(self.this) - return val - def __repr__(self): - return "" -class wxMetaFileDC(wxMetaFileDCPtr): - def __init__(self,*args) : - self.this = apply(gdic.new_wxMetaFileDC,()+args) - self.thisown = 1 + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} +#define wxImageList_Add(_swigobj,_swigarg0,_swigarg1) (_swigobj->Add(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxImageList_Add(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxImageList * _arg0; + wxBitmap * _arg1; + wxBitmap * _arg2 = &wxNullBitmap; + char * _argc0 = 0; + char * _argc1 = 0; + char * _argc2 = 0; + self = self; + if(!PyArg_ParseTuple(args,"ss|s:wxImageList_Add",&_argc0,&_argc1,&_argc2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_Add. Expected _wxImageList_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImageList_Add. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_Add. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} -class wxPalettePtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxPalette(self.this) - def GetPixel(self,arg0,arg1,arg2): - val = gdic.wxPalette_GetPixel(self.this,arg0,arg1,arg2) - return val - def GetRGB(self,arg0,arg1,arg2,arg3): - val = gdic.wxPalette_GetRGB(self.this,arg0,arg1,arg2,arg3) - return val - def Ok(self): - val = gdic.wxPalette_Ok(self.this) - return val - def __repr__(self): - return "" -class wxPalette(wxPalettePtr): - def __init__(self,arg0,arg1,arg2) : - self.this = gdic.new_wxPalette(arg0,arg1,arg2) - self.thisown = 1 +#define wxImageList_AddWithColourMask(_swigobj,_swigarg0,_swigarg1) (_swigobj->Add(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxImageList * _arg0; + wxBitmap * _arg1; + wxColour * _arg2; + char * _argc0 = 0; + char * _argc1 = 0; + char * _argc2 = 0; + self = self; + if(!PyArg_ParseTuple(args,"sss:wxImageList_AddWithColourMask",&_argc0,&_argc1,&_argc2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_AddWithColourMask. Expected _wxImageList_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImageList_AddWithColourMask. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_AddWithColourMask. Expected _wxColour_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} +#define wxImageList_AddIcon(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxImageList_AddIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxImageList * _arg0; + wxIcon * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; -class wxImageListPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - gdic.delete_wxImageList(self.this) - def Add(self,arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxImageList_Add,(self.this,arg0.this,)+args) - return val - def AddWithColourMask(self,arg0,arg1): - val = gdic.wxImageList_AddWithColourMask(self.this,arg0.this,arg1.this) - return val - def AddIcon(self,arg0): - val = gdic.wxImageList_AddIcon(self.this,arg0.this) - return val - def Replace(self,arg0,arg1,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(gdic.wxImageList_Replace,(self.this,arg0,arg1.this,)+args) - return val - def ReplaceIcon(self,arg0,arg1): - val = gdic.wxImageList_ReplaceIcon(self.this,arg0,arg1.this) - return val - def Draw(self,arg0,arg1,arg2,arg3,*args): - val = apply(gdic.wxImageList_Draw,(self.this,arg0,arg1.this,arg2,arg3,)+args) - return val - def GetImageCount(self): - val = gdic.wxImageList_GetImageCount(self.this) - return val - def Remove(self,arg0): - val = gdic.wxImageList_Remove(self.this,arg0) - return val - def RemoveAll(self): - val = gdic.wxImageList_RemoveAll(self.this) - return val - def __repr__(self): - return "" -class wxImageList(wxImageListPtr): - def __init__(self,arg0,arg1,*args) : - self.this = apply(gdic.new_wxImageList,(arg0,arg1,)+args) - self.thisown = 1 + self = self; + if(!PyArg_ParseTuple(args,"ss:wxImageList_AddIcon",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_AddIcon. Expected _wxImageList_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImageList_AddIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxImageList_AddIcon(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxImageList_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxImageList_Replace(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxImageList * _arg0; + int _arg1; + wxBitmap * _arg2; + wxBitmap * _arg3 = &wxNullBitmap; + char * _argc0 = 0; + char * _argc2 = 0; + char * _argc3 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sis|s:wxImageList_Replace",&_argc0,&_arg1,&_argc2,&_argc3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_Replace. Expected _wxImageList_p."); + return NULL; + } + } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_Replace. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argc3) { + if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxImageList_Replace. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxImageList_Replace(_arg0,_arg1,*_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxImageList_ReplaceIcon(_swigobj,_swigarg0,_swigarg1) (_swigobj->Replace(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxImageList_ReplaceIcon(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxImageList * _arg0; + int _arg1; + wxIcon * _arg2; + char * _argc0 = 0; + char * _argc2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sis:wxImageList_ReplaceIcon",&_argc0,&_arg1,&_argc2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_ReplaceIcon. Expected _wxImageList_p."); + return NULL; + } + } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_ReplaceIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxImageList_ReplaceIcon(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxImageList_Draw(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Draw(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxImageList_Draw(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxImageList * _arg0; + int _arg1; + wxDC * _arg2; + int _arg3; + int _arg4; + int _arg5 = (wxIMAGELIST_DRAW_NORMAL); + bool _arg6 = (0); + char * _argc0 = 0; + char * _argc2 = 0; + int tempbool6; + + self = self; + if(!PyArg_ParseTuple(args,"sisii|ii:wxImageList_Draw",&_argc0,&_arg1,&_argc2,&_arg3,&_arg4,&_arg5,&tempbool6)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_Draw. Expected _wxImageList_p."); + return NULL; + } + } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_Draw. Expected _wxDC_p."); + return NULL; + } + } + _arg6 = (bool ) tempbool6; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxImageList_Draw(_arg0,_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxImageList_GetImageCount(_swigobj) (_swigobj->GetImageCount()) +static PyObject *_wrap_wxImageList_GetImageCount(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxImageList * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxImageList_GetImageCount",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_GetImageCount. Expected _wxImageList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxImageList_GetImageCount(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxImageList_Remove(_swigobj,_swigarg0) (_swigobj->Remove(_swigarg0)) +static PyObject *_wrap_wxImageList_Remove(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxImageList * _arg0; + int _arg1; + char * _argc0 = 0; + self = self; + if(!PyArg_ParseTuple(args,"si:wxImageList_Remove",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_Remove. Expected _wxImageList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxImageList_Remove(_arg0,_arg1); + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} +#define wxImageList_RemoveAll(_swigobj) (_swigobj->RemoveAll()) +static PyObject *_wrap_wxImageList_RemoveAll(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxImageList * _arg0; + char * _argc0 = 0; + self = self; + if(!PyArg_ParseTuple(args,"s:wxImageList_RemoveAll",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_RemoveAll. Expected _wxImageList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxImageList_RemoveAll(_arg0); + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} -#-------------- FUNCTION WRAPPERS ------------------ - -def wxEmptyBitmap(arg0,arg1,*args): - val = apply(gdic.wxEmptyBitmap,(arg0,arg1,)+args) - val = wxBitmapPtr(val) - val.thisown = 1 - return val - -def wxNoRefBitmap(arg0,arg1): - val = gdic.wxNoRefBitmap(arg0,arg1) - val = wxBitmapPtr(val) - return val - -def wxMaskColour(arg0,arg1): - val = gdic.wxMaskColour(arg0.this,arg1.this) - val = wxMaskPtr(val) - val.thisown = 1 - return val - -def wxStockCursor(arg0): - val = gdic.wxStockCursor(arg0) - val = wxCursorPtr(val) - val.thisown = 1 - return val - -def wxNamedColour(arg0): - val = gdic.wxNamedColour(arg0) - val = wxColourPtr(val) - val.thisown = 1 - return val - -def wxMemoryDCFromDC(arg0): - val = gdic.wxMemoryDCFromDC(arg0.this) - val = wxMemoryDCPtr(val) - val.thisown = 1 - return val - - - -#-------------- VARIABLE WRAPPERS ------------------ - -cvar = gdic.cvar -wxNORMAL_FONT = wxFontPtr(gdic.cvar.wxNORMAL_FONT) -wxSMALL_FONT = wxFontPtr(gdic.cvar.wxSMALL_FONT) -wxITALIC_FONT = wxFontPtr(gdic.cvar.wxITALIC_FONT) -wxSWISS_FONT = wxFontPtr(gdic.cvar.wxSWISS_FONT) -wxRED_PEN = wxPenPtr(gdic.cvar.wxRED_PEN) -wxCYAN_PEN = wxPenPtr(gdic.cvar.wxCYAN_PEN) -wxGREEN_PEN = wxPenPtr(gdic.cvar.wxGREEN_PEN) -wxBLACK_PEN = wxPenPtr(gdic.cvar.wxBLACK_PEN) -wxWHITE_PEN = wxPenPtr(gdic.cvar.wxWHITE_PEN) -wxTRANSPARENT_PEN = wxPenPtr(gdic.cvar.wxTRANSPARENT_PEN) -wxBLACK_DASHED_PEN = wxPenPtr(gdic.cvar.wxBLACK_DASHED_PEN) -wxGREY_PEN = wxPenPtr(gdic.cvar.wxGREY_PEN) -wxMEDIUM_GREY_PEN = wxPenPtr(gdic.cvar.wxMEDIUM_GREY_PEN) -wxLIGHT_GREY_PEN = wxPenPtr(gdic.cvar.wxLIGHT_GREY_PEN) -wxBLUE_BRUSH = wxBrushPtr(gdic.cvar.wxBLUE_BRUSH) -wxGREEN_BRUSH = wxBrushPtr(gdic.cvar.wxGREEN_BRUSH) -wxWHITE_BRUSH = wxBrushPtr(gdic.cvar.wxWHITE_BRUSH) -wxBLACK_BRUSH = wxBrushPtr(gdic.cvar.wxBLACK_BRUSH) -wxTRANSPARENT_BRUSH = wxBrushPtr(gdic.cvar.wxTRANSPARENT_BRUSH) -wxCYAN_BRUSH = wxBrushPtr(gdic.cvar.wxCYAN_BRUSH) -wxRED_BRUSH = wxBrushPtr(gdic.cvar.wxRED_BRUSH) -wxGREY_BRUSH = wxBrushPtr(gdic.cvar.wxGREY_BRUSH) -wxMEDIUM_GREY_BRUSH = wxBrushPtr(gdic.cvar.wxMEDIUM_GREY_BRUSH) -wxLIGHT_GREY_BRUSH = wxBrushPtr(gdic.cvar.wxLIGHT_GREY_BRUSH) -wxBLACK = wxColourPtr(gdic.cvar.wxBLACK) -wxWHITE = wxColourPtr(gdic.cvar.wxWHITE) -wxRED = wxColourPtr(gdic.cvar.wxRED) -wxBLUE = wxColourPtr(gdic.cvar.wxBLUE) -wxGREEN = wxColourPtr(gdic.cvar.wxGREEN) -wxCYAN = wxColourPtr(gdic.cvar.wxCYAN) -wxLIGHT_GREY = wxColourPtr(gdic.cvar.wxLIGHT_GREY) -wxSTANDARD_CURSOR = wxCursorPtr(gdic.cvar.wxSTANDARD_CURSOR) -wxHOURGLASS_CURSOR = wxCursorPtr(gdic.cvar.wxHOURGLASS_CURSOR) -wxCROSS_CURSOR = wxCursorPtr(gdic.cvar.wxCROSS_CURSOR) -wxNullBitmap = wxBitmapPtr(gdic.cvar.wxNullBitmap) -wxNullIcon = wxIconPtr(gdic.cvar.wxNullIcon) -wxNullCursor = wxCursorPtr(gdic.cvar.wxNullCursor) -wxNullPen = wxPenPtr(gdic.cvar.wxNullPen) -wxNullBrush = wxBrushPtr(gdic.cvar.wxNullBrush) -wxNullPalette = wxPalettePtr(gdic.cvar.wxNullPalette) -wxNullFont = wxFontPtr(gdic.cvar.wxNullFont) -wxNullColour = wxColourPtr(gdic.cvar.wxNullColour) -wxIMAGELIST_DRAW_NORMAL = gdic.wxIMAGELIST_DRAW_NORMAL -wxIMAGELIST_DRAW_TRANSPARENT = gdic.wxIMAGELIST_DRAW_TRANSPARENT -wxIMAGELIST_DRAW_SELECTED = gdic.wxIMAGELIST_DRAW_SELECTED -wxIMAGELIST_DRAW_FOCUSED = gdic.wxIMAGELIST_DRAW_FOCUSED -wxIMAGE_LIST_NORMAL = gdic.wxIMAGE_LIST_NORMAL -wxIMAGE_LIST_SMALL = gdic.wxIMAGE_LIST_SMALL -wxIMAGE_LIST_STATE = gdic.wxIMAGE_LIST_STATE +static PyMethodDef gdicMethods[] = { + { "wxImageList_RemoveAll", _wrap_wxImageList_RemoveAll, 1 }, + { "wxImageList_Remove", _wrap_wxImageList_Remove, 1 }, + { "wxImageList_GetImageCount", _wrap_wxImageList_GetImageCount, 1 }, + { "wxImageList_Draw", _wrap_wxImageList_Draw, 1 }, + { "wxImageList_ReplaceIcon", _wrap_wxImageList_ReplaceIcon, 1 }, + { "wxImageList_Replace", _wrap_wxImageList_Replace, 1 }, + { "wxImageList_AddIcon", _wrap_wxImageList_AddIcon, 1 }, + { "wxImageList_AddWithColourMask", _wrap_wxImageList_AddWithColourMask, 1 }, + { "wxImageList_Add", _wrap_wxImageList_Add, 1 }, + { "delete_wxImageList", _wrap_delete_wxImageList, 1 }, + { "new_wxImageList", _wrap_new_wxImageList, 1 }, + { "wxPalette_Ok", _wrap_wxPalette_Ok, 1 }, + { "wxPalette_GetRGB", _wrap_wxPalette_GetRGB, 1 }, + { "wxPalette_GetPixel", _wrap_wxPalette_GetPixel, 1 }, + { "delete_wxPalette", _wrap_delete_wxPalette, 1 }, + { "new_wxPalette", _wrap_new_wxPalette, 1 }, + { "wxMetaFileDC_Close", _wrap_wxMetaFileDC_Close, 1 }, + { "new_wxMetaFileDC", _wrap_new_wxMetaFileDC, 1 }, + { "new_wxPrinterDC", _wrap_new_wxPrinterDC, 1 }, + { "new_wxWindowDC", _wrap_new_wxWindowDC, 1 }, + { "new_wxPaintDC", _wrap_new_wxPaintDC, 1 }, + { "new_wxClientDC", _wrap_new_wxClientDC, 1 }, + { "wxScreenDC_EndDrawingOnTop", _wrap_wxScreenDC_EndDrawingOnTop, 1 }, + { "wxScreenDC_StartDrawingOnTopRect", _wrap_wxScreenDC_StartDrawingOnTopRect, 1 }, + { "wxScreenDC_StartDrawingOnTop", _wrap_wxScreenDC_StartDrawingOnTop, 1 }, + { "new_wxScreenDC", _wrap_new_wxScreenDC, 1 }, + { "wxMemoryDC_SelectObject", _wrap_wxMemoryDC_SelectObject, 1 }, + { "new_wxMemoryDC", _wrap_new_wxMemoryDC, 1 }, + { "wxDC_DrawBitmap", _wrap_wxDC_DrawBitmap, 1 }, + { "wxDC_StartPage", _wrap_wxDC_StartPage, 1 }, + { "wxDC_StartDoc", _wrap_wxDC_StartDoc, 1 }, + { "wxDC_SetUserScale", _wrap_wxDC_SetUserScale, 1 }, + { "wxDC_SetTextForeground", _wrap_wxDC_SetTextForeground, 1 }, + { "wxDC_SetTextBackground", _wrap_wxDC_SetTextBackground, 1 }, + { "wxDC_SetPen", _wrap_wxDC_SetPen, 1 }, + { "wxDC_SetOptimization", _wrap_wxDC_SetOptimization, 1 }, + { "wxDC_SetMapMode", _wrap_wxDC_SetMapMode, 1 }, + { "wxDC_SetLogicalFunction", _wrap_wxDC_SetLogicalFunction, 1 }, + { "wxDC_SetFont", _wrap_wxDC_SetFont, 1 }, + { "wxDC_SetBrush", _wrap_wxDC_SetBrush, 1 }, + { "wxDC_SetPalette", _wrap_wxDC_SetPalette, 1 }, + { "wxDC_SetClippingRegion", _wrap_wxDC_SetClippingRegion, 1 }, + { "wxDC_SetBackgroundMode", _wrap_wxDC_SetBackgroundMode, 1 }, + { "wxDC_SetBackground", _wrap_wxDC_SetBackground, 1 }, + { "wxDC_SetDeviceOrigin", _wrap_wxDC_SetDeviceOrigin, 1 }, + { "wxDC_Ok", _wrap_wxDC_Ok, 1 }, + { "wxDC_MinY", _wrap_wxDC_MinY, 1 }, + { "wxDC_MinX", _wrap_wxDC_MinX, 1 }, + { "wxDC_MaxY", _wrap_wxDC_MaxY, 1 }, + { "wxDC_MaxX", _wrap_wxDC_MaxX, 1 }, + { "wxDC_LogicalToDeviceYRel", _wrap_wxDC_LogicalToDeviceYRel, 1 }, + { "wxDC_LogicalToDeviceY", _wrap_wxDC_LogicalToDeviceY, 1 }, + { "wxDC_LogicalToDeviceXRel", _wrap_wxDC_LogicalToDeviceXRel, 1 }, + { "wxDC_LogicalToDeviceX", _wrap_wxDC_LogicalToDeviceX, 1 }, + { "wxDC_GetTextForeground", _wrap_wxDC_GetTextForeground, 1 }, + { "wxDC_GetFullTextExtent", _wrap_wxDC_GetFullTextExtent, 1 }, + { "wxDC_GetTextExtent", _wrap_wxDC_GetTextExtent, 1 }, + { "wxDC_GetTextBackground", _wrap_wxDC_GetTextBackground, 1 }, + { "wxDC_GetSize", _wrap_wxDC_GetSize, 1 }, + { "wxDC_GetSizeTuple", _wrap_wxDC_GetSizeTuple, 1 }, + { "wxDC_GetPixel", _wrap_wxDC_GetPixel, 1 }, + { "wxDC_GetPen", _wrap_wxDC_GetPen, 1 }, + { "wxDC_GetOptimization", _wrap_wxDC_GetOptimization, 1 }, + { "wxDC_GetMapMode", _wrap_wxDC_GetMapMode, 1 }, + { "wxDC_GetLogicalFunction", _wrap_wxDC_GetLogicalFunction, 1 }, + { "wxDC_GetFont", _wrap_wxDC_GetFont, 1 }, + { "wxDC_GetClippingBox", _wrap_wxDC_GetClippingBox, 1 }, + { "wxDC_GetCharWidth", _wrap_wxDC_GetCharWidth, 1 }, + { "wxDC_GetCharHeight", _wrap_wxDC_GetCharHeight, 1 }, + { "wxDC_GetBrush", _wrap_wxDC_GetBrush, 1 }, + { "wxDC_GetBackground", _wrap_wxDC_GetBackground, 1 }, + { "wxDC_FloodFill", _wrap_wxDC_FloodFill, 1 }, + { "wxDC_EndPage", _wrap_wxDC_EndPage, 1 }, + { "wxDC_EndDrawing", _wrap_wxDC_EndDrawing, 1 }, + { "wxDC_EndDoc", _wrap_wxDC_EndDoc, 1 }, + { "wxDC_DrawText", _wrap_wxDC_DrawText, 1 }, + { "wxDC_DrawSpline", _wrap_wxDC_DrawSpline, 1 }, + { "wxDC_DrawRoundedRectangle", _wrap_wxDC_DrawRoundedRectangle, 1 }, + { "wxDC_DrawRectangle", _wrap_wxDC_DrawRectangle, 1 }, + { "wxDC_DrawPoint", _wrap_wxDC_DrawPoint, 1 }, + { "wxDC_DrawPolygon", _wrap_wxDC_DrawPolygon, 1 }, + { "wxDC_DrawLines", _wrap_wxDC_DrawLines, 1 }, + { "wxDC_DrawLine", _wrap_wxDC_DrawLine, 1 }, + { "wxDC_DrawIcon", _wrap_wxDC_DrawIcon, 1 }, + { "wxDC_DrawEllipticArc", _wrap_wxDC_DrawEllipticArc, 1 }, + { "wxDC_DrawEllipse", _wrap_wxDC_DrawEllipse, 1 }, + { "wxDC_DrawCircle", _wrap_wxDC_DrawCircle, 1 }, + { "wxDC_DrawArc", _wrap_wxDC_DrawArc, 1 }, + { "wxDC_DeviceToLogicalYRel", _wrap_wxDC_DeviceToLogicalYRel, 1 }, + { "wxDC_DeviceToLogicalY", _wrap_wxDC_DeviceToLogicalY, 1 }, + { "wxDC_DeviceToLogicalXRel", _wrap_wxDC_DeviceToLogicalXRel, 1 }, + { "wxDC_DeviceToLogicalX", _wrap_wxDC_DeviceToLogicalX, 1 }, + { "wxDC_DestroyClippingRegion", _wrap_wxDC_DestroyClippingRegion, 1 }, + { "wxDC_CrossHair", _wrap_wxDC_CrossHair, 1 }, + { "wxDC_Clear", _wrap_wxDC_Clear, 1 }, + { "wxDC_Blit", _wrap_wxDC_Blit, 1 }, + { "wxDC_BeginDrawing", _wrap_wxDC_BeginDrawing, 1 }, + { "delete_wxDC", _wrap_delete_wxDC, 1 }, + { "wxBrush_SetStyle", _wrap_wxBrush_SetStyle, 1 }, + { "wxBrush_SetStipple", _wrap_wxBrush_SetStipple, 1 }, + { "wxBrush_SetColour", _wrap_wxBrush_SetColour, 1 }, + { "wxBrush_Ok", _wrap_wxBrush_Ok, 1 }, + { "wxBrush_GetStyle", _wrap_wxBrush_GetStyle, 1 }, + { "wxBrush_GetStipple", _wrap_wxBrush_GetStipple, 1 }, + { "wxBrush_GetColour", _wrap_wxBrush_GetColour, 1 }, + { "new_wxBrush", _wrap_new_wxBrush, 1 }, + { "wxPen_SetStipple", _wrap_wxPen_SetStipple, 1 }, + { "wxPen_SetDashes", _wrap_wxPen_SetDashes, 1 }, + { "wxPen_GetStipple", _wrap_wxPen_GetStipple, 1 }, + { "wxPen_GetDashes", _wrap_wxPen_GetDashes, 1 }, + { "wxPen_SetWidth", _wrap_wxPen_SetWidth, 1 }, + { "wxPen_SetStyle", _wrap_wxPen_SetStyle, 1 }, + { "wxPen_SetJoin", _wrap_wxPen_SetJoin, 1 }, + { "wxPen_SetColour", _wrap_wxPen_SetColour, 1 }, + { "wxPen_SetCap", _wrap_wxPen_SetCap, 1 }, + { "wxPen_Ok", _wrap_wxPen_Ok, 1 }, + { "wxPen_GetWidth", _wrap_wxPen_GetWidth, 1 }, + { "wxPen_GetStyle", _wrap_wxPen_GetStyle, 1 }, + { "wxPen_GetJoin", _wrap_wxPen_GetJoin, 1 }, + { "wxPen_GetColour", _wrap_wxPen_GetColour, 1 }, + { "wxPen_GetCap", _wrap_wxPen_GetCap, 1 }, + { "new_wxPen", _wrap_new_wxPen, 1 }, + { "wxColour_Get", _wrap_wxColour_Get, 1 }, + { "wxColour_Set", _wrap_wxColour_Set, 1 }, + { "wxColour_Ok", _wrap_wxColour_Ok, 1 }, + { "wxColour_Blue", _wrap_wxColour_Blue, 1 }, + { "wxColour_Green", _wrap_wxColour_Green, 1 }, + { "wxColour_Red", _wrap_wxColour_Red, 1 }, + { "delete_wxColour", _wrap_delete_wxColour, 1 }, + { "new_wxColour", _wrap_new_wxColour, 1 }, + { "wxFont_SetWeight", _wrap_wxFont_SetWeight, 1 }, + { "wxFont_SetUnderlined", _wrap_wxFont_SetUnderlined, 1 }, + { "wxFont_SetStyle", _wrap_wxFont_SetStyle, 1 }, + { "wxFont_SetPointSize", _wrap_wxFont_SetPointSize, 1 }, + { "wxFont_SetFamily", _wrap_wxFont_SetFamily, 1 }, + { "wxFont_SetFaceName", _wrap_wxFont_SetFaceName, 1 }, + { "wxFont_GetWeight", _wrap_wxFont_GetWeight, 1 }, + { "wxFont_GetUnderlined", _wrap_wxFont_GetUnderlined, 1 }, + { "wxFont_GetStyle", _wrap_wxFont_GetStyle, 1 }, + { "wxFont_GetPointSize", _wrap_wxFont_GetPointSize, 1 }, + { "wxFont_GetFontId", _wrap_wxFont_GetFontId, 1 }, + { "wxFont_GetFamily", _wrap_wxFont_GetFamily, 1 }, + { "wxFont_GetFaceName", _wrap_wxFont_GetFaceName, 1 }, + { "new_wxFont", _wrap_new_wxFont, 1 }, + { "wxCursor_Ok", _wrap_wxCursor_Ok, 1 }, + { "delete_wxCursor", _wrap_delete_wxCursor, 1 }, + { "new_wxCursor", _wrap_new_wxCursor, 1 }, + { "wxIcon_SetWidth", _wrap_wxIcon_SetWidth, 1 }, + { "wxIcon_SetHeight", _wrap_wxIcon_SetHeight, 1 }, + { "wxIcon_SetDepth", _wrap_wxIcon_SetDepth, 1 }, + { "wxIcon_Ok", _wrap_wxIcon_Ok, 1 }, + { "wxIcon_LoadFile", _wrap_wxIcon_LoadFile, 1 }, + { "wxIcon_GetWidth", _wrap_wxIcon_GetWidth, 1 }, + { "wxIcon_GetHeight", _wrap_wxIcon_GetHeight, 1 }, + { "wxIcon_GetDepth", _wrap_wxIcon_GetDepth, 1 }, + { "delete_wxIcon", _wrap_delete_wxIcon, 1 }, + { "new_wxIcon", _wrap_new_wxIcon, 1 }, + { "delete_wxMask", _wrap_delete_wxMask, 1 }, + { "new_wxMask", _wrap_new_wxMask, 1 }, + { "wxBitmap_SetWidth", _wrap_wxBitmap_SetWidth, 1 }, + { "wxBitmap_SetPalette", _wrap_wxBitmap_SetPalette, 1 }, + { "wxBitmap_SetMask", _wrap_wxBitmap_SetMask, 1 }, + { "wxBitmap_SetHeight", _wrap_wxBitmap_SetHeight, 1 }, + { "wxBitmap_SetDepth", _wrap_wxBitmap_SetDepth, 1 }, + { "wxBitmap_SaveFile", _wrap_wxBitmap_SaveFile, 1 }, + { "wxBitmap_Ok", _wrap_wxBitmap_Ok, 1 }, + { "wxBitmap_LoadFile", _wrap_wxBitmap_LoadFile, 1 }, + { "wxBitmap_GetWidth", _wrap_wxBitmap_GetWidth, 1 }, + { "wxBitmap_GetMask", _wrap_wxBitmap_GetMask, 1 }, + { "wxBitmap_GetPalette", _wrap_wxBitmap_GetPalette, 1 }, + { "wxBitmap_GetHeight", _wrap_wxBitmap_GetHeight, 1 }, + { "wxBitmap_GetDepth", _wrap_wxBitmap_GetDepth, 1 }, + { "wxBitmap_Create", _wrap_wxBitmap_Create, 1 }, + { "delete_wxBitmap", _wrap_delete_wxBitmap, 1 }, + { "new_wxBitmap", _wrap_new_wxBitmap, 1 }, + { "wxMemoryDCFromDC", _wrap_wxMemoryDCFromDC, 1 }, + { "wxNamedColour", _wrap_wxNamedColour, 1 }, + { "wxStockCursor", _wrap_wxStockCursor, 1 }, + { "wxMaskColour", _wrap_wxMaskColour, 1 }, + { "wxBitmapFromData", _wrap_wxBitmapFromData, 1 }, + { "wxNoRefBitmap", _wrap_wxNoRefBitmap, 1 }, + { "wxEmptyBitmap", _wrap_wxEmptyBitmap, 1 }, + { NULL, NULL } +}; +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void,initgdic)() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("gdic", gdicMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set); + SWIG_addvarlink(SWIG_globals,"wxSMALL_FONT",_wrap_wxSMALL_FONT_get, _wrap_wxSMALL_FONT_set); + SWIG_addvarlink(SWIG_globals,"wxITALIC_FONT",_wrap_wxITALIC_FONT_get, _wrap_wxITALIC_FONT_set); + SWIG_addvarlink(SWIG_globals,"wxSWISS_FONT",_wrap_wxSWISS_FONT_get, _wrap_wxSWISS_FONT_set); + SWIG_addvarlink(SWIG_globals,"wxRED_PEN",_wrap_wxRED_PEN_get, _wrap_wxRED_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxCYAN_PEN",_wrap_wxCYAN_PEN_get, _wrap_wxCYAN_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxGREEN_PEN",_wrap_wxGREEN_PEN_get, _wrap_wxGREEN_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxBLACK_PEN",_wrap_wxBLACK_PEN_get, _wrap_wxBLACK_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxWHITE_PEN",_wrap_wxWHITE_PEN_get, _wrap_wxWHITE_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxTRANSPARENT_PEN",_wrap_wxTRANSPARENT_PEN_get, _wrap_wxTRANSPARENT_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxBLACK_DASHED_PEN",_wrap_wxBLACK_DASHED_PEN_get, _wrap_wxBLACK_DASHED_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxGREY_PEN",_wrap_wxGREY_PEN_get, _wrap_wxGREY_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxMEDIUM_GREY_PEN",_wrap_wxMEDIUM_GREY_PEN_get, _wrap_wxMEDIUM_GREY_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY_PEN",_wrap_wxLIGHT_GREY_PEN_get, _wrap_wxLIGHT_GREY_PEN_set); + SWIG_addvarlink(SWIG_globals,"wxBLUE_BRUSH",_wrap_wxBLUE_BRUSH_get, _wrap_wxBLUE_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxGREEN_BRUSH",_wrap_wxGREEN_BRUSH_get, _wrap_wxGREEN_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxWHITE_BRUSH",_wrap_wxWHITE_BRUSH_get, _wrap_wxWHITE_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxBLACK_BRUSH",_wrap_wxBLACK_BRUSH_get, _wrap_wxBLACK_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxTRANSPARENT_BRUSH",_wrap_wxTRANSPARENT_BRUSH_get, _wrap_wxTRANSPARENT_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxCYAN_BRUSH",_wrap_wxCYAN_BRUSH_get, _wrap_wxCYAN_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxRED_BRUSH",_wrap_wxRED_BRUSH_get, _wrap_wxRED_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxGREY_BRUSH",_wrap_wxGREY_BRUSH_get, _wrap_wxGREY_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxMEDIUM_GREY_BRUSH",_wrap_wxMEDIUM_GREY_BRUSH_get, _wrap_wxMEDIUM_GREY_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY_BRUSH",_wrap_wxLIGHT_GREY_BRUSH_get, _wrap_wxLIGHT_GREY_BRUSH_set); + SWIG_addvarlink(SWIG_globals,"wxBLACK",_wrap_wxBLACK_get, _wrap_wxBLACK_set); + SWIG_addvarlink(SWIG_globals,"wxWHITE",_wrap_wxWHITE_get, _wrap_wxWHITE_set); + SWIG_addvarlink(SWIG_globals,"wxRED",_wrap_wxRED_get, _wrap_wxRED_set); + SWIG_addvarlink(SWIG_globals,"wxBLUE",_wrap_wxBLUE_get, _wrap_wxBLUE_set); + SWIG_addvarlink(SWIG_globals,"wxGREEN",_wrap_wxGREEN_get, _wrap_wxGREEN_set); + SWIG_addvarlink(SWIG_globals,"wxCYAN",_wrap_wxCYAN_get, _wrap_wxCYAN_set); + SWIG_addvarlink(SWIG_globals,"wxLIGHT_GREY",_wrap_wxLIGHT_GREY_get, _wrap_wxLIGHT_GREY_set); + SWIG_addvarlink(SWIG_globals,"wxSTANDARD_CURSOR",_wrap_wxSTANDARD_CURSOR_get, _wrap_wxSTANDARD_CURSOR_set); + SWIG_addvarlink(SWIG_globals,"wxHOURGLASS_CURSOR",_wrap_wxHOURGLASS_CURSOR_get, _wrap_wxHOURGLASS_CURSOR_set); + SWIG_addvarlink(SWIG_globals,"wxCROSS_CURSOR",_wrap_wxCROSS_CURSOR_get, _wrap_wxCROSS_CURSOR_set); + SWIG_addvarlink(SWIG_globals,"wxNullBitmap",_wrap_wxNullBitmap_get, _wrap_wxNullBitmap_set); + SWIG_addvarlink(SWIG_globals,"wxNullIcon",_wrap_wxNullIcon_get, _wrap_wxNullIcon_set); + SWIG_addvarlink(SWIG_globals,"wxNullCursor",_wrap_wxNullCursor_get, _wrap_wxNullCursor_set); + SWIG_addvarlink(SWIG_globals,"wxNullPen",_wrap_wxNullPen_get, _wrap_wxNullPen_set); + SWIG_addvarlink(SWIG_globals,"wxNullBrush",_wrap_wxNullBrush_get, _wrap_wxNullBrush_set); + SWIG_addvarlink(SWIG_globals,"wxNullPalette",_wrap_wxNullPalette_get, _wrap_wxNullPalette_set); + SWIG_addvarlink(SWIG_globals,"wxNullFont",_wrap_wxNullFont_get, _wrap_wxNullFont_set); + SWIG_addvarlink(SWIG_globals,"wxNullColour",_wrap_wxNullColour_get, _wrap_wxNullColour_set); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); + PyDict_SetItemString(d,"wxIMAGELIST_DRAW_FOCUSED", PyInt_FromLong((long) wxIMAGELIST_DRAW_FOCUSED)); + PyDict_SetItemString(d,"wxIMAGE_LIST_NORMAL", PyInt_FromLong((long) wxIMAGE_LIST_NORMAL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_SMALL", PyInt_FromLong((long) wxIMAGE_LIST_SMALL)); + PyDict_SetItemString(d,"wxIMAGE_LIST_STATE", PyInt_FromLong((long) wxIMAGE_LIST_STATE)); +/* + * These are the pointer type-equivalency mappings. + * (Used by the SWIG pointer type-checker). + */ + SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); + SWIG_RegisterMapping("_signed_long","_long",0); + SWIG_RegisterMapping("_wxPrintQuality","_int",0); + SWIG_RegisterMapping("_wxPrintQuality","_signed_int",0); + SWIG_RegisterMapping("_wxPrintQuality","_unsigned_int",0); + SWIG_RegisterMapping("_wxPrintQuality","_wxWindowID",0); + SWIG_RegisterMapping("_wxPrintQuality","_uint",0); + SWIG_RegisterMapping("_wxPrintQuality","_EBool",0); + SWIG_RegisterMapping("_wxPrintQuality","_size_t",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); + SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); + SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); + SWIG_RegisterMapping("_wxMask","_class_wxMask",0); + SWIG_RegisterMapping("_wxPen","_class_wxPen",0); + SWIG_RegisterMapping("_byte","_unsigned_char",0); + SWIG_RegisterMapping("_long","_wxDash",0); + SWIG_RegisterMapping("_long","_unsigned_long",0); + SWIG_RegisterMapping("_long","_signed_long",0); + SWIG_RegisterMapping("_wxImageList","_class_wxImageList",0); + SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); + SWIG_RegisterMapping("_wxDC","_class_wxMetaFileDC",SwigwxMetaFileDCTowxDC); + SWIG_RegisterMapping("_wxDC","_wxMetaFileDC",SwigwxMetaFileDCTowxDC); + SWIG_RegisterMapping("_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC); + SWIG_RegisterMapping("_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC); + SWIG_RegisterMapping("_wxDC","_class_wxWindowDC",SwigwxWindowDCTowxDC); + SWIG_RegisterMapping("_wxDC","_wxWindowDC",SwigwxWindowDCTowxDC); + SWIG_RegisterMapping("_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC); + SWIG_RegisterMapping("_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC); + SWIG_RegisterMapping("_wxDC","_class_wxClientDC",SwigwxClientDCTowxDC); + SWIG_RegisterMapping("_wxDC","_wxClientDC",SwigwxClientDCTowxDC); + SWIG_RegisterMapping("_wxDC","_class_wxScreenDC",SwigwxScreenDCTowxDC); + SWIG_RegisterMapping("_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC); + SWIG_RegisterMapping("_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC); + SWIG_RegisterMapping("_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC); + SWIG_RegisterMapping("_wxDC","_class_wxDC",0); + SWIG_RegisterMapping("_size_t","_wxPrintQuality",0); + SWIG_RegisterMapping("_size_t","_unsigned_int",0); + SWIG_RegisterMapping("_size_t","_int",0); + SWIG_RegisterMapping("_size_t","_wxWindowID",0); + SWIG_RegisterMapping("_size_t","_uint",0); + SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); + SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); + SWIG_RegisterMapping("_class_wxMask","_wxMask",0); + SWIG_RegisterMapping("_wxColour","_class_wxColour",0); + SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); + SWIG_RegisterMapping("_uint","_wxPrintQuality",0); + SWIG_RegisterMapping("_uint","_size_t",0); + SWIG_RegisterMapping("_uint","_unsigned_int",0); + SWIG_RegisterMapping("_uint","_int",0); + SWIG_RegisterMapping("_uint","_wxWindowID",0); + SWIG_RegisterMapping("_wxRect","_class_wxRect",0); + SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); + SWIG_RegisterMapping("_wxBitmap","_class_wxCursor",SwigwxCursorTowxBitmap); + SWIG_RegisterMapping("_wxBitmap","_wxCursor",SwigwxCursorTowxBitmap); + SWIG_RegisterMapping("_wxBitmap","_class_wxIcon",SwigwxIconTowxBitmap); + SWIG_RegisterMapping("_wxBitmap","_wxIcon",SwigwxIconTowxBitmap); + SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); + SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); + SWIG_RegisterMapping("_wxWindowDC","_class_wxWindowDC",0); + SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); + SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); + SWIG_RegisterMapping("_EBool","_signed_int",0); + SWIG_RegisterMapping("_EBool","_int",0); + SWIG_RegisterMapping("_EBool","_wxWindowID",0); + SWIG_RegisterMapping("_class_wxRegion","_wxRegion",0); + SWIG_RegisterMapping("_wxFont","_class_wxFont",0); + SWIG_RegisterMapping("_unsigned_long","_wxDash",0); + SWIG_RegisterMapping("_unsigned_long","_long",0); + SWIG_RegisterMapping("_class_wxRect","_wxRect",0); + SWIG_RegisterMapping("_class_wxDC","_class_wxMetaFileDC",SwigwxMetaFileDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxMetaFileDC",SwigwxMetaFileDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_class_wxWindowDC",SwigwxWindowDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxWindowDC",SwigwxWindowDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_class_wxClientDC",SwigwxClientDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxClientDC",SwigwxClientDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_class_wxScreenDC",SwigwxScreenDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC); + SWIG_RegisterMapping("_class_wxDC","_wxDC",0); + SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); + SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); + SWIG_RegisterMapping("_signed_int","_wxPrintQuality",0); + SWIG_RegisterMapping("_signed_int","_EBool",0); + SWIG_RegisterMapping("_signed_int","_wxWindowID",0); + SWIG_RegisterMapping("_signed_int","_int",0); + SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); + SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); + SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); + SWIG_RegisterMapping("_WXTYPE","_short",0); + SWIG_RegisterMapping("_WXTYPE","_signed_short",0); + SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); + SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); + SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); + SWIG_RegisterMapping("_unsigned_short","_short",0); + SWIG_RegisterMapping("_class_wxFont","_wxFont",0); + SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); + SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); + SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); + SWIG_RegisterMapping("_signed_short","_WXTYPE",0); + SWIG_RegisterMapping("_signed_short","_short",0); + SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); + SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); + SWIG_RegisterMapping("_class_wxWindowDC","_wxWindowDC",0); + SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); + SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); + SWIG_RegisterMapping("_unsigned_char","_byte",0); + SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); + SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0); + SWIG_RegisterMapping("_unsigned_int","_size_t",0); + SWIG_RegisterMapping("_unsigned_int","_uint",0); + SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); + SWIG_RegisterMapping("_unsigned_int","_int",0); + SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); + SWIG_RegisterMapping("_class_wxPen","_wxPen",0); + SWIG_RegisterMapping("_short","_WXTYPE",0); + SWIG_RegisterMapping("_short","_unsigned_short",0); + SWIG_RegisterMapping("_short","_signed_short",0); + SWIG_RegisterMapping("_class_wxImageList","_wxImageList",0); + SWIG_RegisterMapping("_wxWindowID","_wxPrintQuality",0); + SWIG_RegisterMapping("_wxWindowID","_size_t",0); + SWIG_RegisterMapping("_wxWindowID","_EBool",0); + SWIG_RegisterMapping("_wxWindowID","_uint",0); + SWIG_RegisterMapping("_wxWindowID","_int",0); + SWIG_RegisterMapping("_wxWindowID","_signed_int",0); + SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); + SWIG_RegisterMapping("_int","_wxPrintQuality",0); + SWIG_RegisterMapping("_int","_size_t",0); + SWIG_RegisterMapping("_int","_EBool",0); + SWIG_RegisterMapping("_int","_uint",0); + SWIG_RegisterMapping("_int","_wxWindowID",0); + SWIG_RegisterMapping("_int","_unsigned_int",0); + SWIG_RegisterMapping("_int","_signed_int",0); + SWIG_RegisterMapping("_wxSize","_class_wxSize",0); + SWIG_RegisterMapping("_wxRegionIterator","_class_wxRegionIterator",0); + SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); + SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); + SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); + SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); + SWIG_RegisterMapping("_class_wxColour","_wxColour",0); + SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); + SWIG_RegisterMapping("_wxPalette","_class_wxPalette",0); + SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0); + SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); + SWIG_RegisterMapping("_class_wxSize","_wxSize",0); + SWIG_RegisterMapping("_class_wxBitmap","_class_wxCursor",SwigwxCursorTowxBitmap); + SWIG_RegisterMapping("_class_wxBitmap","_wxCursor",SwigwxCursorTowxBitmap); + SWIG_RegisterMapping("_class_wxBitmap","_class_wxIcon",SwigwxIconTowxBitmap); + SWIG_RegisterMapping("_class_wxBitmap","_wxIcon",SwigwxIconTowxBitmap); + SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); + SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); + SWIG_RegisterMapping("_wxDash","_unsigned_long",0); + SWIG_RegisterMapping("_wxDash","_long",0); + SWIG_RegisterMapping("_class_wxPalette","_wxPalette",0); +} diff --git a/utils/wxPython/src/msw/glcanvas.cpp b/utils/wxPython/src/msw/glcanvas.cpp index 243e890b74..a11b302c4e 100644 --- a/utils/wxPython/src/msw/glcanvas.cpp +++ b/utils/wxPython/src/msw/glcanvas.cpp @@ -9270,6 +9270,7 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_wxPrintQuality","_EBool",0); SWIG_RegisterMapping("_wxPrintQuality","_size_t",0); SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); + SWIG_RegisterMapping("___wxPyCleanup","_class___wxPyCleanup",0); SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0); @@ -9299,7 +9300,6 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); SWIG_RegisterMapping("_wxPNGHandler","_class_wxPNGHandler",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0); SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0); @@ -9383,6 +9383,7 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); @@ -9425,6 +9426,7 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_class_wxButton","_wxButton",0); SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); + SWIG_RegisterMapping("_class___wxPyCleanup","___wxPyCleanup",0); SWIG_RegisterMapping("_GLclampf","_float",0); SWIG_RegisterMapping("_GLclampf","_GLfloat",0); SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); @@ -9457,6 +9459,7 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0); SWIG_RegisterMapping("_EBool","_GLsizei",0); @@ -9589,7 +9592,6 @@ SWIGEXPORT(void,initglcanvasc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); SWIG_RegisterMapping("_GLdouble","_GLclampd",0); SWIG_RegisterMapping("_GLdouble","_double",0); diff --git a/utils/wxPython/src/msw/glcanvas.py b/utils/wxPython/src/msw/glcanvas.py index ae4227dcb6..cc895557f9 100644 --- a/utils/wxPython/src/msw/glcanvas.py +++ b/utils/wxPython/src/msw/glcanvas.py @@ -35,7 +35,7 @@ class wxGLContextPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, glcanvasc=glcanvasc): if self.thisown == 1 : glcanvasc.delete_wxGLContext(self.this) def SetCurrent(self): diff --git a/utils/wxPython/src/msw/image.cpp b/utils/wxPython/src/msw/image.cpp index e370e60955..83ba636183 100644 --- a/utils/wxPython/src/msw/image.cpp +++ b/utils/wxPython/src/msw/image.cpp @@ -814,6 +814,33 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args) { return _resultobj; } +#define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxImage * _arg0; + int _arg1; + int _arg2; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sii:wxImage_Rescale",&_argc0,&_arg1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rescale. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImage_Rescale(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxImage_SetRGB(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetRGB(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_wxImage_SetRGB(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1416,6 +1443,7 @@ static PyMethodDef imagecMethods[] = { { "wxImage_GetGreen", _wrap_wxImage_GetGreen, 1 }, { "wxImage_GetRed", _wrap_wxImage_GetRed, 1 }, { "wxImage_SetRGB", _wrap_wxImage_SetRGB, 1 }, + { "wxImage_Rescale", _wrap_wxImage_Rescale, 1 }, { "wxImage_Scale", _wrap_wxImage_Scale, 1 }, { "wxImage_Destroy", _wrap_wxImage_Destroy, 1 }, { "wxImage_Create", _wrap_wxImage_Create, 1 }, diff --git a/utils/wxPython/src/msw/image.py b/utils/wxPython/src/msw/image.py index 6743bf9b5c..103d98f488 100644 --- a/utils/wxPython/src/msw/image.py +++ b/utils/wxPython/src/msw/image.py @@ -102,7 +102,7 @@ class wxImagePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, imagec=imagec): if self.thisown == 1 : imagec.delete_wxImage(self.this) def ConvertToBitmap(self): @@ -121,6 +121,9 @@ class wxImagePtr : val = wxImagePtr(val) val.thisown = 1 return val + def Rescale(self,arg0,arg1): + val = imagec.wxImage_Rescale(self.this,arg0,arg1) + return val def SetRGB(self,arg0,arg1,arg2,arg3,arg4): val = imagec.wxImage_SetRGB(self.this,arg0,arg1,arg2,arg3,arg4) return val diff --git a/utils/wxPython/src/msw/mdi.cpp b/utils/wxPython/src/msw/mdi.cpp index 0bc6611b1d..ca76437d08 100644 --- a/utils/wxPython/src/msw/mdi.cpp +++ b/utils/wxPython/src/msw/mdi.cpp @@ -543,14 +543,16 @@ static PyObject *_wrap_wxMDIChildFrame_Activate(PyObject *self, PyObject *args) return _resultobj; } -#define wxMDIChildFrame_Maximize(_swigobj) (_swigobj->Maximize()) +#define wxMDIChildFrame_Maximize(_swigobj,_swigarg0) (_swigobj->Maximize(_swigarg0)) static PyObject *_wrap_wxMDIChildFrame_Maximize(PyObject *self, PyObject *args) { PyObject * _resultobj; wxMDIChildFrame * _arg0; + bool _arg1; char * _argc0 = 0; + int tempbool1; self = self; - if(!PyArg_ParseTuple(args,"s:wxMDIChildFrame_Maximize",&_argc0)) + if(!PyArg_ParseTuple(args,"si:wxMDIChildFrame_Maximize",&_argc0,&tempbool1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMDIChildFrame_p")) { @@ -558,9 +560,10 @@ static PyObject *_wrap_wxMDIChildFrame_Maximize(PyObject *self, PyObject *args) return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxMDIChildFrame_Maximize(_arg0); + wxMDIChildFrame_Maximize(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -694,7 +697,6 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -734,6 +736,7 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); @@ -763,6 +766,7 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -846,7 +850,6 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/msw/mdi.py b/utils/wxPython/src/msw/mdi.py index d1e2ca65ae..1bc1b3c689 100644 --- a/utils/wxPython/src/msw/mdi.py +++ b/utils/wxPython/src/msw/mdi.py @@ -73,8 +73,8 @@ class wxMDIChildFramePtr(wxFramePtr): def Activate(self): val = mdic.wxMDIChildFrame_Activate(self.this) return val - def Maximize(self): - val = mdic.wxMDIChildFrame_Maximize(self.this) + def Maximize(self,arg0): + val = mdic.wxMDIChildFrame_Maximize(self.this,arg0) return val def Restore(self): val = mdic.wxMDIChildFrame_Restore(self.this) diff --git a/utils/wxPython/src/msw/misc.cpp b/utils/wxPython/src/msw/misc.cpp index 87d46229f4..1c9b1dcebe 100644 --- a/utils/wxPython/src/msw/misc.cpp +++ b/utils/wxPython/src/msw/misc.cpp @@ -121,6 +121,19 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxGetResource(section, entry, &retval, file); return retval; } + + + wxColour wxSystemSettings_GetSystemColour(int index) { + return wxSystemSettings::GetSystemColour(index); + } + + wxFont wxSystemSettings_GetSystemFont(int index) { + return wxSystemSettings::GetSystemFont(index); + } + + int wxSystemSettings_GetSystemMetric(int index) { + return wxSystemSettings::GetSystemMetric(index); + } static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) { PyObject * _resultobj; wxString * _result; @@ -448,6 +461,80 @@ static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args) { return _resultobj; } +static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + long _arg3; + long _arg4 = 0; + long _arg5 = 100; + wxWindow * _arg6 = NULL; + wxPoint * _arg7 = &wxPyDefaultPosition; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char * _argc6 = 0; + char * _argc7 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"OOOl|llss:wxGetNumberFromUser",&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argc6,&_argc7)) + return NULL; +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); +} +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); +} + if (_argc6) { + if (SWIG_GetPtr(_argc6,(void **) &_arg6,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc7) { + if (SWIG_GetPtr(_argc7,(void **) &_arg7,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxGetNumberFromUser. Expected _wxPoint_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args) { PyObject * _resultobj; bool _result; @@ -1172,6 +1259,61 @@ static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args) { return _resultobj; } +static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxColour * _result; + int _arg0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemColour",&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxSystemSettings_GetSystemColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxFont * _result; + int _arg0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemFont",&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxSystemSettings_GetSystemFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + int _arg0; + + self = self; + if(!PyArg_ParseTuple(args,"i:wxSystemSettings_GetSystemMetric",&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSystemSettings_GetSystemMetric(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -4142,6 +4284,9 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", _wrap_wxSize_y_set, 1 }, { "wxSize_x_get", _wrap_wxSize_x_get, 1 }, { "wxSize_x_set", _wrap_wxSize_x_set, 1 }, + { "wxSystemSettings_GetSystemMetric", _wrap_wxSystemSettings_GetSystemMetric, 1 }, + { "wxSystemSettings_GetSystemFont", _wrap_wxSystemSettings_GetSystemFont, 1 }, + { "wxSystemSettings_GetSystemColour", _wrap_wxSystemSettings_GetSystemColour, 1 }, { "wxResourceParseString", _wrap_wxResourceParseString, 1 }, { "wxResourceParseFile", _wrap_wxResourceParseFile, 1 }, { "wxResourceParseData", _wrap_wxResourceParseData, 1 }, @@ -4177,6 +4322,7 @@ static PyMethodDef misccMethods[] = { { "wxSetCursor", _wrap_wxSetCursor, 1 }, { "wxDisplayDepth", _wrap_wxDisplayDepth, 1 }, { "wxColourDisplay", _wrap_wxColourDisplay, 1 }, + { "wxGetNumberFromUser", _wrap_wxGetNumberFromUser, 1 }, { "wxMessageBox", _wrap_wxMessageBox, 1 }, { "wxGetSingleChoiceIndex", _wrap_wxGetSingleChoiceIndex, 1 }, { "wxGetSingleChoice", _wrap_wxGetSingleChoice, 1 }, @@ -4215,6 +4361,92 @@ SWIGEXPORT(void,initmiscc)() { PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); + PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH)); + PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH)); + PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH)); + PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH)); + PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN)); + PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN)); + PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN)); + PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT)); + PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); + PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); + PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); + PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); + PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X)); + PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y)); + PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X)); + PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y)); + PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X)); + PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y)); + PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X)); + PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X)); + PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X)); + PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y)); + PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X)); + PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y)); + PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y)); + PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y)); + PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT)); + PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT)); + PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS)); + PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS)); /* * These are the pointer type-equivalency mappings. * (Used by the SWIG pointer type-checker). diff --git a/utils/wxPython/src/msw/misc.py b/utils/wxPython/src/msw/misc.py index fc5f7bec49..d04285b4fd 100644 --- a/utils/wxPython/src/msw/misc.py +++ b/utils/wxPython/src/msw/misc.py @@ -4,7 +4,7 @@ class wxSizePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxSize(self.this) def Set(self,arg0,arg1): @@ -71,7 +71,7 @@ class wxRealPointPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRealPoint(self.this) def __setattr__(self,name,value): @@ -102,7 +102,7 @@ class wxPointPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxPoint(self.this) def Set(self,arg0,arg1): @@ -141,7 +141,7 @@ class wxRectPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRect(self.this) def GetX(self): @@ -233,7 +233,7 @@ class wxPyTimerPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxPyTimer(self.this) def Interval(self): @@ -360,7 +360,7 @@ class wxRegionPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRegion(self.this) def Clear(self): @@ -409,7 +409,7 @@ class wxRegionIteratorPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, miscc=miscc): if self.thisown == 1 : miscc.delete_wxRegionIterator(self.this) def GetX(self): @@ -538,6 +538,16 @@ def wxMessageBox(arg0,*args): val = apply(miscc.wxMessageBox,(arg0,)+args) return val +def wxGetNumberFromUser(arg0,arg1,arg2,arg3,*args): + argl = map(None,args) + try: argl[2] = argl[2].this + except: pass + try: argl[3] = argl[3].this + except: pass + args = tuple(argl) + val = apply(miscc.wxGetNumberFromUser,(arg0,arg1,arg2,arg3,)+args) + return val + wxColourDisplay = miscc.wxColourDisplay wxDisplayDepth = miscc.wxDisplayDepth @@ -630,6 +640,20 @@ wxResourceParseFile = miscc.wxResourceParseFile wxResourceParseString = miscc.wxResourceParseString +def wxSystemSettings_GetSystemColour(arg0): + val = miscc.wxSystemSettings_GetSystemColour(arg0) + val = wxColourPtr(val) + val.thisown = 1 + return val + +def wxSystemSettings_GetSystemFont(arg0): + val = miscc.wxSystemSettings_GetSystemFont(arg0) + val = wxFontPtr(val) + val.thisown = 1 + return val + +wxSystemSettings_GetSystemMetric = miscc.wxSystemSettings_GetSystemMetric + #-------------- VARIABLE WRAPPERS ------------------ @@ -656,3 +680,89 @@ wxAbsolute = miscc.wxAbsolute wxOutRegion = miscc.wxOutRegion wxPartRegion = miscc.wxPartRegion wxInRegion = miscc.wxInRegion +wxSYS_WHITE_BRUSH = miscc.wxSYS_WHITE_BRUSH +wxSYS_LTGRAY_BRUSH = miscc.wxSYS_LTGRAY_BRUSH +wxSYS_GRAY_BRUSH = miscc.wxSYS_GRAY_BRUSH +wxSYS_DKGRAY_BRUSH = miscc.wxSYS_DKGRAY_BRUSH +wxSYS_BLACK_BRUSH = miscc.wxSYS_BLACK_BRUSH +wxSYS_NULL_BRUSH = miscc.wxSYS_NULL_BRUSH +wxSYS_HOLLOW_BRUSH = miscc.wxSYS_HOLLOW_BRUSH +wxSYS_WHITE_PEN = miscc.wxSYS_WHITE_PEN +wxSYS_BLACK_PEN = miscc.wxSYS_BLACK_PEN +wxSYS_NULL_PEN = miscc.wxSYS_NULL_PEN +wxSYS_OEM_FIXED_FONT = miscc.wxSYS_OEM_FIXED_FONT +wxSYS_ANSI_FIXED_FONT = miscc.wxSYS_ANSI_FIXED_FONT +wxSYS_ANSI_VAR_FONT = miscc.wxSYS_ANSI_VAR_FONT +wxSYS_SYSTEM_FONT = miscc.wxSYS_SYSTEM_FONT +wxSYS_DEVICE_DEFAULT_FONT = miscc.wxSYS_DEVICE_DEFAULT_FONT +wxSYS_DEFAULT_PALETTE = miscc.wxSYS_DEFAULT_PALETTE +wxSYS_SYSTEM_FIXED_FONT = miscc.wxSYS_SYSTEM_FIXED_FONT +wxSYS_DEFAULT_GUI_FONT = miscc.wxSYS_DEFAULT_GUI_FONT +wxSYS_COLOUR_SCROLLBAR = miscc.wxSYS_COLOUR_SCROLLBAR +wxSYS_COLOUR_BACKGROUND = miscc.wxSYS_COLOUR_BACKGROUND +wxSYS_COLOUR_ACTIVECAPTION = miscc.wxSYS_COLOUR_ACTIVECAPTION +wxSYS_COLOUR_INACTIVECAPTION = miscc.wxSYS_COLOUR_INACTIVECAPTION +wxSYS_COLOUR_MENU = miscc.wxSYS_COLOUR_MENU +wxSYS_COLOUR_WINDOW = miscc.wxSYS_COLOUR_WINDOW +wxSYS_COLOUR_WINDOWFRAME = miscc.wxSYS_COLOUR_WINDOWFRAME +wxSYS_COLOUR_MENUTEXT = miscc.wxSYS_COLOUR_MENUTEXT +wxSYS_COLOUR_WINDOWTEXT = miscc.wxSYS_COLOUR_WINDOWTEXT +wxSYS_COLOUR_CAPTIONTEXT = miscc.wxSYS_COLOUR_CAPTIONTEXT +wxSYS_COLOUR_ACTIVEBORDER = miscc.wxSYS_COLOUR_ACTIVEBORDER +wxSYS_COLOUR_INACTIVEBORDER = miscc.wxSYS_COLOUR_INACTIVEBORDER +wxSYS_COLOUR_APPWORKSPACE = miscc.wxSYS_COLOUR_APPWORKSPACE +wxSYS_COLOUR_HIGHLIGHT = miscc.wxSYS_COLOUR_HIGHLIGHT +wxSYS_COLOUR_HIGHLIGHTTEXT = miscc.wxSYS_COLOUR_HIGHLIGHTTEXT +wxSYS_COLOUR_BTNFACE = miscc.wxSYS_COLOUR_BTNFACE +wxSYS_COLOUR_BTNSHADOW = miscc.wxSYS_COLOUR_BTNSHADOW +wxSYS_COLOUR_GRAYTEXT = miscc.wxSYS_COLOUR_GRAYTEXT +wxSYS_COLOUR_BTNTEXT = miscc.wxSYS_COLOUR_BTNTEXT +wxSYS_COLOUR_INACTIVECAPTIONTEXT = miscc.wxSYS_COLOUR_INACTIVECAPTIONTEXT +wxSYS_COLOUR_BTNHIGHLIGHT = miscc.wxSYS_COLOUR_BTNHIGHLIGHT +wxSYS_COLOUR_3DDKSHADOW = miscc.wxSYS_COLOUR_3DDKSHADOW +wxSYS_COLOUR_3DLIGHT = miscc.wxSYS_COLOUR_3DLIGHT +wxSYS_COLOUR_INFOTEXT = miscc.wxSYS_COLOUR_INFOTEXT +wxSYS_COLOUR_INFOBK = miscc.wxSYS_COLOUR_INFOBK +wxSYS_COLOUR_DESKTOP = miscc.wxSYS_COLOUR_DESKTOP +wxSYS_COLOUR_3DFACE = miscc.wxSYS_COLOUR_3DFACE +wxSYS_COLOUR_3DSHADOW = miscc.wxSYS_COLOUR_3DSHADOW +wxSYS_COLOUR_3DHIGHLIGHT = miscc.wxSYS_COLOUR_3DHIGHLIGHT +wxSYS_COLOUR_3DHILIGHT = miscc.wxSYS_COLOUR_3DHILIGHT +wxSYS_COLOUR_BTNHILIGHT = miscc.wxSYS_COLOUR_BTNHILIGHT +wxSYS_MOUSE_BUTTONS = miscc.wxSYS_MOUSE_BUTTONS +wxSYS_BORDER_X = miscc.wxSYS_BORDER_X +wxSYS_BORDER_Y = miscc.wxSYS_BORDER_Y +wxSYS_CURSOR_X = miscc.wxSYS_CURSOR_X +wxSYS_CURSOR_Y = miscc.wxSYS_CURSOR_Y +wxSYS_DCLICK_X = miscc.wxSYS_DCLICK_X +wxSYS_DCLICK_Y = miscc.wxSYS_DCLICK_Y +wxSYS_DRAG_X = miscc.wxSYS_DRAG_X +wxSYS_DRAG_Y = miscc.wxSYS_DRAG_Y +wxSYS_EDGE_X = miscc.wxSYS_EDGE_X +wxSYS_EDGE_Y = miscc.wxSYS_EDGE_Y +wxSYS_HSCROLL_ARROW_X = miscc.wxSYS_HSCROLL_ARROW_X +wxSYS_HSCROLL_ARROW_Y = miscc.wxSYS_HSCROLL_ARROW_Y +wxSYS_HTHUMB_X = miscc.wxSYS_HTHUMB_X +wxSYS_ICON_X = miscc.wxSYS_ICON_X +wxSYS_ICON_Y = miscc.wxSYS_ICON_Y +wxSYS_ICONSPACING_X = miscc.wxSYS_ICONSPACING_X +wxSYS_ICONSPACING_Y = miscc.wxSYS_ICONSPACING_Y +wxSYS_WINDOWMIN_X = miscc.wxSYS_WINDOWMIN_X +wxSYS_WINDOWMIN_Y = miscc.wxSYS_WINDOWMIN_Y +wxSYS_SCREEN_X = miscc.wxSYS_SCREEN_X +wxSYS_SCREEN_Y = miscc.wxSYS_SCREEN_Y +wxSYS_FRAMESIZE_X = miscc.wxSYS_FRAMESIZE_X +wxSYS_FRAMESIZE_Y = miscc.wxSYS_FRAMESIZE_Y +wxSYS_SMALLICON_X = miscc.wxSYS_SMALLICON_X +wxSYS_SMALLICON_Y = miscc.wxSYS_SMALLICON_Y +wxSYS_HSCROLL_Y = miscc.wxSYS_HSCROLL_Y +wxSYS_VSCROLL_X = miscc.wxSYS_VSCROLL_X +wxSYS_VSCROLL_ARROW_X = miscc.wxSYS_VSCROLL_ARROW_X +wxSYS_VSCROLL_ARROW_Y = miscc.wxSYS_VSCROLL_ARROW_Y +wxSYS_VTHUMB_Y = miscc.wxSYS_VTHUMB_Y +wxSYS_CAPTION_Y = miscc.wxSYS_CAPTION_Y +wxSYS_MENU_Y = miscc.wxSYS_MENU_Y +wxSYS_NETWORK_PRESENT = miscc.wxSYS_NETWORK_PRESENT +wxSYS_PENWINDOWS_PRESENT = miscc.wxSYS_PENWINDOWS_PRESENT +wxSYS_SHOW_SOUNDS = miscc.wxSYS_SHOW_SOUNDS +wxSYS_SWAP_BUTTONS = miscc.wxSYS_SWAP_BUTTONS diff --git a/utils/wxPython/src/msw/misc2.cpp b/utils/wxPython/src/msw/misc2.cpp index fb3fd7fc9a..980c3d9049 100644 --- a/utils/wxPython/src/msw/misc2.cpp +++ b/utils/wxPython/src/msw/misc2.cpp @@ -404,7 +404,6 @@ SWIGEXPORT(void,initmisc2c)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); SWIG_RegisterMapping("_long","_wxDash",0); @@ -488,7 +487,6 @@ SWIGEXPORT(void,initmisc2c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/msw/printfw.cpp b/utils/wxPython/src/msw/printfw.cpp index e6267cd761..09b3b96b53 100644 --- a/utils/wxPython/src/msw/printfw.cpp +++ b/utils/wxPython/src/msw/printfw.cpp @@ -4006,7 +4006,6 @@ SWIGEXPORT(void,initprintfwc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0); SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0); @@ -4064,6 +4063,7 @@ SWIGEXPORT(void,initprintfwc)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); SWIG_RegisterMapping("_class_wxPyPrintout","_wxPyPrintout",0); @@ -4099,6 +4099,7 @@ SWIGEXPORT(void,initprintfwc)() { SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -4195,7 +4196,6 @@ SWIGEXPORT(void,initprintfwc)() { SWIG_RegisterMapping("_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/msw/printfw.py b/utils/wxPython/src/msw/printfw.py index 635c46ff05..ad4d201aac 100644 --- a/utils/wxPython/src/msw/printfw.py +++ b/utils/wxPython/src/msw/printfw.py @@ -21,7 +21,7 @@ class wxPrintDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPrintData(self.this) def GetNoCopies(self): @@ -93,7 +93,7 @@ class wxPageSetupDialogDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPageSetupDialogData(self.this) def EnableHelp(self,arg0): @@ -232,7 +232,7 @@ class wxPrintDialogDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPrintDialogData(self.this) def EnableHelp(self,arg0): @@ -409,7 +409,7 @@ class wxPrinterPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, printfwc=printfwc): if self.thisown == 1 : printfwc.delete_wxPrinter(self.this) def CreateAbortWindow(self,arg0,arg1): diff --git a/utils/wxPython/src/msw/stattool.cpp b/utils/wxPython/src/msw/stattool.cpp index 57ed647c28..9c0489d7a6 100644 --- a/utils/wxPython/src/msw/stattool.cpp +++ b/utils/wxPython/src/msw/stattool.cpp @@ -2386,7 +2386,6 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -2426,6 +2425,7 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); SWIG_RegisterMapping("_uint","_wxPrintQuality",0); @@ -2453,6 +2453,7 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -2533,7 +2534,6 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/msw/stattool.py b/utils/wxPython/src/msw/stattool.py index 364ce8dda2..0f0e36ec8a 100644 --- a/utils/wxPython/src/msw/stattool.py +++ b/utils/wxPython/src/msw/stattool.py @@ -65,7 +65,7 @@ class wxToolBarToolPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, stattoolc=stattoolc): if self.thisown == 1 : stattoolc.delete_wxToolBarTool(self.this) def SetSize(self,arg0,arg1): diff --git a/utils/wxPython/src/msw/utils.cpp b/utils/wxPython/src/msw/utils.cpp index f4984b5e9e..80a4facf79 100644 --- a/utils/wxPython/src/msw/utils.cpp +++ b/utils/wxPython/src/msw/utils.cpp @@ -33,8 +33,50 @@ * and things like that. * * $Log$ - * Revision 1.7 1999/06/22 18:01:12 RD - * wxPython 2.1b1: More more set of generated sources... + * Revision 1.8 1999/07/31 07:56:02 RD + * wxPython 2.1b1: + * + * Added the missing wxWindow.GetUpdateRegion() method. + * + * Made a new change in SWIG (update your patches everybody) that + * provides a fix for global shadow objects that get an exception in + * their __del__ when their extension module has already been deleted. + * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about + * line 496 if you want to do it by hand. + * + * It is now possible to run through MainLoop more than once in any one + * process. The cleanup that used to happen as MainLoop completed (and + * prevented it from running again) has been delayed until the wxc module + * is being unloaded by Python. + * + * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added + * wxWindow.PopupMenuXY to be consistent with some other methods. + * + * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. + * + * You can now provide your own app.MainLoop method. See + * wxPython/demo/demoMainLoop.py for an example and some explaination. + * + * Got the in-place-edit for the wxTreeCtrl fixed and added some demo + * code to show how to use it. + * + * Put the wxIcon constructor back in for GTK as it now has one that + * matches MSW's. + * + * Added wxGrid.GetCells + * + * Added wxSystemSettings static methods as functions with names like + * wxSystemSettings_GetSystemColour. + * + * Removed wxPyMenu since using menu callbacks have been depreciated in + * wxWindows. Use wxMenu and events instead. + * + * Added alternate wxBitmap constructor (for MSW only) as + * wxBitmapFromData(data, type, width, height, depth = 1) + * + * Added a helper function named wxPyTypeCast that can convert shadow + * objects of one type into shadow objects of another type. (Like doing + * a down-cast.) See the implementation in wx.py for some docs. * ************************************************************************/ diff --git a/utils/wxPython/src/msw/utils.py b/utils/wxPython/src/msw/utils.py index 321e6ed069..5d437af207 100644 --- a/utils/wxPython/src/msw/utils.py +++ b/utils/wxPython/src/msw/utils.py @@ -4,7 +4,7 @@ class wxConfigPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, utilsc=utilsc): if self.thisown == 1 : utilsc.delete_wxConfig(self.this) def DontCreateOnDemand(self): diff --git a/utils/wxPython/src/msw/windows.cpp b/utils/wxPython/src/msw/windows.cpp index 5b133f5982..8a1cbf660a 100644 --- a/utils/wxPython/src/msw/windows.cpp +++ b/utils/wxPython/src/msw/windows.cpp @@ -317,7 +317,7 @@ static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -343,7 +343,7 @@ static PyObject *_wrap_wxWindow_Center(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -369,7 +369,7 @@ static PyObject *_wrap_wxWindow_Centre(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -395,7 +395,7 @@ static PyObject *_wrap_wxWindow_CentreOnParent(PyObject *self, PyObject *args) { static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (wxHORIZONTAL); + int _arg1 = (wxBOTH); char * _argc0 = 0; self = self; @@ -1557,6 +1557,33 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args) { return _resultobj; } +#define wxWindow_GetUpdateRegion(_swigobj) (_swigobj->GetUpdateRegion()) +static PyObject *_wrap_wxWindow_GetUpdateRegion(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxRegion * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxWindow_GetUpdateRegion",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetUpdateRegion. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRegion (wxWindow_GetUpdateRegion(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRegion_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxWindow_GetWindowStyleFlag(_swigobj) (_swigobj->GetWindowStyleFlag()) static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1924,8 +1951,8 @@ static PyObject *_wrap_wxWindow_Move(PyObject *self, PyObject *args) { return _resultobj; } -#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { +#define wxWindow_PopupMenuXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PopupMenu(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxWindow_PopupMenuXY(PyObject *self, PyObject *args) { PyObject * _resultobj; bool _result; wxWindow * _arg0; @@ -1936,7 +1963,42 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { char * _argc1 = 0; self = self; - if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenu",&_argc0,&_argc1,&_arg2,&_arg3)) + if(!PyArg_ParseTuple(args,"ssii:wxWindow_PopupMenuXY",&_argc0,&_argc1,&_arg2,&_arg3)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_PopupMenuXY. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_PopupMenuXY. Expected _wxMenu_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxWindow_PopupMenuXY(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxWindow_PopupMenu(_swigobj,_swigarg0,_swigarg1) (_swigobj->PopupMenu(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + wxMenu * _arg1; + wxPoint * _arg2; + char * _argc0 = 0; + char * _argc1 = 0; + char * _argc2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sss:wxWindow_PopupMenu",&_argc0,&_argc1,&_argc2)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { @@ -1950,9 +2012,15 @@ static PyObject *_wrap_wxWindow_PopupMenu(PyObject *self, PyObject *args) { return NULL; } } + if (_argc2) { + if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxWindow_PopupMenu. Expected _wxPoint_p."); + return NULL; + } + } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxWindow_PopupMenu(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -4091,16 +4159,17 @@ static void *SwigwxMenuTowxEvtHandler(void *ptr) { return (void *) dest; } -#define new_wxMenu(_swigarg0) (new wxMenu(_swigarg0)) +#define new_wxMenu(_swigarg0,_swigarg1) (new wxMenu(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) { PyObject * _resultobj; wxMenu * _result; wxString * _arg0 = &wxPyEmptyStr; + long _arg1 = 0; PyObject * _obj0 = 0; char _ptemp[128]; self = self; - if(!PyArg_ParseTuple(args,"|O:new_wxMenu",&_obj0)) + if(!PyArg_ParseTuple(args,"|Ol:new_wxMenu",&_obj0,&_arg1)) return NULL; if (_obj0) { @@ -4112,7 +4181,7 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args) { } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenu *)new_wxMenu(*_arg0); + _result = (wxMenu *)new_wxMenu(*_arg0,_arg1); wxPy_END_ALLOW_THREADS; } SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); @@ -4706,79 +4775,32 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args) { return _resultobj; } -static void *SwigwxPyMenuTowxMenu(void *ptr) { - wxPyMenu *src; - wxMenu *dest; - src = (wxPyMenu *) ptr; - dest = (wxMenu *) src; - return (void *) dest; -} - -static void *SwigwxPyMenuTowxEvtHandler(void *ptr) { - wxPyMenu *src; - wxEvtHandler *dest; - src = (wxPyMenu *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxPyMenu(_swigarg0,_swigarg1) (new wxPyMenu(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxPyMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyMenu * _result; - wxString * _arg0 = &wxPyEmptyStr; - PyObject * _arg1 = NULL; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"|OO:new_wxPyMenu",&_obj0,&_obj1)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - _arg1 = _obj1; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyMenu *)new_wxPyMenu(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyMenu_p"); - _resultobj = Py_BuildValue("s",_ptemp); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define delete_wxPyMenu(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyMenu(PyObject *self, PyObject *args) { +#define wxMenu_UpdateUI(_swigobj,_swigarg0) (_swigobj->UpdateUI(_swigarg0)) +static PyObject *_wrap_wxMenu_UpdateUI(PyObject *self, PyObject *args) { PyObject * _resultobj; - wxPyMenu * _arg0; + wxMenu * _arg0; + wxEvtHandler * _arg1 = NULL; char * _argc0 = 0; + char * _argc1 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxPyMenu",&_argc0)) + if(!PyArg_ParseTuple(args,"s|s:wxMenu_UpdateUI",&_argc0,&_argc1)) return NULL; if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyMenu_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyMenu. Expected _wxPyMenu_p."); + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_UpdateUI. Expected _wxMenu_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenu_UpdateUI. Expected _wxEvtHandler_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - delete_wxPyMenu(_arg0); + wxMenu_UpdateUI(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -6123,8 +6145,7 @@ static PyMethodDef windowscMethods[] = { { "wxMenuBar_Check", _wrap_wxMenuBar_Check, 1 }, { "wxMenuBar_Append", _wrap_wxMenuBar_Append, 1 }, { "new_wxMenuBar", _wrap_new_wxMenuBar, 1 }, - { "delete_wxPyMenu", _wrap_delete_wxPyMenu, 1 }, - { "new_wxPyMenu", _wrap_new_wxPyMenu, 1 }, + { "wxMenu_UpdateUI", _wrap_wxMenu_UpdateUI, 1 }, { "wxMenu_SetLabel", _wrap_wxMenu_SetLabel, 1 }, { "wxMenu_IsEnabled", _wrap_wxMenu_IsEnabled, 1 }, { "wxMenu_IsChecked", _wrap_wxMenu_IsChecked, 1 }, @@ -6210,6 +6231,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Refresh", _wrap_wxWindow_Refresh, 1 }, { "wxWindow_Raise", _wrap_wxWindow_Raise, 1 }, { "wxWindow_PopupMenu", _wrap_wxWindow_PopupMenu, 1 }, + { "wxWindow_PopupMenuXY", _wrap_wxWindow_PopupMenuXY, 1 }, { "wxWindow_Move", _wrap_wxWindow_Move, 1 }, { "wxWindow_MoveXY", _wrap_wxWindow_MoveXY, 1 }, { "wxWindow_MakeModal", _wrap_wxWindow_MakeModal, 1 }, @@ -6223,6 +6245,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_InitDialog", _wrap_wxWindow_InitDialog, 1 }, { "wxWindow_Hide", _wrap_wxWindow_Hide, 1 }, { "wxWindow_GetWindowStyleFlag", _wrap_wxWindow_GetWindowStyleFlag, 1 }, + { "wxWindow_GetUpdateRegion", _wrap_wxWindow_GetUpdateRegion, 1 }, { "wxWindow_GetTitle", _wrap_wxWindow_GetTitle, 1 }, { "wxWindow_GetFullTextExtent", _wrap_wxWindow_GetFullTextExtent, 1 }, { "wxWindow_GetTextExtent", _wrap_wxWindow_GetTextExtent, 1 }, @@ -6296,8 +6319,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); @@ -6312,7 +6333,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); SWIG_RegisterMapping("_long","_wxDash",0); @@ -6372,8 +6392,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_signed_int","_int",0); SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); SWIG_RegisterMapping("_WXTYPE","_short",0); @@ -6403,8 +6421,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); SWIG_RegisterMapping("_unsigned_char","_byte",0); SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_class_wxPyMenu",SwigwxPyMenuTowxMenu); - SWIG_RegisterMapping("_class_wxMenu","_wxPyMenu",SwigwxPyMenuTowxMenu); SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0); SWIG_RegisterMapping("_unsigned_int","_size_t",0); @@ -6413,7 +6429,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); @@ -6450,8 +6465,6 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyMenu",SwigwxPyMenuTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPyMenu",SwigwxPyMenuTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler); SWIG_RegisterMapping("_wxEvtHandler","_class_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler); diff --git a/utils/wxPython/src/msw/windows.py b/utils/wxPython/src/msw/windows.py index 987810ffeb..59becc1aa2 100644 --- a/utils/wxPython/src/msw/windows.py +++ b/utils/wxPython/src/msw/windows.py @@ -185,6 +185,11 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetTitle(self): val = windowsc.wxWindow_GetTitle(self.this) return val + def GetUpdateRegion(self): + val = windowsc.wxWindow_GetUpdateRegion(self.this) + val = wxRegionPtr(val) + val.thisown = 1 + return val def GetWindowStyleFlag(self): val = windowsc.wxWindow_GetWindowStyleFlag(self.this) return val @@ -224,8 +229,11 @@ class wxWindowPtr(wxEvtHandlerPtr): def Move(self,arg0): val = windowsc.wxWindow_Move(self.this,arg0.this) return val - def PopupMenu(self,arg0,arg1,arg2): - val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1,arg2) + def PopupMenuXY(self,arg0,arg1,arg2): + val = windowsc.wxWindow_PopupMenuXY(self.this,arg0.this,arg1,arg2) + return val + def PopupMenu(self,arg0,arg1): + val = windowsc.wxWindow_PopupMenu(self.this,arg0.this,arg1.this) return val def Raise(self): val = windowsc.wxWindow_Raise(self.this) @@ -584,6 +592,13 @@ class wxMenuPtr(wxEvtHandlerPtr): def SetLabel(self,arg0,arg1): val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1) return val + def UpdateUI(self,*args): + argl = map(None,args) + try: argl[0] = argl[0].this + except: pass + args = tuple(argl) + val = apply(windowsc.wxMenu_UpdateUI,(self.this,)+args) + return val def __repr__(self): return "" class wxMenu(wxMenuPtr): @@ -594,23 +609,6 @@ class wxMenu(wxMenuPtr): -class wxPyMenuPtr(wxMenuPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self): - if self.thisown == 1 : - windowsc.delete_wxPyMenu(self.this) - def __repr__(self): - return "" -class wxPyMenu(wxPyMenuPtr): - def __init__(self,*args) : - self.this = apply(windowsc.new_wxPyMenu,()+args) - self.thisown = 1 - - - - class wxMenuBarPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this diff --git a/utils/wxPython/src/msw/windows2.cpp b/utils/wxPython/src/msw/windows2.cpp index 23a0093644..bab8d0e815 100644 --- a/utils/wxPython/src/msw/windows2.cpp +++ b/utils/wxPython/src/msw/windows2.cpp @@ -1082,6 +1082,58 @@ static PyObject *_wrap_wxGrid_GetDefCellBackgroundColour(PyObject *self, PyObjec return _resultobj; } +static PyObject * wxGrid_GetCells(wxGrid *self) { + int row, col; + PyObject* rows = PyList_New(0); + for (row=0; row < self->GetRows(); row++) { + PyObject* rowList = PyList_New(0); + for (col=0; col < self->GetCols(); col++) { + wxGridCell* cell = self->GetCell(row, col); + +#ifdef WXP_WITH_THREAD + PyEval_RestoreThread(wxPyEventThreadState); + wxPyInEvent = true; +#endif + PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell"); +#ifdef WXP_WITH_THREAD + PyEval_SaveThread(); + wxPyInEvent = false; +#endif + + if (PyList_Append(rowList, pyCell) == -1) + return NULL; + } + if (PyList_Append(rows, rowList) == -1) + return NULL; + } + return rows; + } +static PyObject *_wrap_wxGrid_GetCells(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + wxGrid * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxGrid_GetCells",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCells. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxGrid_GetCells(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + #define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1)) static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -2475,6 +2527,57 @@ static PyObject *_wrap_wxGrid_UpdateDimensions(PyObject *self, PyObject *args) { return _resultobj; } +#define wxGrid_GetEditInPlace(_swigobj) (_swigobj->GetEditInPlace()) +static PyObject *_wrap_wxGrid_GetEditInPlace(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxGrid_GetEditInPlace",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetEditInPlace. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_GetEditInPlace(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetEditInPlace(_swigobj,_swigarg0) (_swigobj->SetEditInPlace(_swigarg0)) +static PyObject *_wrap_wxGrid_SetEditInPlace(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1 = (1); + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:wxGrid_SetEditInPlace",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetEditInPlace. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetEditInPlace(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxGridEventTowxEvent(void *ptr) { wxGridEvent *src; wxEvent *dest; @@ -4496,6 +4599,8 @@ static PyMethodDef windows2cMethods[] = { { "wxGridEvent_m_col_set", _wrap_wxGridEvent_m_col_set, 1 }, { "wxGridEvent_m_row_get", _wrap_wxGridEvent_m_row_get, 1 }, { "wxGridEvent_m_row_set", _wrap_wxGridEvent_m_row_set, 1 }, + { "wxGrid_SetEditInPlace", _wrap_wxGrid_SetEditInPlace, 1 }, + { "wxGrid_GetEditInPlace", _wrap_wxGrid_GetEditInPlace, 1 }, { "wxGrid_UpdateDimensions", _wrap_wxGrid_UpdateDimensions, 1 }, { "wxGrid_SetRowHeight", _wrap_wxGrid_SetRowHeight, 1 }, { "wxGrid_SetLabelValue", _wrap_wxGrid_SetLabelValue, 1 }, @@ -4544,6 +4649,7 @@ static PyMethodDef windows2cMethods[] = { { "wxGrid_GetCellTextFont", _wrap_wxGrid_GetCellTextFont, 1 }, { "wxGrid_GetDefCellTextColour", _wrap_wxGrid_GetDefCellTextColour, 1 }, { "wxGrid_GetCellTextColour", _wrap_wxGrid_GetCellTextColour, 1 }, + { "wxGrid_GetCells", _wrap_wxGrid_GetCells, 1 }, { "wxGrid_GetDefCellBackgroundColour", _wrap_wxGrid_GetDefCellBackgroundColour, 1 }, { "wxGrid_GetCellBackgroundColour", _wrap_wxGrid_GetCellBackgroundColour, 1 }, { "wxGrid_GetDefCellAlignment", _wrap_wxGrid_GetDefCellAlignment, 1 }, @@ -4647,7 +4753,6 @@ SWIGEXPORT(void,initwindows2c)() { SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -4689,6 +4794,7 @@ SWIGEXPORT(void,initwindows2c)() { SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0); SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); @@ -4730,6 +4836,7 @@ SWIGEXPORT(void,initwindows2c)() { SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0); SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); SWIG_RegisterMapping("_EBool","_signed_int",0); @@ -4817,7 +4924,6 @@ SWIGEXPORT(void,initwindows2c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_short","_WXTYPE",0); SWIG_RegisterMapping("_short","_unsigned_short",0); diff --git a/utils/wxPython/src/msw/windows2.py b/utils/wxPython/src/msw/windows2.py index f5d4c0cdb9..9af0e32ba9 100644 --- a/utils/wxPython/src/msw/windows2.py +++ b/utils/wxPython/src/msw/windows2.py @@ -15,7 +15,7 @@ class wxGridCellPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, windows2c=windows2c): if self.thisown == 1 : windows2c.delete_wxGridCell(self.this) def GetTextValue(self): @@ -127,6 +127,9 @@ class wxGridPtr(wxPanelPtr): val = windows2c.wxGrid_GetDefCellBackgroundColour(self.this) val = wxColourPtr(val) return val + def GetCells(self): + val = windows2c.wxGrid_GetCells(self.this) + return val def GetCellTextColour(self,arg0,arg1): val = windows2c.wxGrid_GetCellTextColour(self.this,arg0,arg1) val = wxColourPtr(val) @@ -283,6 +286,12 @@ class wxGridPtr(wxPanelPtr): def UpdateDimensions(self): val = windows2c.wxGrid_UpdateDimensions(self.this) return val + def GetEditInPlace(self): + val = windows2c.wxGrid_GetEditInPlace(self.this) + return val + def SetEditInPlace(self,*args): + val = apply(windows2c.wxGrid_SetEditInPlace,(self.this,)+args) + return val def __repr__(self): return "" class wxGrid(wxGridPtr): @@ -574,7 +583,7 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, windows2c=windows2c): if self.thisown == 1 : windows2c.delete_wxTaskBarIcon(self.this) def SetIcon(self,arg0,*args): diff --git a/utils/wxPython/src/msw/windows3.cpp b/utils/wxPython/src/msw/windows3.cpp index 13484e60bd..7c6f60e716 100644 --- a/utils/wxPython/src/msw/windows3.cpp +++ b/utils/wxPython/src/msw/windows3.cpp @@ -1674,7 +1674,6 @@ SWIGEXPORT(void,initwindows3c)() { SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0); SWIG_RegisterMapping("_wxMask","_class_wxMask",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_wxPen","_class_wxPen",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); SWIG_RegisterMapping("_byte","_unsigned_char",0); @@ -1721,6 +1720,7 @@ SWIGEXPORT(void,initwindows3c)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0); @@ -1767,6 +1767,7 @@ SWIGEXPORT(void,initwindows3c)() { SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); @@ -1855,7 +1856,6 @@ SWIGEXPORT(void,initwindows3c)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0); SWIG_RegisterMapping("_short","_WXTYPE",0); diff --git a/utils/wxPython/src/msw/windows3.py b/utils/wxPython/src/msw/windows3.py index cf20a91997..c6fc7bc4da 100644 --- a/utils/wxPython/src/msw/windows3.py +++ b/utils/wxPython/src/msw/windows3.py @@ -238,7 +238,7 @@ class wxLayoutAlgorithmPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self): + def __del__(self, windows3c=windows3c): if self.thisown == 1 : windows3c.delete_wxLayoutAlgorithm(self.this) def LayoutMDIFrame(self,arg0,*args): diff --git a/utils/wxPython/src/msw/wx.cpp b/utils/wxPython/src/msw/wx.cpp index c576cf1f31..3b1c0f80ac 100644 --- a/utils/wxPython/src/msw/wx.cpp +++ b/utils/wxPython/src/msw/wx.cpp @@ -33,8 +33,50 @@ * and things like that. * * $Log$ - * Revision 1.12 1999/06/28 03:10:35 RD - * Final tweaks for 2.1b1 + * Revision 1.13 1999/07/31 07:56:03 RD + * wxPython 2.1b1: + * + * Added the missing wxWindow.GetUpdateRegion() method. + * + * Made a new change in SWIG (update your patches everybody) that + * provides a fix for global shadow objects that get an exception in + * their __del__ when their extension module has already been deleted. + * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about + * line 496 if you want to do it by hand. + * + * It is now possible to run through MainLoop more than once in any one + * process. The cleanup that used to happen as MainLoop completed (and + * prevented it from running again) has been delayed until the wxc module + * is being unloaded by Python. + * + * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added + * wxWindow.PopupMenuXY to be consistent with some other methods. + * + * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. + * + * You can now provide your own app.MainLoop method. See + * wxPython/demo/demoMainLoop.py for an example and some explaination. + * + * Got the in-place-edit for the wxTreeCtrl fixed and added some demo + * code to show how to use it. + * + * Put the wxIcon constructor back in for GTK as it now has one that + * matches MSW's. + * + * Added wxGrid.GetCells + * + * Added wxSystemSettings static methods as functions with names like + * wxSystemSettings_GetSystemColour. + * + * Removed wxPyMenu since using menu callbacks have been depreciated in + * wxWindows. Use wxMenu and events instead. + * + * Added alternate wxBitmap constructor (for MSW only) as + * wxBitmapFromData(data, type, width, height, depth = 1) + * + * Added a helper function named wxPyTypeCast that can convert shadow + * objects of one type into shadow objects of another type. (Like doing + * a down-cast.) See the implementation in wx.py for some docs. * ************************************************************************/ @@ -617,6 +659,522 @@ extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); static char* wxStringErrorMsg = "string type is required for parameter"; + +#include + +/*------------------------------------------------------------------ + ptrcast(value,type) + + Constructs a new pointer value. Value may either be a string + or an integer. Type is a string corresponding to either the + C datatype or mangled datatype. + + ptrcast(0,"Vector *") + or + ptrcast(0,"Vector_p") + ------------------------------------------------------------------ */ + +static PyObject *ptrcast(PyObject *_PTRVALUE, char *type) { + + char *r,*s; + void *ptr; + PyObject *obj; + char *typestr,*c; + + /* Produce a "mangled" version of the type string. */ + + typestr = (char *) malloc(strlen(type)+2); + + /* Go through and munge the typestring */ + + r = typestr; + *(r++) = '_'; + c = type; + while (*c) { + if (!isspace(*c)) { + if ((*c == '*') || (*c == '&')) { + *(r++) = 'p'; + } + else *(r++) = *c; + } else { + *(r++) = '_'; + } + c++; + } + *(r++) = 0; + + /* Check to see what kind of object _PTRVALUE is */ + + if (PyInt_Check(_PTRVALUE)) { + ptr = (void *) PyInt_AsLong(_PTRVALUE); + /* Received a numerical value. Make a pointer out of it */ + r = (char *) malloc(strlen(typestr)+22); + if (ptr) { + SWIG_MakePtr(r, ptr, typestr); + } else { + sprintf(r,"_0%s",typestr); + } + obj = PyString_FromString(r); + free(r); + } else if (PyString_Check(_PTRVALUE)) { + /* Have a real pointer value now. Try to strip out the pointer + value */ + s = PyString_AsString(_PTRVALUE); + r = (char *) malloc(strlen(type)+22); + + /* Now extract the pointer value */ + if (!SWIG_GetPtr(s,&ptr,0)) { + if (ptr) { + SWIG_MakePtr(r,ptr,typestr); + } else { + sprintf(r,"_0%s",typestr); + } + obj = PyString_FromString(r); + } else { + obj = NULL; + } + free(r); + } else { + obj = NULL; + } + free(typestr); + if (!obj) + PyErr_SetString(PyExc_TypeError,"Type error in ptrcast. Argument is not a valid pointer value."); + return obj; +} + +/*------------------------------------------------------------------ + ptrvalue(ptr,type = 0) + + Attempts to dereference a pointer value. If type is given, it + will try to use that type. Otherwise, this function will attempt + to "guess" the proper datatype by checking against all of the + builtin C datatypes. + ------------------------------------------------------------------ */ + +static PyObject *ptrvalue(PyObject *_PTRVALUE, int index, char *type) { + void *ptr; + char *s; + PyObject *obj; + + if (!PyString_Check(_PTRVALUE)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrvalue. Argument is not a valid pointer value."); + return NULL; + } + s = PyString_AsString(_PTRVALUE); + if (SWIG_GetPtr(s,&ptr,0)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrvalue. Argument is not a valid pointer value."); + return NULL; + } + + /* If no datatype was passed, try a few common datatypes first */ + + if (!type) { + + /* No datatype was passed. Type to figure out if it's a common one */ + + if (!SWIG_GetPtr(s,&ptr,"_int_p")) { + type = "int"; + } else if (!SWIG_GetPtr(s,&ptr,"_double_p")) { + type = "double"; + } else if (!SWIG_GetPtr(s,&ptr,"_short_p")) { + type = "short"; + } else if (!SWIG_GetPtr(s,&ptr,"_long_p")) { + type = "long"; + } else if (!SWIG_GetPtr(s,&ptr,"_float_p")) { + type = "float"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_p")) { + type = "char"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_pp")) { + type = "char *"; + } else { + type = "unknown"; + } + } + + if (!ptr) { + PyErr_SetString(PyExc_TypeError,"Unable to dereference NULL pointer."); + return NULL; + } + + /* Now we have a datatype. Try to figure out what to do about it */ + if (strcmp(type,"int") == 0) { + obj = PyInt_FromLong((long) *(((int *) ptr) + index)); + } else if (strcmp(type,"double") == 0) { + obj = PyFloat_FromDouble((double) *(((double *) ptr)+index)); + } else if (strcmp(type,"short") == 0) { + obj = PyInt_FromLong((long) *(((short *) ptr)+index)); + } else if (strcmp(type,"long") == 0) { + obj = PyInt_FromLong((long) *(((long *) ptr)+index)); + } else if (strcmp(type,"float") == 0) { + obj = PyFloat_FromDouble((double) *(((float *) ptr)+index)); + } else if (strcmp(type,"char") == 0) { + obj = PyString_FromString(((char *) ptr)+index); + } else if (strcmp(type,"char *") == 0) { + char *c = *(((char **) ptr)+index); + if (c) obj = PyString_FromString(c); + else obj = PyString_FromString("NULL"); + } else { + PyErr_SetString(PyExc_TypeError,"Unable to dereference unsupported datatype."); + return NULL; + } + return obj; +} + +/*------------------------------------------------------------------ + ptrcreate(type,value = 0,numelements = 1) + + Attempts to create a new object of given type. Type must be + a basic C datatype. Will not create complex objects. + ------------------------------------------------------------------ */ + +static PyObject *ptrcreate(char *type, PyObject *_PYVALUE, int numelements) { + void *ptr; + PyObject *obj; + int sz; + char *cast; + char temp[40]; + + /* Check the type string against a variety of possibilities */ + + if (strcmp(type,"int") == 0) { + sz = sizeof(int)*numelements; + cast = "_int_p"; + } else if (strcmp(type,"short") == 0) { + sz = sizeof(short)*numelements; + cast = "_short_p"; + } else if (strcmp(type,"long") == 0) { + sz = sizeof(long)*numelements; + cast = "_long_p"; + } else if (strcmp(type,"double") == 0) { + sz = sizeof(double)*numelements; + cast = "_double_p"; + } else if (strcmp(type,"float") == 0) { + sz = sizeof(float)*numelements; + cast = "_float_p"; + } else if (strcmp(type,"char") == 0) { + sz = sizeof(char)*numelements; + cast = "_char_p"; + } else if (strcmp(type,"char *") == 0) { + sz = sizeof(char *)*(numelements+1); + cast = "_char_pp"; + } else { + PyErr_SetString(PyExc_TypeError,"Unable to create unknown datatype."); + return NULL; + } + + /* Create the new object */ + + ptr = (void *) malloc(sz); + if (!ptr) { + PyErr_SetString(PyExc_MemoryError,"Out of memory in swig_create."); + return NULL; + } + + /* Now try to set its default value */ + + if (_PYVALUE) { + if (strcmp(type,"int") == 0) { + int *ip,i,ivalue; + ivalue = (int) PyInt_AsLong(_PYVALUE); + ip = (int *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"short") == 0) { + short *ip,ivalue; + int i; + ivalue = (short) PyInt_AsLong(_PYVALUE); + ip = (short *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"long") == 0) { + long *ip,ivalue; + int i; + ivalue = (long) PyInt_AsLong(_PYVALUE); + ip = (long *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"double") == 0) { + double *ip,ivalue; + int i; + ivalue = (double) PyFloat_AsDouble(_PYVALUE); + ip = (double *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"float") == 0) { + float *ip,ivalue; + int i; + ivalue = (float) PyFloat_AsDouble(_PYVALUE); + ip = (float *) ptr; + for (i = 0; i < numelements; i++) + ip[i] = ivalue; + } else if (strcmp(type,"char") == 0) { + char *ip,*ivalue; + ivalue = (char *) PyString_AsString(_PYVALUE); + ip = (char *) ptr; + strncpy(ip,ivalue,numelements-1); + } else if (strcmp(type,"char *") == 0) { + char **ip, *ivalue; + int i; + ivalue = (char *) PyString_AsString(_PYVALUE); + ip = (char **) ptr; + for (i = 0; i < numelements; i++) { + if (ivalue) { + ip[i] = (char *) malloc(strlen(ivalue)+1); + strcpy(ip[i],ivalue); + } else { + ip[i] = 0; + } + } + ip[numelements] = 0; + } + } + /* Create the pointer value */ + + SWIG_MakePtr(temp,ptr,cast); + obj = PyString_FromString(temp); + return obj; +} + + +/*------------------------------------------------------------------ + ptrset(ptr,value,index = 0,type = 0) + + Attempts to set the value of a pointer variable. If type is + given, we will use that type. Otherwise, we'll guess the datatype. + ------------------------------------------------------------------ */ + +static PyObject *ptrset(PyObject *_PTRVALUE, PyObject *_PYVALUE, int index, char *type) { + void *ptr; + char *s; + PyObject *obj; + + if (!PyString_Check(_PTRVALUE)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrset. Argument is not a valid pointer value."); + return NULL; + } + s = PyString_AsString(_PTRVALUE); + if (SWIG_GetPtr(s,&ptr,0)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrset. Argument is not a valid pointer value."); + return NULL; + } + + /* If no datatype was passed, try a few common datatypes first */ + + if (!type) { + + /* No datatype was passed. Type to figure out if it's a common one */ + + if (!SWIG_GetPtr(s,&ptr,"_int_p")) { + type = "int"; + } else if (!SWIG_GetPtr(s,&ptr,"_double_p")) { + type = "double"; + } else if (!SWIG_GetPtr(s,&ptr,"_short_p")) { + type = "short"; + } else if (!SWIG_GetPtr(s,&ptr,"_long_p")) { + type = "long"; + } else if (!SWIG_GetPtr(s,&ptr,"_float_p")) { + type = "float"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_p")) { + type = "char"; + } else if (!SWIG_GetPtr(s,&ptr,"_char_pp")) { + type = "char *"; + } else { + type = "unknown"; + } + } + + if (!ptr) { + PyErr_SetString(PyExc_TypeError,"Unable to set NULL pointer."); + return NULL; + } + + /* Now we have a datatype. Try to figure out what to do about it */ + if (strcmp(type,"int") == 0) { + *(((int *) ptr)+index) = (int) PyInt_AsLong(_PYVALUE); + } else if (strcmp(type,"double") == 0) { + *(((double *) ptr)+index) = (double) PyFloat_AsDouble(_PYVALUE); + } else if (strcmp(type,"short") == 0) { + *(((short *) ptr)+index) = (short) PyInt_AsLong(_PYVALUE); + } else if (strcmp(type,"long") == 0) { + *(((long *) ptr)+index) = (long) PyInt_AsLong(_PYVALUE); + } else if (strcmp(type,"float") == 0) { + *(((float *) ptr)+index) = (float) PyFloat_AsDouble(_PYVALUE); + } else if (strcmp(type,"char") == 0) { + char *c = PyString_AsString(_PYVALUE); + strcpy(((char *) ptr)+index, c); + } else if (strcmp(type,"char *") == 0) { + char *c = PyString_AsString(_PYVALUE); + char **ca = (char **) ptr; + if (ca[index]) free(ca[index]); + if (strcmp(c,"NULL") == 0) { + ca[index] = 0; + } else { + ca[index] = (char *) malloc(strlen(c)+1); + strcpy(ca[index],c); + } + } else { + PyErr_SetString(PyExc_TypeError,"Unable to set unsupported datatype."); + return NULL; + } + Py_INCREF(Py_None); + return Py_None; +} + + +/*------------------------------------------------------------------ + ptradd(ptr,offset) + + Adds a value to an existing pointer value. Will do a type-dependent + add for basic datatypes. For other datatypes, will do a byte-add. + ------------------------------------------------------------------ */ + +static PyObject *ptradd(PyObject *_PTRVALUE, int offset) { + + char *r,*s; + void *ptr,*junk; + PyObject *obj; + char *type; + + /* Check to see what kind of object _PTRVALUE is */ + + if (PyString_Check(_PTRVALUE)) { + /* Have a potential pointer value now. Try to strip out the value */ + s = PyString_AsString(_PTRVALUE); + + /* Try to handle a few common datatypes first */ + + if (!SWIG_GetPtr(s,&ptr,"_int_p")) { + ptr = (void *) (((int *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_double_p")) { + ptr = (void *) (((double *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_short_p")) { + ptr = (void *) (((short *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_long_p")) { + ptr = (void *) (((long *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_float_p")) { + ptr = (void *) (((float *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,"_char_p")) { + ptr = (void *) (((char *) ptr) + offset); + } else if (!SWIG_GetPtr(s,&ptr,0)) { + ptr = (void *) (((char *) ptr) + offset); + } else { + PyErr_SetString(PyExc_TypeError,"Type error in ptradd. Argument is not a valid pointer value."); + return NULL; + } + type = SWIG_GetPtr(s,&junk,"INVALID POINTER"); + r = (char *) malloc(strlen(type)+20); + if (ptr) { + SWIG_MakePtr(r,ptr,type); + } else { + sprintf(r,"_0%s",type); + } + obj = PyString_FromString(r); + free(r); + } + return obj; +} + +/*------------------------------------------------------------------ + ptrmap(type1,type2) + + Allows a mapping between type1 and type2. (Like a typedef) + ------------------------------------------------------------------ */ + +static void ptrmap(char *type1, char *type2) { + + char *typestr1,*typestr2,*c,*r; + + /* Produce a "mangled" version of the type string. */ + + typestr1 = (char *) malloc(strlen(type1)+2); + + /* Go through and munge the typestring */ + + r = typestr1; + *(r++) = '_'; + c = type1; + while (*c) { + if (!isspace(*c)) { + if ((*c == '*') || (*c == '&')) { + *(r++) = 'p'; + } + else *(r++) = *c; + } else { + *(r++) = '_'; + } + c++; + } + *(r++) = 0; + + typestr2 = (char *) malloc(strlen(type2)+2); + + /* Go through and munge the typestring */ + + r = typestr2; + *(r++) = '_'; + c = type2; + while (*c) { + if (!isspace(*c)) { + if ((*c == '*') || (*c == '&')) { + *(r++) = 'p'; + } + else *(r++) = *c; + } else { + *(r++) = '_'; + } + c++; + } + *(r++) = 0; + SWIG_RegisterMapping(typestr1,typestr2,0); + SWIG_RegisterMapping(typestr2,typestr1,0); +} + +/*------------------------------------------------------------------ + ptrfree(ptr) + + Destroys a pointer value + ------------------------------------------------------------------ */ + +PyObject *ptrfree(PyObject *_PTRVALUE) { + void *ptr, *junk; + char *s; + + if (!PyString_Check(_PTRVALUE)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrfree. Argument is not a valid pointer value."); + return NULL; + } + s = PyString_AsString(_PTRVALUE); + if (SWIG_GetPtr(s,&ptr,0)) { + PyErr_SetString(PyExc_TypeError,"Type error in ptrfree. Argument is not a valid pointer value."); + return NULL; + } + + /* Check to see if this pointer is a char ** */ + if (!SWIG_GetPtr(s,&junk,"_char_pp")) { + char **c = (char **) ptr; + if (c) { + int i = 0; + while (c[i]) { + free(c[i]); + i++; + } + } + } + if (ptr) + free((char *) ptr); + + Py_INCREF(Py_None); + return Py_None; +} + + +class __wxPyCleanup { +public: + __wxPyCleanup() { } + ~__wxPyCleanup() { wxApp::CleanUp(); } +}; + extern "C" SWIGEXPORT(void,initwindowsc)(); extern "C" SWIGEXPORT(void,initwindows2c)(); extern "C" SWIGEXPORT(void,initeventsc)(); @@ -634,8 +1192,179 @@ extern "C" SWIGEXPORT(void,initimagec)(); extern "C" SWIGEXPORT(void,initprintfwc)(); #ifndef SEPARATE extern "C" SWIGEXPORT(void,initutilsc)(); +//extern "C" SWIGEXPORT(void,initoglc)(); extern "C" SWIGEXPORT(void,initglcanvasc)(); #endif +static PyObject *_wrap_ptrcast(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + char * _arg1; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"Os:ptrcast",&_obj0,&_arg1)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrcast(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrvalue(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + int _arg1 = 0; + char * _arg2 = 0; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"O|is:ptrvalue",&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrset(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + PyObject * _arg1; + int _arg2 = 0; + char * _arg3 = 0; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"OO|is:ptrset",&_obj0,&_obj1,&_arg2,&_arg3)) + return NULL; +{ + _arg0 = _obj0; +} +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrcreate(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + char * _arg0; + PyObject * _arg1 = 0; + int _arg2 = 1; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s|Oi:ptrcreate",&_arg0,&_obj1,&_arg2)) + return NULL; + if (_obj1) +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrfree(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"O:ptrfree",&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptrfree(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptradd(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + PyObject * _arg0; + int _arg1; + PyObject * _obj0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"Oi:ptradd",&_obj0,&_arg1)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)ptradd(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args) { + PyObject * _resultobj; + char * _arg0; + char * _arg1; + + self = self; + if(!PyArg_ParseTuple(args,"ss:ptrmap",&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + ptrmap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static int _wrap_wxPyDefaultPosition_set(PyObject *val) { char * tval; wxPoint * temp; @@ -723,6 +1452,31 @@ static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args) { return _resultobj; } +#define delete_wxPyApp(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPyApp(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPyApp * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxPyApp",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyApp. Expected _wxPyApp_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyApp(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxPyApp_GetAppName(_swigobj) (_swigobj->GetAppName()) static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1040,6 +1794,31 @@ static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args) { return _resultobj; } +#define wxPyApp_ProcessIdle(_swigobj) (_swigobj->ProcessIdle()) +static PyObject *_wrap_wxPyApp_ProcessIdle(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxPyApp * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxPyApp_ProcessIdle",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_ProcessIdle. Expected _wxPyApp_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyApp_ProcessIdle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPyApp_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1269,24 +2048,71 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args) { return _resultobj; } -#define wxPyApp_AfterMainLoop(_swigobj) (_swigobj->AfterMainLoop()) -static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { +#define wxPyApp_GetStdIcon(_swigobj,_swigarg0) (_swigobj->GetStdIcon(_swigarg0)) +static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args) { PyObject * _resultobj; + wxIcon * _result; wxPyApp * _arg0; + int _arg1; char * _argc0 = 0; + char _ptemp[128]; self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_AfterMainLoop",&_argc0)) + if(!PyArg_ParseTuple(args,"si:wxPyApp_GetStdIcon",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_AfterMainLoop. Expected _wxPyApp_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetStdIcon. Expected _wxPyApp_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxPyApp_AfterMainLoop(_arg0); + _result = new wxIcon (wxPyApp_GetStdIcon(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define new___wxPyCleanup() (new __wxPyCleanup()) +static PyObject *_wrap_new___wxPyCleanup(PyObject *self, PyObject *args) { + PyObject * _resultobj; + __wxPyCleanup * _result; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,":new___wxPyCleanup")) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (__wxPyCleanup *)new___wxPyCleanup(); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (char *) _result,"___wxPyCleanup_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define delete___wxPyCleanup(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete___wxPyCleanup(PyObject *self, PyObject *args) { + PyObject * _resultobj; + __wxPyCleanup * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete___wxPyCleanup",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"___wxPyCleanup_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete___wxPyCleanup. Expected ___wxPyCleanup_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete___wxPyCleanup(_arg0); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1295,7 +2121,9 @@ static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { } static PyMethodDef wxcMethods[] = { - { "wxPyApp_AfterMainLoop", _wrap_wxPyApp_AfterMainLoop, 1 }, + { "delete___wxPyCleanup", _wrap_delete___wxPyCleanup, 1 }, + { "new___wxPyCleanup", _wrap_new___wxPyCleanup, 1 }, + { "wxPyApp_GetStdIcon", _wrap_wxPyApp_GetStdIcon, 1 }, { "wxPyApp_SetVendorName", _wrap_wxPyApp_SetVendorName, 1 }, { "wxPyApp_SetTopWindow", _wrap_wxPyApp_SetTopWindow, 1 }, { "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 }, @@ -1303,6 +2131,7 @@ static PyMethodDef wxcMethods[] = { { "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 }, { "wxPyApp_SetAuto3D", _wrap_wxPyApp_SetAuto3D, 1 }, { "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 }, + { "wxPyApp_ProcessIdle", _wrap_wxPyApp_ProcessIdle, 1 }, { "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 }, { "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 }, { "wxPyApp_Initialized", _wrap_wxPyApp_Initialized, 1 }, @@ -1315,9 +2144,17 @@ static PyMethodDef wxcMethods[] = { { "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 }, { "wxPyApp_GetAuto3D", _wrap_wxPyApp_GetAuto3D, 1 }, { "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 }, + { "delete_wxPyApp", _wrap_delete_wxPyApp, 1 }, { "new_wxPyApp", _wrap_new_wxPyApp, 1 }, { "_wxSetDictionary", __wxSetDictionary, 1 }, { "_wxStart", __wxStart, 1 }, + { "ptrmap", _wrap_ptrmap, 1 }, + { "ptradd", _wrap_ptradd, 1 }, + { "ptrfree", _wrap_ptrfree, 1 }, + { "ptrcreate", _wrap_ptrcreate, 1 }, + { "ptrset", _wrap_ptrset, 1 }, + { "ptrvalue", _wrap_ptrvalue, 1 }, + { "ptrcast", _wrap_ptrcast, 1 }, { NULL, NULL } }; static PyObject *SWIG_globals; @@ -1395,6 +2232,7 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); + PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE)); PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE)); PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN)); @@ -1427,6 +2265,8 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS)); PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS)); PyDict_SetItemString(d,"wxTR_LINES_AT_ROOT", PyInt_FromLong((long) wxTR_LINES_AT_ROOT)); + PyDict_SetItemString(d,"wxTR_MULTIPLE", PyInt_FromLong((long) wxTR_MULTIPLE)); + PyDict_SetItemString(d,"wxTR_HAS_VARIABLE_ROW_HEIGHT", PyInt_FromLong((long) wxTR_HAS_VARIABLE_ROW_HEIGHT)); PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON)); PyDict_SetItemString(d,"wxLC_SMALL_ICON", PyInt_FromLong((long) wxLC_SMALL_ICON)); PyDict_SetItemString(d,"wxLC_LIST", PyInt_FromLong((long) wxLC_LIST)); @@ -1561,6 +2401,8 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxPD_ESTIMATED_TIME", PyInt_FromLong((long) wxPD_ESTIMATED_TIME)); PyDict_SetItemString(d,"wxPD_REMAINING_TIME", PyInt_FromLong((long) wxPD_REMAINING_TIME)); PyDict_SetItemString(d,"wxNO_DEFAULT", PyInt_FromLong((long) wxNO_DEFAULT)); + PyDict_SetItemString(d,"wxMENU_TEAROFF", PyInt_FromLong((long) wxMENU_TEAROFF)); + PyDict_SetItemString(d,"wxNO_FULL_REPAINT_ON_RESIZE", PyInt_FromLong((long) wxNO_FULL_REPAINT_ON_RESIZE)); PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); @@ -1836,6 +2678,9 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK)); PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK)); PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR)); + PyDict_SetItemString(d,"wxEVT_KEY_DOWN", PyInt_FromLong((long) wxEVT_KEY_DOWN)); + PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); + PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); PyDict_SetItemString(d,"wxEVT_SCROLL_TOP", PyInt_FromLong((long) wxEVT_SCROLL_TOP)); PyDict_SetItemString(d,"wxEVT_SCROLL_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLL_BOTTOM)); PyDict_SetItemString(d,"wxEVT_SCROLL_LINEUP", PyInt_FromLong((long) wxEVT_SCROLL_LINEUP)); @@ -1857,8 +2702,6 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxEVT_QUERY_END_SESSION", PyInt_FromLong((long) wxEVT_QUERY_END_SESSION)); PyDict_SetItemString(d,"wxEVT_ACTIVATE_APP", PyInt_FromLong((long) wxEVT_ACTIVATE_APP)); PyDict_SetItemString(d,"wxEVT_POWER", PyInt_FromLong((long) wxEVT_POWER)); - PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); - PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); PyDict_SetItemString(d,"wxEVT_ACTIVATE", PyInt_FromLong((long) wxEVT_ACTIVATE)); PyDict_SetItemString(d,"wxEVT_CREATE", PyInt_FromLong((long) wxEVT_CREATE)); PyDict_SetItemString(d,"wxEVT_DESTROY", PyInt_FromLong((long) wxEVT_DESTROY)); @@ -1933,7 +2776,7 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_UNSPLIT", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_UNSPLIT)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)); - PyDict_SetItemString(d,"__version__", PyString_FromString("2.1b1")); + PyDict_SetItemString(d,"__version__", PyString_FromString("2.1b2")); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); @@ -1941,7 +2784,6 @@ SWIGEXPORT(void,initwxc)() { __wxPreStart(); // initialize the GUI toolkit, if needed. -// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); // Since these modules are all linked together, initialize them now // because python won't be able to find their shared library files, @@ -1963,6 +2805,7 @@ SWIGEXPORT(void,initwxc)() { initprintfwc(); #ifndef SEPARATE initutilsc(); +// initoglc(); #ifdef WITH_GLCANVAS initglcanvasc(); #endif @@ -1987,6 +2830,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_wxPrintQuality","_EBool",0); SWIG_RegisterMapping("_wxPrintQuality","_size_t",0); SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); + SWIG_RegisterMapping("___wxPyCleanup","_class___wxPyCleanup",0); SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0); @@ -2004,7 +2848,6 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0); SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); SWIG_RegisterMapping("_wxPNGHandler","_class_wxPNGHandler",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); SWIG_RegisterMapping("_class_wxPageSetupDialogData","_wxPageSetupDialogData",0); SWIG_RegisterMapping("_wxPrinter","_class_wxPrinter",0); @@ -2064,6 +2907,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0); + SWIG_RegisterMapping("_wxStaticLine","_class_wxStaticLine",0); SWIG_RegisterMapping("_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0); SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); @@ -2089,6 +2933,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_class_wxButton","_wxButton",0); SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); + SWIG_RegisterMapping("_class___wxPyCleanup","___wxPyCleanup",0); SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); SWIG_RegisterMapping("_wxTaskBarIcon","_class_wxTaskBarIcon",0); SWIG_RegisterMapping("_wxPrintDialog","_class_wxPrintDialog",0); @@ -2109,6 +2954,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0); + SWIG_RegisterMapping("_class_wxStaticLine","_wxStaticLine",0); SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); SWIG_RegisterMapping("_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0); SWIG_RegisterMapping("_EBool","_wxPrintQuality",0); @@ -2206,7 +3052,6 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_unsigned_int","_int",0); SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); SWIG_RegisterMapping("_class_wxPen","_wxPen",0); SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); diff --git a/utils/wxPython/src/msw/wx.py b/utils/wxPython/src/msw/wx.py index 3983021421..1ced3863e2 100644 --- a/utils/wxPython/src/msw/wx.py +++ b/utils/wxPython/src/msw/wx.py @@ -34,6 +34,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self, wxc=wxc): + if self.thisown == 1 : + wxc.delete_wxPyApp(self.this) def GetAppName(self): val = wxc.wxPyApp_GetAppName(self.this) return val @@ -71,6 +74,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def Pending(self): val = wxc.wxPyApp_Pending(self.this) return val + def ProcessIdle(self): + val = wxc.wxPyApp_ProcessIdle(self.this) + return val def SetAppName(self,arg0): val = wxc.wxPyApp_SetAppName(self.this,arg0) return val @@ -92,8 +98,10 @@ class wxPyAppPtr(wxEvtHandlerPtr): def SetVendorName(self,arg0): val = wxc.wxPyApp_SetVendorName(self.this,arg0) return val - def AfterMainLoop(self): - val = wxc.wxPyApp_AfterMainLoop(self.this) + def GetStdIcon(self,arg0): + val = wxc.wxPyApp_GetStdIcon(self.this,arg0) + val = wxIconPtr(val) + val.thisown = 1 return val def __repr__(self): return "" @@ -105,10 +113,41 @@ class wxPyApp(wxPyAppPtr): +class __wxPyCleanupPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self, wxc=wxc): + if self.thisown == 1 : + wxc.delete___wxPyCleanup(self.this) + def __repr__(self): + return "" +class __wxPyCleanup(__wxPyCleanupPtr): + def __init__(self) : + self.this = wxc.new___wxPyCleanup() + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ +ptrcast = wxc.ptrcast + +ptrvalue = wxc.ptrvalue + +ptrset = wxc.ptrset + +ptrcreate = wxc.ptrcreate + +ptrfree = wxc.ptrfree + +ptradd = wxc.ptradd + +ptrmap = wxc.ptrmap + _wxStart = wxc._wxStart _wxSetDictionary = wxc._wxSetDictionary @@ -183,6 +222,7 @@ wxPASSWORD = wxc.wxPASSWORD wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_READONLY = wxc.wxTE_READONLY +wxTE_RICH = wxc.wxTE_RICH wxTE_MULTILINE = wxc.wxTE_MULTILINE wxCB_SIMPLE = wxc.wxCB_SIMPLE wxCB_DROPDOWN = wxc.wxCB_DROPDOWN @@ -215,6 +255,8 @@ wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW wxTR_HAS_BUTTONS = wxc.wxTR_HAS_BUTTONS wxTR_EDIT_LABELS = wxc.wxTR_EDIT_LABELS wxTR_LINES_AT_ROOT = wxc.wxTR_LINES_AT_ROOT +wxTR_MULTIPLE = wxc.wxTR_MULTIPLE +wxTR_HAS_VARIABLE_ROW_HEIGHT = wxc.wxTR_HAS_VARIABLE_ROW_HEIGHT wxLC_ICON = wxc.wxLC_ICON wxLC_SMALL_ICON = wxc.wxLC_SMALL_ICON wxLC_LIST = wxc.wxLC_LIST @@ -349,6 +391,8 @@ wxPD_ELAPSED_TIME = wxc.wxPD_ELAPSED_TIME wxPD_ESTIMATED_TIME = wxc.wxPD_ESTIMATED_TIME wxPD_REMAINING_TIME = wxc.wxPD_REMAINING_TIME wxNO_DEFAULT = wxc.wxNO_DEFAULT +wxMENU_TEAROFF = wxc.wxMENU_TEAROFF +wxNO_FULL_REPAINT_ON_RESIZE = wxc.wxNO_FULL_REPAINT_ON_RESIZE wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE wxROMAN = wxc.wxROMAN @@ -624,6 +668,9 @@ wxEVT_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK wxEVT_CHAR = wxc.wxEVT_CHAR +wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN +wxEVT_KEY_UP = wxc.wxEVT_KEY_UP +wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK wxEVT_SCROLL_TOP = wxc.wxEVT_SCROLL_TOP wxEVT_SCROLL_BOTTOM = wxc.wxEVT_SCROLL_BOTTOM wxEVT_SCROLL_LINEUP = wxc.wxEVT_SCROLL_LINEUP @@ -645,8 +692,6 @@ wxEVT_END_SESSION = wxc.wxEVT_END_SESSION wxEVT_QUERY_END_SESSION = wxc.wxEVT_QUERY_END_SESSION wxEVT_ACTIVATE_APP = wxc.wxEVT_ACTIVATE_APP wxEVT_POWER = wxc.wxEVT_POWER -wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK -wxEVT_KEY_UP = wxc.wxEVT_KEY_UP wxEVT_ACTIVATE = wxc.wxEVT_ACTIVATE wxEVT_CREATE = wxc.wxEVT_CREATE wxEVT_DESTROY = wxc.wxEVT_DESTROY @@ -826,6 +871,12 @@ def EVT_CHAR(win, func): def EVT_CHAR_HOOK(win, func): win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) +def EVT_KEY_DOWN(win, func): + win.Connect(-1, -1, wxEVT_KEY_DOWN, func) + +def EVT_KEY_UP(win, func): + win.Connect(-1, -1, wxEVT_KEY_UP, func) + def EVT_MENU_HIGHLIGHT(win, id, func): win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) @@ -1317,6 +1368,38 @@ class wxAcceleratorTable(wxAcceleratorTablePtr): self.this = miscc.new_wxAcceleratorTable(arg0) self.thisown = 1 +#---------------------------------------------------------------------- +# This helper function will take a wxPython object and convert it to +# another wxPython object type. This will not be able to create objects +# user that are derived from wxPython classes, only those that are +# actually part of wxPython and directly corespond to C++ objects. +# +# This is useful in situations where some method returns a generic +# type such as wxWindow, but you know that it is actually some +# derived type such as a wxTextCtrl. You can't call wxTextCtrl specific +# methods on a wxWindow object, but you can use this function to +# create a wxTextCtrl object that will pass the same pointer to +# the C++ code. You use it like this: +# +# textCtrl = wxPyTypeCast(window, "wxTextCtrl") +# +# +# WARNING: Using this function to type cast objects into types that +# they are not is not recommended and is likely to cause your +# program to crash... Hard. +# + +def wxPyTypeCast(obj, typeStr): + if hasattr(obj, "this"): + newPtr = ptrcast(obj.this, typeStr+"_p") + else: + newPtr = ptrcast(obj, typeStr+"_p") + theClass = globals()[typeStr+"Ptr"] + theObj = theClass(newPtr) + theObj.thisown = obj.thisown + return theObj + + #---------------------------------------------------------------------- ## class wxPyStdOutWindow: @@ -1385,3 +1468,10 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- +# DO NOT hold any other references to this object. This is how we know when +# to cleanup system resources that wxWin is holding... +__cleanMeUp = __wxPyCleanup() +#---------------------------------------------------------------------------- + + + diff --git a/utils/wxPython/src/windows.i b/utils/wxPython/src/windows.i index 8e65300fa6..1bb931f518 100644 --- a/utils/wxPython/src/windows.i +++ b/utils/wxPython/src/windows.i @@ -64,10 +64,10 @@ public: %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void CaptureMouse(); - void Center(int direction = wxHORIZONTAL); - void Centre(int direction = wxHORIZONTAL); - void CentreOnParent(int direction = wxHORIZONTAL ); - void CenterOnParent(int direction = wxHORIZONTAL ); + void Center(int direction = wxBOTH); + void Centre(int direction = wxBOTH); + void CentreOnParent(int direction = wxBOTH ); + void CenterOnParent(int direction = wxBOTH ); %name(ClientToScreenXY)void ClientToScreen(int *BOTH, int *BOTH); wxPoint ClientToScreen(const wxPoint& pt); bool Close(int force = FALSE); @@ -110,6 +110,7 @@ public: int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT, const wxFont* font = NULL); //, bool use16 = FALSE) wxString GetTitle(); + wxRegion GetUpdateRegion(); long GetWindowStyleFlag(); bool Hide(); void InitDialog(); @@ -125,9 +126,11 @@ public: void Move(const wxPoint& point); //wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE); - bool PopupMenu(wxMenu *menu, int x, int y); //void PushEventHandler(wxEvtHandler* handler); + %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y); + bool PopupMenu(wxMenu *menu, const wxPoint& pos); + void Raise(); void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL); void ReleaseMouse(); @@ -141,7 +144,6 @@ public: void SetAutoLayout(bool autoLayout); void SetBackgroundColour(const wxColour& colour); void SetConstraints(wxLayoutConstraints *constraints); -// void SetDoubleClick(bool allowDoubleClick); void SetFocus(); void SetFont(const wxFont& font); void SetForegroundColour(const wxColour& colour); @@ -308,7 +310,7 @@ public: class wxMenu : public wxEvtHandler { public: - wxMenu(const wxString& title = wxPyEmptyStr); + wxMenu(const wxString& title = wxPyEmptyStr, long style = 0); void Append(int id, const wxString& item, const wxString& helpString = wxPyEmptyStr, @@ -333,6 +335,7 @@ public: bool IsChecked(int id); bool IsEnabled(int id); void SetLabel(int id, const wxString& label); + void UpdateUI(wxEvtHandler* source = NULL); }; @@ -341,11 +344,11 @@ public: // be used for PopupMenus, but you must retain a referece to it while using // it. // -class wxPyMenu : public wxMenu { -public: - wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL); - ~wxPyMenu(); -}; +// class wxPyMenu : public wxMenu { +// public: +// wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL); +// ~wxPyMenu(); +// }; //---------------------------------------------------------------------- @@ -419,7 +422,53 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.18 1999/07/31 07:54:35 RD +// wxPython 2.1b1: +// +// Added the missing wxWindow.GetUpdateRegion() method. +// +// Made a new change in SWIG (update your patches everybody) that +// provides a fix for global shadow objects that get an exception in +// their __del__ when their extension module has already been deleted. +// It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about +// line 496 if you want to do it by hand. +// +// It is now possible to run through MainLoop more than once in any one +// process. The cleanup that used to happen as MainLoop completed (and +// prevented it from running again) has been delayed until the wxc module +// is being unloaded by Python. +// +// wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added +// wxWindow.PopupMenuXY to be consistent with some other methods. +// +// Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. +// +// You can now provide your own app.MainLoop method. See +// wxPython/demo/demoMainLoop.py for an example and some explaination. +// +// Got the in-place-edit for the wxTreeCtrl fixed and added some demo +// code to show how to use it. +// +// Put the wxIcon constructor back in for GTK as it now has one that +// matches MSW's. +// +// Added wxGrid.GetCells +// +// Added wxSystemSettings static methods as functions with names like +// wxSystemSettings_GetSystemColour. +// +// Removed wxPyMenu since using menu callbacks have been depreciated in +// wxWindows. Use wxMenu and events instead. +// +// Added alternate wxBitmap constructor (for MSW only) as +// wxBitmapFromData(data, type, width, height, depth = 1) +// +// Added a helper function named wxPyTypeCast that can convert shadow +// objects of one type into shadow objects of another type. (Like doing +// a down-cast.) See the implementation in wx.py for some docs. +// // Revision 1.17 1999/06/22 07:03:03 RD +// // wxPython 2.1b1 for wxMSW (wxGTK coming soon) // Lots of changes, see the README.txt for details... // diff --git a/utils/wxPython/src/windows2.i b/utils/wxPython/src/windows2.i index bd63b5136b..fdc11e48a7 100644 --- a/utils/wxPython/src/windows2.i +++ b/utils/wxPython/src/windows2.i @@ -120,7 +120,36 @@ public: %name(GetDefCellAlignment)int GetCellAlignment(); wxColour& GetCellBackgroundColour(int row, int col); %name(GetDefCellBackgroundColour) wxColour& GetCellBackgroundColour(); + //wxGridCell *** GetCells(); + %addmethods { + PyObject* GetCells() { + int row, col; + PyObject* rows = PyList_New(0); + for (row=0; row < self->GetRows(); row++) { + PyObject* rowList = PyList_New(0); + for (col=0; col < self->GetCols(); col++) { + wxGridCell* cell = self->GetCell(row, col); + +#ifdef WXP_WITH_THREAD + PyEval_RestoreThread(wxPyEventThreadState); + wxPyInEvent = true; +#endif + PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell"); +#ifdef WXP_WITH_THREAD + PyEval_SaveThread(); + wxPyInEvent = false; +#endif + + if (PyList_Append(rowList, pyCell) == -1) + return NULL; + } + if (PyList_Append(rows, rowList) == -1) + return NULL; + } + return rows; + } + } wxColour& GetCellTextColour(int row, int col); %name(GetDefCellTextColour)wxColour& GetCellTextColour(); wxFont& GetCellTextFont(int row, int col); @@ -174,6 +203,10 @@ public: void SetRowHeight(int row, int height); void UpdateDimensions(); + + bool GetEditInPlace(); + void SetEditInPlace(int edit = TRUE); + }; diff --git a/utils/wxPython/src/wx.i b/utils/wxPython/src/wx.i index b504eff89c..a2ce9c2082 100644 --- a/utils/wxPython/src/wx.i +++ b/utils/wxPython/src/wx.i @@ -25,6 +25,8 @@ %include my_typemaps.i %include _defs.i +%include pointer.i + %import misc.i %import misc2.i %import windows.i @@ -47,7 +49,7 @@ //--------------------------------------------------------------------------- -#define __version__ "2.1b1" +#define __version__ "2.1b2" wxPoint wxPyDefaultPosition; wxSize wxPyDefaultSize; @@ -64,6 +66,7 @@ public: } } + ~wxPyApp(); wxString GetAppName(); #ifdef __WXMSW__ @@ -80,6 +83,7 @@ public: bool Initialized(); int MainLoop(); bool Pending(); + bool ProcessIdle(); void SetAppName(const wxString& name); #ifdef __WXMSW__ @@ -91,9 +95,31 @@ public: void SetTopWindow(wxWindow* window); void SetVendorName(const wxString& name); - // This one is wxPython specific. If you override MainLoop, - // call this when done. - void AfterMainLoop(); + wxIcon GetStdIcon(int which); + + +}; + + +//---------------------------------------------------------------------- +// An instance of this object is created in the main wx module. As long +// as there are no extra references to it then when the wx module is being +// unloaded from memory then this object's destructor will be called. When +// it is then we'll use that as a signal to clean up wxWindows + +%{ +class __wxPyCleanup { +public: + __wxPyCleanup() { } + ~__wxPyCleanup() { wxApp::CleanUp(); } +}; +%} + +// now to swigify it... +class __wxPyCleanup { +public: + __wxPyCleanup(); + ~__wxPyCleanup(); }; @@ -120,6 +146,7 @@ extern "C" SWIGEXPORT(void,initimagec)(); extern "C" SWIGEXPORT(void,initprintfwc)(); #ifndef SEPARATE extern "C" SWIGEXPORT(void,initutilsc)(); +//extern "C" SWIGEXPORT(void,initoglc)(); extern "C" SWIGEXPORT(void,initglcanvasc)(); #endif %} @@ -130,7 +157,6 @@ extern "C" SWIGEXPORT(void,initglcanvasc)(); __wxPreStart(); // initialize the GUI toolkit, if needed. -// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); // Since these modules are all linked together, initialize them now // because python won't be able to find their shared library files, @@ -152,6 +178,7 @@ extern "C" SWIGEXPORT(void,initglcanvasc)(); initprintfwc(); #ifndef SEPARATE initutilsc(); +// initoglc(); #ifdef WITH_GLCANVAS initglcanvasc(); #endif diff --git a/utils/wxPython/tests/README.txt b/utils/wxPython/tests/README.txt index f480e98ff0..7411213f1f 100644 --- a/utils/wxPython/tests/README.txt +++ b/utils/wxPython/tests/README.txt @@ -3,5 +3,7 @@ The tests in this directory are being depreciated in favor of the demo program found in ../demo. +They are still used from time to time for my development efforts, but +they should not be included with any distributions. Robin \ No newline at end of file diff --git a/utils/wxPython/tests/TstLstIcon.py b/utils/wxPython/tests/TstLstIcon.py new file mode 100644 index 0000000000..915b20e853 --- /dev/null +++ b/utils/wxPython/tests/TstLstIcon.py @@ -0,0 +1,108 @@ +#!/bin/env python +#---------------------------------------------------------------------------- +# Name: TstLstIcon.py +# Purpose: Lest Icon List +# +# Author: Lorne White +# +# Version: 0.8 +# Licence: wxWindows, wxPython license +#---------------------------------------------------------------------------- + +import sys, os +from wxPython.wx import * + +class AppFrame(wxFrame): + def __init__(self, parent, id=-1, title="New"): + wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(420, 320)) + if wxPlatform == '__WXMSW__': + self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO) + self.SetIcon(self.icon) + + self.CreateStatusBar() + + self.mainmenu = wxMenuBar() + menu = wxMenu() + + menu = self.MakeFileMenu() + self.mainmenu.Append(menu, '&File') + + self.SetMenuBar(self.mainmenu) + + self.il = wxImageList(32, 32) + self.idx1 = idx1 = self.il.Add(wxNoRefBitmap('table.bmp', wxBITMAP_TYPE_BMP)) + self.idx2 = idx2 = self.il.Add(wxNoRefBitmap('query.bmp', wxBITMAP_TYPE_BMP)) + + self.nb = nb = wxNotebook(self, -1) + + self.list = wxListCtrl(nb, 1100, wxDefaultPosition, wxDefaultSize) + + nb.AddPage(self.list, "Tables") + + self.list.SetSingleStyle(wxLC_ICON) + self.list.SetWindowStyleFlag(wxSTATIC_BORDER|wxVSCROLL) + self.list.SetImageList(self.il, wxIMAGE_LIST_NORMAL) + + self.qlist = wxListCtrl(nb, 1200, wxDefaultPosition, wxDefaultSize) + nb.AddPage(self.qlist, "Queries") + + self.qlist.SetSingleStyle(wxLC_ICON) + self.qlist.SetWindowStyleFlag(wxSTATIC_BORDER|wxVSCROLL) + self.qlist.SetImageList(self.il, wxIMAGE_LIST_NORMAL) + + self.UpdateView2() + self.UpdateView1() + + self.nb.SetSelection(1) + self.nb.SetSelection(0) + #self.nb.Refresh() + #self.nb.ResizeChildren() + + def MakeFileMenu(self): + self.fl_mn = menu = wxMenu() + + mID = NewId() + menu.Append(mID, 'E&xit', 'Exit') + EVT_MENU(self, mID, self.OnFileExit) + + return menu + + + def UpdateView1(self): + vset = "ViewA " + for i in range(20): + self.list.InsertImageStringItem(i, vset + str(i), self.idx1) + + def UpdateView2(self): + vset = "ViewB " + for i in range(5): + self.qlist.InsertImageStringItem(i, vset + str(i), self.idx2) + + def OnFileExit(self, event): + self.Close() + +#--------------------------------------------------------------------------- + + +class MyApp(wxApp): + def OnInit(self): + frame = AppFrame(NULL, -1, "Demo") + frame.Show(true) + self.SetTopWindow(frame) + return true + +#--------------------------------------------------------------------------- + + +def main(): + app = MyApp(0) + app.MainLoop() + + +def t(): + import pdb + pdb.run('main()') + + +if __name__ == '__main__': + main() diff --git a/utils/wxPython/tests/atom.bmp b/utils/wxPython/tests/atom.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d85435104d3f95e67510ba6ac033427d9d88fa50 GIT binary patch literal 630 zcmZuuF;2ul3^WLdEA9nUS5or?gapMRQPAEuE-8pM-8DRFi%8c*h-RfL@DEO+bVFEX zyaA=a*-h3vW5*ufKJLy%Hga{d6On7|&AiX#0w);o|E(9nlD@AWym6G2621hAFDZp5 zY&^W8@7BQTiSL|OEiU4GGi|p|`@Q{LsDcn&rQWaa^N;hV?_g z=V5f%&~v1I>op{XgZ`-(1+M)U=tcc70CF*cSwB|lGn!mK%HVJ*)bG;uuLGM@-@SE4 O(-iPxp16TG&-({tSAQ%3 literal 0 HcmV?d00001 diff --git a/utils/wxPython/tests/getvalues.py b/utils/wxPython/tests/getvalues.py new file mode 100644 index 0000000000..562a3179e0 --- /dev/null +++ b/utils/wxPython/tests/getvalues.py @@ -0,0 +1,48 @@ +from wxPython.wx import * + +class MyDlg(wxDialog): + def __init__(self, parent): + wxDialog.__init__(self, parent, -1, "This is a test", + wxDefaultPosition, wxSize(150, 150)) + + self.text1 = wxTextCtrl(self, -1, "", wxPoint(10, 10), wxSize(120, -1)) + self.text2 = wxTextCtrl(self, -1, "", wxPoint(10, 40), wxSize(120, -1)) + + wxButton(self, wxID_OK, "Okay", wxPoint(10,70)).SetDefault() + wxButton(self, wxID_CANCEL, "Cancel", wxPoint(60, 70)) + + + def GetValues(self): + val1 = self.text1.GetValue() + val2 = self.text2.GetValue() + return (val1, val2) + + + + +class MyApp(wxApp): + def OnInit(self): + + frame = wxFrame(NULL, -1, "") + wxButton(frame, 101, "test it", wxDefaultPosition, wxSize(50, 25)) + EVT_BUTTON(frame, 101, self.OnClick) + frame.Fit() + frame.Show(true) + + self.SetTopWindow(frame) + return true + + def OnClick(self, event): + dlg = MyDlg(NULL) + if dlg.ShowModal() == wxID_OK: + values = dlg.GetValues() + print "Your values are: %s" % str(values) + else: + print "You canceled!" + + dlg.Destroy() + + + +app = MyApp(0) +app.MainLoop() diff --git a/utils/wxPython/tests/info.bmp b/utils/wxPython/tests/info.bmp new file mode 100644 index 0000000000000000000000000000000000000000..709cd923361c94d42f4a4d040908eb961bcb6a07 GIT binary patch literal 370 zcmZ9HJqp4=5QRq&l2QvVU}f(GL7pgEmec{e_wAOnqyLKfk=l)A3zgt#RHBQ}>=6g0IR z5)X4pO5k`Q7OJBJINt#xA5!dRfT5~@`KM~`p`&u$#g3+@q(EhH number of list entries +# ostart - line number of the top line of the previous redraw +# vw - width of the viewing window +# vh - height of the viewing window +# smalltext - 0 = size 12pt, 1 = size 9pt text +# +# Method members: +# OnPaint(evt) - basic draw handler +# OnDraw(dc) - called by OnPaint, redraws the screen if required +# update(updatelist) - called every 3 seconds if updates are needed. + +class MyWindow(wxScrolledWindow): + def __init__(self,num,parent,id,pos,size,style): + wxScrolledWindow.__init__(self,parent,id,pos,size,style) + self.SetBackgroundColour(wxWHITE) + + self.num=num + self.ostart=0 + self.smalltext = 0 + self.vw,self.vh=self.GetClientSizeTuple() + + # calculate font pt size needed: a bit of a kludge to get round + # font compatibility problems of X and Windows. + dc=wxClientDC(self) + + dc.SetFont(wxFont(12,wxDEFAULT,wxNORMAL,wxNORMAL,FALSE)) + if dc.GetTextExtent("XXXXXXXXXX")[0] > 100: + self.smalltext = 1 + + def OnPaint(self,evt): + """ overriding OnPaint to give handler. """ + dc = wxPaintDC(self) + self.PrepareDC(dc) + self.OnDraw(dc) + + def update(self,updlist): + """ handles line by line updating of list entries. """ + dc = wxClientDC(self) + self.PrepareDC(dc) + dc.SetBrush(wxWHITE_BRUSH) + dc.SetPen(wxWHITE_PEN) + + if self.smalltext == 1: + dc.SetFont(wxFont(9,wxDEFAULT,wxNORMAL,wxNORMAL,FALSE)) + else: + dc.SetFont(wxFont(12,wxDEFAULT,wxNORMAL,wxNORMAL,FALSE)) + + dc.BeginDrawing() + + for i in updlist: + if i >= self.ostart and i < self.ostart+self.vh/17+1: + dc.DrawRectangle(0,i*17,self.vw,17) + dc.DrawText("This is a simple test.Line "+str(i)+".", + 10,i*17+2) + dc.EndDrawing() + + def OnDraw(self,dc): + """ Main redraw function. """ + + if self.smalltext == 1: + dc.SetFont(wxFont(9,wxDEFAULT,wxNORMAL,wxNORMAL,FALSE)) + else: + dc.SetFont(wxFont(12,wxDEFAULT,wxNORMAL,wxNORMAL,FALSE)) + + vx,vstart=self.ViewStart() + self.vw,self.vh=self.GetClientSizeTuple() + vend=vstart+(self.vh/17) + 1 + if vend > self.num: vend = self.num + + dc.BeginDrawing() + if vstart > self.ostart: # if moving downwards... + for i in range(vend-(vstart-self.ostart+1),vend): + dc.DrawText("This is a simple test. Line "+str(i)+".", + 10,i*17+2) + + elif vstart < self.ostart: # if moving upwards... + for i in range(vstart,self.ostart): + dc.DrawText("This is a simple test. Line "+str(i)+".", + 10,i*17+2) + + elif vstart == self.ostart: # if not moving (redraw)... + #dc.Clear() + for i in range(vstart,vend): + dc.DrawText("This is a simple test. Line "+str(i)+".", + 10,i*17+2) + + dc.EndDrawing() + self.ostart=vstart + +#-------------------------------------------------------------------- + +class MyTimer(wxTimer): + def __init__(self,frame): + wxTimer.__init__(self) + self.frame_ = frame + + def Notify(self): + self.frame_.idle() + + +class MyFrame(wxFrame): + def __init__(self, parent, id, title): + wxFrame.__init__(self, parent, id, title, + wxPoint(100, 100), wxSize(500, 300)) + + # number of entries + self.num = 30 + + # set up the scrolling window... + self.sw = MyWindow(self.num,self, -1, + wxDefaultPosition, wxDefaultSize, + wxVSCROLL|wxSUNKEN_BORDER) + + self.sw.SetScrollbars(1,17,0,self.num+1) + + lc = wxLayoutConstraints() + lc.top.SameAs(self, wxTop, 5) + lc.left.SameAs(self, wxLeft, 5) + lc.bottom.SameAs(self, wxBottom, 5) + lc.right.SameAs(self, wxRight,5) + self.sw.SetConstraints(lc) + + self.timer=MyTimer(self) + # stupidly short interval time to accelerate memory leak problem: + self.timer.Start(80) + + def idle(self): + #usually just update one or two lines; to accelerate problem, + #every line is updated here. + self.sw.update(range(self.num)) + + +###################################################################### +# Main procedure.... + +if __name__ == "__main__": + class MyApp(wxApp): + def OnInit(self): + + self.frame = MyFrame(NULL, -1, "Memory Leak Tester") + self.frame.Show(true) + + self.exiting = FALSE; + return true + + app = MyApp(0) # Create an instance of the application class + app.MainLoop() # Tell it to start processing events + diff --git a/utils/wxPython/tests/paul.py b/utils/wxPython/tests/paul.py new file mode 100644 index 0000000000..0341e7eb7d --- /dev/null +++ b/utils/wxPython/tests/paul.py @@ -0,0 +1,28 @@ +from wxPython.wx import * + + +class MyFrame(wxFrame): + def __init__(self, parent, id, title='A pxFrame!'): + wxFrame.__init__(self, parent, id, title, + wxPyDefaultPosition, wxSize(50, 50)) + + def get_filename(self): + dlg = wxFileDialog(self, "Choose a file", ".", "", "*.*", wxOPEN) + dlg.ShowModal() + self.file = dlg.GetPath() + dlg.Destroy() + self.Iconize(true) + return self.file + + +class FilePicker(wxApp): + def OnInit(self): + return true + + def get_filename(self): + dlg = wxFileDialog(NULL, "Choose a file", ".", "", "*.*", wxOPEN) + dlg.ShowModal() + self.file = dlg.GetPath() + dlg.Destroy() + return self.file + diff --git a/utils/wxPython/tests/paul.pyc b/utils/wxPython/tests/paul.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d5b68375dcab2113638b87afc62ed1b3c09e4e15 GIT binary patch literal 1091 zcma)5O>fgc5PfSqNfW9THBjIH3OB2V9^k+kHGq0(8j%y}A+qdEvZ}G8>{dxo&>qr1 z!B5~{GBZ}21aTm-NBc1|`}V!(U%l4voA)15&@ZCbUQqD#DBJ?Mg7OhEKnEBrWD57d z2KY7%;ZKkS(2;C}j~g{)5e9LMn>8q0tv=6_?^;d>5Wsf$gb1Dz1L>$Rq?INzX);v! zI*1udFO3LO6Cvz7uBpM-;Q*ts2G$e!I}+-PL^IIHuqt&L;UNr}BO>9{6W0}`65E_|+o}jsymZjC5 zq%$@|h@$m#O93{daCUwcGh};6foP_bu1WH8vd_q3dENiilZq^#*d`?prsd+Q%#vIb z`l4MwaZ{<1bC|2Hwr*aoB;hhG3u0Rm-26_9&f7y63wPe7m?2HH8*#sa?AWYOhU$%K zsS|pis;bMLE&i^GsY~Ue2kCYk9z7^`90^x^|Gr6Y^*rS=R?ohs0ev^VEyjl!|CGhM zr?D8H!S_gN{*%;4T+oJp#!^>mFzdaTA*rt`9_gX8+S?xN^ftJQnX<_ z%Gc$Fq@~=k{{ilTb4~-v*Jk@|72^|Ng4{e&klr^5=Tu`?)(be&QDMrnVFJ y9+l6z9dxcwj1JYQ#E z#`XRJaATiaKjFfNjsACA0Nz-ZI`GL5+qQ9($mK@Pir9GxDeuigkILv1M&KdY0DRha z`vTgO%&b+&%D24O!52Gt6_54*;r&>DS>I{|_5ZX!w@6TP`SmR@_(;$;xA-VfcevDp rplw(61nmIm-8`b_A+36OY}50kj}!FsLQr~W9;!f}tyu(PD$t8R&mwid literal 0 HcmV?d00001 diff --git a/utils/wxPython/tests/tabs.py b/utils/wxPython/tests/tabs.py new file mode 100644 index 0000000000..1af9a13cfb --- /dev/null +++ b/utils/wxPython/tests/tabs.py @@ -0,0 +1,38 @@ +from wxPython.wx import * +import string, sys + +class Test: + def __init__(self): + self.panel = wxPanel(frame, -1) + self.box = wxListBox(self.panel, 100, wxPoint(10,10), + wxSize(300,100), [], wxLB_SINGLE|wxLB_SORT) + self.text = wxTextCtrl(self.panel, 110,'', wxPoint(310,10), + wxSize(300,100),wxTE_MULTILINE|wxTE_READONLY) + self.FillList() + + def FillList(self): + line = 'This is a test' + self.box.Append(line) + self.text.AppendText(line) + + def OnCloseWindow(self, event): + self.panel.Close(true) + +class MyApp(wxApp): + def OnInit(self): + global frame + frame = wxFrame(NULL,-1,'Main',wxDefaultPosition,wxSize(630,150)) + test = Test() + frame.Show(true) + self.SetTopWindow(frame) + return true + + def OnCloseWindow(self, event): + self.Destroy() + +if __name__ == '__main__': + app = MyApp(0) + app.MainLoop() + + + diff --git a/utils/wxPython/tests/test1.py b/utils/wxPython/tests/test1.py index 16b35fdca8..a3d1c1e1b7 100644 --- a/utils/wxPython/tests/test1.py +++ b/utils/wxPython/tests/test1.py @@ -12,16 +12,7 @@ #---------------------------------------------------------------------------- -<<<<<<< test1.py -<<<<<<< test1.py -#from wxPython import * -from wxpc import * -======= -======= -## import all of the wxPython GUI package ->>>>>>> 1.4 from wxPython.wx import * ->>>>>>> 1.3 #--------------------------------------------------------------------------- @@ -62,10 +53,7 @@ class MyFrame(wxFrame): #--------------------------------------------------------------------------- -<<<<<<< test1.py -======= # Every wxWindows application must have a class derived from wxApp ->>>>>>> 1.4 class MyApp(wxApp): # wxWindows calls this method to initialize the application @@ -83,67 +71,13 @@ class MyApp(wxApp): #--------------------------------------------------------------------------- -<<<<<<< test1.py -def main(): - app = MyApp(0) - app.MainLoop() - - -def t(): - import pdb - pdb.run('main()') -======= ->>>>>>> 1.4 - -<<<<<<< test1.py -if __name__ == '__main__': - main() -======= app = MyApp(0) # Create an instance of the application class app.MainLoop() # Tell it to start processing events ->>>>>>> 1.4 print 'done!' #---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.6 1999/06/28 21:39:48 VZ -# 1. wxStaticLine implemented (generic (ugly) and MSW versions) -# 2. wxTextDialog looks fine under MSW again -# 3. startup tips added: code, sample, docs -# 4. read-only text controls don't participate in TAB traversal -# -# Revision 1.3 1998/12/15 20:44:34 RD -# 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, (untested.) -# -# Changed many of the args and return values that were pointers to gdi -# objects to references to reflect changes in the wxWindows API. -# -<<<<<<< test1.py -# Other assorted fixes and additions. -# -# Revision 1.2 1998/10/02 06:42:27 RD -# -# Version 0.4 of wxPython for MSW. -# -# Revision 1.1 1998/08/09 08:28:05 RD -# Initial version -# -# -======= ->>>>>>> 1.4 + diff --git a/utils/wxPython/tests/thtest.py b/utils/wxPython/tests/thtest.py new file mode 100644 index 0000000000..dccbf0e35a --- /dev/null +++ b/utils/wxPython/tests/thtest.py @@ -0,0 +1,29 @@ + +from wxPython.wx import * + +class someData: + def __init__(self, data="spam"): + self.data = data + +class errApp(wxApp): + def OnInit(self): + frame = wxFrame(NULL, -1, "Close to get an error", wxDefaultPosition, + wxSize(200,200)) + + tree = wxTreeCtrl(frame, -1, wxDefaultPosition, wxDefaultSize) + + root = tree.AddRoot("Spam") + tree.SetPyData(root, someData()) + #tree.SetPyData(root, "A string") + #tree.SetPyData(root, ["a list", "A string"]) + + frame.Show(true) + self.SetTopWindow(frame) + self.frame = frame + return true + + +app = errApp(0) +app.MainLoop() +print "got to the end" + diff --git a/utils/wxPython/tests/txml.py b/utils/wxPython/tests/txml.py new file mode 100644 index 0000000000..9c87e276dc --- /dev/null +++ b/utils/wxPython/tests/txml.py @@ -0,0 +1,87 @@ +""" +Build a GUI Tree (wxWindows) from an XML file +using pyExpat +""" + +import sys,string +from xml.parsers import pyexpat + +from wxPython.wx import * + +class MyFrame(wxFrame): + def __init__(self, parent, id, title): + wxFrame.__init__(self, parent, id, title, wxPoint(100, 100), wxSize(160,100)) + menu = wxMenu() + menu.Append (1001,"Open") + menu.Append (1002,"Close") + menu.Append (1003,"Exit") + menubar = wxMenuBar() + menubar.Append (menu,"File") + self.SetMenuBar(menubar) + +class MyApp(wxApp): + def OnInit(self): + self.frame = MyFrame(NULL, -1, "Tree View of XML") + self.tree = wx.wxTreeCtrl(self.frame, -1) + EVT_MENU(self, 1001, self.OnOpen) + EVT_MENU(self, 1002, self.OnClose) + EVT_MENU(self, 1003, self.OnExit) + self.frame.Show(true) + self.SetTopWindow(self.frame) + return true + + def OnOpen(self,event): + f = wxFileDialog(self.frame,"Select a file",".","","*.xml",wxOPEN) + if f.ShowModal() == wxID_OK: + LoadTree(f.GetPath()) + + def OnClose(self,event): + self.tree = wx.wxTreeCtrl(self.frame, -1) + pass + + def OnExit(self,event): + self.OnCloseWindow(event) + + def OnCloseWindow(self, event): + self.frame.Destroy() + + +NodeStack = [] + +# Define a handler for start element events +def StartElement( name, attrs ): + global NodeStack + NodeStack.append(app.tree.AppendItem(NodeStack[-1],name)) + +def EndElement( name ): + global NodeStack + NodeStack = NodeStack[:-1] + +def CharacterData ( data ): + global NodeStack + if string.strip(data): + app.tree.AppendItem(NodeStack[-1],data) + + +def LoadTree (f): + print f + # Create a parser + Parser = pyexpat.ParserCreate() + + # Tell the parser what the start element handler is + Parser.StartElementHandler = StartElement + Parser.EndElementHandler = EndElement + Parser.CharacterDataHandler = CharacterData + + # Parse the XML File + ParserStatus = Parser.Parse(open(f,'r').read(), 1) + if ParserStatus == 0: + print "oops!" + raise SystemExit + +app = MyApp(0) +NodeStack = [app.tree.AddRoot("Root")] + + +app.MainLoop() +raise SystemExit diff --git a/utils/wxPython/tests/zigron.py b/utils/wxPython/tests/zigron.py new file mode 100644 index 0000000000..7a6c89d380 --- /dev/null +++ b/utils/wxPython/tests/zigron.py @@ -0,0 +1,75 @@ +#!/bin/env python +#---------------------------------------------------------------------------- +## import all of the wxPython GUI package +from wxPython.wx import * + + +#--------------------------------------------------------------------------- +class GeneralTab(wxWindow): + def __init__(self,parent,id): + wxWindow.__init__(self,parent,id,wxPoint(5,25)) + self.Opts = {} + hdr = wxStaticText(self,-1,"This space left intentionally blank.",wxPoint(5,10)) + def GetOpts(self): + return self.Opts + +class ServersTab(wxWindow): + def __init__(self,parent,id): + wxWindow.__init__(self,parent,id,wxPoint(5,25)) + hdr = wxStaticText(self,-1,"This is also blank on purpose.",wxPoint(5,10)) + self.Opts = {} + def GetOpts(self): + return self.Opts + +class OptionsTab(wxWindow): + def __init__(self,parent,id): + wxWindow.__init__(self,parent,id,wxPoint(5,25)) + hdr = wxStaticText(self,-1,"Quit bugging me!.",wxPoint(5,10)) + self.Opts = {} + def GetOpts(self): + return self.Opts + +class SettingsWindow(wxFrame): + NOTEBOOK = 3201 + GENERAL_TAB = 3210 + OPTIONS_TAB = 3211 + SERVERS_TAB = 3212 + + def __init__(self,parent,id): + self.id = id + self.parent = parent + wxFrame.__init__(self,parent,id,'Pyces Settings', + wxPoint(50,50), wxSize(350,475), + wxDIALOG_MODAL|wxSTATIC_BORDER|wxCAPTION|wxSYSTEM_MENU) + nb = wxNotebook(self, self.NOTEBOOK) + self.GeneralTab = GeneralTab(self,-1) + self.OptionsTab = OptionsTab(self,-1) + self.ServersTab = ServersTab(self,-1) + nb.AddPage(self.GeneralTab,'General') + nb.AddPage(self.OptionsTab,'Options') + nb.AddPage(self.ServersTab,'Servers') + nb.SetSelection(0) + nb.SetSize(wxSize(350,420)) + + + +#--------------------------------------------------------------------------- + +class MyApp(wxApp): + def OnInit(self): + frame = SettingsWindow(NULL, -1) + #frame.ShowModal() + #return false + frame.Show(true) + self.SetTopWindow(frame) + return true + +#--------------------------------------------------------------------------- + + +app = MyApp(0) # Create an instance of the application class +app.MainLoop() # Tell it to start processing events + +#---------------------------------------------------------------------------- +# + -- 2.45.2