diff --git a/utils/wxPython/README.txt b/utils/wxPython/README.txt index 4e173e1ef2..6ab54cdad1 100644 --- a/utils/wxPython/README.txt +++ b/utils/wxPython/README.txt @@ -42,6 +42,28 @@ application will cause problems. However there is a plan to support this in the future. +What's new in 0.5.0 +------------------- +Changed the import semantics from "from wxPython import *" to "from +wxPython.wx import *" This is for people who are worried about +namespace pollution, they can use "from wxPython import wx" and then +prefix all the wxPython identifiers with "wx." + +Added wxTaskbarIcon for wxMSW. + +Made the events work for wxGrid. + +Added wxConfig. + +Added wxMiniFrame for wxGTK, (untested.) + +Changed many of the args and return values that were pointers to gdi +objects to references to reflect changes in the wxWindows API. + +Other assorted fixes and additions. + + + What's new in 0.4.2 ------------------- diff --git a/utils/wxPython/src/Makefile.pre.in b/utils/wxPython/src/Makefile.pre.in index 0d9dd43de5..273d32820f 100644 --- a/utils/wxPython/src/Makefile.pre.in +++ b/utils/wxPython/src/Makefile.pre.in @@ -334,6 +334,7 @@ PYMODULES = $(GENCODEDIR)/wxp.py $(GENCODEDIR)/events.py \ $(GENCODEDIR)/controls.py $(GENCODEDIR)/controls2.py \ $(GENCODEDIR)/windows2.py $(GENCODEDIR)/cmndlgs.py \ $(GENCODEDIR)/frames.py $(GENCODEDIR)/stattool.py \ + $(GENCODEDIR)/utils.py \ __init__.py @@ -346,8 +347,8 @@ $(GENCODEDIR)/%.py : %.i # This one must leave out the -c flag so we define the whole rule -$(GENCODEDIR)/wxp.cpp $(GENCODEDIR)/wxp.py : wxp.i my_typemaps.i _defs.i _extras.py - swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i +$(GENCODEDIR)/wx.cpp $(GENCODEDIR)/wx.py : wx.i my_typemaps.i _defs.i _extras.py + swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i # define some dependencies @@ -362,6 +363,7 @@ $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemap $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i +$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i $(GENCODEDIR)/helpers.cpp: ln -s `pwd`/helpers.cpp $@ diff --git a/utils/wxPython/src/__init__.py b/utils/wxPython/src/__init__.py index c4dd7e571a..8967f75e0a 100644 --- a/utils/wxPython/src/__init__.py +++ b/utils/wxPython/src/__init__.py @@ -1,9 +1,7 @@ #---------------------------------------------------------------------------- # Name: __init__.py -# Purpose: The presence of this file turs this directory into a -# Python package. For simplicity, we import all of the -# wxPython package at this point, so users only need to -# import the package. +# Purpose: The presence of this file turns this directory into a +# Python package. # # Author: Robin Dunn # @@ -13,14 +11,29 @@ # Licence: wxWindows license #---------------------------------------------------------------------------- -from wxp import * - -import wxp -__version__ = wxp.__version__ #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.3 1998/12/15 20:41:12 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. +# +# Other assorted fixes and additions. +# # Revision 1.2 1998/10/07 07:34:32 RD # Version 0.4.1 for wxGTK # diff --git a/utils/wxPython/src/_defs.i b/utils/wxPython/src/_defs.i index 79884f13cf..1db1acc6ad 100644 --- a/utils/wxPython/src/_defs.i +++ b/utils/wxPython/src/_defs.i @@ -152,6 +152,9 @@ enum { wxDIALOG_MODELESS, wxDEFAULT_FRAME_STYLE, wxDEFAULT_DIALOG_STYLE, + + wxFRAME_TOOL_WINDOW, + wxRETAINED, wxBACKINGSTORE, wxTB_3DBUTTONS, @@ -333,7 +336,6 @@ enum { wxACCEL_ALT, wxACCEL_CTRL, wxACCEL_SHIFT, - }; @@ -699,6 +701,25 @@ enum wxEventType { ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.9 1998/12/15 20:41:13 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. +// +// Other assorted fixes and additions. +// // Revision 1.8 1998/11/15 23:03:42 RD // Removing some ifdef's for wxGTK // diff --git a/utils/wxPython/src/cmndlgs.i b/utils/wxPython/src/cmndlgs.i index 3ec7bd1ece..f4942a4ffb 100644 --- a/utils/wxPython/src/cmndlgs.i +++ b/utils/wxPython/src/cmndlgs.i @@ -31,6 +31,7 @@ %import gdi.i %import windows.i +%pragma(python) code = "import wx" //---------------------------------------------------------------------- @@ -52,7 +53,7 @@ class wxColourDialog : public wxDialog { public: wxColourDialog(wxWindow* parent, wxColourData* data = NULL); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" #ifdef __WXMSW__ wxColourData& GetColourData(); @@ -74,7 +75,7 @@ public: long style = 0, const wxPoint& pos = wxPyDefaultPosition); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" wxString GetPath(); wxString GetMessage(); @@ -97,7 +98,7 @@ public: long style = 0, const wxPoint& pos = wxPyDefaultPosition); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" wxString GetDirectory(); wxString GetFilename(); @@ -140,7 +141,7 @@ public: } } - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" int GetSelection(); wxString GetStringSelection(); @@ -160,7 +161,7 @@ public: long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxPyDefaultPosition); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" wxString GetValue(); void SetValue(const wxString& value); @@ -194,7 +195,7 @@ class wxFontDialog : public wxDialog { public: wxFontDialog(wxWindow* parent, wxFontData* data = NULL); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" wxFontData& GetFontData(); int ShowModal(); @@ -241,7 +242,7 @@ class wxPageSetupDialog : public wxDialog { public: wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" wxPageSetupData& GetPageSetupData(); int ShowModal(); @@ -282,7 +283,7 @@ class wxPrintDialog : public wxDialog { public: wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" wxPrintData& GetPrintData(); %new wxDC* GetPrintDC(); @@ -299,7 +300,7 @@ public: long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxPyDefaultPosition); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" int ShowModal(); }; @@ -310,7 +311,27 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.7 1998/12/15 20:41:14 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. +// +// Other assorted fixes and additions. +// // Revision 1.6 1998/11/25 08:45:22 RD +// // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon // Added events for wxGrid // Other various fixes and additions diff --git a/utils/wxPython/src/controls.i b/utils/wxPython/src/controls.i index 27401be2c6..7279b5dc3c 100644 --- a/utils/wxPython/src/controls.i +++ b/utils/wxPython/src/controls.i @@ -36,7 +36,7 @@ %import gdi.i %import events.i -%pragma(python) code = "import wxp" +%pragma(python) code = "import wx" //---------------------------------------------------------------------- @@ -64,7 +64,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "button"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void SetDefault(); }; @@ -80,7 +80,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "button"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" wxBitmap& GetBitmapLabel(); #ifdef __WXMSW__ @@ -106,7 +106,7 @@ public: const wxValidator& val = wxPyDefaultValidator, char* name = "checkBox"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" bool GetValue(); void SetValue(const bool state); @@ -124,7 +124,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "choice"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void Append(const wxString& item); void Clear(); @@ -151,7 +151,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "comboBox"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void Append(const wxString& item); // TODO: void Append(const wxString& item, char* clientData); @@ -191,7 +191,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "gauge"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" int GetBezelFace(); int GetRange(); @@ -225,7 +225,7 @@ public: long style = 0, char* name = "staticText"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" wxString GetLabel(); void SetLabel(const wxString& label); @@ -243,7 +243,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "listBox"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void Append(const wxString& item); // TODO: void Append(const wxString& item, char* clientData); @@ -282,7 +282,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "listBox"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" bool IsChecked(int uiIndex); void Check(int uiIndex, bool bCheck = TRUE); @@ -302,7 +302,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "text"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void Clear(); void Copy(); @@ -342,13 +342,13 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "scrollBar"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" int GetRange(); int GetPageSize(); - int GetPosition(); + int GetThumbPosition(); int GetThumbSize(); - void SetPosition(int viewStart); + void SetThumbPosition(int viewStart); void SetScrollbar(int position, int thumbSize, int range, int pageSize, bool refresh = TRUE); @@ -382,7 +382,7 @@ public: long style = 0, char* name = "staticBitmap"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" wxBitmap& GetBitmap(); void SetBitmap(const wxBitmap& bitmap); @@ -402,7 +402,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "radioBox"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" %name(EnableBox)void Enable(bool enable); void Enable(int n, bool enable); @@ -435,7 +435,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "radioButton"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" bool GetValue(); void SetValue(bool value); @@ -453,7 +453,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "slider"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void ClearSel(); void ClearTicks(); @@ -483,6 +483,25 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.8 1998/12/15 20:41:15 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. +// +// Other assorted fixes and additions. +// // Revision 1.7 1998/11/16 00:00:53 RD // Generic treectrl for wxPython/GTK compiles... // diff --git a/utils/wxPython/src/controls2.i b/utils/wxPython/src/controls2.i index 62a0203f29..2996269eab 100644 --- a/utils/wxPython/src/controls2.i +++ b/utils/wxPython/src/controls2.i @@ -31,7 +31,7 @@ %import events.i %import controls.i -%pragma(python) code = "import wxp" +%pragma(python) code = "import wx" //---------------------------------------------------------------------- @@ -84,7 +84,7 @@ public: const wxValidator& validator = wxPyDefaultValidator, char* name = "listCtrl"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); bool DeleteItem(long item); @@ -238,7 +238,7 @@ public: //const wxValidator& validator = wxPyDefaultValidator, char* name = "wxTreeCtrl"); #endif - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" size_t GetCount(); unsigned int GetIndent(); @@ -316,6 +316,9 @@ public: // **** And this too // wxTreeItemCmpFunc *cmpFunction = NULL); + void SetItemBold(const wxTreeItemId& item, bool bold = TRUE); + bool IsBold(const wxTreeItemId& item) const; + wxTreeItemId HitTest(const wxPoint& point); }; @@ -337,7 +340,7 @@ public: long style = 0, char* name = "tabCtrl"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" bool DeleteAllItems(); bool DeleteItem(int item); @@ -379,7 +382,27 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.11 1998/12/15 20:41:16 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. +// +// Other assorted fixes and additions. +// // Revision 1.10 1998/11/25 08:45:23 RD +// // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon // Added events for wxGrid // Other various fixes and additions diff --git a/utils/wxPython/src/events.i b/utils/wxPython/src/events.i index c3f8e0039a..870807cf61 100644 --- a/utils/wxPython/src/events.i +++ b/utils/wxPython/src/events.i @@ -54,11 +54,14 @@ public: class wxCloseEvent : public wxEvent { public: -// ??? it's in the docs ??? bool GetSessionEnding(); + bool CanVeto(); +// **** bool GetSessionEnding(); bool GetLoggingOff(); void Veto(bool veto = TRUE); bool GetVeto(); void SetForce(bool force); + void SetCanVeto(bool canVeto); + void SetLoggingOff(bool loggingOff); bool GetForce(); }; @@ -297,6 +300,25 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.5 1998/12/15 20:41:17 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. +// +// Other assorted fixes and additions. +// // Revision 1.4 1998/11/16 00:00:55 RD // Generic treectrl for wxPython/GTK compiles... // diff --git a/utils/wxPython/src/frames.i b/utils/wxPython/src/frames.i index 8fa8ee5416..5d55dbdcea 100644 --- a/utils/wxPython/src/frames.i +++ b/utils/wxPython/src/frames.i @@ -33,7 +33,7 @@ %import windows.i %import stattool.i -%pragma(python) code = "import wxp" +%pragma(python) code = "import wx" //---------------------------------------------------------------------- @@ -45,7 +45,7 @@ public: long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); - %pragma(python) addtomethod = "__init__:wxp._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" void Centre(int direction = wxBOTH); #ifdef __WXMSW__ @@ -55,7 +55,7 @@ public: long style = wxST_SIZEGRIP, wxWindowID id = -1, char* name = "statusBar"); - wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, + wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT, wxWindowID id = -1, char* name = "toolBar"); @@ -79,7 +79,6 @@ public: //--------------------------------------------------------------------------- -#ifdef __WXMSW__ class wxMiniFrame : public wxFrame { public: wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title, @@ -88,7 +87,36 @@ public: long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); - %pragma(python) addtomethod = "__init__:wxp._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" }; -#endif + + +//--------------------------------------------------------------------------- +///////////////////////////////////////////////////////////////////////////// +// +// $Log$ +// Revision 1.3 1998/12/15 20:41:18 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. +// +// Other assorted fixes and additions. +// + + + + + diff --git a/utils/wxPython/src/gdi.i b/utils/wxPython/src/gdi.i index f4166abfb6..6bc2672b72 100644 --- a/utils/wxPython/src/gdi.i +++ b/utils/wxPython/src/gdi.i @@ -49,7 +49,7 @@ public: void SetHeight(int height); void SetMask(wxMask* mask); #ifdef __WXMSW__ - void SetPalette(wxPalette* palette); + void SetPalette(wxPalette& palette); #endif void SetWidth(int width); }; @@ -220,7 +220,7 @@ public: void SetColour(wxColour& colour); #ifdef __WXMSW__ void SetDashes(int LCOUNT, wxDash* LIST); - void SetStipple(wxBitmap * stipple); + void SetStipple(wxBitmap& stipple); #endif void SetJoin(int join_style); void SetStyle(int style); @@ -246,7 +246,7 @@ public: bool Ok(); #ifdef __WXMSW__ void SetColour(wxColour &colour); - void SetStipple(wxBitmap *bitmap); + void SetStipple(wxBitmap& bitmap); void SetStyle(int style); #endif }; @@ -292,17 +292,17 @@ public: #ifdef __WXGTK__ void FloodFill(long x, long y, wxColour* colour, int style=wxFLOOD_SURFACE); #endif - wxBrush * GetBackground(); - wxBrush * GetBrush(); + wxBrush& GetBackground(); + wxBrush& GetBrush(); long GetCharHeight(); long GetCharWidth(); void GetClippingBox(long *OUTPUT, long *OUTPUT, long *OUTPUT, long *OUTPUT); - wxFont * GetFont(); + wxFont& GetFont(); int GetLogicalFunction(); int GetMapMode(); bool GetOptimization(); - wxPen * GetPen(); + wxPen& GetPen(); %addmethods { %new wxColour* GetPixel(long x, long y) { wxColour* wc = new wxColour(); @@ -344,12 +344,12 @@ public: %addmethods { // This one is my own creation... - void DrawBitmap(wxBitmap* bitmap, long x, long y, bool swapPalette=TRUE) { + void DrawBitmap(wxBitmap& bitmap, long x, long y, bool swapPalette=TRUE) { wxMemoryDC* memDC = new wxMemoryDC; memDC->SelectObject(bitmap); if (swapPalette) - self->SetPalette(bitmap->GetPalette()); - self->Blit(x, y, bitmap->GetWidth(), bitmap->GetHeight(), memDC, + self->SetPalette(*bitmap.GetPalette()); + self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC, 0, 0, self->GetLogicalFunction()); memDC->SelectObject(wxNullBitmap); delete memDC; @@ -511,7 +511,27 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.7 1998/12/15 20:41:18 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. +// +// Other assorted fixes and additions. +// // Revision 1.6 1998/11/25 08:45:24 RD +// // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon // Added events for wxGrid // Other various fixes and additions diff --git a/utils/wxPython/src/gtk/wxp.cpp b/utils/wxPython/src/gtk/wx.cpp similarity index 99% rename from utils/wxPython/src/gtk/wxp.cpp rename to utils/wxPython/src/gtk/wx.cpp index 16a3d71fd3..fb9f50ed39 100644 --- a/utils/wxPython/src/gtk/wxp.cpp +++ b/utils/wxPython/src/gtk/wx.cpp @@ -33,6 +33,25 @@ * and things like that. * * $Log$ + * Revision 1.1 1998/12/15 20:41:59 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. + * + * Other assorted fixes and additions. + * * Revision 1.9 1998/11/16 00:01:41 RD * Generic treectrl for wxPython/GTK compiles... * diff --git a/utils/wxPython/src/gtk/wxp.py b/utils/wxPython/src/gtk/wx.py similarity index 98% rename from utils/wxPython/src/gtk/wxp.py rename to utils/wxPython/src/gtk/wx.py index 2c48ba9de8..3ff09e450e 100644 --- a/utils/wxPython/src/gtk/wxp.py +++ b/utils/wxPython/src/gtk/wx.py @@ -1125,6 +1125,25 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.1 1998/12/15 20:42:01 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. +# +# Other assorted fixes and additions. +# # Revision 1.9 1998/11/16 00:01:43 RD # Generic treectrl for wxPython/GTK compiles... # diff --git a/utils/wxPython/src/helpers.cpp b/utils/wxPython/src/helpers.cpp index 8ffbd7931a..3601629369 100644 --- a/utils/wxPython/src/helpers.cpp +++ b/utils/wxPython/src/helpers.cpp @@ -103,7 +103,7 @@ void wxPyApp::AfterMainLoop(void) { #ifdef __WXGTK__ wxApp::CommonCleanUp(); #endif - delete wxPythonApp; +// delete wxPythonApp; } @@ -602,7 +602,27 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) { ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.15 1998/12/15 20:41:19 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. +// +// Other assorted fixes and additions. +// // Revision 1.14 1998/11/25 08:45:25 RD +// // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon // Added events for wxGrid // Other various fixes and additions diff --git a/utils/wxPython/src/makefile.nt b/utils/wxPython/src/makefile.nt index 357bdae5e5..3cc0bffa5d 100644 --- a/utils/wxPython/src/makefile.nt +++ b/utils/wxPython/src/makefile.nt @@ -20,7 +20,8 @@ PYTHONDIR=e:\Tools\Python15 FINAL=0 # Set this to where you want the stuff installed at. It should -# be a directory contained in a PYTHONPATH directory. +# be a directory contained in a PYTHONPATH directory, and should be +# named wxPython TARGETDIR=.. # Set this to 1 for make to pre-compile the Python modules, 0 to @@ -28,6 +29,8 @@ TARGETDIR=.. # runtime. COMPILEPY=0 +SEPARATE=0 + #---------------------------------------------------------------------- WXUSINGDLL=0 @@ -46,21 +49,28 @@ GENCODEDIR=msw #---------------------------------------------------------------------- -TARGET = wxpc +TARGET = wxc -OBJECTS = wxp.obj helpers.obj windows.obj events.obj \ +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 + frames.obj \ +!if "$(SEPARATE)" == "0" + utils.obj +!else +TARGET2 = utilsc +OBJECTS2 = utils.obj +target2=$(TARGETDIR)\$(TARGET2).pyd +!endif -PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \ +PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \ $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \ $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \ $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \ $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \ $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \ - $(TARGETDIR)\__init__.py + $(TARGETDIR)\utils.py $(TARGETDIR)\__init__.py #---------------------------------------------------------------------- @@ -74,11 +84,14 @@ DEBUGLFLAGS = /INCREMENTAL:NO LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \ /machine:I386 /implib:./$(TARGET).lib /nologo +LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \ + /machine:I386 /implib:./$(TARGET2).lib /nologo + #---------------------------------------------------------------------- -default: $(TARGETDIR)\$(TARGET).pyd pycfiles +default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles -all: wx $(TARGET) +all: wx $(TARGET) $(TARGET2) wx: cd $(WXDIR)\src\msw @@ -107,6 +120,14 @@ $(DUMMYOBJ) $(OBJECTS) $(TARGET).res $(LIBS) << +$(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2) + $(link) @<< +/out:$@ /dll +$(LFLAGS2) +$(DUMMYOBJ) $(OBJECTS2) +$(LIBS) +<< + $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc @@ -135,11 +156,16 @@ clean: -erase *.pch -erase $(TARGET).exp -erase $(TARGET).lib + -erase $(TARGETDIR)\$(TARGET).* +!if "$(SEPARATE)" != "0" + -erase $(TARGET2).exp + -erase $(TARGET2).lib + -erase $(TARGETDIR)\$(TARGET2).* +!endif -erase $(TARGETDIR)\$(TARGET).pyd -erase $(TARGETDIR)\*.py -erase $(TARGETDIR)\*.pyc -erase $(TARGETDIR)\*.pyo - -erase $(TARGETDIR)\$(TARGET).* @@ -168,8 +194,8 @@ clean: # This one must leave out the -c flag so we define the whole rule -$(GENCODEDIR)\wxp.cpp $(GENCODEDIR)\wxp.py : wxp.i my_typemaps.i _defs.i _extras.py - swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i +$(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py + swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i # Define some dependencies. These MUST use forward slashes so SWIG @@ -186,8 +212,15 @@ $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemap $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i +!if "$(SEPARATE)" == "1" +$(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i + swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i +!else +$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i +!endif -$(TARGETDIR)\wxp.py : $(GENCODEDIR)\wxp.py + +$(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py $(TARGETDIR)\events.py : $(GENCODEDIR)\events.py @@ -197,15 +230,36 @@ $(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py $(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py $(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py $(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py -$(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py +$(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py $(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py +$(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py $(TARGETDIR)\__init__.py : __init__.py #------------------------------------------------------------------------ # # $Log$ +# Revision 1.7 1998/12/15 20:41:20 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. +# +# Other assorted fixes and additions. +# # Revision 1.6 1998/10/02 06:40:41 RD +# # Version 0.4 of wxPython for MSW. # # Revision 1.5 1998/08/19 00:38:23 RD diff --git a/utils/wxPython/src/mdi.i b/utils/wxPython/src/mdi.i index c3a1fbddc0..86da963457 100644 --- a/utils/wxPython/src/mdi.i +++ b/utils/wxPython/src/mdi.i @@ -28,7 +28,7 @@ %import windows.i %import frames.i -%pragma(python) code = "import wxp" +%pragma(python) code = "import wx" //---------------------------------------------------------------------- @@ -42,7 +42,7 @@ public: long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const char* name = "frame"); - %pragma(python) addtomethod = "__init__:wxp._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" void ActivateNext(); void ActivatePrevious(); @@ -74,7 +74,7 @@ public: long style = wxDEFAULT_FRAME_STYLE, const char* name = "frame"); - %pragma(python) addtomethod = "__init__:wxp._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" void Activate(); void Maximize(); @@ -92,15 +92,35 @@ public: class wxMDIClientWindow : public wxWindow { public: wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wxp._StdOnScrollCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)" }; //--------------------------------------------------------------------------- ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.5 1998/12/15 20:41:21 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. +// +// Other assorted fixes and additions. +// // Revision 1.4 1998/10/02 06:40:41 RD +// // Version 0.4 of wxPython for MSW. // // Revision 1.3 1998/08/18 19:48:18 RD diff --git a/utils/wxPython/src/misc.i b/utils/wxPython/src/misc.i index c5b9da1829..6d11cacacb 100644 --- a/utils/wxPython/src/misc.i +++ b/utils/wxPython/src/misc.i @@ -165,7 +165,7 @@ int wxMessageBox(const wxString& message, bool wxColourDisplay(); int wxDisplayDepth(); -void wxSetCursor(wxCursor *cursor); +void wxSetCursor(wxCursor& cursor); //--------------------------------------------------------------------------- // Miscellaneous functions @@ -358,7 +358,27 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.8 1998/12/15 20:41:22 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. +// +// Other assorted fixes and additions. +// // Revision 1.7 1998/11/25 08:45:27 RD +// // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon // Added events for wxGrid // Other various fixes and additions diff --git a/utils/wxPython/src/msw/cmndlgs.py b/utils/wxPython/src/msw/cmndlgs.py index 5b58c4e340..39dd99819e 100644 --- a/utils/wxPython/src/msw/cmndlgs.py +++ b/utils/wxPython/src/msw/cmndlgs.py @@ -6,6 +6,7 @@ from misc import * from gdi import * from windows import * +import wx class wxColourDataPtr : def __init__(self,this): self.this = this @@ -65,7 +66,7 @@ class wxColourDialog(wxColourDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxColourDialog,(arg0.this,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -102,7 +103,7 @@ class wxDirDialog(wxDirDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxDirDialog,(arg0.this,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -166,7 +167,7 @@ class wxFileDialog(wxFileDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxFileDialog,(arg0.this,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -197,7 +198,7 @@ class wxSingleChoiceDialog(wxSingleChoiceDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,(arg0.this,arg1,arg2,arg3,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -225,7 +226,7 @@ class wxTextEntryDialog(wxTextEntryDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxTextEntryDialog,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -312,7 +313,7 @@ class wxFontDialog(wxFontDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxFontDialog,(arg0.this,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -443,7 +444,7 @@ class wxPageSetupDialog(wxPageSetupDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxPageSetupDialog,(arg0.this,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -554,7 +555,7 @@ class wxPrintDialog(wxPrintDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxPrintDialog,(arg0.this,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -576,7 +577,7 @@ class wxMessageDialog(wxMessageDialogPtr): args = tuple(argl) self.this = apply(cmndlgsc.new_wxMessageDialog,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) diff --git a/utils/wxPython/src/msw/controls.cpp b/utils/wxPython/src/msw/controls.cpp index 369f85f227..df26cc2d69 100644 --- a/utils/wxPython/src/msw/controls.cpp +++ b/utils/wxPython/src/msw/controls.cpp @@ -3743,23 +3743,23 @@ static PyObject *_wrap_wxScrollBar_GetPageSize(PyObject *self, PyObject *args) { return _resultobj; } -#define wxScrollBar_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxScrollBar_GetPosition(PyObject *self, PyObject *args) { +#define wxScrollBar_GetThumbPosition(_swigobj) (_swigobj->GetThumbPosition()) +static PyObject *_wrap_wxScrollBar_GetThumbPosition(PyObject *self, PyObject *args) { PyObject * _resultobj; int _result; wxScrollBar * _arg0; char * _argc0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetPosition",&_argc0)) + if(!PyArg_ParseTuple(args,"s:wxScrollBar_GetThumbPosition",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetPosition. Expected _wxScrollBar_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_GetThumbPosition. Expected _wxScrollBar_p."); return NULL; } } - _result = (int )wxScrollBar_GetPosition(_arg0); + _result = (int )wxScrollBar_GetThumbPosition(_arg0); _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -3785,23 +3785,23 @@ static PyObject *_wrap_wxScrollBar_GetThumbSize(PyObject *self, PyObject *args) return _resultobj; } -#define wxScrollBar_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) -static PyObject *_wrap_wxScrollBar_SetPosition(PyObject *self, PyObject *args) { +#define wxScrollBar_SetThumbPosition(_swigobj,_swigarg0) (_swigobj->SetThumbPosition(_swigarg0)) +static PyObject *_wrap_wxScrollBar_SetThumbPosition(PyObject *self, PyObject *args) { PyObject * _resultobj; wxScrollBar * _arg0; int _arg1; char * _argc0 = 0; self = self; - if(!PyArg_ParseTuple(args,"si:wxScrollBar_SetPosition",&_argc0,&_arg1)) + if(!PyArg_ParseTuple(args,"si:wxScrollBar_SetThumbPosition",&_argc0,&_arg1)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxScrollBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_SetPosition. Expected _wxScrollBar_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_SetThumbPosition. Expected _wxScrollBar_p."); return NULL; } } - wxScrollBar_SetPosition(_arg0,_arg1); + wxScrollBar_SetThumbPosition(_arg0,_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -5314,9 +5314,9 @@ static PyMethodDef controlscMethods[] = { { "wxSpinButton_GetMax", _wrap_wxSpinButton_GetMax, 1 }, { "new_wxSpinButton", _wrap_new_wxSpinButton, 1 }, { "wxScrollBar_SetScrollbar", _wrap_wxScrollBar_SetScrollbar, 1 }, - { "wxScrollBar_SetPosition", _wrap_wxScrollBar_SetPosition, 1 }, + { "wxScrollBar_SetThumbPosition", _wrap_wxScrollBar_SetThumbPosition, 1 }, { "wxScrollBar_GetThumbSize", _wrap_wxScrollBar_GetThumbSize, 1 }, - { "wxScrollBar_GetPosition", _wrap_wxScrollBar_GetPosition, 1 }, + { "wxScrollBar_GetThumbPosition", _wrap_wxScrollBar_GetThumbPosition, 1 }, { "wxScrollBar_GetPageSize", _wrap_wxScrollBar_GetPageSize, 1 }, { "wxScrollBar_GetRange", _wrap_wxScrollBar_GetRange, 1 }, { "new_wxScrollBar", _wrap_new_wxScrollBar, 1 }, @@ -5451,6 +5451,7 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler); @@ -5551,6 +5552,7 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_EBool","_signed_int",0); SWIG_RegisterMapping("_EBool","_int",0); SWIG_RegisterMapping("_EBool","_wxWindowID",0); + SWIG_RegisterMapping("_class_wxRegion","_wxRegion",0); SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); SWIG_RegisterMapping("_wxFont","_class_wxFont",0); @@ -5715,6 +5717,7 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton); SWIG_RegisterMapping("_wxButton","_class_wxButton",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_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); @@ -5766,6 +5769,7 @@ SWIGEXPORT(void,initcontrolsc)() { SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); + SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0); SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); diff --git a/utils/wxPython/src/msw/controls.py b/utils/wxPython/src/msw/controls.py index d16f14fe77..af330a5217 100644 --- a/utils/wxPython/src/msw/controls.py +++ b/utils/wxPython/src/msw/controls.py @@ -8,7 +8,7 @@ from windows import * from gdi import * from events import * -import wxp +import wx class wxControlPtr(wxWindowPtr): def __init__(self,this): self.this = this @@ -50,7 +50,7 @@ class wxButton(wxButtonPtr): args = tuple(argl) self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -99,7 +99,7 @@ class wxBitmapButton(wxBitmapButtonPtr): args = tuple(argl) self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -126,7 +126,7 @@ class wxCheckBox(wxCheckBoxPtr): args = tuple(argl) self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -180,7 +180,7 @@ class wxChoice(wxChoicePtr): args = tuple(argl) self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -264,7 +264,7 @@ class wxComboBox(wxComboBoxPtr): args = tuple(argl) self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -309,7 +309,7 @@ class wxGauge(wxGaugePtr): args = tuple(argl) self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -356,7 +356,7 @@ class wxStaticText(wxStaticTextPtr): args = tuple(argl) self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -425,7 +425,7 @@ class wxListBox(wxListBoxPtr): args = tuple(argl) self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -455,7 +455,7 @@ class wxCheckListBox(wxCheckListBoxPtr): args = tuple(argl) self.this = apply(controlsc.new_wxCheckListBox,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -551,7 +551,7 @@ class wxTextCtrl(wxTextCtrlPtr): args = tuple(argl) self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -566,14 +566,14 @@ class wxScrollBarPtr(wxControlPtr): def GetPageSize(self): val = controlsc.wxScrollBar_GetPageSize(self.this) return val - def GetPosition(self): - val = controlsc.wxScrollBar_GetPosition(self.this) + def GetThumbPosition(self): + val = controlsc.wxScrollBar_GetThumbPosition(self.this) return val def GetThumbSize(self): val = controlsc.wxScrollBar_GetThumbSize(self.this) return val - def SetPosition(self,arg0): - val = controlsc.wxScrollBar_SetPosition(self.this,arg0) + def SetThumbPosition(self,arg0): + val = controlsc.wxScrollBar_SetThumbPosition(self.this,arg0) return val def SetScrollbar(self,arg0,arg1,arg2,arg3,*args): val = apply(controlsc.wxScrollBar_SetScrollbar,(self.this,arg0,arg1,arg2,arg3,)+args) @@ -590,7 +590,7 @@ class wxScrollBar(wxScrollBarPtr): args = tuple(argl) self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -653,7 +653,7 @@ class wxStaticBitmap(wxStaticBitmapPtr): args = tuple(argl) self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -719,7 +719,7 @@ class wxRadioBox(wxRadioBoxPtr): args = tuple(argl) self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -746,7 +746,7 @@ class wxRadioButton(wxRadioButtonPtr): args = tuple(argl) self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -824,7 +824,7 @@ class wxSlider(wxSliderPtr): args = tuple(argl) self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) diff --git a/utils/wxPython/src/msw/controls2.cpp b/utils/wxPython/src/msw/controls2.cpp index 15d39d486d..d4315fa1a3 100644 --- a/utils/wxPython/src/msw/controls2.cpp +++ b/utils/wxPython/src/msw/controls2.cpp @@ -3730,7 +3730,102 @@ static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args) { return _resultobj; } +#define wxTreeCtrl_SetItemBold(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBold(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxTreeCtrl * _arg0; + wxTreeItemId * _arg1; + bool _arg2 = (1); + char * _argc0 = 0; + char * _argc1 = 0; + int tempbool2; + + self = self; + if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_SetItemBold",&_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_SetItemBold. 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_SetItemBold. Expected _wxTreeItemId_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; + wxTreeCtrl_SetItemBold(_arg0,*_arg1,_arg2); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTreeCtrl_IsBold(_swigobj,_swigarg0) (_swigobj->IsBold(_swigarg0)) +static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxTreeCtrl * _arg0; + wxTreeItemId * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_IsBold",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsBold. 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_IsBold. Expected _wxTreeItemId_p."); + return NULL; + } + } + _result = (bool )wxTreeCtrl_IsBold(_arg0,*_arg1); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTreeCtrl_HitTest(_swigobj,_swigarg0) (_swigobj->HitTest(_swigarg0)) +static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxTreeItemId * _result; + wxTreeCtrl * _arg0; + wxPoint * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_HitTest",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_HitTest. Expected _wxTreeCtrl_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_HitTest. Expected _wxPoint_p."); + return NULL; + } + } + _result = new wxTreeItemId (wxTreeCtrl_HitTest(_arg0,*_arg1)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + 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 }, @@ -3885,6 +3980,7 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler); @@ -3963,6 +4059,7 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_EBool","_signed_int",0); SWIG_RegisterMapping("_EBool","_int",0); SWIG_RegisterMapping("_EBool","_wxWindowID",0); + SWIG_RegisterMapping("_class_wxRegion","_wxRegion",0); SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); SWIG_RegisterMapping("_wxFont","_class_wxFont",0); @@ -4064,6 +4161,7 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_class_wxSpinEvent","_wxSpinEvent",0); SWIG_RegisterMapping("_wxButton","_class_wxButton",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_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); @@ -4087,6 +4185,7 @@ SWIGEXPORT(void,initcontrols2c)() { SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); + SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0); SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); diff --git a/utils/wxPython/src/msw/controls2.py b/utils/wxPython/src/msw/controls2.py index 5ccdc674b9..ac552d120d 100644 --- a/utils/wxPython/src/msw/controls2.py +++ b/utils/wxPython/src/msw/controls2.py @@ -10,7 +10,7 @@ from gdi import * from events import * from controls import * -import wxp +import wx class wxListItemPtr : def __init__(self,this): self.this = this @@ -313,7 +313,7 @@ class wxListCtrl(wxListCtrlPtr): args = tuple(argl) self.this = apply(controls2c.new_wxListCtrl,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -581,6 +581,17 @@ class wxTreeCtrlPtr(wxControlPtr): 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) + return val + def IsBold(self,arg0): + val = controls2c.wxTreeCtrl_IsBold(self.this,arg0.this) + return val + def HitTest(self,arg0): + val = controls2c.wxTreeCtrl_HitTest(self.this,arg0.this) + val = wxTreeItemIdPtr(val) + val.thisown = 1 + return val def __repr__(self): return "" class wxTreeCtrl(wxTreeCtrlPtr): @@ -593,7 +604,7 @@ class wxTreeCtrl(wxTreeCtrlPtr): args = tuple(argl) self.this = apply(controls2c.new_wxTreeCtrl,(arg0.this,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) diff --git a/utils/wxPython/src/msw/events.cpp b/utils/wxPython/src/msw/events.cpp index 43508c554f..7bef3da8d2 100644 --- a/utils/wxPython/src/msw/events.cpp +++ b/utils/wxPython/src/msw/events.cpp @@ -379,6 +379,27 @@ static void *SwigwxCloseEventTowxEvent(void *ptr) { return (void *) dest; } +#define wxCloseEvent_CanVeto(_swigobj) (_swigobj->CanVeto()) +static PyObject *_wrap_wxCloseEvent_CanVeto(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxCloseEvent * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxCloseEvent_CanVeto",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_CanVeto. Expected _wxCloseEvent_p."); + return NULL; + } + } + _result = (bool )wxCloseEvent_CanVeto(_arg0); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxCloseEvent_GetLoggingOff(_swigobj) (_swigobj->GetLoggingOff()) static PyObject *_wrap_wxCloseEvent_GetLoggingOff(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -469,6 +490,54 @@ static PyObject *_wrap_wxCloseEvent_SetForce(PyObject *self, PyObject *args) { return _resultobj; } +#define wxCloseEvent_SetCanVeto(_swigobj,_swigarg0) (_swigobj->SetCanVeto(_swigarg0)) +static PyObject *_wrap_wxCloseEvent_SetCanVeto(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxCloseEvent * _arg0; + bool _arg1; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxCloseEvent_SetCanVeto",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_SetCanVeto. Expected _wxCloseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + wxCloseEvent_SetCanVeto(_arg0,_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCloseEvent_SetLoggingOff(_swigobj,_swigarg0) (_swigobj->SetLoggingOff(_swigarg0)) +static PyObject *_wrap_wxCloseEvent_SetLoggingOff(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxCloseEvent * _arg0; + bool _arg1; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"si:wxCloseEvent_SetLoggingOff",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxCloseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCloseEvent_SetLoggingOff. Expected _wxCloseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + wxCloseEvent_SetLoggingOff(_arg0,_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxCloseEvent_GetForce(_swigobj) (_swigobj->GetForce()) static PyObject *_wrap_wxCloseEvent_GetForce(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -2628,10 +2697,13 @@ static PyMethodDef eventscMethods[] = { { "wxCommandEvent_GetExtraLong", _wrap_wxCommandEvent_GetExtraLong, 1 }, { "wxCommandEvent_Checked", _wrap_wxCommandEvent_Checked, 1 }, { "wxCloseEvent_GetForce", _wrap_wxCloseEvent_GetForce, 1 }, + { "wxCloseEvent_SetLoggingOff", _wrap_wxCloseEvent_SetLoggingOff, 1 }, + { "wxCloseEvent_SetCanVeto", _wrap_wxCloseEvent_SetCanVeto, 1 }, { "wxCloseEvent_SetForce", _wrap_wxCloseEvent_SetForce, 1 }, { "wxCloseEvent_GetVeto", _wrap_wxCloseEvent_GetVeto, 1 }, { "wxCloseEvent_Veto", _wrap_wxCloseEvent_Veto, 1 }, { "wxCloseEvent_GetLoggingOff", _wrap_wxCloseEvent_GetLoggingOff, 1 }, + { "wxCloseEvent_CanVeto", _wrap_wxCloseEvent_CanVeto, 1 }, { "wxSizeEvent_GetSize", _wrap_wxSizeEvent_GetSize, 1 }, { "wxEvent_Skip", _wrap_wxEvent_Skip, 1 }, { "wxEvent_SetTimestamp", _wrap_wxEvent_SetTimestamp, 1 }, @@ -2707,6 +2779,7 @@ SWIGEXPORT(void,initeventsc)() { SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); @@ -2789,6 +2862,7 @@ SWIGEXPORT(void,initeventsc)() { SWIG_RegisterMapping("_EBool","_signed_int",0); SWIG_RegisterMapping("_EBool","_int",0); SWIG_RegisterMapping("_EBool","_wxWindowID",0); + SWIG_RegisterMapping("_class_wxRegion","_wxRegion",0); SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); SWIG_RegisterMapping("_unsigned_long","_long",0); @@ -2841,6 +2915,7 @@ SWIGEXPORT(void,initeventsc)() { SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); SWIG_RegisterMapping("_class_wxSpinEvent","_wxSpinEvent",0); SWIG_RegisterMapping("_wxSize","_class_wxSize",0); + SWIG_RegisterMapping("_wxRegionIterator","_class_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); @@ -2848,6 +2923,7 @@ SWIGEXPORT(void,initeventsc)() { SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); + SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0); SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent); diff --git a/utils/wxPython/src/msw/events.py b/utils/wxPython/src/msw/events.py index 7d20bbc827..f8a052d14b 100644 --- a/utils/wxPython/src/msw/events.py +++ b/utils/wxPython/src/msw/events.py @@ -67,6 +67,9 @@ class wxCloseEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def CanVeto(self): + val = eventsc.wxCloseEvent_CanVeto(self.this) + return val def GetLoggingOff(self): val = eventsc.wxCloseEvent_GetLoggingOff(self.this) return val @@ -79,6 +82,12 @@ class wxCloseEventPtr(wxEventPtr): def SetForce(self,arg0): val = eventsc.wxCloseEvent_SetForce(self.this,arg0) return val + def SetCanVeto(self,arg0): + val = eventsc.wxCloseEvent_SetCanVeto(self.this,arg0) + return val + def SetLoggingOff(self,arg0): + val = eventsc.wxCloseEvent_SetLoggingOff(self.this,arg0) + return val def GetForce(self): val = eventsc.wxCloseEvent_GetForce(self.this) return val diff --git a/utils/wxPython/src/msw/frames.cpp b/utils/wxPython/src/msw/frames.cpp index ed3324469e..efc6009033 100644 --- a/utils/wxPython/src/msw/frames.cpp +++ b/utils/wxPython/src/msw/frames.cpp @@ -264,7 +264,7 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args) { PyObject * _resultobj; wxToolBar * _result; wxFrame * _arg0; - long _arg1 = (wxNO_BORDER)|(wxTB_HORIZONTAL); + long _arg1 = (wxNO_BORDER)|(wxTB_HORIZONTAL)|(wxTB_FLAT); wxWindowID _arg2 = -1; char * _arg3 = "toolBar"; char * _argc0 = 0; @@ -821,6 +821,7 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler); @@ -892,6 +893,7 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_EBool","_signed_int",0); SWIG_RegisterMapping("_EBool","_int",0); SWIG_RegisterMapping("_EBool","_wxWindowID",0); + SWIG_RegisterMapping("_class_wxRegion","_wxRegion",0); SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); SWIG_RegisterMapping("_wxFont","_class_wxFont",0); @@ -989,6 +991,7 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_class_wxSpinEvent","_wxSpinEvent",0); SWIG_RegisterMapping("_wxButton","_class_wxButton",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_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); @@ -1007,6 +1010,7 @@ SWIGEXPORT(void,initframesc)() { SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); + SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0); SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); diff --git a/utils/wxPython/src/msw/frames.py b/utils/wxPython/src/msw/frames.py index 8d4cec750f..e03413e799 100644 --- a/utils/wxPython/src/msw/frames.py +++ b/utils/wxPython/src/msw/frames.py @@ -12,7 +12,7 @@ from stattool import * from controls import * from events import * -import wxp +import wx class wxFramePtr(wxWindowPtr): def __init__(self,this): self.this = this @@ -91,7 +91,7 @@ class wxFrame(wxFramePtr): args = tuple(argl) self.this = apply(framesc.new_wxFrame,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdFrameCallbacks(self) + wx._StdFrameCallbacks(self) @@ -112,7 +112,7 @@ class wxMiniFrame(wxMiniFramePtr): args = tuple(argl) self.this = apply(framesc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdFrameCallbacks(self) + wx._StdFrameCallbacks(self) diff --git a/utils/wxPython/src/msw/gdi.cpp b/utils/wxPython/src/msw/gdi.cpp index c152aff9b9..f587c5cb86 100644 --- a/utils/wxPython/src/msw/gdi.cpp +++ b/utils/wxPython/src/msw/gdi.cpp @@ -1318,7 +1318,7 @@ static PyObject *_wrap_wxBitmap_SetPalette(PyObject *self, PyObject *args) { return NULL; } } - wxBitmap_SetPalette(_arg0,_arg1); + wxBitmap_SetPalette(_arg0,*_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2536,7 +2536,7 @@ static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args) { return NULL; } } - wxPen_SetStipple(_arg0,_arg1); + wxPen_SetStipple(_arg0,*_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2776,7 +2776,7 @@ static PyObject *_wrap_wxBrush_SetStipple(PyObject *self, PyObject *args) { return NULL; } } - wxBrush_SetStipple(_arg0,_arg1); + wxBrush_SetStipple(_arg0,*_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -3476,7 +3476,8 @@ static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxBrush *)wxDC_GetBackground(_arg0); + wxBrush & _result_ref = wxDC_GetBackground(_arg0); + _result = (wxBrush *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -3499,7 +3500,8 @@ static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxBrush *)wxDC_GetBrush(_arg0); + wxBrush & _result_ref = wxDC_GetBrush(_arg0); + _result = (wxBrush *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -3625,7 +3627,8 @@ static PyObject *_wrap_wxDC_GetFont(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxFont *)wxDC_GetFont(_arg0); + wxFont & _result_ref = wxDC_GetFont(_arg0); + _result = (wxFont *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -3711,7 +3714,8 @@ static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxPen *)wxDC_GetPen(_arg0); + wxPen & _result_ref = wxDC_GetPen(_arg0); + _result = (wxPen *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -4521,12 +4525,12 @@ static PyObject *_wrap_wxDC_StartPage(PyObject *self, PyObject *args) { return _resultobj; } -static void wxDC_DrawBitmap(wxDC *self,wxBitmap * bitmap,long x,long y,bool swapPalette) { +static void wxDC_DrawBitmap(wxDC *self,wxBitmap & bitmap,long x,long y,bool swapPalette) { wxMemoryDC* memDC = new wxMemoryDC; memDC->SelectObject(bitmap); if (swapPalette) - self->SetPalette(bitmap->GetPalette()); - self->Blit(x, y, bitmap->GetWidth(), bitmap->GetHeight(), memDC, + self->SetPalette(*bitmap.GetPalette()); + self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC, 0, 0, self->GetLogicalFunction()); memDC->SelectObject(wxNullBitmap); delete memDC; @@ -4558,7 +4562,7 @@ static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args) { } } _arg4 = (bool ) tempbool4; - wxDC_DrawBitmap(_arg0,_arg1,_arg2,_arg3,_arg4); + wxDC_DrawBitmap(_arg0,*_arg1,_arg2,_arg3,_arg4); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -5329,6 +5333,7 @@ SWIGEXPORT(void,initgdic)() { */ SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); SWIG_RegisterMapping("_signed_long","_long",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); @@ -5374,6 +5379,7 @@ SWIGEXPORT(void,initgdic)() { 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); @@ -5439,6 +5445,7 @@ SWIGEXPORT(void,initgdic)() { 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); @@ -5446,6 +5453,7 @@ SWIGEXPORT(void,initgdic)() { 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); diff --git a/utils/wxPython/src/msw/mdi.cpp b/utils/wxPython/src/msw/mdi.cpp index f2622dc6cb..4c4bb01d65 100644 --- a/utils/wxPython/src/msw/mdi.cpp +++ b/utils/wxPython/src/msw/mdi.cpp @@ -751,6 +751,7 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler); @@ -825,6 +826,7 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_EBool","_signed_int",0); SWIG_RegisterMapping("_EBool","_int",0); SWIG_RegisterMapping("_EBool","_wxWindowID",0); + SWIG_RegisterMapping("_class_wxRegion","_wxRegion",0); SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); SWIG_RegisterMapping("_wxFont","_class_wxFont",0); @@ -929,6 +931,7 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_class_wxSpinEvent","_wxSpinEvent",0); SWIG_RegisterMapping("_wxButton","_class_wxButton",0); SWIG_RegisterMapping("_wxSize","_class_wxSize",0); + SWIG_RegisterMapping("_wxRegionIterator","_class_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); SWIG_RegisterMapping("_class_wxMDIParentFrame","_wxMDIParentFrame",0); SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); @@ -948,6 +951,7 @@ SWIGEXPORT(void,initmdic)() { SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); + SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0); SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); diff --git a/utils/wxPython/src/msw/mdi.py b/utils/wxPython/src/msw/mdi.py index 1c67864883..7af8ce5122 100644 --- a/utils/wxPython/src/msw/mdi.py +++ b/utils/wxPython/src/msw/mdi.py @@ -14,7 +14,7 @@ from stattool import * from controls import * from events import * -import wxp +import wx class wxMDIParentFramePtr(wxFramePtr): def __init__(self,this): self.this = this @@ -64,7 +64,7 @@ class wxMDIParentFrame(wxMDIParentFramePtr): args = tuple(argl) self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdFrameCallbacks(self) + wx._StdFrameCallbacks(self) @@ -103,7 +103,7 @@ class wxMDIChildFrame(wxMDIChildFramePtr): args = tuple(argl) self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdFrameCallbacks(self) + wx._StdFrameCallbacks(self) @@ -118,8 +118,8 @@ class wxMDIClientWindow(wxMDIClientWindowPtr): def __init__(self,arg0,*args) : self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) - wxp._StdOnScrollCallbacks(self) + wx._StdWindowCallbacks(self) + wx._StdOnScrollCallbacks(self) diff --git a/utils/wxPython/src/msw/misc.cpp b/utils/wxPython/src/msw/misc.cpp index 592dcd9225..47344d4033 100644 --- a/utils/wxPython/src/msw/misc.cpp +++ b/utils/wxPython/src/msw/misc.cpp @@ -450,7 +450,7 @@ static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args) { return NULL; } } - wxSetCursor(_arg0); + wxSetCursor(*_arg0); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; diff --git a/utils/wxPython/src/msw/stattool.cpp b/utils/wxPython/src/msw/stattool.cpp index b061d20a0c..204c421302 100644 --- a/utils/wxPython/src/msw/stattool.cpp +++ b/utils/wxPython/src/msw/stattool.cpp @@ -1584,6 +1584,7 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); SWIG_RegisterMapping("_signed_long","_long",0); SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxToolBar",SwigwxToolBarTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxToolBar",SwigwxToolBarTowxEvtHandler); @@ -1654,6 +1655,7 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_EBool","_signed_int",0); SWIG_RegisterMapping("_EBool","_int",0); SWIG_RegisterMapping("_EBool","_wxWindowID",0); + SWIG_RegisterMapping("_class_wxRegion","_wxRegion",0); SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); SWIG_RegisterMapping("_wxFont","_class_wxFont",0); @@ -1750,6 +1752,7 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_class_wxSpinEvent","_wxSpinEvent",0); SWIG_RegisterMapping("_wxButton","_class_wxButton",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_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); @@ -1769,6 +1772,7 @@ SWIGEXPORT(void,initstattoolc)() { SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); + SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0); SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); diff --git a/utils/wxPython/src/msw/stattool.py b/utils/wxPython/src/msw/stattool.py index f16438105e..550d3d9a22 100644 --- a/utils/wxPython/src/msw/stattool.py +++ b/utils/wxPython/src/msw/stattool.py @@ -10,6 +10,7 @@ from gdi import * from controls import * from events import * +import wx class wxStatusBarPtr(wxWindowPtr): def __init__(self,this): self.this = this @@ -55,7 +56,7 @@ class wxStatusBar(wxStatusBarPtr): args = tuple(argl) self.this = apply(stattoolc.new_wxStatusBar,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -261,7 +262,7 @@ class wxToolBar(wxToolBarPtr): args = tuple(argl) self.this = apply(stattoolc.new_wxToolBar,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) diff --git a/utils/wxPython/src/msw/utils.cpp b/utils/wxPython/src/msw/utils.cpp new file mode 100644 index 0000000000..2b43e0fe77 --- /dev/null +++ b/utils/wxPython/src/msw/utils.cpp @@ -0,0 +1,1177 @@ +/* + * FILE : msw/utils.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Patch 5) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a,b) __declspec(dllexport) a b +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a,b) a _export b +# else +# define SWIGEXPORT(a,b) a b +# endif +# endif +#else +# define SWIGEXPORT(a,b) a b +#endif + +#ifdef __cplusplus +extern "C" { +#endif +#include "Python.h" +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif + +#define SWIG_init initutilsc + +#define SWIG_name "utilsc" + +#include "helpers.h" +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + + +extern byte* byte_LIST_helper(PyObject* source); +extern int* int_LIST_helper(PyObject* source); +extern long* long_LIST_helper(PyObject* source); +extern char** string_LIST_helper(PyObject* source); +extern wxPoint* wxPoint_LIST_helper(PyObject* source); +extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); +extern wxString* wxString_LIST_helper(PyObject* source); +extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); + + +static char* wxStringErrorMsg = "string type is required for parameter"; + + static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { + PyObject* ret = PyTuple_New(3); + if (ret) { + PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); + PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); + PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); + } + return ret; + } +#define new_wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _result; + wxString * _arg0 = &wxPyEmptyStr; + wxString * _arg1 = &wxPyEmptyStr; + wxString * _arg2 = &wxPyEmptyStr; + wxString * _arg3 = &wxPyEmptyStr; + long _arg4 = 0; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"|OOOOl:new_wxConfig",&_obj0,&_obj1,&_obj2,&_obj3,&_arg4)) + return NULL; + if (_obj0) +{ + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AsString(_obj0)); +} + if (_obj1) +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + if (_obj2) +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2)); +} + if (_obj3) +{ + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AsString(_obj3)); +} + _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define delete_wxConfig(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:delete_wxConfig",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfig. Expected _wxConfig_p."); + return NULL; + } + } + delete_wxConfig(_arg0); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfig_DontCreateOnDemand(_swigobj) (_swigobj->DontCreateOnDemand()) +static PyObject *_wrap_wxConfig_DontCreateOnDemand(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_DontCreateOnDemand",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DontCreateOnDemand. Expected _wxConfig_p."); + return NULL; + } + } + wxConfig_DontCreateOnDemand(_arg0); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfig_DeleteEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteEntry(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfig_DeleteEntry(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + bool _arg2 = TRUE; + char * _argc0 = 0; + PyObject * _obj1 = 0; + int tempbool2; + + self = self; + if(!PyArg_ParseTuple(args,"sO|i:wxConfig_DeleteEntry",&_argc0,&_obj1,&tempbool2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteEntry. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _arg2 = (bool ) tempbool2; + _result = (bool )wxConfig_DeleteEntry(_arg0,*_arg1,_arg2); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_DeleteGroup(_swigobj,_swigarg0) (_swigobj->DeleteGroup(_swigarg0)) +static PyObject *_wrap_wxConfig_DeleteGroup(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxConfig_DeleteGroup",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteGroup. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (bool )wxConfig_DeleteGroup(_arg0,*_arg1); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_Exists(_swigobj,_swigarg0) (_swigobj->Exists(_swigarg0)) +static PyObject *_wrap_wxConfig_Exists(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxConfig_Exists",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Exists. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (bool )wxConfig_Exists(_arg0,*_arg1); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_Flush(_swigobj,_swigarg0) (_swigobj->Flush(_swigarg0)) +static PyObject *_wrap_wxConfig_Flush(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + bool _arg1 = FALSE; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:wxConfig_Flush",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Flush. Expected _wxConfig_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + _result = (bool )wxConfig_Flush(_arg0,_arg1); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfig_GetAppName(_swigobj) (_swigobj->GetAppName()) +static PyObject *_wrap_wxConfig_GetAppName(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxString * _result; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_GetAppName",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetAppName. Expected _wxConfig_p."); + return NULL; + } + } + _result = new wxString (wxConfig_GetAppName(_arg0)); +{ + _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject * wxConfig_GetFirstGroup(wxConfig *self) { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstGroup(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfig_GetFirstGroup(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_GetFirstGroup",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstGroup. Expected _wxConfig_p."); + return NULL; + } + } + _result = (PyObject *)wxConfig_GetFirstGroup(_arg0); +{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfig_GetFirstEntry(wxConfig *self) { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstEntry(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfig_GetFirstEntry(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_GetFirstEntry",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstEntry. Expected _wxConfig_p."); + return NULL; + } + } + _result = (PyObject *)wxConfig_GetFirstEntry(_arg0); +{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfig_GetNextGroup(wxConfig *self,long index) { + bool cont; + wxString value; + + cont = self->GetNextGroup(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfig_GetNextGroup(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + wxConfig * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxConfig_GetNextGroup",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextGroup. Expected _wxConfig_p."); + return NULL; + } + } + _result = (PyObject *)wxConfig_GetNextGroup(_arg0,_arg1); +{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfig_GetNextEntry(wxConfig *self,long index) { + bool cont; + wxString value; + + cont = self->GetNextEntry(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfig_GetNextEntry(PyObject *self, PyObject *args) { + PyObject * _resultobj; + PyObject * _result; + wxConfig * _arg0; + long _arg1; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sl:wxConfig_GetNextEntry",&_argc0,&_arg1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextEntry. Expected _wxConfig_p."); + return NULL; + } + } + _result = (PyObject *)wxConfig_GetNextEntry(_arg0,_arg1); +{ + _resultobj = _result; +} + return _resultobj; +} + +#define wxConfig_GetNumberOfEntries(_swigobj,_swigarg0) (_swigobj->GetNumberOfEntries(_swigarg0)) +static PyObject *_wrap_wxConfig_GetNumberOfEntries(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxConfig * _arg0; + bool _arg1 = FALSE; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:wxConfig_GetNumberOfEntries",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfEntries. Expected _wxConfig_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + _result = (int )wxConfig_GetNumberOfEntries(_arg0,_arg1); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfig_GetNumberOfGroups(_swigobj,_swigarg0) (_swigobj->GetNumberOfGroups(_swigarg0)) +static PyObject *_wrap_wxConfig_GetNumberOfGroups(PyObject *self, PyObject *args) { + PyObject * _resultobj; + int _result; + wxConfig * _arg0; + bool _arg1 = FALSE; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:wxConfig_GetNumberOfGroups",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfGroups. Expected _wxConfig_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + _result = (int )wxConfig_GetNumberOfGroups(_arg0,_arg1); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfig_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxConfig_GetPath(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxString * _result; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_GetPath",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetPath. Expected _wxConfig_p."); + return NULL; + } + } + _result = new wxString (wxConfig_GetPath(_arg0)); +{ + _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfig_GetVendorName(_swigobj) (_swigobj->GetVendorName()) +static PyObject *_wrap_wxConfig_GetVendorName(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxString * _result; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_GetVendorName",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetVendorName. Expected _wxConfig_p."); + return NULL; + } + } + _result = new wxString (wxConfig_GetVendorName(_arg0)); +{ + _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfig_HasEntry(_swigobj,_swigarg0) (_swigobj->HasEntry(_swigarg0)) +static PyObject *_wrap_wxConfig_HasEntry(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxConfig_HasEntry",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasEntry. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (bool )wxConfig_HasEntry(_arg0,*_arg1); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_HasGroup(_swigobj,_swigarg0) (_swigobj->HasGroup(_swigarg0)) +static PyObject *_wrap_wxConfig_HasGroup(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxConfig_HasGroup",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasGroup. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (bool )wxConfig_HasGroup(_arg0,*_arg1); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_IsExpandingEnvVars(_swigobj) (_swigobj->IsExpandingEnvVars()) +static PyObject *_wrap_wxConfig_IsExpandingEnvVars(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_IsExpandingEnvVars",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsExpandingEnvVars. Expected _wxConfig_p."); + return NULL; + } + } + _result = (bool )wxConfig_IsExpandingEnvVars(_arg0); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfig_IsRecordingDefaults(_swigobj) (_swigobj->IsRecordingDefaults()) +static PyObject *_wrap_wxConfig_IsRecordingDefaults(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxConfig_IsRecordingDefaults",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsRecordingDefaults. Expected _wxConfig_p."); + return NULL; + } + } + _result = (bool )wxConfig_IsRecordingDefaults(_arg0); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfig_Read(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfig_Read(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxString * _result; + wxConfig * _arg0; + wxString * _arg1; + wxString * _arg2 = &wxPyEmptyStr; + char * _argc0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO|O:wxConfig_Read",&_argc0,&_obj1,&_obj2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Read. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + if (_obj2) +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2)); +} + _result = new wxString (wxConfig_Read(_arg0,*_arg1,*_arg2)); +{ + _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfig_ReadInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfig_ReadInt(PyObject *self, PyObject *args) { + PyObject * _resultobj; + long _result; + wxConfig * _arg0; + wxString * _arg1; + long _arg2 = 0; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO|l:wxConfig_ReadInt",&_argc0,&_obj1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadInt. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (long )wxConfig_ReadInt(_arg0,*_arg1,_arg2); + _resultobj = Py_BuildValue("l",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_ReadFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfig_ReadFloat(PyObject *self, PyObject *args) { + PyObject * _resultobj; + double _result; + wxConfig * _arg0; + wxString * _arg1; + double _arg2 = 0.0; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO|d:wxConfig_ReadFloat",&_argc0,&_obj1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadFloat. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (double )wxConfig_ReadFloat(_arg0,*_arg1,_arg2); + _resultobj = Py_BuildValue("d",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) +static PyObject *_wrap_wxConfig_SetAppName(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxConfig_SetAppName",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetAppName. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + wxConfig_SetAppName(_arg0,*_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_SetExpandEnvVars(_swigobj,_swigarg0) (_swigobj->SetExpandEnvVars(_swigarg0)) +static PyObject *_wrap_wxConfig_SetExpandEnvVars(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _arg0; + bool _arg1 = TRUE; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:wxConfig_SetExpandEnvVars",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetExpandEnvVars. Expected _wxConfig_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + wxConfig_SetExpandEnvVars(_arg0,_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfig_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) +static PyObject *_wrap_wxConfig_SetPath(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxConfig_SetPath",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetPath. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + wxConfig_SetPath(_arg0,*_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_SetRecordDefaults(_swigobj,_swigarg0) (_swigobj->SetRecordDefaults(_swigarg0)) +static PyObject *_wrap_wxConfig_SetRecordDefaults(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _arg0; + bool _arg1 = TRUE; + char * _argc0 = 0; + int tempbool1; + + self = self; + if(!PyArg_ParseTuple(args,"s|i:wxConfig_SetRecordDefaults",&_argc0,&tempbool1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetRecordDefaults. Expected _wxConfig_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + wxConfig_SetRecordDefaults(_arg0,_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfig_SetVendorName(_swigobj,_swigarg0) (_swigobj->SetVendorName(_swigarg0)) +static PyObject *_wrap_wxConfig_SetVendorName(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxConfig * _arg0; + wxString * _arg1; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sO:wxConfig_SetVendorName",&_argc0,&_obj1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetVendorName. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + wxConfig_SetVendorName(_arg0,*_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_Write(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfig_Write(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + wxString * _arg2; + char * _argc0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sOO:wxConfig_Write",&_argc0,&_obj1,&_obj2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Write. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} +{ + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AsString(_obj2)); +} + _result = (bool )wxConfig_Write(_arg0,*_arg1,*_arg2); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxConfig_WriteInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfig_WriteInt(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + long _arg2; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sOl:wxConfig_WriteInt",&_argc0,&_obj1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteInt. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (bool )wxConfig_WriteInt(_arg0,*_arg1,_arg2); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfig_WriteFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfig_WriteFloat(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxConfig * _arg0; + wxString * _arg1; + double _arg2; + char * _argc0 = 0; + PyObject * _obj1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"sOd:wxConfig_WriteFloat",&_argc0,&_obj1,&_arg2)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteFloat. Expected _wxConfig_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1)); +} + _result = (bool )wxConfig_WriteFloat(_arg0,*_arg1,_arg2); + _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyMethodDef utilscMethods[] = { + { "wxConfig_WriteFloat", _wrap_wxConfig_WriteFloat, 1 }, + { "wxConfig_WriteInt", _wrap_wxConfig_WriteInt, 1 }, + { "wxConfig_Write", _wrap_wxConfig_Write, 1 }, + { "wxConfig_SetVendorName", _wrap_wxConfig_SetVendorName, 1 }, + { "wxConfig_SetRecordDefaults", _wrap_wxConfig_SetRecordDefaults, 1 }, + { "wxConfig_SetPath", _wrap_wxConfig_SetPath, 1 }, + { "wxConfig_SetExpandEnvVars", _wrap_wxConfig_SetExpandEnvVars, 1 }, + { "wxConfig_SetAppName", _wrap_wxConfig_SetAppName, 1 }, + { "wxConfig_ReadFloat", _wrap_wxConfig_ReadFloat, 1 }, + { "wxConfig_ReadInt", _wrap_wxConfig_ReadInt, 1 }, + { "wxConfig_Read", _wrap_wxConfig_Read, 1 }, + { "wxConfig_IsRecordingDefaults", _wrap_wxConfig_IsRecordingDefaults, 1 }, + { "wxConfig_IsExpandingEnvVars", _wrap_wxConfig_IsExpandingEnvVars, 1 }, + { "wxConfig_HasGroup", _wrap_wxConfig_HasGroup, 1 }, + { "wxConfig_HasEntry", _wrap_wxConfig_HasEntry, 1 }, + { "wxConfig_GetVendorName", _wrap_wxConfig_GetVendorName, 1 }, + { "wxConfig_GetPath", _wrap_wxConfig_GetPath, 1 }, + { "wxConfig_GetNumberOfGroups", _wrap_wxConfig_GetNumberOfGroups, 1 }, + { "wxConfig_GetNumberOfEntries", _wrap_wxConfig_GetNumberOfEntries, 1 }, + { "wxConfig_GetNextEntry", _wrap_wxConfig_GetNextEntry, 1 }, + { "wxConfig_GetNextGroup", _wrap_wxConfig_GetNextGroup, 1 }, + { "wxConfig_GetFirstEntry", _wrap_wxConfig_GetFirstEntry, 1 }, + { "wxConfig_GetFirstGroup", _wrap_wxConfig_GetFirstGroup, 1 }, + { "wxConfig_GetAppName", _wrap_wxConfig_GetAppName, 1 }, + { "wxConfig_Flush", _wrap_wxConfig_Flush, 1 }, + { "wxConfig_Exists", _wrap_wxConfig_Exists, 1 }, + { "wxConfig_DeleteGroup", _wrap_wxConfig_DeleteGroup, 1 }, + { "wxConfig_DeleteEntry", _wrap_wxConfig_DeleteEntry, 1 }, + { "wxConfig_DontCreateOnDemand", _wrap_wxConfig_DontCreateOnDemand, 1 }, + { "delete_wxConfig", _wrap_delete_wxConfig, 1 }, + { "new_wxConfig", _wrap_new_wxConfig, 1 }, + { NULL, NULL } +}; +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void,initutilsc)() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("utilsc", utilscMethods); + d = PyModule_GetDict(m); +/* + * These are the pointer type-equivalency mappings. + * (Used by the SWIG pointer type-checker). + */ + SWIG_RegisterMapping("_signed_long","_long",0); + SWIG_RegisterMapping("_long","_unsigned_long",0); + SWIG_RegisterMapping("_long","_signed_long",0); + SWIG_RegisterMapping("_wxConfig","_class_wxConfig",0); + SWIG_RegisterMapping("_unsigned_long","_long",0); + SWIG_RegisterMapping("_signed_int","_int",0); + SWIG_RegisterMapping("_unsigned_short","_short",0); + SWIG_RegisterMapping("_signed_short","_short",0); + SWIG_RegisterMapping("_unsigned_int","_int",0); + SWIG_RegisterMapping("_short","_unsigned_short",0); + SWIG_RegisterMapping("_short","_signed_short",0); + SWIG_RegisterMapping("_int","_unsigned_int",0); + SWIG_RegisterMapping("_int","_signed_int",0); + SWIG_RegisterMapping("_class_wxConfig","_wxConfig",0); +} diff --git a/utils/wxPython/src/msw/utils.py b/utils/wxPython/src/msw/utils.py new file mode 100644 index 0000000000..3128077d1a --- /dev/null +++ b/utils/wxPython/src/msw/utils.py @@ -0,0 +1,114 @@ +# This file was created automatically by SWIG. +import utilsc +class wxConfigPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self): + if self.thisown == 1 : + utilsc.delete_wxConfig(self.this) + def DontCreateOnDemand(self): + val = utilsc.wxConfig_DontCreateOnDemand(self.this) + return val + def DeleteEntry(self,arg0,*args): + val = apply(utilsc.wxConfig_DeleteEntry,(self.this,arg0,)+args) + return val + def DeleteGroup(self,arg0): + val = utilsc.wxConfig_DeleteGroup(self.this,arg0) + return val + def Exists(self,arg0): + val = utilsc.wxConfig_Exists(self.this,arg0) + return val + def Flush(self,*args): + val = apply(utilsc.wxConfig_Flush,(self.this,)+args) + return val + def GetAppName(self): + val = utilsc.wxConfig_GetAppName(self.this) + return val + def GetFirstGroup(self): + val = utilsc.wxConfig_GetFirstGroup(self.this) + return val + def GetFirstEntry(self): + val = utilsc.wxConfig_GetFirstEntry(self.this) + return val + def GetNextGroup(self,arg0): + val = utilsc.wxConfig_GetNextGroup(self.this,arg0) + return val + def GetNextEntry(self,arg0): + val = utilsc.wxConfig_GetNextEntry(self.this,arg0) + return val + def GetNumberOfEntries(self,*args): + val = apply(utilsc.wxConfig_GetNumberOfEntries,(self.this,)+args) + return val + def GetNumberOfGroups(self,*args): + val = apply(utilsc.wxConfig_GetNumberOfGroups,(self.this,)+args) + return val + def GetPath(self): + val = utilsc.wxConfig_GetPath(self.this) + return val + def GetVendorName(self): + val = utilsc.wxConfig_GetVendorName(self.this) + return val + def HasEntry(self,arg0): + val = utilsc.wxConfig_HasEntry(self.this,arg0) + return val + def HasGroup(self,arg0): + val = utilsc.wxConfig_HasGroup(self.this,arg0) + return val + def IsExpandingEnvVars(self): + val = utilsc.wxConfig_IsExpandingEnvVars(self.this) + return val + def IsRecordingDefaults(self): + val = utilsc.wxConfig_IsRecordingDefaults(self.this) + return val + def Read(self,arg0,*args): + val = apply(utilsc.wxConfig_Read,(self.this,arg0,)+args) + return val + def ReadInt(self,arg0,*args): + val = apply(utilsc.wxConfig_ReadInt,(self.this,arg0,)+args) + return val + def ReadFloat(self,arg0,*args): + val = apply(utilsc.wxConfig_ReadFloat,(self.this,arg0,)+args) + return val + def SetAppName(self,arg0): + val = utilsc.wxConfig_SetAppName(self.this,arg0) + return val + def SetExpandEnvVars(self,*args): + val = apply(utilsc.wxConfig_SetExpandEnvVars,(self.this,)+args) + return val + def SetPath(self,arg0): + val = utilsc.wxConfig_SetPath(self.this,arg0) + return val + def SetRecordDefaults(self,*args): + val = apply(utilsc.wxConfig_SetRecordDefaults,(self.this,)+args) + return val + def SetVendorName(self,arg0): + val = utilsc.wxConfig_SetVendorName(self.this,arg0) + return val + def Write(self,arg0,arg1): + val = utilsc.wxConfig_Write(self.this,arg0,arg1) + return val + def WriteInt(self,arg0,arg1): + val = utilsc.wxConfig_WriteInt(self.this,arg0,arg1) + return val + def WriteFloat(self,arg0,arg1): + val = utilsc.wxConfig_WriteFloat(self.this,arg0,arg1) + return val + def __repr__(self): + return "" +class wxConfig(wxConfigPtr): + def __init__(self,*args) : + self.this = apply(utilsc.new_wxConfig,()+args) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/utils/wxPython/src/msw/windows.cpp b/utils/wxPython/src/msw/windows.cpp index 19c3b5d104..fc4520a99e 100644 --- a/utils/wxPython/src/msw/windows.cpp +++ b/utils/wxPython/src/msw/windows.cpp @@ -593,8 +593,8 @@ static PyObject *_wrap_wxWindow_GetCharWidth(PyObject *self, PyObject *args) { return _resultobj; } -#define wxWindow_GetClientSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetClientSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args) { +#define wxWindow_GetClientSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetClientSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_GetClientSizeTuple(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; int * _arg1; @@ -610,15 +610,15 @@ static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args) { { _arg2 = &temp0; } - if(!PyArg_ParseTuple(args,"s:wxWindow_GetClientSize",&_argc0)) + if(!PyArg_ParseTuple(args,"s:wxWindow_GetClientSizeTuple",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetClientSize. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetClientSizeTuple. Expected _wxWindow_p."); return NULL; } } - wxWindow_GetClientSize(_arg0,_arg1,_arg2); + wxWindow_GetClientSizeTuple(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; { @@ -634,6 +634,29 @@ static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args) { return _resultobj; } +#define wxWindow_GetClientSize(_swigobj) (_swigobj->GetClientSize()) +static PyObject *_wrap_wxWindow_GetClientSize(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxSize * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxWindow_GetClientSize",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetClientSize. Expected _wxWindow_p."); + return NULL; + } + } + _result = new wxSize (wxWindow_GetClientSize(_arg0)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxWindow_GetConstraints(_swigobj) (_swigobj->GetConstraints()) static PyObject *_wrap_wxWindow_GetConstraints(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -697,7 +720,8 @@ static PyObject *_wrap_wxWindow_GetFont(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxFont *)wxWindow_GetFont(_arg0); + wxFont & _result_ref = wxWindow_GetFont(_arg0); + _result = (wxFont *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -770,47 +794,6 @@ static PyObject *_wrap_wxWindow_GetId(PyObject *self, PyObject *args) { return _resultobj; } -#define wxWindow_GetPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetPosition(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - char * _argc0 = 0; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTuple(args,"s:wxWindow_GetPosition",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetPosition. Expected _wxWindow_p."); - return NULL; - } - } - wxWindow_GetPosition(_arg0,_arg1,_arg2); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - #define wxWindow_GetLabel(_swigobj) (_swigobj->GetLabel()) static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -886,6 +869,93 @@ static PyObject *_wrap_wxWindow_GetParent(PyObject *self, PyObject *args) { return _resultobj; } +#define wxWindow_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_GetPositionTuple(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxWindow * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + char * _argc0 = 0; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTuple(args,"s:wxWindow_GetPositionTuple",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetPositionTuple. Expected _wxWindow_p."); + return NULL; + } + } + wxWindow_GetPositionTuple(_arg0,_arg1,_arg2); + Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxWindow_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxWindow_GetPosition(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPoint * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxWindow_GetPosition",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetPosition. Expected _wxWindow_p."); + return NULL; + } + } + _result = new wxPoint (wxWindow_GetPosition(_arg0)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxWindow_GetRect(_swigobj) (_swigobj->GetRect()) +static PyObject *_wrap_wxWindow_GetRect(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxRect * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxWindow_GetRect",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetRect. Expected _wxWindow_p."); + return NULL; + } + } + _result = new wxRect (wxWindow_GetRect(_arg0)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxWindow_GetReturnCode(_swigobj) (_swigobj->GetReturnCode()) static PyObject *_wrap_wxWindow_GetReturnCode(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -973,8 +1043,8 @@ static PyObject *_wrap_wxWindow_GetScrollRange(PyObject *self, PyObject *args) { return _resultobj; } -#define wxWindow_GetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args) { +#define wxWindow_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_GetSizeTuple(PyObject *self, PyObject *args) { PyObject * _resultobj; wxWindow * _arg0; int * _arg1; @@ -990,15 +1060,15 @@ static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args) { { _arg2 = &temp0; } - if(!PyArg_ParseTuple(args,"s:wxWindow_GetSize",&_argc0)) + if(!PyArg_ParseTuple(args,"s:wxWindow_GetSizeTuple",&_argc0)) return NULL; if (_argc0) { if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetSize. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetSizeTuple. Expected _wxWindow_p."); return NULL; } } - wxWindow_GetSize(_arg0,_arg1,_arg2); + wxWindow_GetSizeTuple(_arg0,_arg1,_arg2); Py_INCREF(Py_None); _resultobj = Py_None; { @@ -1014,6 +1084,29 @@ static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args) { return _resultobj; } +#define wxWindow_GetSize(_swigobj) (_swigobj->GetSize()) +static PyObject *_wrap_wxWindow_GetSize(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxSize * _result; + wxWindow * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxWindow_GetSize",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetSize. Expected _wxWindow_p."); + return NULL; + } + } + _result = new wxSize (wxWindow_GetSize(_arg0)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxWindow_GetTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetTextExtent(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1519,6 +1612,35 @@ static PyObject *_wrap_wxWindow_ScrollWindow(PyObject *self, PyObject *args) { return _resultobj; } +#define wxWindow_SetAcceleratorTable(_swigobj,_swigarg0) (_swigobj->SetAcceleratorTable(_swigarg0)) +static PyObject *_wrap_wxWindow_SetAcceleratorTable(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxWindow * _arg0; + wxAcceleratorTable * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxWindow_SetAcceleratorTable",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetAcceleratorTable. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxAcceleratorTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetAcceleratorTable. Expected _wxAcceleratorTable_p."); + return NULL; + } + } + wxWindow_SetAcceleratorTable(_arg0,*_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_SetAutoLayout(_swigobj,_swigarg0) (_swigobj->SetAutoLayout(_swigarg0)) static PyObject *_wrap_wxWindow_SetAutoLayout(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -2147,6 +2269,130 @@ static PyObject *_wrap_wxWindow_WarpPointer(PyObject *self, PyObject *args) { return _resultobj; } +#define wxWindow_ConvertDialogPointToPixels(_swigobj,_swigarg0) (_swigobj->ConvertDialogToPixels(_swigarg0)) +static PyObject *_wrap_wxWindow_ConvertDialogPointToPixels(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPoint * _result; + wxWindow * _arg0; + wxPoint * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxWindow_ConvertDialogPointToPixels",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ConvertDialogPointToPixels. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_ConvertDialogPointToPixels. Expected _wxPoint_p."); + return NULL; + } + } + _result = new wxPoint (wxWindow_ConvertDialogPointToPixels(_arg0,*_arg1)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxWindow_ConvertDialogSizeToPixels(_swigobj,_swigarg0) (_swigobj->ConvertDialogToPixels(_swigarg0)) +static PyObject *_wrap_wxWindow_ConvertDialogSizeToPixels(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxSize * _result; + wxWindow * _arg0; + wxSize * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxWindow_ConvertDialogSizeToPixels",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ConvertDialogSizeToPixels. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_ConvertDialogSizeToPixels. Expected _wxSize_p."); + return NULL; + } + } + _result = new wxSize (wxWindow_ConvertDialogSizeToPixels(_arg0,*_arg1)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxWindow_ConvertPixelPointToDialog(_swigobj,_swigarg0) (_swigobj->ConvertPixelsToDialog(_swigarg0)) +static PyObject *_wrap_wxWindow_ConvertPixelPointToDialog(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxPoint * _result; + wxWindow * _arg0; + wxPoint * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxWindow_ConvertPixelPointToDialog",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ConvertPixelPointToDialog. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPoint_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_ConvertPixelPointToDialog. Expected _wxPoint_p."); + return NULL; + } + } + _result = new wxPoint (wxWindow_ConvertPixelPointToDialog(_arg0,*_arg1)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxWindow_ConvertPixelSizeToDialog(_swigobj,_swigarg0) (_swigobj->ConvertPixelsToDialog(_swigarg0)) +static PyObject *_wrap_wxWindow_ConvertPixelSizeToDialog(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxSize * _result; + wxWindow * _arg0; + wxSize * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxWindow_ConvertPixelSizeToDialog",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ConvertPixelSizeToDialog. Expected _wxWindow_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_ConvertPixelSizeToDialog. Expected _wxSize_p."); + return NULL; + } + } + _result = new wxSize (wxWindow_ConvertPixelSizeToDialog(_arg0,*_arg1)); + SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static void *SwigwxPanelTowxWindow(void *ptr) { wxPanel *src; wxWindow *dest; @@ -4317,6 +4563,10 @@ static PyMethodDef windowscMethods[] = { { "new_wxDialog", _wrap_new_wxDialog, 1 }, { "wxPanel_InitDialog", _wrap_wxPanel_InitDialog, 1 }, { "new_wxPanel", _wrap_new_wxPanel, 1 }, + { "wxWindow_ConvertPixelSizeToDialog", _wrap_wxWindow_ConvertPixelSizeToDialog, 1 }, + { "wxWindow_ConvertPixelPointToDialog", _wrap_wxWindow_ConvertPixelPointToDialog, 1 }, + { "wxWindow_ConvertDialogSizeToPixels", _wrap_wxWindow_ConvertDialogSizeToPixels, 1 }, + { "wxWindow_ConvertDialogPointToPixels", _wrap_wxWindow_ConvertDialogPointToPixels, 1 }, { "wxWindow_WarpPointer", _wrap_wxWindow_WarpPointer, 1 }, { "wxWindow_Validate", _wrap_wxWindow_Validate, 1 }, { "wxWindow_TransferDataToWindow", _wrap_wxWindow_TransferDataToWindow, 1 }, @@ -4341,6 +4591,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetConstraints", _wrap_wxWindow_SetConstraints, 1 }, { "wxWindow_SetBackgroundColour", _wrap_wxWindow_SetBackgroundColour, 1 }, { "wxWindow_SetAutoLayout", _wrap_wxWindow_SetAutoLayout, 1 }, + { "wxWindow_SetAcceleratorTable", _wrap_wxWindow_SetAcceleratorTable, 1 }, { "wxWindow_ScrollWindow", _wrap_wxWindow_ScrollWindow, 1 }, { "wxWindow_ScreenToClient", _wrap_wxWindow_ScreenToClient, 1 }, { "wxWindow_ReleaseMouse", _wrap_wxWindow_ReleaseMouse, 1 }, @@ -4360,14 +4611,17 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_GetTitle", _wrap_wxWindow_GetTitle, 1 }, { "wxWindow_GetTextExtent", _wrap_wxWindow_GetTextExtent, 1 }, { "wxWindow_GetSize", _wrap_wxWindow_GetSize, 1 }, + { "wxWindow_GetSizeTuple", _wrap_wxWindow_GetSizeTuple, 1 }, { "wxWindow_GetScrollRange", _wrap_wxWindow_GetScrollRange, 1 }, { "wxWindow_GetScrollPos", _wrap_wxWindow_GetScrollPos, 1 }, { "wxWindow_GetScrollThumb", _wrap_wxWindow_GetScrollThumb, 1 }, { "wxWindow_GetReturnCode", _wrap_wxWindow_GetReturnCode, 1 }, + { "wxWindow_GetRect", _wrap_wxWindow_GetRect, 1 }, + { "wxWindow_GetPosition", _wrap_wxWindow_GetPosition, 1 }, + { "wxWindow_GetPositionTuple", _wrap_wxWindow_GetPositionTuple, 1 }, { "wxWindow_GetParent", _wrap_wxWindow_GetParent, 1 }, { "wxWindow_GetName", _wrap_wxWindow_GetName, 1 }, { "wxWindow_GetLabel", _wrap_wxWindow_GetLabel, 1 }, - { "wxWindow_GetPosition", _wrap_wxWindow_GetPosition, 1 }, { "wxWindow_GetId", _wrap_wxWindow_GetId, 1 }, { "wxWindow_GetGrandParent", _wrap_wxWindow_GetGrandParent, 1 }, { "wxWindow_GetForegroundColour", _wrap_wxWindow_GetForegroundColour, 1 }, @@ -4375,6 +4629,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_GetDefaultItem", _wrap_wxWindow_GetDefaultItem, 1 }, { "wxWindow_GetConstraints", _wrap_wxWindow_GetConstraints, 1 }, { "wxWindow_GetClientSize", _wrap_wxWindow_GetClientSize, 1 }, + { "wxWindow_GetClientSizeTuple", _wrap_wxWindow_GetClientSizeTuple, 1 }, { "wxWindow_GetCharWidth", _wrap_wxWindow_GetCharWidth, 1 }, { "wxWindow_GetCharHeight", _wrap_wxWindow_GetCharHeight, 1 }, { "wxWindow_GetBackgroundColour", _wrap_wxWindow_GetBackgroundColour, 1 }, @@ -4410,6 +4665,7 @@ SWIGEXPORT(void,initwindowsc)() { */ SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); SWIG_RegisterMapping("_signed_long","_long",0); + SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0); SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler); SWIG_RegisterMapping("_class_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler); @@ -4459,6 +4715,7 @@ SWIGEXPORT(void,initwindowsc)() { 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); @@ -4529,6 +4786,7 @@ SWIGEXPORT(void,initwindowsc)() { 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); @@ -4536,6 +4794,7 @@ SWIGEXPORT(void,initwindowsc)() { 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","_wxBitmap",0); diff --git a/utils/wxPython/src/msw/windows.py b/utils/wxPython/src/msw/windows.py index ca35b3c304..eb705781e7 100644 --- a/utils/wxPython/src/msw/windows.py +++ b/utils/wxPython/src/msw/windows.py @@ -4,7 +4,14 @@ import windowsc from misc import * from gdi import * -import wxp +import wx + +def wxDLG_PNT(win, point): + return win.ConvertDialogPointToPixels(point) + +def wxDLG_SZE(win, size): + return win.ConvertDialogPointToPixels(size) + class wxEvtHandlerPtr : def __init__(self,this): self.this = this @@ -74,8 +81,13 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetCharWidth(self): val = windowsc.wxWindow_GetCharWidth(self.this) return val + def GetClientSizeTuple(self): + val = windowsc.wxWindow_GetClientSizeTuple(self.this) + return val def GetClientSize(self): val = windowsc.wxWindow_GetClientSize(self.this) + val = wxSizePtr(val) + val.thisown = 1 return val def GetConstraints(self): val = windowsc.wxWindow_GetConstraints(self.this) @@ -101,9 +113,6 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetId(self): val = windowsc.wxWindow_GetId(self.this) return val - def GetPosition(self): - val = windowsc.wxWindow_GetPosition(self.this) - return val def GetLabel(self): val = windowsc.wxWindow_GetLabel(self.this) return val @@ -114,6 +123,19 @@ class wxWindowPtr(wxEvtHandlerPtr): val = windowsc.wxWindow_GetParent(self.this) val = wxWindowPtr(val) return val + def GetPositionTuple(self): + val = windowsc.wxWindow_GetPositionTuple(self.this) + return val + def GetPosition(self): + val = windowsc.wxWindow_GetPosition(self.this) + val = wxPointPtr(val) + val.thisown = 1 + return val + def GetRect(self): + val = windowsc.wxWindow_GetRect(self.this) + val = wxRectPtr(val) + val.thisown = 1 + return val def GetReturnCode(self): val = windowsc.wxWindow_GetReturnCode(self.this) return val @@ -126,8 +148,13 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetScrollRange(self,arg0): val = windowsc.wxWindow_GetScrollRange(self.this,arg0) return val + def GetSizeTuple(self): + val = windowsc.wxWindow_GetSizeTuple(self.this) + return val def GetSize(self): val = windowsc.wxWindow_GetSize(self.this) + val = wxSizePtr(val) + val.thisown = 1 return val def GetTextExtent(self,arg0): val = windowsc.wxWindow_GetTextExtent(self.this,arg0) @@ -191,6 +218,9 @@ class wxWindowPtr(wxEvtHandlerPtr): args = tuple(argl) val = apply(windowsc.wxWindow_ScrollWindow,(self.this,arg0,arg1,)+args) return val + def SetAcceleratorTable(self,arg0): + val = windowsc.wxWindow_SetAcceleratorTable(self.this,arg0.this) + return val def SetAutoLayout(self,arg0): val = windowsc.wxWindow_SetAutoLayout(self.this,arg0) return val @@ -263,6 +293,26 @@ class wxWindowPtr(wxEvtHandlerPtr): def WarpPointer(self,arg0,arg1): val = windowsc.wxWindow_WarpPointer(self.this,arg0,arg1) return val + def ConvertDialogPointToPixels(self,arg0): + val = windowsc.wxWindow_ConvertDialogPointToPixels(self.this,arg0.this) + val = wxPointPtr(val) + val.thisown = 1 + return val + def ConvertDialogSizeToPixels(self,arg0): + val = windowsc.wxWindow_ConvertDialogSizeToPixels(self.this,arg0.this) + val = wxSizePtr(val) + val.thisown = 1 + return val + def ConvertPixelPointToDialog(self,arg0): + val = windowsc.wxWindow_ConvertPixelPointToDialog(self.this,arg0.this) + val = wxPointPtr(val) + val.thisown = 1 + return val + def ConvertPixelSizeToDialog(self,arg0): + val = windowsc.wxWindow_ConvertPixelSizeToDialog(self.this,arg0.this) + val = wxSizePtr(val) + val.thisown = 1 + return val def __repr__(self): return "" class wxWindow(wxWindowPtr): @@ -275,7 +325,7 @@ class wxWindow(wxWindowPtr): args = tuple(argl) self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -299,7 +349,7 @@ class wxPanel(wxPanelPtr): args = tuple(argl) self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -350,7 +400,7 @@ class wxDialog(wxDialogPtr): args = tuple(argl) self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args) self.thisown = 1 - wxp._StdDialogCallbacks(self) + wx._StdDialogCallbacks(self) @@ -395,8 +445,8 @@ class wxScrolledWindow(wxScrolledWindowPtr): args = tuple(argl) self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) - wxp._StdOnScrollCallbacks(self) + wx._StdWindowCallbacks(self) + wx._StdOnScrollCallbacks(self) diff --git a/utils/wxPython/src/msw/windows2.cpp b/utils/wxPython/src/msw/windows2.cpp index cf9c51e8ce..2c08b2472f 100644 --- a/utils/wxPython/src/msw/windows2.cpp +++ b/utils/wxPython/src/msw/windows2.cpp @@ -230,7 +230,8 @@ static PyObject *_wrap_wxGridCell_GetFont(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxFont *)wxGridCell_GetFont(_arg0); + wxFont & _result_ref = wxGridCell_GetFont(_arg0); + _result = (wxFont *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -259,7 +260,7 @@ static PyObject *_wrap_wxGridCell_SetFont(PyObject *self, PyObject *args) { return NULL; } } - wxGridCell_SetFont(_arg0,_arg1); + wxGridCell_SetFont(_arg0,*_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -388,7 +389,8 @@ static PyObject *_wrap_wxGridCell_GetBackgroundBrush(PyObject *self, PyObject *a return NULL; } } - _result = (wxBrush *)wxGridCell_GetBackgroundBrush(_arg0); + wxBrush & _result_ref = wxGridCell_GetBackgroundBrush(_arg0); + _result = (wxBrush *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -1021,7 +1023,8 @@ static PyObject *_wrap_wxGrid_GetCellTextFont(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxFont *)wxGrid_GetCellTextFont(_arg0,_arg1,_arg2); + wxFont & _result_ref = wxGrid_GetCellTextFont(_arg0,_arg1,_arg2); + _result = (wxFont *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -1044,7 +1047,8 @@ static PyObject *_wrap_wxGrid_GetDefCellTextFont(PyObject *self, PyObject *args) return NULL; } } - _result = (wxFont *)wxGrid_GetDefCellTextFont(_arg0); + wxFont & _result_ref = wxGrid_GetDefCellTextFont(_arg0); + _result = (wxFont *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -1338,7 +1342,8 @@ static PyObject *_wrap_wxGrid_GetLabelTextFont(PyObject *self, PyObject *args) { return NULL; } } - _result = (wxFont *)wxGrid_GetLabelTextFont(_arg0); + wxFont & _result_ref = wxGrid_GetLabelTextFont(_arg0); + _result = (wxFont *) &_result_ref; SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -1768,7 +1773,7 @@ static PyObject *_wrap_wxGrid_SetCellTextFont(PyObject *self, PyObject *args) { return NULL; } } - wxGrid_SetCellTextFont(_arg0,_arg1,_arg2,_arg3); + wxGrid_SetCellTextFont(_arg0,*_arg1,_arg2,_arg3); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1797,7 +1802,7 @@ static PyObject *_wrap_wxGrid_SetDefCellTextFont(PyObject *self, PyObject *args) return NULL; } } - wxGrid_SetDefCellTextFont(_arg0,_arg1); + wxGrid_SetDefCellTextFont(_arg0,*_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1885,7 +1890,7 @@ static PyObject *_wrap_wxGrid_SetDividerPen(PyObject *self, PyObject *args) { return NULL; } } - wxGrid_SetDividerPen(_arg0,_arg1); + wxGrid_SetDividerPen(_arg0,*_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2065,7 +2070,7 @@ static PyObject *_wrap_wxGrid_SetLabelTextFont(PyObject *self, PyObject *args) { return NULL; } } - wxGrid_SetLabelTextFont(_arg0,_arg1); + wxGrid_SetLabelTextFont(_arg0,*_arg1); Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; diff --git a/utils/wxPython/src/msw/windows2.py b/utils/wxPython/src/msw/windows2.py index bc40f10590..5ecbbc5443 100644 --- a/utils/wxPython/src/msw/windows2.py +++ b/utils/wxPython/src/msw/windows2.py @@ -10,7 +10,7 @@ from windows import * from controls import * from events import * -import wxp +import wx class wxGridCellPtr : def __init__(self,this): self.this = this @@ -294,16 +294,16 @@ class wxGrid(wxGridPtr): args = tuple(argl) self.this = apply(windows2c.new_wxGrid,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) - wxp._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL) - wxp._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL) - wxp._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS) - wxp._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL) - wxp._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE) - wxp._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK) - wxp._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK) - wxp._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK) - wxp._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK) + wx._StdWindowCallbacks(self) + wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL) + wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL) + wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS) + wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL) + wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE) + wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK) + wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK) + wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK) + wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK) @@ -443,7 +443,7 @@ class wxNotebook(wxNotebookPtr): args = tuple(argl) self.this = apply(windows2c.new_wxNotebook,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -521,7 +521,7 @@ class wxSplitterWindow(wxSplitterWindowPtr): args = tuple(argl) self.this = apply(windows2c.new_wxSplitterWindow,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) @@ -545,13 +545,13 @@ class wxTaskBarIcon(wxTaskBarIconPtr): def __init__(self) : self.this = windows2c.new_wxTaskBarIcon() self.thisown = 1 - wxp._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE) - wxp._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN) - wxp._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP) - wxp._checkForCallback(self, 'OnRButtonDown', wxEVT_TASKBAR_RIGHT_DOWN) - wxp._checkForCallback(self, 'OnRButtonUp', wxEVT_TASKBAR_RIGHT_UP) - wxp._checkForCallback(self, 'OnLButtonDClick',wxEVT_TASKBAR_LEFT_DCLICK) - wxp._checkForCallback(self, 'OnRButtonDClick',wxEVT_TASKBAR_RIGHT_DCLICK) + wx._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE) + wx._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN) + wx._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP) + wx._checkForCallback(self, 'OnRButtonDown', wxEVT_TASKBAR_RIGHT_DOWN) + wx._checkForCallback(self, 'OnRButtonUp', wxEVT_TASKBAR_RIGHT_UP) + wx._checkForCallback(self, 'OnLButtonDClick',wxEVT_TASKBAR_LEFT_DCLICK) + wx._checkForCallback(self, 'OnRButtonDClick',wxEVT_TASKBAR_RIGHT_DCLICK) diff --git a/utils/wxPython/src/msw/wxp.cpp b/utils/wxPython/src/msw/wx.cpp similarity index 98% rename from utils/wxPython/src/msw/wxp.cpp rename to utils/wxPython/src/msw/wx.cpp index e9ffc0d211..635923af56 100644 --- a/utils/wxPython/src/msw/wxp.cpp +++ b/utils/wxPython/src/msw/wx.cpp @@ -1,5 +1,5 @@ /* - * FILE : msw/wxp.cpp + * FILE : msw/wx.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) @@ -33,10 +33,24 @@ * and things like that. * * $Log$ - * Revision 1.6 1998/11/25 08:46:46 RD - * Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon - * Added events for wxGrid - * Other various fixes and additions + * Revision 1.1 1998/12/15 20:44:01 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. + * + * Other assorted fixes and additions. * ************************************************************************/ @@ -554,9 +568,9 @@ char *SWIG_GetPtr(char *_c, void **ptr, char *_t) #define _swig_get_hex SWIG_GetPtr -#define SWIG_init initwxpc +#define SWIG_init initwxc -#define SWIG_name "wxpc" +#define SWIG_name "wxc" #include "helpers.h" @@ -630,6 +644,7 @@ extern "C" SWIGEXPORT(void,initcontrols2c)(); extern "C" SWIGEXPORT(void,initcmndlgsc)(); extern "C" SWIGEXPORT(void,initstattoolc)(); extern "C" SWIGEXPORT(void,initframesc)(); +extern "C" SWIGEXPORT(void,initutilsc)(); static int _wrap_wxPyDefaultPosition_set(PyObject *val) { @@ -1179,7 +1194,7 @@ static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { return _resultobj; } -static PyMethodDef wxpcMethods[] = { +static PyMethodDef wxcMethods[] = { { "wxPyApp_AfterMainLoop", _wrap_wxPyApp_AfterMainLoop, 1 }, { "wxPyApp_SetVendorName", _wrap_wxPyApp_SetVendorName, 1 }, { "wxPyApp_SetTopWindow", _wrap_wxPyApp_SetTopWindow, 1 }, @@ -1209,10 +1224,10 @@ static PyObject *SWIG_globals; #ifdef __cplusplus extern "C" #endif -SWIGEXPORT(void,initwxpc)() { +SWIGEXPORT(void,initwxc)() { PyObject *m, *d; SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("wxpc", wxpcMethods); + m = Py_InitModule("wxc", wxcMethods); d = PyModule_GetDict(m); PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long) wxMAJOR_VERSION)); PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long) wxMINOR_VERSION)); @@ -1252,6 +1267,7 @@ SWIGEXPORT(void,initwxpc)() { PyDict_SetItemString(d,"wxDIALOG_MODELESS", PyInt_FromLong((long) wxDIALOG_MODELESS)); PyDict_SetItemString(d,"wxDEFAULT_FRAME_STYLE", PyInt_FromLong((long) wxDEFAULT_FRAME_STYLE)); PyDict_SetItemString(d,"wxDEFAULT_DIALOG_STYLE", PyInt_FromLong((long) wxDEFAULT_DIALOG_STYLE)); + PyDict_SetItemString(d,"wxFRAME_TOOL_WINDOW", PyInt_FromLong((long) wxFRAME_TOOL_WINDOW)); PyDict_SetItemString(d,"wxRETAINED", PyInt_FromLong((long) wxRETAINED)); PyDict_SetItemString(d,"wxBACKINGSTORE", PyInt_FromLong((long) wxBACKINGSTORE)); PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS)); @@ -1723,7 +1739,7 @@ SWIGEXPORT(void,initwxpc)() { PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGING)); PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)); PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)); - PyDict_SetItemString(d,"__version__", PyString_FromString("0.4.2")); + PyDict_SetItemString(d,"__version__", PyString_FromString("0.4.5")); 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); @@ -1747,7 +1763,9 @@ SWIGEXPORT(void,initwxpc)() { initcmndlgsc(); initstattoolc(); initframesc(); - +#ifndef SEPARATE + initutilsc(); +#endif /* * These are the pointer type-equivalency mappings. * (Used by the SWIG pointer type-checker). @@ -1841,6 +1859,7 @@ SWIGEXPORT(void,initwxpc)() { SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); SWIG_RegisterMapping("_wxMessageDialog","_class_wxMessageDialog",0); SWIG_RegisterMapping("_wxTextEntryDialog","_class_wxTextEntryDialog",0); + SWIG_RegisterMapping("_wxConfig","_class_wxConfig",0); SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); @@ -2017,6 +2036,7 @@ SWIGEXPORT(void,initwxpc)() { SWIG_RegisterMapping("_wxDash","_long",0); SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); SWIG_RegisterMapping("_class_wxTextEntryDialog","_wxTextEntryDialog",0); + SWIG_RegisterMapping("_class_wxConfig","_wxConfig",0); SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); SWIG_RegisterMapping("_wxColourData","_class_wxColourData",0); diff --git a/utils/wxPython/src/msw/wx.py b/utils/wxPython/src/msw/wx.py new file mode 100644 index 0000000000..f01ea55ea0 --- /dev/null +++ b/utils/wxPython/src/msw/wx.py @@ -0,0 +1,1241 @@ +# This file was created automatically by SWIG. +import wxc + +from misc import * + +from windows import * + +from gdi import * + +from events import * + +from mdi import * + +from frames import * + +from stattool import * + +from controls import * + +from controls2 import * + +from windows2 import * + +from cmndlgs import * + +from utils import * +class wxPyAppPtr(wxEvtHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetAppName(self): + val = wxc.wxPyApp_GetAppName(self.this) + return val + def GetAuto3D(self): + val = wxc.wxPyApp_GetAuto3D(self.this) + return val + def GetClassName(self): + val = wxc.wxPyApp_GetClassName(self.this) + return val + def GetExitOnFrameDelete(self): + val = wxc.wxPyApp_GetExitOnFrameDelete(self.this) + return val + def GetPrintMode(self): + val = wxc.wxPyApp_GetPrintMode(self.this) + return val + def GetTopWindow(self): + val = wxc.wxPyApp_GetTopWindow(self.this) + val = wxWindowPtr(val) + return val + def GetVendorName(self): + val = wxc.wxPyApp_GetVendorName(self.this) + return val + def Dispatch(self): + val = wxc.wxPyApp_Dispatch(self.this) + return val + def ExitMainLoop(self): + val = wxc.wxPyApp_ExitMainLoop(self.this) + return val + def Initialized(self): + val = wxc.wxPyApp_Initialized(self.this) + return val + def MainLoop(self): + val = wxc.wxPyApp_MainLoop(self.this) + return val + def Pending(self): + val = wxc.wxPyApp_Pending(self.this) + return val + def SetAppName(self,arg0): + val = wxc.wxPyApp_SetAppName(self.this,arg0) + return val + def SetAuto3D(self,arg0): + val = wxc.wxPyApp_SetAuto3D(self.this,arg0) + return val + def SetClassName(self,arg0): + val = wxc.wxPyApp_SetClassName(self.this,arg0) + return val + def SetExitOnFrameDelete(self,arg0): + val = wxc.wxPyApp_SetExitOnFrameDelete(self.this,arg0) + return val + def SetPrintMode(self,arg0): + val = wxc.wxPyApp_SetPrintMode(self.this,arg0) + return val + def SetTopWindow(self,arg0): + val = wxc.wxPyApp_SetTopWindow(self.this,arg0.this) + return val + 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): + def __init__(self) : + self.this = wxc.new_wxPyApp() + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +_wxStart = wxc._wxStart + +_wxSetDictionary = wxc._wxSetDictionary + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxMAJOR_VERSION = wxc.wxMAJOR_VERSION +wxMINOR_VERSION = wxc.wxMINOR_VERSION +wxRELEASE_NUMBER = wxc.wxRELEASE_NUMBER +NOT_FOUND = wxc.NOT_FOUND +wxVSCROLL = wxc.wxVSCROLL +wxHSCROLL = wxc.wxHSCROLL +wxCAPTION = wxc.wxCAPTION +wxDOUBLE_BORDER = wxc.wxDOUBLE_BORDER +wxSUNKEN_BORDER = wxc.wxSUNKEN_BORDER +wxRAISED_BORDER = wxc.wxRAISED_BORDER +wxBORDER = wxc.wxBORDER +wxSIMPLE_BORDER = wxc.wxSIMPLE_BORDER +wxSTATIC_BORDER = wxc.wxSTATIC_BORDER +wxTRANSPARENT_WINDOW = wxc.wxTRANSPARENT_WINDOW +wxNO_BORDER = wxc.wxNO_BORDER +wxUSER_COLOURS = wxc.wxUSER_COLOURS +wxNO_3D = wxc.wxNO_3D +wxTAB_TRAVERSAL = wxc.wxTAB_TRAVERSAL +wxHORIZONTAL = wxc.wxHORIZONTAL +wxVERTICAL = wxc.wxVERTICAL +wxBOTH = wxc.wxBOTH +wxCENTER_FRAME = wxc.wxCENTER_FRAME +wxSTAY_ON_TOP = wxc.wxSTAY_ON_TOP +wxICONIZE = wxc.wxICONIZE +wxMINIMIZE = wxc.wxMINIMIZE +wxMAXIMIZE = wxc.wxMAXIMIZE +wxTHICK_FRAME = wxc.wxTHICK_FRAME +wxSYSTEM_MENU = wxc.wxSYSTEM_MENU +wxMINIMIZE_BOX = wxc.wxMINIMIZE_BOX +wxMAXIMIZE_BOX = wxc.wxMAXIMIZE_BOX +wxTINY_CAPTION_HORIZ = wxc.wxTINY_CAPTION_HORIZ +wxTINY_CAPTION_VERT = wxc.wxTINY_CAPTION_VERT +wxRESIZE_BOX = wxc.wxRESIZE_BOX +wxRESIZE_BORDER = wxc.wxRESIZE_BORDER +wxDIALOG_MODAL = wxc.wxDIALOG_MODAL +wxDIALOG_MODELESS = wxc.wxDIALOG_MODELESS +wxDEFAULT_FRAME_STYLE = wxc.wxDEFAULT_FRAME_STYLE +wxDEFAULT_DIALOG_STYLE = wxc.wxDEFAULT_DIALOG_STYLE +wxFRAME_TOOL_WINDOW = wxc.wxFRAME_TOOL_WINDOW +wxRETAINED = wxc.wxRETAINED +wxBACKINGSTORE = wxc.wxBACKINGSTORE +wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS +wxTB_HORIZONTAL = wxc.wxTB_HORIZONTAL +wxTB_VERTICAL = wxc.wxTB_VERTICAL +wxTB_FLAT = wxc.wxTB_FLAT +wxCOLOURED = wxc.wxCOLOURED +wxFIXED_LENGTH = wxc.wxFIXED_LENGTH +wxALIGN_LEFT = wxc.wxALIGN_LEFT +wxALIGN_CENTER = wxc.wxALIGN_CENTER +wxALIGN_CENTRE = wxc.wxALIGN_CENTRE +wxALIGN_RIGHT = wxc.wxALIGN_RIGHT +wxLB_NEEDED_SB = wxc.wxLB_NEEDED_SB +wxLB_ALWAYS_SB = wxc.wxLB_ALWAYS_SB +wxLB_SORT = wxc.wxLB_SORT +wxLB_SINGLE = wxc.wxLB_SINGLE +wxLB_MULTIPLE = wxc.wxLB_MULTIPLE +wxLB_EXTENDED = wxc.wxLB_EXTENDED +wxLB_OWNERDRAW = wxc.wxLB_OWNERDRAW +wxLB_HSCROLL = wxc.wxLB_HSCROLL +wxPROCESS_ENTER = wxc.wxPROCESS_ENTER +wxPASSWORD = wxc.wxPASSWORD +wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER +wxTE_PASSWORD = wxc.wxTE_PASSWORD +wxTE_READONLY = wxc.wxTE_READONLY +wxTE_MULTILINE = wxc.wxTE_MULTILINE +wxCB_SIMPLE = wxc.wxCB_SIMPLE +wxCB_DROPDOWN = wxc.wxCB_DROPDOWN +wxCB_SORT = wxc.wxCB_SORT +wxCB_READONLY = wxc.wxCB_READONLY +wxRA_HORIZONTAL = wxc.wxRA_HORIZONTAL +wxRA_VERTICAL = wxc.wxRA_VERTICAL +wxRB_GROUP = wxc.wxRB_GROUP +wxGA_PROGRESSBAR = wxc.wxGA_PROGRESSBAR +wxGA_HORIZONTAL = wxc.wxGA_HORIZONTAL +wxGA_VERTICAL = wxc.wxGA_VERTICAL +wxSL_HORIZONTAL = wxc.wxSL_HORIZONTAL +wxSL_VERTICAL = wxc.wxSL_VERTICAL +wxSL_AUTOTICKS = wxc.wxSL_AUTOTICKS +wxSL_LABELS = wxc.wxSL_LABELS +wxSL_LEFT = wxc.wxSL_LEFT +wxSL_TOP = wxc.wxSL_TOP +wxSL_RIGHT = wxc.wxSL_RIGHT +wxSL_BOTTOM = wxc.wxSL_BOTTOM +wxSL_BOTH = wxc.wxSL_BOTH +wxSL_SELRANGE = wxc.wxSL_SELRANGE +wxSB_HORIZONTAL = wxc.wxSB_HORIZONTAL +wxSB_VERTICAL = wxc.wxSB_VERTICAL +wxBU_AUTODRAW = wxc.wxBU_AUTODRAW +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 +wxLC_ICON = wxc.wxLC_ICON +wxLC_SMALL_ICON = wxc.wxLC_SMALL_ICON +wxLC_LIST = wxc.wxLC_LIST +wxLC_REPORT = wxc.wxLC_REPORT +wxLC_ALIGN_TOP = wxc.wxLC_ALIGN_TOP +wxLC_ALIGN_LEFT = wxc.wxLC_ALIGN_LEFT +wxLC_AUTOARRANGE = wxc.wxLC_AUTOARRANGE +wxLC_USER_TEXT = wxc.wxLC_USER_TEXT +wxLC_EDIT_LABELS = wxc.wxLC_EDIT_LABELS +wxLC_NO_HEADER = wxc.wxLC_NO_HEADER +wxLC_NO_SORT_HEADER = wxc.wxLC_NO_SORT_HEADER +wxLC_SINGLE_SEL = wxc.wxLC_SINGLE_SEL +wxLC_SORT_ASCENDING = wxc.wxLC_SORT_ASCENDING +wxLC_SORT_DESCENDING = wxc.wxLC_SORT_DESCENDING +wxLC_MASK_TYPE = wxc.wxLC_MASK_TYPE +wxLC_MASK_ALIGN = wxc.wxLC_MASK_ALIGN +wxLC_MASK_SORT = wxc.wxLC_MASK_SORT +wxSP_VERTICAL = wxc.wxSP_VERTICAL +wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL +wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS +wxSP_WRAP = wxc.wxSP_WRAP +wxSP_NOBORDER = wxc.wxSP_NOBORDER +wxSP_3D = wxc.wxSP_3D +wxSP_BORDER = wxc.wxSP_BORDER +wxTAB_MULTILINE = wxc.wxTAB_MULTILINE +wxTAB_RIGHTJUSTIFY = wxc.wxTAB_RIGHTJUSTIFY +wxTAB_FIXEDWIDTH = wxc.wxTAB_FIXEDWIDTH +wxTAB_OWNERDRAW = wxc.wxTAB_OWNERDRAW +wxFLOOD_SURFACE = wxc.wxFLOOD_SURFACE +wxFLOOD_BORDER = wxc.wxFLOOD_BORDER +wxODDEVEN_RULE = wxc.wxODDEVEN_RULE +wxWINDING_RULE = wxc.wxWINDING_RULE +wxTOOL_TOP = wxc.wxTOOL_TOP +wxTOOL_BOTTOM = wxc.wxTOOL_BOTTOM +wxTOOL_LEFT = wxc.wxTOOL_LEFT +wxTOOL_RIGHT = wxc.wxTOOL_RIGHT +wxOK = wxc.wxOK +wxYES_NO = wxc.wxYES_NO +wxCANCEL = wxc.wxCANCEL +wxYES = wxc.wxYES +wxNO = wxc.wxNO +wxICON_EXCLAMATION = wxc.wxICON_EXCLAMATION +wxICON_HAND = wxc.wxICON_HAND +wxICON_QUESTION = wxc.wxICON_QUESTION +wxICON_INFORMATION = wxc.wxICON_INFORMATION +wxICON_STOP = wxc.wxICON_STOP +wxICON_ASTERISK = wxc.wxICON_ASTERISK +wxICON_MASK = wxc.wxICON_MASK +wxCENTRE = wxc.wxCENTRE +wxCENTER = wxc.wxCENTER +wxSIZE_AUTO_WIDTH = wxc.wxSIZE_AUTO_WIDTH +wxSIZE_AUTO_HEIGHT = wxc.wxSIZE_AUTO_HEIGHT +wxSIZE_AUTO = wxc.wxSIZE_AUTO +wxSIZE_USE_EXISTING = wxc.wxSIZE_USE_EXISTING +wxSIZE_ALLOW_MINUS_ONE = wxc.wxSIZE_ALLOW_MINUS_ONE +wxDF_TEXT = wxc.wxDF_TEXT +wxDF_BITMAP = wxc.wxDF_BITMAP +wxDF_METAFILE = wxc.wxDF_METAFILE +wxDF_DIB = wxc.wxDF_DIB +wxDF_OEMTEXT = wxc.wxDF_OEMTEXT +wxDF_FILENAME = wxc.wxDF_FILENAME +wxPORTRAIT = wxc.wxPORTRAIT +wxLANDSCAPE = wxc.wxLANDSCAPE +wxID_OPEN = wxc.wxID_OPEN +wxID_CLOSE = wxc.wxID_CLOSE +wxID_NEW = wxc.wxID_NEW +wxID_SAVE = wxc.wxID_SAVE +wxID_SAVEAS = wxc.wxID_SAVEAS +wxID_REVERT = wxc.wxID_REVERT +wxID_EXIT = wxc.wxID_EXIT +wxID_UNDO = wxc.wxID_UNDO +wxID_REDO = wxc.wxID_REDO +wxID_HELP = wxc.wxID_HELP +wxID_PRINT = wxc.wxID_PRINT +wxID_PRINT_SETUP = wxc.wxID_PRINT_SETUP +wxID_PREVIEW = wxc.wxID_PREVIEW +wxID_ABOUT = wxc.wxID_ABOUT +wxID_HELP_CONTENTS = wxc.wxID_HELP_CONTENTS +wxID_HELP_COMMANDS = wxc.wxID_HELP_COMMANDS +wxID_HELP_PROCEDURES = wxc.wxID_HELP_PROCEDURES +wxID_HELP_CONTEXT = wxc.wxID_HELP_CONTEXT +wxID_CUT = wxc.wxID_CUT +wxID_COPY = wxc.wxID_COPY +wxID_PASTE = wxc.wxID_PASTE +wxID_CLEAR = wxc.wxID_CLEAR +wxID_FIND = wxc.wxID_FIND +wxID_FILE1 = wxc.wxID_FILE1 +wxID_FILE2 = wxc.wxID_FILE2 +wxID_FILE3 = wxc.wxID_FILE3 +wxID_FILE4 = wxc.wxID_FILE4 +wxID_FILE5 = wxc.wxID_FILE5 +wxID_FILE6 = wxc.wxID_FILE6 +wxID_FILE7 = wxc.wxID_FILE7 +wxID_FILE8 = wxc.wxID_FILE8 +wxID_FILE9 = wxc.wxID_FILE9 +wxID_OK = wxc.wxID_OK +wxID_CANCEL = wxc.wxID_CANCEL +wxID_APPLY = wxc.wxID_APPLY +wxID_YES = wxc.wxID_YES +wxID_NO = wxc.wxID_NO +wxBITMAP_TYPE_BMP = wxc.wxBITMAP_TYPE_BMP +wxBITMAP_TYPE_BMP_RESOURCE = wxc.wxBITMAP_TYPE_BMP_RESOURCE +wxBITMAP_TYPE_ICO = wxc.wxBITMAP_TYPE_ICO +wxBITMAP_TYPE_ICO_RESOURCE = wxc.wxBITMAP_TYPE_ICO_RESOURCE +wxBITMAP_TYPE_CUR = wxc.wxBITMAP_TYPE_CUR +wxBITMAP_TYPE_CUR_RESOURCE = wxc.wxBITMAP_TYPE_CUR_RESOURCE +wxBITMAP_TYPE_XBM = wxc.wxBITMAP_TYPE_XBM +wxBITMAP_TYPE_XBM_DATA = wxc.wxBITMAP_TYPE_XBM_DATA +wxBITMAP_TYPE_XPM = wxc.wxBITMAP_TYPE_XPM +wxBITMAP_TYPE_XPM_DATA = wxc.wxBITMAP_TYPE_XPM_DATA +wxBITMAP_TYPE_TIF = wxc.wxBITMAP_TYPE_TIF +wxBITMAP_TYPE_TIF_RESOURCE = wxc.wxBITMAP_TYPE_TIF_RESOURCE +wxBITMAP_TYPE_GIF = wxc.wxBITMAP_TYPE_GIF +wxBITMAP_TYPE_GIF_RESOURCE = wxc.wxBITMAP_TYPE_GIF_RESOURCE +wxBITMAP_TYPE_PNG = wxc.wxBITMAP_TYPE_PNG +wxBITMAP_TYPE_PNG_RESOURCE = wxc.wxBITMAP_TYPE_PNG_RESOURCE +wxBITMAP_TYPE_ANY = wxc.wxBITMAP_TYPE_ANY +wxBITMAP_TYPE_RESOURCE = wxc.wxBITMAP_TYPE_RESOURCE +wxOPEN = wxc.wxOPEN +wxSAVE = wxc.wxSAVE +wxHIDE_READONLY = wxc.wxHIDE_READONLY +wxOVERWRITE_PROMPT = wxc.wxOVERWRITE_PROMPT +wxACCEL_ALT = wxc.wxACCEL_ALT +wxACCEL_CTRL = wxc.wxACCEL_CTRL +wxACCEL_SHIFT = wxc.wxACCEL_SHIFT +ERR_PARAM = wxc.ERR_PARAM +ERR_NODATA = wxc.ERR_NODATA +ERR_CANCEL = wxc.ERR_CANCEL +ERR_SUCCESS = wxc.ERR_SUCCESS +wxDEFAULT = wxc.wxDEFAULT +wxDECORATIVE = wxc.wxDECORATIVE +wxROMAN = wxc.wxROMAN +wxSCRIPT = wxc.wxSCRIPT +wxSWISS = wxc.wxSWISS +wxMODERN = wxc.wxMODERN +wxTELETYPE = wxc.wxTELETYPE +wxVARIABLE = wxc.wxVARIABLE +wxFIXED = wxc.wxFIXED +wxNORMAL = wxc.wxNORMAL +wxLIGHT = wxc.wxLIGHT +wxBOLD = wxc.wxBOLD +wxITALIC = wxc.wxITALIC +wxSLANT = wxc.wxSLANT +wxSOLID = wxc.wxSOLID +wxDOT = wxc.wxDOT +wxLONG_DASH = wxc.wxLONG_DASH +wxSHORT_DASH = wxc.wxSHORT_DASH +wxDOT_DASH = wxc.wxDOT_DASH +wxUSER_DASH = wxc.wxUSER_DASH +wxTRANSPARENT = wxc.wxTRANSPARENT +wxSTIPPLE = wxc.wxSTIPPLE +wxBDIAGONAL_HATCH = wxc.wxBDIAGONAL_HATCH +wxCROSSDIAG_HATCH = wxc.wxCROSSDIAG_HATCH +wxFDIAGONAL_HATCH = wxc.wxFDIAGONAL_HATCH +wxCROSS_HATCH = wxc.wxCROSS_HATCH +wxHORIZONTAL_HATCH = wxc.wxHORIZONTAL_HATCH +wxVERTICAL_HATCH = wxc.wxVERTICAL_HATCH +wxJOIN_BEVEL = wxc.wxJOIN_BEVEL +wxJOIN_MITER = wxc.wxJOIN_MITER +wxJOIN_ROUND = wxc.wxJOIN_ROUND +wxCAP_ROUND = wxc.wxCAP_ROUND +wxCAP_PROJECTING = wxc.wxCAP_PROJECTING +wxCAP_BUTT = wxc.wxCAP_BUTT +wxCLEAR = wxc.wxCLEAR +wxXOR = wxc.wxXOR +wxINVERT = wxc.wxINVERT +wxOR_REVERSE = wxc.wxOR_REVERSE +wxAND_REVERSE = wxc.wxAND_REVERSE +wxCOPY = wxc.wxCOPY +wxAND = wxc.wxAND +wxAND_INVERT = wxc.wxAND_INVERT +wxNO_OP = wxc.wxNO_OP +wxNOR = wxc.wxNOR +wxEQUIV = wxc.wxEQUIV +wxSRC_INVERT = wxc.wxSRC_INVERT +wxOR_INVERT = wxc.wxOR_INVERT +wxNAND = wxc.wxNAND +wxOR = wxc.wxOR +wxSET = wxc.wxSET +wxSRC_OR = wxc.wxSRC_OR +wxSRC_AND = wxc.wxSRC_AND +WXK_BACK = wxc.WXK_BACK +WXK_TAB = wxc.WXK_TAB +WXK_RETURN = wxc.WXK_RETURN +WXK_ESCAPE = wxc.WXK_ESCAPE +WXK_SPACE = wxc.WXK_SPACE +WXK_DELETE = wxc.WXK_DELETE +WXK_START = wxc.WXK_START +WXK_LBUTTON = wxc.WXK_LBUTTON +WXK_RBUTTON = wxc.WXK_RBUTTON +WXK_CANCEL = wxc.WXK_CANCEL +WXK_MBUTTON = wxc.WXK_MBUTTON +WXK_CLEAR = wxc.WXK_CLEAR +WXK_SHIFT = wxc.WXK_SHIFT +WXK_CONTROL = wxc.WXK_CONTROL +WXK_MENU = wxc.WXK_MENU +WXK_PAUSE = wxc.WXK_PAUSE +WXK_CAPITAL = wxc.WXK_CAPITAL +WXK_PRIOR = wxc.WXK_PRIOR +WXK_NEXT = wxc.WXK_NEXT +WXK_END = wxc.WXK_END +WXK_HOME = wxc.WXK_HOME +WXK_LEFT = wxc.WXK_LEFT +WXK_UP = wxc.WXK_UP +WXK_RIGHT = wxc.WXK_RIGHT +WXK_DOWN = wxc.WXK_DOWN +WXK_SELECT = wxc.WXK_SELECT +WXK_PRINT = wxc.WXK_PRINT +WXK_EXECUTE = wxc.WXK_EXECUTE +WXK_SNAPSHOT = wxc.WXK_SNAPSHOT +WXK_INSERT = wxc.WXK_INSERT +WXK_HELP = wxc.WXK_HELP +WXK_NUMPAD0 = wxc.WXK_NUMPAD0 +WXK_NUMPAD1 = wxc.WXK_NUMPAD1 +WXK_NUMPAD2 = wxc.WXK_NUMPAD2 +WXK_NUMPAD3 = wxc.WXK_NUMPAD3 +WXK_NUMPAD4 = wxc.WXK_NUMPAD4 +WXK_NUMPAD5 = wxc.WXK_NUMPAD5 +WXK_NUMPAD6 = wxc.WXK_NUMPAD6 +WXK_NUMPAD7 = wxc.WXK_NUMPAD7 +WXK_NUMPAD8 = wxc.WXK_NUMPAD8 +WXK_NUMPAD9 = wxc.WXK_NUMPAD9 +WXK_MULTIPLY = wxc.WXK_MULTIPLY +WXK_ADD = wxc.WXK_ADD +WXK_SEPARATOR = wxc.WXK_SEPARATOR +WXK_SUBTRACT = wxc.WXK_SUBTRACT +WXK_DECIMAL = wxc.WXK_DECIMAL +WXK_DIVIDE = wxc.WXK_DIVIDE +WXK_F1 = wxc.WXK_F1 +WXK_F2 = wxc.WXK_F2 +WXK_F3 = wxc.WXK_F3 +WXK_F4 = wxc.WXK_F4 +WXK_F5 = wxc.WXK_F5 +WXK_F6 = wxc.WXK_F6 +WXK_F7 = wxc.WXK_F7 +WXK_F8 = wxc.WXK_F8 +WXK_F9 = wxc.WXK_F9 +WXK_F10 = wxc.WXK_F10 +WXK_F11 = wxc.WXK_F11 +WXK_F12 = wxc.WXK_F12 +WXK_F13 = wxc.WXK_F13 +WXK_F14 = wxc.WXK_F14 +WXK_F15 = wxc.WXK_F15 +WXK_F16 = wxc.WXK_F16 +WXK_F17 = wxc.WXK_F17 +WXK_F18 = wxc.WXK_F18 +WXK_F19 = wxc.WXK_F19 +WXK_F20 = wxc.WXK_F20 +WXK_F21 = wxc.WXK_F21 +WXK_F22 = wxc.WXK_F22 +WXK_F23 = wxc.WXK_F23 +WXK_F24 = wxc.WXK_F24 +WXK_NUMLOCK = wxc.WXK_NUMLOCK +WXK_SCROLL = wxc.WXK_SCROLL +WXK_PAGEUP = wxc.WXK_PAGEUP +WXK_PAGEDOWN = wxc.WXK_PAGEDOWN +wxCURSOR_NONE = wxc.wxCURSOR_NONE +wxCURSOR_ARROW = wxc.wxCURSOR_ARROW +wxCURSOR_BULLSEYE = wxc.wxCURSOR_BULLSEYE +wxCURSOR_CHAR = wxc.wxCURSOR_CHAR +wxCURSOR_CROSS = wxc.wxCURSOR_CROSS +wxCURSOR_HAND = wxc.wxCURSOR_HAND +wxCURSOR_IBEAM = wxc.wxCURSOR_IBEAM +wxCURSOR_LEFT_BUTTON = wxc.wxCURSOR_LEFT_BUTTON +wxCURSOR_MAGNIFIER = wxc.wxCURSOR_MAGNIFIER +wxCURSOR_MIDDLE_BUTTON = wxc.wxCURSOR_MIDDLE_BUTTON +wxCURSOR_NO_ENTRY = wxc.wxCURSOR_NO_ENTRY +wxCURSOR_PAINT_BRUSH = wxc.wxCURSOR_PAINT_BRUSH +wxCURSOR_PENCIL = wxc.wxCURSOR_PENCIL +wxCURSOR_POINT_LEFT = wxc.wxCURSOR_POINT_LEFT +wxCURSOR_POINT_RIGHT = wxc.wxCURSOR_POINT_RIGHT +wxCURSOR_QUESTION_ARROW = wxc.wxCURSOR_QUESTION_ARROW +wxCURSOR_RIGHT_BUTTON = wxc.wxCURSOR_RIGHT_BUTTON +wxCURSOR_SIZENESW = wxc.wxCURSOR_SIZENESW +wxCURSOR_SIZENS = wxc.wxCURSOR_SIZENS +wxCURSOR_SIZENWSE = wxc.wxCURSOR_SIZENWSE +wxCURSOR_SIZEWE = wxc.wxCURSOR_SIZEWE +wxCURSOR_SIZING = wxc.wxCURSOR_SIZING +wxCURSOR_SPRAYCAN = wxc.wxCURSOR_SPRAYCAN +wxCURSOR_WAIT = wxc.wxCURSOR_WAIT +wxCURSOR_WATCH = wxc.wxCURSOR_WATCH +wxCURSOR_BLANK = wxc.wxCURSOR_BLANK +FALSE = wxc.FALSE +false = wxc.false +TRUE = wxc.TRUE +true = wxc.true +wxEVT_NULL = wxc.wxEVT_NULL +wxEVT_FIRST = wxc.wxEVT_FIRST +wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED +wxEVT_COMMAND_CHECKBOX_CLICKED = wxc.wxEVT_COMMAND_CHECKBOX_CLICKED +wxEVT_COMMAND_CHOICE_SELECTED = wxc.wxEVT_COMMAND_CHOICE_SELECTED +wxEVT_COMMAND_LISTBOX_SELECTED = wxc.wxEVT_COMMAND_LISTBOX_SELECTED +wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED +wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED +wxEVT_COMMAND_TEXT_UPDATED = wxc.wxEVT_COMMAND_TEXT_UPDATED +wxEVT_COMMAND_TEXT_ENTER = wxc.wxEVT_COMMAND_TEXT_ENTER +wxEVT_COMMAND_MENU_SELECTED = wxc.wxEVT_COMMAND_MENU_SELECTED +wxEVT_COMMAND_SLIDER_UPDATED = wxc.wxEVT_COMMAND_SLIDER_UPDATED +wxEVT_COMMAND_RADIOBOX_SELECTED = wxc.wxEVT_COMMAND_RADIOBOX_SELECTED +wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxc.wxEVT_COMMAND_RADIOBUTTON_SELECTED +wxEVT_COMMAND_SCROLLBAR_UPDATED = wxc.wxEVT_COMMAND_SCROLLBAR_UPDATED +wxEVT_COMMAND_VLBOX_SELECTED = wxc.wxEVT_COMMAND_VLBOX_SELECTED +wxEVT_COMMAND_COMBOBOX_SELECTED = wxc.wxEVT_COMMAND_COMBOBOX_SELECTED +wxEVT_COMMAND_TOOL_CLICKED = wxc.wxEVT_COMMAND_TOOL_CLICKED +wxEVT_COMMAND_TOOL_RCLICKED = wxc.wxEVT_COMMAND_TOOL_RCLICKED +wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER +wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS +wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS +wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN +wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP +wxEVT_MIDDLE_DOWN = wxc.wxEVT_MIDDLE_DOWN +wxEVT_MIDDLE_UP = wxc.wxEVT_MIDDLE_UP +wxEVT_RIGHT_DOWN = wxc.wxEVT_RIGHT_DOWN +wxEVT_RIGHT_UP = wxc.wxEVT_RIGHT_UP +wxEVT_MOTION = wxc.wxEVT_MOTION +wxEVT_ENTER_WINDOW = wxc.wxEVT_ENTER_WINDOW +wxEVT_LEAVE_WINDOW = wxc.wxEVT_LEAVE_WINDOW +wxEVT_LEFT_DCLICK = wxc.wxEVT_LEFT_DCLICK +wxEVT_MIDDLE_DCLICK = wxc.wxEVT_MIDDLE_DCLICK +wxEVT_RIGHT_DCLICK = wxc.wxEVT_RIGHT_DCLICK +wxEVT_NC_LEFT_DOWN = wxc.wxEVT_NC_LEFT_DOWN +wxEVT_NC_LEFT_UP = wxc.wxEVT_NC_LEFT_UP +wxEVT_NC_MIDDLE_DOWN = wxc.wxEVT_NC_MIDDLE_DOWN +wxEVT_NC_MIDDLE_UP = wxc.wxEVT_NC_MIDDLE_UP +wxEVT_NC_RIGHT_DOWN = wxc.wxEVT_NC_RIGHT_DOWN +wxEVT_NC_RIGHT_UP = wxc.wxEVT_NC_RIGHT_UP +wxEVT_NC_MOTION = wxc.wxEVT_NC_MOTION +wxEVT_NC_ENTER_WINDOW = wxc.wxEVT_NC_ENTER_WINDOW +wxEVT_NC_LEAVE_WINDOW = wxc.wxEVT_NC_LEAVE_WINDOW +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_SCROLL_TOP = wxc.wxEVT_SCROLL_TOP +wxEVT_SCROLL_BOTTOM = wxc.wxEVT_SCROLL_BOTTOM +wxEVT_SCROLL_LINEUP = wxc.wxEVT_SCROLL_LINEUP +wxEVT_SCROLL_LINEDOWN = wxc.wxEVT_SCROLL_LINEDOWN +wxEVT_SCROLL_PAGEUP = wxc.wxEVT_SCROLL_PAGEUP +wxEVT_SCROLL_PAGEDOWN = wxc.wxEVT_SCROLL_PAGEDOWN +wxEVT_SCROLL_THUMBTRACK = wxc.wxEVT_SCROLL_THUMBTRACK +wxEVT_SIZE = wxc.wxEVT_SIZE +wxEVT_MOVE = wxc.wxEVT_MOVE +wxEVT_CLOSE_WINDOW = wxc.wxEVT_CLOSE_WINDOW +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 +wxEVT_SHOW = wxc.wxEVT_SHOW +wxEVT_ICONIZE = wxc.wxEVT_ICONIZE +wxEVT_MAXIMIZE = wxc.wxEVT_MAXIMIZE +wxEVT_MOUSE_CAPTURE_CHANGED = wxc.wxEVT_MOUSE_CAPTURE_CHANGED +wxEVT_PAINT = wxc.wxEVT_PAINT +wxEVT_ERASE_BACKGROUND = wxc.wxEVT_ERASE_BACKGROUND +wxEVT_NC_PAINT = wxc.wxEVT_NC_PAINT +wxEVT_PAINT_ICON = wxc.wxEVT_PAINT_ICON +wxEVT_MENU_CHAR = wxc.wxEVT_MENU_CHAR +wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT +wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT +wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT +wxEVT_CONTEXT_MENU = wxc.wxEVT_CONTEXT_MENU +wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED +wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED +wxEVT_QUERY_NEW_PALETTE = wxc.wxEVT_QUERY_NEW_PALETTE +wxEVT_PALETTE_CHANGED = wxc.wxEVT_PALETTE_CHANGED +wxEVT_JOY_BUTTON_DOWN = wxc.wxEVT_JOY_BUTTON_DOWN +wxEVT_JOY_BUTTON_UP = wxc.wxEVT_JOY_BUTTON_UP +wxEVT_JOY_MOVE = wxc.wxEVT_JOY_MOVE +wxEVT_JOY_ZMOVE = wxc.wxEVT_JOY_ZMOVE +wxEVT_DROP_FILES = wxc.wxEVT_DROP_FILES +wxEVT_DRAW_ITEM = wxc.wxEVT_DRAW_ITEM +wxEVT_MEASURE_ITEM = wxc.wxEVT_MEASURE_ITEM +wxEVT_COMPARE_ITEM = wxc.wxEVT_COMPARE_ITEM +wxEVT_INIT_DIALOG = wxc.wxEVT_INIT_DIALOG +wxEVT_IDLE = wxc.wxEVT_IDLE +wxEVT_UPDATE_UI = wxc.wxEVT_UPDATE_UI +wxEVT_COMMAND_LEFT_CLICK = wxc.wxEVT_COMMAND_LEFT_CLICK +wxEVT_COMMAND_LEFT_DCLICK = wxc.wxEVT_COMMAND_LEFT_DCLICK +wxEVT_COMMAND_RIGHT_CLICK = wxc.wxEVT_COMMAND_RIGHT_CLICK +wxEVT_COMMAND_RIGHT_DCLICK = wxc.wxEVT_COMMAND_RIGHT_DCLICK +wxEVT_COMMAND_SET_FOCUS = wxc.wxEVT_COMMAND_SET_FOCUS +wxEVT_COMMAND_KILL_FOCUS = wxc.wxEVT_COMMAND_KILL_FOCUS +wxEVT_COMMAND_ENTER = wxc.wxEVT_COMMAND_ENTER +wxEVT_COMMAND_TREE_BEGIN_DRAG = wxc.wxEVT_COMMAND_TREE_BEGIN_DRAG +wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxc.wxEVT_COMMAND_TREE_BEGIN_RDRAG +wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxc.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT +wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxc.wxEVT_COMMAND_TREE_END_LABEL_EDIT +wxEVT_COMMAND_TREE_DELETE_ITEM = wxc.wxEVT_COMMAND_TREE_DELETE_ITEM +wxEVT_COMMAND_TREE_GET_INFO = wxc.wxEVT_COMMAND_TREE_GET_INFO +wxEVT_COMMAND_TREE_SET_INFO = wxc.wxEVT_COMMAND_TREE_SET_INFO +wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxc.wxEVT_COMMAND_TREE_ITEM_EXPANDED +wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxc.wxEVT_COMMAND_TREE_ITEM_EXPANDING +wxEVT_COMMAND_TREE_ITEM_COLLAPSED = wxc.wxEVT_COMMAND_TREE_ITEM_COLLAPSED +wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxc.wxEVT_COMMAND_TREE_ITEM_COLLAPSING +wxEVT_COMMAND_TREE_SEL_CHANGED = wxc.wxEVT_COMMAND_TREE_SEL_CHANGED +wxEVT_COMMAND_TREE_SEL_CHANGING = wxc.wxEVT_COMMAND_TREE_SEL_CHANGING +wxEVT_COMMAND_TREE_KEY_DOWN = wxc.wxEVT_COMMAND_TREE_KEY_DOWN +wxEVT_COMMAND_LIST_BEGIN_DRAG = wxc.wxEVT_COMMAND_LIST_BEGIN_DRAG +wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxc.wxEVT_COMMAND_LIST_BEGIN_RDRAG +wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT +wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxc.wxEVT_COMMAND_LIST_END_LABEL_EDIT +wxEVT_COMMAND_LIST_DELETE_ITEM = wxc.wxEVT_COMMAND_LIST_DELETE_ITEM +wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxc.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS +wxEVT_COMMAND_LIST_GET_INFO = wxc.wxEVT_COMMAND_LIST_GET_INFO +wxEVT_COMMAND_LIST_SET_INFO = wxc.wxEVT_COMMAND_LIST_SET_INFO +wxEVT_COMMAND_LIST_ITEM_SELECTED = wxc.wxEVT_COMMAND_LIST_ITEM_SELECTED +wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxc.wxEVT_COMMAND_LIST_ITEM_DESELECTED +wxEVT_COMMAND_LIST_KEY_DOWN = wxc.wxEVT_COMMAND_LIST_KEY_DOWN +wxEVT_COMMAND_LIST_INSERT_ITEM = wxc.wxEVT_COMMAND_LIST_INSERT_ITEM +wxEVT_COMMAND_LIST_COL_CLICK = wxc.wxEVT_COMMAND_LIST_COL_CLICK +wxEVT_COMMAND_TAB_SEL_CHANGED = wxc.wxEVT_COMMAND_TAB_SEL_CHANGED +wxEVT_COMMAND_TAB_SEL_CHANGING = wxc.wxEVT_COMMAND_TAB_SEL_CHANGING +wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED +wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING +__version__ = wxc.__version__ +cvar = wxc.cvar +wxPyDefaultPosition = wxPointPtr(wxc.cvar.wxPyDefaultPosition) +wxPyDefaultSize = wxSizePtr(wxc.cvar.wxPyDefaultSize) + + +#-------------- USER INCLUDE ----------------------- + +#---------------------------------------------------------------------------- +# Name: _extra.py +# Purpose: This file is appended to the shadow class file generated +# by SWIG. We add some unSWIGable things here. +# +# Author: Robin Dunn +# +# Created: 6/30/97 +# RCS-ID: $Id$ +# Copyright: (c) 1998 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------------- + +import sys + +#---------------------------------------------------------------------- +# This gives this module's dictionary to the C++ extension code... + +_wxSetDictionary(vars()) + + +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- +# Helper function to link python methods to wxWindows virtual +# functions by name. + +def _checkForCallback(obj, name, event, theID=-1): + try: cb = getattr(obj, name) + except: pass + else: obj.Connect(theID, -1, event, cb) + +def _StdWindowCallbacks(win): + _checkForCallback(win, "OnChar", wxEVT_CHAR) + _checkForCallback(win, "OnSize", wxEVT_SIZE) + _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) + _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) + _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) + _checkForCallback(win, "OnIdle", wxEVT_IDLE) + _checkForCallback(win, "OnPaint", wxEVT_PAINT) + +def _StdFrameCallbacks(win): + _StdWindowCallbacks(win) + _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) + _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) + _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) + + +def _StdDialogCallbacks(win): + _StdWindowCallbacks(win) + _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) + _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) + _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) + _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) + _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) + + +def _StdOnScrollCallback(win): + try: cb = getattr(win, "OnScroll") + except: pass + else: EVT_SCROLL(win, cb) + + + +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- +# functions that look and act like the C++ Macros of the same name + + +# Miscellaneous +def EVT_SIZE(win, func): + win.Connect(-1, -1, wxEVT_SIZE, func) + +def EVT_MOVE(win, func): + win.Connect(-1, -1, wxEVT_MOVE, func) + +def EVT_CLOSE(win, func): + win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) + +def EVT_PAINT(win, func): + win.Connect(-1, -1, wxEVT_PAINT, func) + +def EVT_ERASE_BACKGROUND(win, func): + win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func) + +def EVT_CHAR(win, func): + win.Connect(-1, -1, wxEVT_CHAR, func) + +def EVT_CHAR_HOOK(win, func): + win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) + +def EVT_MENU_HIGHLIGHT(win, id, func): + win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) + +def EVT_MENU_HIGHLIGHT_ALL(win, func): + win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func) + +def EVT_SET_FOCUS(win, func): + win.Connect(-1, -1, wxEVT_SET_FOCUS, func) + +def EVT_KILL_FOCUS(win, func): + win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) + +def EVT_ACTIVATE(win, func): + win.Connect(-1, -1, wxEVT_ACTIVATE, func) + +def EVT_ACTIVATE_APP(win, func): + win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func) + +def EVT_END_SESSION(win, func): + win.Connect(-1, -1, wxEVT_END_SESSION, func) + +def EVT_QUERY_END_SESSION(win, func): + win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func) + +def EVT_DROP_FILES(win, func): + win.Connect(-1, -1, wxEVT_DROP_FILES, func) + +def EVT_INIT_DIALOG(win, func): + win.Connect(-1, -1, wxEVT_INIT_DIALOG, func) + +def EVT_SYS_COLOUR_CHANGED(win, func): + win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func) + +def EVT_SHOW(win, func): + win.Connect(-1, -1, wxEVT_SHOW, func) + +def EVT_MAXIMIZE(win, func): + win.Connect(-1, -1, wxEVT_MAXIMIZE, func) + +def EVT_ICONIZE(win, func): + win.Connect(-1, -1, wxEVT_ICONIZE, func) + +def EVT_NAVIGATION_KEY(win, func): + win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func) + + +# Mouse Events +def EVT_LEFT_DOWN(win, func): + win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) + +def EVT_LEFT_UP(win, func): + win.Connect(-1, -1, wxEVT_LEFT_UP, func) + +def EVT_MIDDLE_DOWN(win, func): + win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) + +def EVT_MIDDLE_UP(win, func): + win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) + +def EVT_RIGHT_DOWN(win, func): + win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) + +def EVT_RIGHT_UP(win, func): + win.Connect(-1, -1, wxEVT_RIGHT_UP, func) + +def EVT_MOTION(win, func): + win.Connect(-1, -1, wxEVT_MOTION, func) + +def EVT_LEFT_DCLICK(win, func): + win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) + +def EVT_MIDDLE_DCLICK(win, func): + win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) + +def EVT_RIGHT_DCLICK(win, func): + win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) + +def EVT_LEAVE_WINDOW(win, func): + win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) + +def EVT_ENTER_WINDOW(win, func): + win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) + + +# all mouse events +def EVT_MOUSE_EVENTS(win, func): + win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) + win.Connect(-1, -1, wxEVT_LEFT_UP, func) + win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) + win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) + win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) + win.Connect(-1, -1, wxEVT_RIGHT_UP, func) + win.Connect(-1, -1, wxEVT_MOTION, func) + win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) + win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) + win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) + win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) + win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) + +# EVT_COMMAND +def EVT_COMMAND(win, id, cmd, func): + win.Connect(id, -1, cmd, func) + +def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): + win.Connect(id1, id2, cmd, func) + +# Scrolling +def EVT_SCROLL(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) + win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) + win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) + win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) + win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) + win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) + win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func) + +def EVT_SCROLL_TOP(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) + +def EVT_SCROLL_BOTTOM(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) + +def EVT_SCROLL_LINEUP(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) + +def EVT_SCROLL_LINEDOWN(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) + +def EVT_SCROLL_PAGEUP(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) + +def EVT_SCROLL_PAGEDOWN(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) + +def EVT_SCROLL_THUMBTRACK(win, func): + win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func) + + + +# Scrolling, with an id +def EVT_COMMAND_SCROLL(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_TOP, func) + win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) + win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) + win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) + win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) + win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) + win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) + +def EVT_COMMAND_SCROLL_TOP(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_TOP, func) + +def EVT_COMMAND_SCROLL_BOTTOM(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) + +def EVT_COMMAND_SCROLL_LINEUP(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) + +def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) + +def EVT_COMMAND_SCROLL_PAGEUP(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) + +def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) + +def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func) + + +# Convenience commands +def EVT_BUTTON(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func) + +def EVT_CHECKBOX(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func) + +def EVT_CHOICE(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func) + +def EVT_LISTBOX(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func) + +def EVT_LISTBOX_DCLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func) + +def EVT_TEXT(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func) + +def EVT_TEXT_ENTER(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func) + +def EVT_MENU(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func) + +def EVT_MENU_RANGE(win, id1, id2, func): + win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func) + +def EVT_SLIDER(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func) + +def EVT_RADIOBOX(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func) + +def EVT_RADIOBUTTON(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func) + +def EVT_VLBOX(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func) + +def EVT_COMBOBOX(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func) + +def EVT_TOOL(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func) + +def EVT_TOOL_RCLICKED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func) + +def EVT_TOOL_ENTER(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func) + +def EVT_CHECKLISTBOX(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func) + + +# Generic command events + +def EVT_COMMAND_LEFT_CLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func) + +def EVT_COMMAND_LEFT_DCLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func) + +def EVT_COMMAND_RIGHT_CLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func) + +def EVT_COMMAND_RIGHT_DCLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func) + +def EVT_COMMAND_SET_FOCUS(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func) + +def EVT_COMMAND_KILL_FOCUS(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func) + +def EVT_COMMAND_ENTER(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_ENTER, func) + + +# wxNotebook events +def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func) + +def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func) + + +# wxTreeCtrl events +def EVT_TREE_BEGIN_DRAG(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func) + +def EVT_TREE_BEGIN_RDRAG(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func) + +def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func) + +def EVT_TREE_END_LABEL_EDIT(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func) + +def EVT_TREE_GET_INFO(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func) + +def EVT_TREE_SET_INFO(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func) + +def EVT_TREE_ITEM_EXPANDED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func) + +def EVT_TREE_ITEM_EXPANDING(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func) + +def EVT_TREE_ITEM_COLLAPSED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func) + +def EVT_TREE_ITEM_COLLAPSING(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func) + +def EVT_TREE_SEL_CHANGED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func) + +def EVT_TREE_SEL_CHANGING(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func) + +def EVT_TREE_KEY_DOWN(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func) + +def EVT_TREE_DELETE_ITEM(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func) + + +# wxSpinButton +def EVT_SPIN_UP(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) + +def EVT_SPIN_DOWN(win, id, func): + win.Connect(id, -1,wxEVT_SCROLL_LINEDOWN, func) + +def EVT_SPIN(win, id, func): + win.Connect(id, -1, wxEVT_SCROLL_TOP, func) + win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) + win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) + win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) + win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) + win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) + win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) + + + + +# wxTaskBarIcon +def EVT_TASKBAR_MOVE(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func) + +def EVT_TASKBAR_LEFT_DOWN(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func) + +def EVT_TASKBAR_LEFT_UP(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func) + +def EVT_TASKBAR_RIGHT_DOWN(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func) + +def EVT_TASKBAR_RIGHT_UP(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func) + +def EVT_TASKBAR_LEFT_DCLICK(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func) + +def EVT_TASKBAR_RIGHT_DCLICK(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) + + +# wxGrid +def EVT_GRID_SELECT_CELL(win, fn): + win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) + +def EVT_GRID_CREATE_CELL(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) + +def EVT_GRID_CHANGE_LABELS(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) + +def EVT_GRID_CHANGE_SEL_LABEL(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) + +def EVT_GRID_CELL_CHANGE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) + +def EVT_GRID_CELL_LCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) + +def EVT_GRID_CELL_RCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) + +def EVT_GRID_LABEL_LCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) + +def EVT_GRID_LABEL_RCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) + + + + +#---------------------------------------------------------------------- + +class wxTimer(wxPyTimer): + def __init__(self): + wxPyTimer.__init__(self, self.Notify) # derived class must provide + # Notify(self) method. + +#---------------------------------------------------------------------- +# Some wxWin methods can take "NULL" as parameters, but the shadow classes +# expect an object with the SWIG pointer as a 'this' member. This class +# and instance fools the shadow into passing the NULL pointer. + +class NullObj: + this = 'NULL' # SWIG converts this to (void*)0 + +NULL = NullObj() + + +#---------------------------------------------------------------------- +# aliases + +wxColor = wxColour +wxNamedColor = wxNamedColour + +wxPyDefaultPosition.Set(-1,-1) +wxPyDefaultSize.Set(-1,-1) + +#---------------------------------------------------------------------- + +## class wxPyStdOutWindow(wxFrame): +## def __init__(self, title = "wxPython: stdout/stderr"): +## wxFrame.__init__(self, NULL, title) +## self.title = title +## self.text = wxTextWindow(self) +## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD)) +## self.SetSize(-1,-1,400,200) +## self.Show(false) +## self.isShown = false + +## def write(self, str): # with this method, +## if not self.isShown: +## self.Show(true) +## self.isShown = true +## self.text.WriteText(str) + +## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it +## self.Show(false) +## self.isShown = false + + +_defRedirect = (wxPlatform == '__WXMSW__') + +#---------------------------------------------------------------------- +# The main application class. Derive from this and implement an OnInit +# method that creates a frame and then calls self.SetTopWindow(frame) + +class wxApp(wxPyApp): + error = 'wxApp.error' + + def __init__(self, redirect=_defRedirect, filename=None): + wxPyApp.__init__(self) + self.stdioWin = None + self.saveStdio = (sys.stdout, sys.stderr) + if redirect: + self.RedirectStdio(filename) + + # this initializes wxWindows and then calls our OnInit + _wxStart(self.OnInit) + + + def __del__(self): + try: + self.RestoreStdio() + except: + pass + + def RedirectStdio(self, filename): + if filename: + sys.stdout = sys.stderr = open(filename, 'a') + else: + raise self.error, 'wxPyStdOutWindow not yet implemented.' + #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow() + + def RestoreStdio(self): + sys.stdout, sys.stderr = self.saveStdio + if self.stdioWin != None: + self.stdioWin.Show(false) + self.stdioWin.Destroy() + self.stdioWin = None + + +#---------------------------------------------------------------------------- +# +# $Log$ +# Revision 1.1 1998/12/15 20:44:04 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. +# +# Other assorted fixes and additions. +# +# Revision 1.7 1998/11/25 08:45:21 RD +# +# Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon +# Added events for wxGrid +# Other various fixes and additions +# +# Revision 1.6 1998/11/16 00:00:52 RD +# Generic treectrl for wxPython/GTK compiles... +# +# Revision 1.5 1998/10/20 07:38:02 RD +# bug fix +# +# Revision 1.4 1998/10/20 06:43:54 RD +# New wxTreeCtrl wrappers (untested) +# some changes in helpers +# etc. +# +# Revision 1.3 1998/10/02 06:40:33 RD +# +# Version 0.4 of wxPython for MSW. +# +# Revision 1.2 1998/08/18 19:48:12 RD +# more wxGTK compatibility things. +# +# It builds now but there are serious runtime problems... +# +# Revision 1.1 1998/08/09 08:25:49 RD +# Initial version +# +# + diff --git a/utils/wxPython/src/msw/wxp.py b/utils/wxPython/src/msw/wxp.py deleted file mode 100644 index 72af0862c4..0000000000 --- a/utils/wxPython/src/msw/wxp.py +++ /dev/null @@ -1,1218 +0,0 @@ -# This file was created automatically by SWIG. -import wxpc - -from misc import * - -from windows import * - -from gdi import * - -from events import * - -from mdi import * - -from frames import * - -from stattool import * - -from controls import * - -from controls2 import * - -from windows2 import * - -from cmndlgs import * -class wxPyAppPtr(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetAppName(self): - val = wxpc.wxPyApp_GetAppName(self.this) - return val - def GetAuto3D(self): - val = wxpc.wxPyApp_GetAuto3D(self.this) - return val - def GetClassName(self): - val = wxpc.wxPyApp_GetClassName(self.this) - return val - def GetExitOnFrameDelete(self): - val = wxpc.wxPyApp_GetExitOnFrameDelete(self.this) - return val - def GetPrintMode(self): - val = wxpc.wxPyApp_GetPrintMode(self.this) - return val - def GetTopWindow(self): - val = wxpc.wxPyApp_GetTopWindow(self.this) - val = wxWindowPtr(val) - return val - def GetVendorName(self): - val = wxpc.wxPyApp_GetVendorName(self.this) - return val - def Dispatch(self): - val = wxpc.wxPyApp_Dispatch(self.this) - return val - def ExitMainLoop(self): - val = wxpc.wxPyApp_ExitMainLoop(self.this) - return val - def Initialized(self): - val = wxpc.wxPyApp_Initialized(self.this) - return val - def MainLoop(self): - val = wxpc.wxPyApp_MainLoop(self.this) - return val - def Pending(self): - val = wxpc.wxPyApp_Pending(self.this) - return val - def SetAppName(self,arg0): - val = wxpc.wxPyApp_SetAppName(self.this,arg0) - return val - def SetAuto3D(self,arg0): - val = wxpc.wxPyApp_SetAuto3D(self.this,arg0) - return val - def SetClassName(self,arg0): - val = wxpc.wxPyApp_SetClassName(self.this,arg0) - return val - def SetExitOnFrameDelete(self,arg0): - val = wxpc.wxPyApp_SetExitOnFrameDelete(self.this,arg0) - return val - def SetPrintMode(self,arg0): - val = wxpc.wxPyApp_SetPrintMode(self.this,arg0) - return val - def SetTopWindow(self,arg0): - val = wxpc.wxPyApp_SetTopWindow(self.this,arg0.this) - return val - def SetVendorName(self,arg0): - val = wxpc.wxPyApp_SetVendorName(self.this,arg0) - return val - def AfterMainLoop(self): - val = wxpc.wxPyApp_AfterMainLoop(self.this) - return val - def __repr__(self): - return "" -class wxPyApp(wxPyAppPtr): - def __init__(self) : - self.this = wxpc.new_wxPyApp() - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -_wxStart = wxpc._wxStart - -_wxSetDictionary = wxpc._wxSetDictionary - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxMAJOR_VERSION = wxpc.wxMAJOR_VERSION -wxMINOR_VERSION = wxpc.wxMINOR_VERSION -wxRELEASE_NUMBER = wxpc.wxRELEASE_NUMBER -NOT_FOUND = wxpc.NOT_FOUND -wxVSCROLL = wxpc.wxVSCROLL -wxHSCROLL = wxpc.wxHSCROLL -wxCAPTION = wxpc.wxCAPTION -wxDOUBLE_BORDER = wxpc.wxDOUBLE_BORDER -wxSUNKEN_BORDER = wxpc.wxSUNKEN_BORDER -wxRAISED_BORDER = wxpc.wxRAISED_BORDER -wxBORDER = wxpc.wxBORDER -wxSIMPLE_BORDER = wxpc.wxSIMPLE_BORDER -wxSTATIC_BORDER = wxpc.wxSTATIC_BORDER -wxTRANSPARENT_WINDOW = wxpc.wxTRANSPARENT_WINDOW -wxNO_BORDER = wxpc.wxNO_BORDER -wxUSER_COLOURS = wxpc.wxUSER_COLOURS -wxNO_3D = wxpc.wxNO_3D -wxTAB_TRAVERSAL = wxpc.wxTAB_TRAVERSAL -wxHORIZONTAL = wxpc.wxHORIZONTAL -wxVERTICAL = wxpc.wxVERTICAL -wxBOTH = wxpc.wxBOTH -wxCENTER_FRAME = wxpc.wxCENTER_FRAME -wxSTAY_ON_TOP = wxpc.wxSTAY_ON_TOP -wxICONIZE = wxpc.wxICONIZE -wxMINIMIZE = wxpc.wxMINIMIZE -wxMAXIMIZE = wxpc.wxMAXIMIZE -wxTHICK_FRAME = wxpc.wxTHICK_FRAME -wxSYSTEM_MENU = wxpc.wxSYSTEM_MENU -wxMINIMIZE_BOX = wxpc.wxMINIMIZE_BOX -wxMAXIMIZE_BOX = wxpc.wxMAXIMIZE_BOX -wxTINY_CAPTION_HORIZ = wxpc.wxTINY_CAPTION_HORIZ -wxTINY_CAPTION_VERT = wxpc.wxTINY_CAPTION_VERT -wxRESIZE_BOX = wxpc.wxRESIZE_BOX -wxRESIZE_BORDER = wxpc.wxRESIZE_BORDER -wxDIALOG_MODAL = wxpc.wxDIALOG_MODAL -wxDIALOG_MODELESS = wxpc.wxDIALOG_MODELESS -wxDEFAULT_FRAME_STYLE = wxpc.wxDEFAULT_FRAME_STYLE -wxDEFAULT_DIALOG_STYLE = wxpc.wxDEFAULT_DIALOG_STYLE -wxRETAINED = wxpc.wxRETAINED -wxBACKINGSTORE = wxpc.wxBACKINGSTORE -wxTB_3DBUTTONS = wxpc.wxTB_3DBUTTONS -wxTB_HORIZONTAL = wxpc.wxTB_HORIZONTAL -wxTB_VERTICAL = wxpc.wxTB_VERTICAL -wxTB_FLAT = wxpc.wxTB_FLAT -wxCOLOURED = wxpc.wxCOLOURED -wxFIXED_LENGTH = wxpc.wxFIXED_LENGTH -wxALIGN_LEFT = wxpc.wxALIGN_LEFT -wxALIGN_CENTER = wxpc.wxALIGN_CENTER -wxALIGN_CENTRE = wxpc.wxALIGN_CENTRE -wxALIGN_RIGHT = wxpc.wxALIGN_RIGHT -wxLB_NEEDED_SB = wxpc.wxLB_NEEDED_SB -wxLB_ALWAYS_SB = wxpc.wxLB_ALWAYS_SB -wxLB_SORT = wxpc.wxLB_SORT -wxLB_SINGLE = wxpc.wxLB_SINGLE -wxLB_MULTIPLE = wxpc.wxLB_MULTIPLE -wxLB_EXTENDED = wxpc.wxLB_EXTENDED -wxLB_OWNERDRAW = wxpc.wxLB_OWNERDRAW -wxLB_HSCROLL = wxpc.wxLB_HSCROLL -wxPROCESS_ENTER = wxpc.wxPROCESS_ENTER -wxPASSWORD = wxpc.wxPASSWORD -wxTE_PROCESS_ENTER = wxpc.wxTE_PROCESS_ENTER -wxTE_PASSWORD = wxpc.wxTE_PASSWORD -wxTE_READONLY = wxpc.wxTE_READONLY -wxTE_MULTILINE = wxpc.wxTE_MULTILINE -wxCB_SIMPLE = wxpc.wxCB_SIMPLE -wxCB_DROPDOWN = wxpc.wxCB_DROPDOWN -wxCB_SORT = wxpc.wxCB_SORT -wxCB_READONLY = wxpc.wxCB_READONLY -wxRA_HORIZONTAL = wxpc.wxRA_HORIZONTAL -wxRA_VERTICAL = wxpc.wxRA_VERTICAL -wxRB_GROUP = wxpc.wxRB_GROUP -wxGA_PROGRESSBAR = wxpc.wxGA_PROGRESSBAR -wxGA_HORIZONTAL = wxpc.wxGA_HORIZONTAL -wxGA_VERTICAL = wxpc.wxGA_VERTICAL -wxSL_HORIZONTAL = wxpc.wxSL_HORIZONTAL -wxSL_VERTICAL = wxpc.wxSL_VERTICAL -wxSL_AUTOTICKS = wxpc.wxSL_AUTOTICKS -wxSL_LABELS = wxpc.wxSL_LABELS -wxSL_LEFT = wxpc.wxSL_LEFT -wxSL_TOP = wxpc.wxSL_TOP -wxSL_RIGHT = wxpc.wxSL_RIGHT -wxSL_BOTTOM = wxpc.wxSL_BOTTOM -wxSL_BOTH = wxpc.wxSL_BOTH -wxSL_SELRANGE = wxpc.wxSL_SELRANGE -wxSB_HORIZONTAL = wxpc.wxSB_HORIZONTAL -wxSB_VERTICAL = wxpc.wxSB_VERTICAL -wxBU_AUTODRAW = wxpc.wxBU_AUTODRAW -wxBU_NOAUTODRAW = wxpc.wxBU_NOAUTODRAW -wxTR_HAS_BUTTONS = wxpc.wxTR_HAS_BUTTONS -wxTR_EDIT_LABELS = wxpc.wxTR_EDIT_LABELS -wxTR_LINES_AT_ROOT = wxpc.wxTR_LINES_AT_ROOT -wxLC_ICON = wxpc.wxLC_ICON -wxLC_SMALL_ICON = wxpc.wxLC_SMALL_ICON -wxLC_LIST = wxpc.wxLC_LIST -wxLC_REPORT = wxpc.wxLC_REPORT -wxLC_ALIGN_TOP = wxpc.wxLC_ALIGN_TOP -wxLC_ALIGN_LEFT = wxpc.wxLC_ALIGN_LEFT -wxLC_AUTOARRANGE = wxpc.wxLC_AUTOARRANGE -wxLC_USER_TEXT = wxpc.wxLC_USER_TEXT -wxLC_EDIT_LABELS = wxpc.wxLC_EDIT_LABELS -wxLC_NO_HEADER = wxpc.wxLC_NO_HEADER -wxLC_NO_SORT_HEADER = wxpc.wxLC_NO_SORT_HEADER -wxLC_SINGLE_SEL = wxpc.wxLC_SINGLE_SEL -wxLC_SORT_ASCENDING = wxpc.wxLC_SORT_ASCENDING -wxLC_SORT_DESCENDING = wxpc.wxLC_SORT_DESCENDING -wxLC_MASK_TYPE = wxpc.wxLC_MASK_TYPE -wxLC_MASK_ALIGN = wxpc.wxLC_MASK_ALIGN -wxLC_MASK_SORT = wxpc.wxLC_MASK_SORT -wxSP_VERTICAL = wxpc.wxSP_VERTICAL -wxSP_HORIZONTAL = wxpc.wxSP_HORIZONTAL -wxSP_ARROW_KEYS = wxpc.wxSP_ARROW_KEYS -wxSP_WRAP = wxpc.wxSP_WRAP -wxSP_NOBORDER = wxpc.wxSP_NOBORDER -wxSP_3D = wxpc.wxSP_3D -wxSP_BORDER = wxpc.wxSP_BORDER -wxTAB_MULTILINE = wxpc.wxTAB_MULTILINE -wxTAB_RIGHTJUSTIFY = wxpc.wxTAB_RIGHTJUSTIFY -wxTAB_FIXEDWIDTH = wxpc.wxTAB_FIXEDWIDTH -wxTAB_OWNERDRAW = wxpc.wxTAB_OWNERDRAW -wxFLOOD_SURFACE = wxpc.wxFLOOD_SURFACE -wxFLOOD_BORDER = wxpc.wxFLOOD_BORDER -wxODDEVEN_RULE = wxpc.wxODDEVEN_RULE -wxWINDING_RULE = wxpc.wxWINDING_RULE -wxTOOL_TOP = wxpc.wxTOOL_TOP -wxTOOL_BOTTOM = wxpc.wxTOOL_BOTTOM -wxTOOL_LEFT = wxpc.wxTOOL_LEFT -wxTOOL_RIGHT = wxpc.wxTOOL_RIGHT -wxOK = wxpc.wxOK -wxYES_NO = wxpc.wxYES_NO -wxCANCEL = wxpc.wxCANCEL -wxYES = wxpc.wxYES -wxNO = wxpc.wxNO -wxICON_EXCLAMATION = wxpc.wxICON_EXCLAMATION -wxICON_HAND = wxpc.wxICON_HAND -wxICON_QUESTION = wxpc.wxICON_QUESTION -wxICON_INFORMATION = wxpc.wxICON_INFORMATION -wxICON_STOP = wxpc.wxICON_STOP -wxICON_ASTERISK = wxpc.wxICON_ASTERISK -wxICON_MASK = wxpc.wxICON_MASK -wxCENTRE = wxpc.wxCENTRE -wxCENTER = wxpc.wxCENTER -wxSIZE_AUTO_WIDTH = wxpc.wxSIZE_AUTO_WIDTH -wxSIZE_AUTO_HEIGHT = wxpc.wxSIZE_AUTO_HEIGHT -wxSIZE_AUTO = wxpc.wxSIZE_AUTO -wxSIZE_USE_EXISTING = wxpc.wxSIZE_USE_EXISTING -wxSIZE_ALLOW_MINUS_ONE = wxpc.wxSIZE_ALLOW_MINUS_ONE -wxDF_TEXT = wxpc.wxDF_TEXT -wxDF_BITMAP = wxpc.wxDF_BITMAP -wxDF_METAFILE = wxpc.wxDF_METAFILE -wxDF_DIB = wxpc.wxDF_DIB -wxDF_OEMTEXT = wxpc.wxDF_OEMTEXT -wxDF_FILENAME = wxpc.wxDF_FILENAME -wxPORTRAIT = wxpc.wxPORTRAIT -wxLANDSCAPE = wxpc.wxLANDSCAPE -wxID_OPEN = wxpc.wxID_OPEN -wxID_CLOSE = wxpc.wxID_CLOSE -wxID_NEW = wxpc.wxID_NEW -wxID_SAVE = wxpc.wxID_SAVE -wxID_SAVEAS = wxpc.wxID_SAVEAS -wxID_REVERT = wxpc.wxID_REVERT -wxID_EXIT = wxpc.wxID_EXIT -wxID_UNDO = wxpc.wxID_UNDO -wxID_REDO = wxpc.wxID_REDO -wxID_HELP = wxpc.wxID_HELP -wxID_PRINT = wxpc.wxID_PRINT -wxID_PRINT_SETUP = wxpc.wxID_PRINT_SETUP -wxID_PREVIEW = wxpc.wxID_PREVIEW -wxID_ABOUT = wxpc.wxID_ABOUT -wxID_HELP_CONTENTS = wxpc.wxID_HELP_CONTENTS -wxID_HELP_COMMANDS = wxpc.wxID_HELP_COMMANDS -wxID_HELP_PROCEDURES = wxpc.wxID_HELP_PROCEDURES -wxID_HELP_CONTEXT = wxpc.wxID_HELP_CONTEXT -wxID_CUT = wxpc.wxID_CUT -wxID_COPY = wxpc.wxID_COPY -wxID_PASTE = wxpc.wxID_PASTE -wxID_CLEAR = wxpc.wxID_CLEAR -wxID_FIND = wxpc.wxID_FIND -wxID_FILE1 = wxpc.wxID_FILE1 -wxID_FILE2 = wxpc.wxID_FILE2 -wxID_FILE3 = wxpc.wxID_FILE3 -wxID_FILE4 = wxpc.wxID_FILE4 -wxID_FILE5 = wxpc.wxID_FILE5 -wxID_FILE6 = wxpc.wxID_FILE6 -wxID_FILE7 = wxpc.wxID_FILE7 -wxID_FILE8 = wxpc.wxID_FILE8 -wxID_FILE9 = wxpc.wxID_FILE9 -wxID_OK = wxpc.wxID_OK -wxID_CANCEL = wxpc.wxID_CANCEL -wxID_APPLY = wxpc.wxID_APPLY -wxID_YES = wxpc.wxID_YES -wxID_NO = wxpc.wxID_NO -wxBITMAP_TYPE_BMP = wxpc.wxBITMAP_TYPE_BMP -wxBITMAP_TYPE_BMP_RESOURCE = wxpc.wxBITMAP_TYPE_BMP_RESOURCE -wxBITMAP_TYPE_ICO = wxpc.wxBITMAP_TYPE_ICO -wxBITMAP_TYPE_ICO_RESOURCE = wxpc.wxBITMAP_TYPE_ICO_RESOURCE -wxBITMAP_TYPE_CUR = wxpc.wxBITMAP_TYPE_CUR -wxBITMAP_TYPE_CUR_RESOURCE = wxpc.wxBITMAP_TYPE_CUR_RESOURCE -wxBITMAP_TYPE_XBM = wxpc.wxBITMAP_TYPE_XBM -wxBITMAP_TYPE_XBM_DATA = wxpc.wxBITMAP_TYPE_XBM_DATA -wxBITMAP_TYPE_XPM = wxpc.wxBITMAP_TYPE_XPM -wxBITMAP_TYPE_XPM_DATA = wxpc.wxBITMAP_TYPE_XPM_DATA -wxBITMAP_TYPE_TIF = wxpc.wxBITMAP_TYPE_TIF -wxBITMAP_TYPE_TIF_RESOURCE = wxpc.wxBITMAP_TYPE_TIF_RESOURCE -wxBITMAP_TYPE_GIF = wxpc.wxBITMAP_TYPE_GIF -wxBITMAP_TYPE_GIF_RESOURCE = wxpc.wxBITMAP_TYPE_GIF_RESOURCE -wxBITMAP_TYPE_PNG = wxpc.wxBITMAP_TYPE_PNG -wxBITMAP_TYPE_PNG_RESOURCE = wxpc.wxBITMAP_TYPE_PNG_RESOURCE -wxBITMAP_TYPE_ANY = wxpc.wxBITMAP_TYPE_ANY -wxBITMAP_TYPE_RESOURCE = wxpc.wxBITMAP_TYPE_RESOURCE -wxOPEN = wxpc.wxOPEN -wxSAVE = wxpc.wxSAVE -wxHIDE_READONLY = wxpc.wxHIDE_READONLY -wxOVERWRITE_PROMPT = wxpc.wxOVERWRITE_PROMPT -wxACCEL_ALT = wxpc.wxACCEL_ALT -wxACCEL_CTRL = wxpc.wxACCEL_CTRL -wxACCEL_SHIFT = wxpc.wxACCEL_SHIFT -ERR_PARAM = wxpc.ERR_PARAM -ERR_NODATA = wxpc.ERR_NODATA -ERR_CANCEL = wxpc.ERR_CANCEL -ERR_SUCCESS = wxpc.ERR_SUCCESS -wxDEFAULT = wxpc.wxDEFAULT -wxDECORATIVE = wxpc.wxDECORATIVE -wxROMAN = wxpc.wxROMAN -wxSCRIPT = wxpc.wxSCRIPT -wxSWISS = wxpc.wxSWISS -wxMODERN = wxpc.wxMODERN -wxTELETYPE = wxpc.wxTELETYPE -wxVARIABLE = wxpc.wxVARIABLE -wxFIXED = wxpc.wxFIXED -wxNORMAL = wxpc.wxNORMAL -wxLIGHT = wxpc.wxLIGHT -wxBOLD = wxpc.wxBOLD -wxITALIC = wxpc.wxITALIC -wxSLANT = wxpc.wxSLANT -wxSOLID = wxpc.wxSOLID -wxDOT = wxpc.wxDOT -wxLONG_DASH = wxpc.wxLONG_DASH -wxSHORT_DASH = wxpc.wxSHORT_DASH -wxDOT_DASH = wxpc.wxDOT_DASH -wxUSER_DASH = wxpc.wxUSER_DASH -wxTRANSPARENT = wxpc.wxTRANSPARENT -wxSTIPPLE = wxpc.wxSTIPPLE -wxBDIAGONAL_HATCH = wxpc.wxBDIAGONAL_HATCH -wxCROSSDIAG_HATCH = wxpc.wxCROSSDIAG_HATCH -wxFDIAGONAL_HATCH = wxpc.wxFDIAGONAL_HATCH -wxCROSS_HATCH = wxpc.wxCROSS_HATCH -wxHORIZONTAL_HATCH = wxpc.wxHORIZONTAL_HATCH -wxVERTICAL_HATCH = wxpc.wxVERTICAL_HATCH -wxJOIN_BEVEL = wxpc.wxJOIN_BEVEL -wxJOIN_MITER = wxpc.wxJOIN_MITER -wxJOIN_ROUND = wxpc.wxJOIN_ROUND -wxCAP_ROUND = wxpc.wxCAP_ROUND -wxCAP_PROJECTING = wxpc.wxCAP_PROJECTING -wxCAP_BUTT = wxpc.wxCAP_BUTT -wxCLEAR = wxpc.wxCLEAR -wxXOR = wxpc.wxXOR -wxINVERT = wxpc.wxINVERT -wxOR_REVERSE = wxpc.wxOR_REVERSE -wxAND_REVERSE = wxpc.wxAND_REVERSE -wxCOPY = wxpc.wxCOPY -wxAND = wxpc.wxAND -wxAND_INVERT = wxpc.wxAND_INVERT -wxNO_OP = wxpc.wxNO_OP -wxNOR = wxpc.wxNOR -wxEQUIV = wxpc.wxEQUIV -wxSRC_INVERT = wxpc.wxSRC_INVERT -wxOR_INVERT = wxpc.wxOR_INVERT -wxNAND = wxpc.wxNAND -wxOR = wxpc.wxOR -wxSET = wxpc.wxSET -wxSRC_OR = wxpc.wxSRC_OR -wxSRC_AND = wxpc.wxSRC_AND -WXK_BACK = wxpc.WXK_BACK -WXK_TAB = wxpc.WXK_TAB -WXK_RETURN = wxpc.WXK_RETURN -WXK_ESCAPE = wxpc.WXK_ESCAPE -WXK_SPACE = wxpc.WXK_SPACE -WXK_DELETE = wxpc.WXK_DELETE -WXK_START = wxpc.WXK_START -WXK_LBUTTON = wxpc.WXK_LBUTTON -WXK_RBUTTON = wxpc.WXK_RBUTTON -WXK_CANCEL = wxpc.WXK_CANCEL -WXK_MBUTTON = wxpc.WXK_MBUTTON -WXK_CLEAR = wxpc.WXK_CLEAR -WXK_SHIFT = wxpc.WXK_SHIFT -WXK_CONTROL = wxpc.WXK_CONTROL -WXK_MENU = wxpc.WXK_MENU -WXK_PAUSE = wxpc.WXK_PAUSE -WXK_CAPITAL = wxpc.WXK_CAPITAL -WXK_PRIOR = wxpc.WXK_PRIOR -WXK_NEXT = wxpc.WXK_NEXT -WXK_END = wxpc.WXK_END -WXK_HOME = wxpc.WXK_HOME -WXK_LEFT = wxpc.WXK_LEFT -WXK_UP = wxpc.WXK_UP -WXK_RIGHT = wxpc.WXK_RIGHT -WXK_DOWN = wxpc.WXK_DOWN -WXK_SELECT = wxpc.WXK_SELECT -WXK_PRINT = wxpc.WXK_PRINT -WXK_EXECUTE = wxpc.WXK_EXECUTE -WXK_SNAPSHOT = wxpc.WXK_SNAPSHOT -WXK_INSERT = wxpc.WXK_INSERT -WXK_HELP = wxpc.WXK_HELP -WXK_NUMPAD0 = wxpc.WXK_NUMPAD0 -WXK_NUMPAD1 = wxpc.WXK_NUMPAD1 -WXK_NUMPAD2 = wxpc.WXK_NUMPAD2 -WXK_NUMPAD3 = wxpc.WXK_NUMPAD3 -WXK_NUMPAD4 = wxpc.WXK_NUMPAD4 -WXK_NUMPAD5 = wxpc.WXK_NUMPAD5 -WXK_NUMPAD6 = wxpc.WXK_NUMPAD6 -WXK_NUMPAD7 = wxpc.WXK_NUMPAD7 -WXK_NUMPAD8 = wxpc.WXK_NUMPAD8 -WXK_NUMPAD9 = wxpc.WXK_NUMPAD9 -WXK_MULTIPLY = wxpc.WXK_MULTIPLY -WXK_ADD = wxpc.WXK_ADD -WXK_SEPARATOR = wxpc.WXK_SEPARATOR -WXK_SUBTRACT = wxpc.WXK_SUBTRACT -WXK_DECIMAL = wxpc.WXK_DECIMAL -WXK_DIVIDE = wxpc.WXK_DIVIDE -WXK_F1 = wxpc.WXK_F1 -WXK_F2 = wxpc.WXK_F2 -WXK_F3 = wxpc.WXK_F3 -WXK_F4 = wxpc.WXK_F4 -WXK_F5 = wxpc.WXK_F5 -WXK_F6 = wxpc.WXK_F6 -WXK_F7 = wxpc.WXK_F7 -WXK_F8 = wxpc.WXK_F8 -WXK_F9 = wxpc.WXK_F9 -WXK_F10 = wxpc.WXK_F10 -WXK_F11 = wxpc.WXK_F11 -WXK_F12 = wxpc.WXK_F12 -WXK_F13 = wxpc.WXK_F13 -WXK_F14 = wxpc.WXK_F14 -WXK_F15 = wxpc.WXK_F15 -WXK_F16 = wxpc.WXK_F16 -WXK_F17 = wxpc.WXK_F17 -WXK_F18 = wxpc.WXK_F18 -WXK_F19 = wxpc.WXK_F19 -WXK_F20 = wxpc.WXK_F20 -WXK_F21 = wxpc.WXK_F21 -WXK_F22 = wxpc.WXK_F22 -WXK_F23 = wxpc.WXK_F23 -WXK_F24 = wxpc.WXK_F24 -WXK_NUMLOCK = wxpc.WXK_NUMLOCK -WXK_SCROLL = wxpc.WXK_SCROLL -WXK_PAGEUP = wxpc.WXK_PAGEUP -WXK_PAGEDOWN = wxpc.WXK_PAGEDOWN -wxCURSOR_NONE = wxpc.wxCURSOR_NONE -wxCURSOR_ARROW = wxpc.wxCURSOR_ARROW -wxCURSOR_BULLSEYE = wxpc.wxCURSOR_BULLSEYE -wxCURSOR_CHAR = wxpc.wxCURSOR_CHAR -wxCURSOR_CROSS = wxpc.wxCURSOR_CROSS -wxCURSOR_HAND = wxpc.wxCURSOR_HAND -wxCURSOR_IBEAM = wxpc.wxCURSOR_IBEAM -wxCURSOR_LEFT_BUTTON = wxpc.wxCURSOR_LEFT_BUTTON -wxCURSOR_MAGNIFIER = wxpc.wxCURSOR_MAGNIFIER -wxCURSOR_MIDDLE_BUTTON = wxpc.wxCURSOR_MIDDLE_BUTTON -wxCURSOR_NO_ENTRY = wxpc.wxCURSOR_NO_ENTRY -wxCURSOR_PAINT_BRUSH = wxpc.wxCURSOR_PAINT_BRUSH -wxCURSOR_PENCIL = wxpc.wxCURSOR_PENCIL -wxCURSOR_POINT_LEFT = wxpc.wxCURSOR_POINT_LEFT -wxCURSOR_POINT_RIGHT = wxpc.wxCURSOR_POINT_RIGHT -wxCURSOR_QUESTION_ARROW = wxpc.wxCURSOR_QUESTION_ARROW -wxCURSOR_RIGHT_BUTTON = wxpc.wxCURSOR_RIGHT_BUTTON -wxCURSOR_SIZENESW = wxpc.wxCURSOR_SIZENESW -wxCURSOR_SIZENS = wxpc.wxCURSOR_SIZENS -wxCURSOR_SIZENWSE = wxpc.wxCURSOR_SIZENWSE -wxCURSOR_SIZEWE = wxpc.wxCURSOR_SIZEWE -wxCURSOR_SIZING = wxpc.wxCURSOR_SIZING -wxCURSOR_SPRAYCAN = wxpc.wxCURSOR_SPRAYCAN -wxCURSOR_WAIT = wxpc.wxCURSOR_WAIT -wxCURSOR_WATCH = wxpc.wxCURSOR_WATCH -wxCURSOR_BLANK = wxpc.wxCURSOR_BLANK -FALSE = wxpc.FALSE -false = wxpc.false -TRUE = wxpc.TRUE -true = wxpc.true -wxEVT_NULL = wxpc.wxEVT_NULL -wxEVT_FIRST = wxpc.wxEVT_FIRST -wxEVT_COMMAND_BUTTON_CLICKED = wxpc.wxEVT_COMMAND_BUTTON_CLICKED -wxEVT_COMMAND_CHECKBOX_CLICKED = wxpc.wxEVT_COMMAND_CHECKBOX_CLICKED -wxEVT_COMMAND_CHOICE_SELECTED = wxpc.wxEVT_COMMAND_CHOICE_SELECTED -wxEVT_COMMAND_LISTBOX_SELECTED = wxpc.wxEVT_COMMAND_LISTBOX_SELECTED -wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxpc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED -wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxpc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED -wxEVT_COMMAND_TEXT_UPDATED = wxpc.wxEVT_COMMAND_TEXT_UPDATED -wxEVT_COMMAND_TEXT_ENTER = wxpc.wxEVT_COMMAND_TEXT_ENTER -wxEVT_COMMAND_MENU_SELECTED = wxpc.wxEVT_COMMAND_MENU_SELECTED -wxEVT_COMMAND_SLIDER_UPDATED = wxpc.wxEVT_COMMAND_SLIDER_UPDATED -wxEVT_COMMAND_RADIOBOX_SELECTED = wxpc.wxEVT_COMMAND_RADIOBOX_SELECTED -wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxpc.wxEVT_COMMAND_RADIOBUTTON_SELECTED -wxEVT_COMMAND_SCROLLBAR_UPDATED = wxpc.wxEVT_COMMAND_SCROLLBAR_UPDATED -wxEVT_COMMAND_VLBOX_SELECTED = wxpc.wxEVT_COMMAND_VLBOX_SELECTED -wxEVT_COMMAND_COMBOBOX_SELECTED = wxpc.wxEVT_COMMAND_COMBOBOX_SELECTED -wxEVT_COMMAND_TOOL_CLICKED = wxpc.wxEVT_COMMAND_TOOL_CLICKED -wxEVT_COMMAND_TOOL_RCLICKED = wxpc.wxEVT_COMMAND_TOOL_RCLICKED -wxEVT_COMMAND_TOOL_ENTER = wxpc.wxEVT_COMMAND_TOOL_ENTER -wxEVT_SET_FOCUS = wxpc.wxEVT_SET_FOCUS -wxEVT_KILL_FOCUS = wxpc.wxEVT_KILL_FOCUS -wxEVT_LEFT_DOWN = wxpc.wxEVT_LEFT_DOWN -wxEVT_LEFT_UP = wxpc.wxEVT_LEFT_UP -wxEVT_MIDDLE_DOWN = wxpc.wxEVT_MIDDLE_DOWN -wxEVT_MIDDLE_UP = wxpc.wxEVT_MIDDLE_UP -wxEVT_RIGHT_DOWN = wxpc.wxEVT_RIGHT_DOWN -wxEVT_RIGHT_UP = wxpc.wxEVT_RIGHT_UP -wxEVT_MOTION = wxpc.wxEVT_MOTION -wxEVT_ENTER_WINDOW = wxpc.wxEVT_ENTER_WINDOW -wxEVT_LEAVE_WINDOW = wxpc.wxEVT_LEAVE_WINDOW -wxEVT_LEFT_DCLICK = wxpc.wxEVT_LEFT_DCLICK -wxEVT_MIDDLE_DCLICK = wxpc.wxEVT_MIDDLE_DCLICK -wxEVT_RIGHT_DCLICK = wxpc.wxEVT_RIGHT_DCLICK -wxEVT_NC_LEFT_DOWN = wxpc.wxEVT_NC_LEFT_DOWN -wxEVT_NC_LEFT_UP = wxpc.wxEVT_NC_LEFT_UP -wxEVT_NC_MIDDLE_DOWN = wxpc.wxEVT_NC_MIDDLE_DOWN -wxEVT_NC_MIDDLE_UP = wxpc.wxEVT_NC_MIDDLE_UP -wxEVT_NC_RIGHT_DOWN = wxpc.wxEVT_NC_RIGHT_DOWN -wxEVT_NC_RIGHT_UP = wxpc.wxEVT_NC_RIGHT_UP -wxEVT_NC_MOTION = wxpc.wxEVT_NC_MOTION -wxEVT_NC_ENTER_WINDOW = wxpc.wxEVT_NC_ENTER_WINDOW -wxEVT_NC_LEAVE_WINDOW = wxpc.wxEVT_NC_LEAVE_WINDOW -wxEVT_NC_LEFT_DCLICK = wxpc.wxEVT_NC_LEFT_DCLICK -wxEVT_NC_MIDDLE_DCLICK = wxpc.wxEVT_NC_MIDDLE_DCLICK -wxEVT_NC_RIGHT_DCLICK = wxpc.wxEVT_NC_RIGHT_DCLICK -wxEVT_CHAR = wxpc.wxEVT_CHAR -wxEVT_SCROLL_TOP = wxpc.wxEVT_SCROLL_TOP -wxEVT_SCROLL_BOTTOM = wxpc.wxEVT_SCROLL_BOTTOM -wxEVT_SCROLL_LINEUP = wxpc.wxEVT_SCROLL_LINEUP -wxEVT_SCROLL_LINEDOWN = wxpc.wxEVT_SCROLL_LINEDOWN -wxEVT_SCROLL_PAGEUP = wxpc.wxEVT_SCROLL_PAGEUP -wxEVT_SCROLL_PAGEDOWN = wxpc.wxEVT_SCROLL_PAGEDOWN -wxEVT_SCROLL_THUMBTRACK = wxpc.wxEVT_SCROLL_THUMBTRACK -wxEVT_SIZE = wxpc.wxEVT_SIZE -wxEVT_MOVE = wxpc.wxEVT_MOVE -wxEVT_CLOSE_WINDOW = wxpc.wxEVT_CLOSE_WINDOW -wxEVT_END_SESSION = wxpc.wxEVT_END_SESSION -wxEVT_QUERY_END_SESSION = wxpc.wxEVT_QUERY_END_SESSION -wxEVT_ACTIVATE_APP = wxpc.wxEVT_ACTIVATE_APP -wxEVT_POWER = wxpc.wxEVT_POWER -wxEVT_CHAR_HOOK = wxpc.wxEVT_CHAR_HOOK -wxEVT_KEY_UP = wxpc.wxEVT_KEY_UP -wxEVT_ACTIVATE = wxpc.wxEVT_ACTIVATE -wxEVT_CREATE = wxpc.wxEVT_CREATE -wxEVT_DESTROY = wxpc.wxEVT_DESTROY -wxEVT_SHOW = wxpc.wxEVT_SHOW -wxEVT_ICONIZE = wxpc.wxEVT_ICONIZE -wxEVT_MAXIMIZE = wxpc.wxEVT_MAXIMIZE -wxEVT_MOUSE_CAPTURE_CHANGED = wxpc.wxEVT_MOUSE_CAPTURE_CHANGED -wxEVT_PAINT = wxpc.wxEVT_PAINT -wxEVT_ERASE_BACKGROUND = wxpc.wxEVT_ERASE_BACKGROUND -wxEVT_NC_PAINT = wxpc.wxEVT_NC_PAINT -wxEVT_PAINT_ICON = wxpc.wxEVT_PAINT_ICON -wxEVT_MENU_CHAR = wxpc.wxEVT_MENU_CHAR -wxEVT_MENU_INIT = wxpc.wxEVT_MENU_INIT -wxEVT_MENU_HIGHLIGHT = wxpc.wxEVT_MENU_HIGHLIGHT -wxEVT_POPUP_MENU_INIT = wxpc.wxEVT_POPUP_MENU_INIT -wxEVT_CONTEXT_MENU = wxpc.wxEVT_CONTEXT_MENU -wxEVT_SYS_COLOUR_CHANGED = wxpc.wxEVT_SYS_COLOUR_CHANGED -wxEVT_SETTING_CHANGED = wxpc.wxEVT_SETTING_CHANGED -wxEVT_QUERY_NEW_PALETTE = wxpc.wxEVT_QUERY_NEW_PALETTE -wxEVT_PALETTE_CHANGED = wxpc.wxEVT_PALETTE_CHANGED -wxEVT_JOY_BUTTON_DOWN = wxpc.wxEVT_JOY_BUTTON_DOWN -wxEVT_JOY_BUTTON_UP = wxpc.wxEVT_JOY_BUTTON_UP -wxEVT_JOY_MOVE = wxpc.wxEVT_JOY_MOVE -wxEVT_JOY_ZMOVE = wxpc.wxEVT_JOY_ZMOVE -wxEVT_DROP_FILES = wxpc.wxEVT_DROP_FILES -wxEVT_DRAW_ITEM = wxpc.wxEVT_DRAW_ITEM -wxEVT_MEASURE_ITEM = wxpc.wxEVT_MEASURE_ITEM -wxEVT_COMPARE_ITEM = wxpc.wxEVT_COMPARE_ITEM -wxEVT_INIT_DIALOG = wxpc.wxEVT_INIT_DIALOG -wxEVT_IDLE = wxpc.wxEVT_IDLE -wxEVT_UPDATE_UI = wxpc.wxEVT_UPDATE_UI -wxEVT_COMMAND_LEFT_CLICK = wxpc.wxEVT_COMMAND_LEFT_CLICK -wxEVT_COMMAND_LEFT_DCLICK = wxpc.wxEVT_COMMAND_LEFT_DCLICK -wxEVT_COMMAND_RIGHT_CLICK = wxpc.wxEVT_COMMAND_RIGHT_CLICK -wxEVT_COMMAND_RIGHT_DCLICK = wxpc.wxEVT_COMMAND_RIGHT_DCLICK -wxEVT_COMMAND_SET_FOCUS = wxpc.wxEVT_COMMAND_SET_FOCUS -wxEVT_COMMAND_KILL_FOCUS = wxpc.wxEVT_COMMAND_KILL_FOCUS -wxEVT_COMMAND_ENTER = wxpc.wxEVT_COMMAND_ENTER -wxEVT_COMMAND_TREE_BEGIN_DRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_DRAG -wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_RDRAG -wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT -wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_END_LABEL_EDIT -wxEVT_COMMAND_TREE_DELETE_ITEM = wxpc.wxEVT_COMMAND_TREE_DELETE_ITEM -wxEVT_COMMAND_TREE_GET_INFO = wxpc.wxEVT_COMMAND_TREE_GET_INFO -wxEVT_COMMAND_TREE_SET_INFO = wxpc.wxEVT_COMMAND_TREE_SET_INFO -wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDED -wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDING -wxEVT_COMMAND_TREE_ITEM_COLLAPSED = wxpc.wxEVT_COMMAND_TREE_ITEM_COLLAPSED -wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxpc.wxEVT_COMMAND_TREE_ITEM_COLLAPSING -wxEVT_COMMAND_TREE_SEL_CHANGED = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGED -wxEVT_COMMAND_TREE_SEL_CHANGING = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGING -wxEVT_COMMAND_TREE_KEY_DOWN = wxpc.wxEVT_COMMAND_TREE_KEY_DOWN -wxEVT_COMMAND_LIST_BEGIN_DRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_DRAG -wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_RDRAG -wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT -wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_END_LABEL_EDIT -wxEVT_COMMAND_LIST_DELETE_ITEM = wxpc.wxEVT_COMMAND_LIST_DELETE_ITEM -wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxpc.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS -wxEVT_COMMAND_LIST_GET_INFO = wxpc.wxEVT_COMMAND_LIST_GET_INFO -wxEVT_COMMAND_LIST_SET_INFO = wxpc.wxEVT_COMMAND_LIST_SET_INFO -wxEVT_COMMAND_LIST_ITEM_SELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_SELECTED -wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_DESELECTED -wxEVT_COMMAND_LIST_KEY_DOWN = wxpc.wxEVT_COMMAND_LIST_KEY_DOWN -wxEVT_COMMAND_LIST_INSERT_ITEM = wxpc.wxEVT_COMMAND_LIST_INSERT_ITEM -wxEVT_COMMAND_LIST_COL_CLICK = wxpc.wxEVT_COMMAND_LIST_COL_CLICK -wxEVT_COMMAND_TAB_SEL_CHANGED = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGED -wxEVT_COMMAND_TAB_SEL_CHANGING = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGING -wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED -wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING -__version__ = wxpc.__version__ -cvar = wxpc.cvar -wxPyDefaultPosition = wxPointPtr(wxpc.cvar.wxPyDefaultPosition) -wxPyDefaultSize = wxSizePtr(wxpc.cvar.wxPyDefaultSize) - - -#-------------- USER INCLUDE ----------------------- - -#---------------------------------------------------------------------------- -# Name: _extra.py -# Purpose: This file is appended to the shadow class file generated -# by SWIG. We add some unSWIGable things here. -# -# Author: Robin Dunn -# -# Created: 6/30/97 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -import sys - -#---------------------------------------------------------------------- -# This gives this module's dictionary to the C++ extension code... - -_wxSetDictionary(vars()) - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# Helper function to link python methods to wxWindows virtual -# functions by name. - -def _checkForCallback(obj, name, event, theID=-1): - try: cb = getattr(obj, name) - except: pass - else: obj.Connect(theID, -1, event, cb) - -def _StdWindowCallbacks(win): - _checkForCallback(win, "OnChar", wxEVT_CHAR) - _checkForCallback(win, "OnSize", wxEVT_SIZE) - _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) - _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) - _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) - _checkForCallback(win, "OnIdle", wxEVT_IDLE) - _checkForCallback(win, "OnPaint", wxEVT_PAINT) - -def _StdFrameCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) - _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - - -def _StdDialogCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) - _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) - _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) - - -def _StdOnScrollCallback(win): - try: cb = getattr(win, "OnScroll") - except: pass - else: EVT_SCROLL(win, cb) - - - -#---------------------------------------------------------------------- -#---------------------------------------------------------------------- -# functions that look and act like the C++ Macros of the same name - - -# Miscellaneous -def EVT_SIZE(win, func): - win.Connect(-1, -1, wxEVT_SIZE, func) - -def EVT_MOVE(win, func): - win.Connect(-1, -1, wxEVT_MOVE, func) - -def EVT_CLOSE(win, func): - win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) - -def EVT_PAINT(win, func): - win.Connect(-1, -1, wxEVT_PAINT, func) - -def EVT_ERASE_BACKGROUND(win, func): - win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func) - -def EVT_CHAR(win, func): - win.Connect(-1, -1, wxEVT_CHAR, func) - -def EVT_CHAR_HOOK(win, func): - win.Connect(-1, -1, wxEVT_CHAR_HOOK, func) - -def EVT_MENU_HIGHLIGHT(win, id, func): - win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_MENU_HIGHLIGHT_ALL(win, func): - win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func) - -def EVT_SET_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_SET_FOCUS, func) - -def EVT_KILL_FOCUS(win, func): - win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) - -def EVT_ACTIVATE(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE, func) - -def EVT_ACTIVATE_APP(win, func): - win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func) - -def EVT_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_END_SESSION, func) - -def EVT_QUERY_END_SESSION(win, func): - win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func) - -def EVT_DROP_FILES(win, func): - win.Connect(-1, -1, wxEVT_DROP_FILES, func) - -def EVT_INIT_DIALOG(win, func): - win.Connect(-1, -1, wxEVT_INIT_DIALOG, func) - -def EVT_SYS_COLOUR_CHANGED(win, func): - win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func) - -def EVT_SHOW(win, func): - win.Connect(-1, -1, wxEVT_SHOW, func) - -def EVT_MAXIMIZE(win, func): - win.Connect(-1, -1, wxEVT_MAXIMIZE, func) - -def EVT_ICONIZE(win, func): - win.Connect(-1, -1, wxEVT_ICONIZE, func) - -def EVT_NAVIGATION_KEY(win, func): - win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func) - - -# Mouse Events -def EVT_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - -def EVT_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - -def EVT_MIDDLE_DOWN(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - -def EVT_MIDDLE_UP(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - -def EVT_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - -def EVT_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - -def EVT_MOTION(win, func): - win.Connect(-1, -1, wxEVT_MOTION, func) - -def EVT_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - -def EVT_MIDDLE_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - -def EVT_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - -def EVT_LEAVE_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - -def EVT_ENTER_WINDOW(win, func): - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - - -# all mouse events -def EVT_MOUSE_EVENTS(win, func): - win.Connect(-1, -1, wxEVT_LEFT_DOWN, func) - win.Connect(-1, -1, wxEVT_LEFT_UP, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func) - win.Connect(-1, -1, wxEVT_MIDDLE_UP, func) - win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func) - win.Connect(-1, -1, wxEVT_RIGHT_UP, func) - win.Connect(-1, -1, wxEVT_MOTION, func) - win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func) - win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func) - win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func) - win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func) - win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func) - -# EVT_COMMAND -def EVT_COMMAND(win, id, cmd, func): - win.Connect(id, -1, cmd, func) - -def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): - win.Connect(id1, id2, cmd, func) - -# Scrolling -def EVT_SCROLL(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_SCROLL_TOP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_TOP, func) - -def EVT_SCROLL_BOTTOM(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_SCROLL_LINEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_SCROLL_LINEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_SCROLL_PAGEUP(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_SCROLL_PAGEDOWN(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_SCROLL_THUMBTRACK(win, func): - win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func) - - - -# Scrolling, with an id -def EVT_COMMAND_SCROLL(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) - -def EVT_COMMAND_SCROLL_TOP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - -def EVT_COMMAND_SCROLL_BOTTOM(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - -def EVT_COMMAND_SCROLL_LINEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - -def EVT_COMMAND_SCROLL_PAGEUP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - -def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - -def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func) - - -# Convenience commands -def EVT_BUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func) - -def EVT_CHECKBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func) - -def EVT_CHOICE(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func) - -def EVT_LISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func) - -def EVT_LISTBOX_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func) - -def EVT_TEXT(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func) - -def EVT_TEXT_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func) - -def EVT_MENU(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_MENU_RANGE(win, id1, id2, func): - win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func) - -def EVT_SLIDER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func) - -def EVT_RADIOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func) - -def EVT_RADIOBUTTON(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func) - -def EVT_VLBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func) - -def EVT_COMBOBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func) - -def EVT_TOOL(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func) - -def EVT_TOOL_RCLICKED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func) - -def EVT_TOOL_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func) - -def EVT_CHECKLISTBOX(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func) - - -# Generic command events - -def EVT_COMMAND_LEFT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func) - -def EVT_COMMAND_LEFT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func) - -def EVT_COMMAND_RIGHT_CLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func) - -def EVT_COMMAND_RIGHT_DCLICK(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func) - -def EVT_COMMAND_SET_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func) - -def EVT_COMMAND_KILL_FOCUS(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func) - -def EVT_COMMAND_ENTER(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_ENTER, func) - - -# wxNotebook events -def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func) - -def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func) - - -# wxTreeCtrl events -def EVT_TREE_BEGIN_DRAG(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func) - -def EVT_TREE_BEGIN_RDRAG(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func) - -def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func) - -def EVT_TREE_END_LABEL_EDIT(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func) - -def EVT_TREE_GET_INFO(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func) - -def EVT_TREE_SET_INFO(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func) - -def EVT_TREE_ITEM_EXPANDED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func) - -def EVT_TREE_ITEM_EXPANDING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func) - -def EVT_TREE_ITEM_COLLAPSED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func) - -def EVT_TREE_ITEM_COLLAPSING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func) - -def EVT_TREE_SEL_CHANGED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func) - -def EVT_TREE_SEL_CHANGING(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func) - -def EVT_TREE_KEY_DOWN(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func) - -def EVT_TREE_DELETE_ITEM(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func) - - -# wxSpinButton -def EVT_SPIN_UP(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - -def EVT_SPIN_DOWN(win, id, func): - win.Connect(id, -1,wxEVT_SCROLL_LINEDOWN, func) - -def EVT_SPIN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) - - - - -# wxTaskBarIcon -def EVT_TASKBAR_MOVE(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func) - -def EVT_TASKBAR_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func) - -def EVT_TASKBAR_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func) - -def EVT_TASKBAR_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func) - -def EVT_TASKBAR_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func) - -def EVT_TASKBAR_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func) - -def EVT_TASKBAR_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) - - -# wxGrid -def EVT_GRID_SELECT_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) - -def EVT_GRID_CREATE_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) - -def EVT_GRID_CHANGE_LABELS(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) - -def EVT_GRID_CHANGE_SEL_LABEL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) - -def EVT_GRID_CELL_CHANGE(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) - -def EVT_GRID_CELL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) - -def EVT_GRID_CELL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) - -def EVT_GRID_LABEL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) - -def EVT_GRID_LABEL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) - - - - -#---------------------------------------------------------------------- - -class wxTimer(wxPyTimer): - def __init__(self): - wxPyTimer.__init__(self, self.Notify) # derived class must provide - # Notify(self) method. - -#---------------------------------------------------------------------- -# Some wxWin methods can take "NULL" as parameters, but the shadow classes -# expect an object with the SWIG pointer as a 'this' member. This class -# and instance fools the shadow into passing the NULL pointer. - -class NullObj: - this = 'NULL' # SWIG converts this to (void*)0 - -NULL = NullObj() - - -#---------------------------------------------------------------------- -# aliases - -wxColor = wxColour -wxNamedColor = wxNamedColour - -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - -#---------------------------------------------------------------------- - -## class wxPyStdOutWindow(wxFrame): -## def __init__(self, title = "wxPython: stdout/stderr"): -## wxFrame.__init__(self, NULL, title) -## self.title = title -## self.text = wxTextWindow(self) -## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD)) -## self.SetSize(-1,-1,400,200) -## self.Show(false) -## self.isShown = false - -## def write(self, str): # with this method, -## if not self.isShown: -## self.Show(true) -## self.isShown = true -## self.text.WriteText(str) - -## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it -## self.Show(false) -## self.isShown = false - - -_defRedirect = (wxPlatform == '__WXMSW__') - -#---------------------------------------------------------------------- -# The main application class. Derive from this and implement an OnInit -# method that creates a frame and then calls self.SetTopWindow(frame) - -class wxApp(wxPyApp): - error = 'wxApp.error' - - def __init__(self, redirect=_defRedirect, filename=None): - wxPyApp.__init__(self) - self.stdioWin = None - self.saveStdio = (sys.stdout, sys.stderr) - if redirect: - self.RedirectStdio(filename) - - # this initializes wxWindows and then calls our OnInit - _wxStart(self.OnInit) - - - def __del__(self): - try: - self.RestoreStdio() - except: - pass - - def RedirectStdio(self, filename): - if filename: - sys.stdout = sys.stderr = open(filename, 'a') - else: - raise self.error, 'wxPyStdOutWindow not yet implemented.' - #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow() - - def RestoreStdio(self): - sys.stdout, sys.stderr = self.saveStdio - if self.stdioWin != None: - self.stdioWin.Show(false) - self.stdioWin.Destroy() - self.stdioWin = None - - -#---------------------------------------------------------------------------- -# -# $Log$ -# Revision 1.6 1998/11/25 08:46:48 RD -# Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon -# Added events for wxGrid -# Other various fixes and additions -# -# Revision 1.6 1998/11/16 00:00:52 RD -# Generic treectrl for wxPython/GTK compiles... -# -# Revision 1.5 1998/10/20 07:38:02 RD -# bug fix -# -# Revision 1.4 1998/10/20 06:43:54 RD -# New wxTreeCtrl wrappers (untested) -# some changes in helpers -# etc. -# -# Revision 1.3 1998/10/02 06:40:33 RD -# -# Version 0.4 of wxPython for MSW. -# -# Revision 1.2 1998/08/18 19:48:12 RD -# more wxGTK compatibility things. -# -# It builds now but there are serious runtime problems... -# -# Revision 1.1 1998/08/09 08:25:49 RD -# Initial version -# -# - diff --git a/utils/wxPython/src/stattool.i b/utils/wxPython/src/stattool.i index 82f1cb9680..e68fccaf47 100644 --- a/utils/wxPython/src/stattool.i +++ b/utils/wxPython/src/stattool.i @@ -30,6 +30,7 @@ %import windows.i %import controls.i +%pragma(python) code = "import wx" //--------------------------------------------------------------------------- @@ -41,7 +42,7 @@ public: long style = wxST_SIZEGRIP, char* name = "statusBar"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" %addmethods { %new wxRect* GetFieldRect(long item) { @@ -110,7 +111,7 @@ public: long style = wxTB_HORIZONTAL | wxNO_BORDER, char* name = "toolBar"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void AddSeparator(void); @@ -184,7 +185,7 @@ public: // long style = wxTB_HORIZONTAL | wxNO_BORDER, // char* name = "toolBar"); -// %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" +// %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" // }; @@ -198,7 +199,7 @@ public: // long style = wxTB_HORIZONTAL | wxNO_BORDER, // char* name = "toolBar"); -// %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" +// %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" // }; @@ -208,6 +209,25 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.3 1998/12/15 20:41:23 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. +// +// Other assorted fixes and additions. +// // Revision 1.2 1998/10/07 07:34:34 RD // Version 0.4.1 for wxGTK // diff --git a/utils/wxPython/src/utils.i b/utils/wxPython/src/utils.i new file mode 100644 index 0000000000..c5ce6f4de9 --- /dev/null +++ b/utils/wxPython/src/utils.i @@ -0,0 +1,159 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: utils.i +// Purpose: SWIG definitions of various utility classes classes +// +// Author: Robin Dunn +// +// Created: 25-nov-1998 +// RCS-ID: $Id$ +// Copyright: (c) 1998 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + + +%module utils + +%{ +#include "helpers.h" +#include +%} + +//--------------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + + +#ifdef SEPARATE +%{ + static wxString wxPyEmptyStr(""); +%} +#endif + + +%{ + static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { + PyObject* ret = PyTuple_New(3); + if (ret) { + PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); + PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); + PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); + } + return ret; + } +%} + +//--------------------------------------------------------------------------- + +class wxConfig { +public: + wxConfig(const wxString& appName = wxPyEmptyStr, + const wxString& vendorName = wxPyEmptyStr, + const wxString& localFilename = wxPyEmptyStr, + const wxString& globalFilename = wxPyEmptyStr, + long style = 0); + ~wxConfig(); + + //static wxConfigBase * Create(); + //static wxConfigBase * Get(); + //static wxConfigBase * Set(wxConfigBase *pConfig); + + + + void DontCreateOnDemand(); + // **** DANGER Will Robinson! DANGER! bool DeleteAll(); + bool DeleteEntry(const wxString& key, bool bDeleteGroupIfEmpty = TRUE); + bool DeleteGroup(const wxString& key); + bool Exists(wxString& strName); + bool Flush(bool bCurrentOnly = FALSE); + wxString GetAppName(); + + + // Each of these enumeration methods return a 3-tuple consisting of + // the continue flag, the value string, and the index for the next call. + %addmethods { + PyObject* GetFirstGroup() { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstGroup(value, index); + return __EnumerationHelper(cont, value, index); + } + + PyObject* GetFirstEntry() { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstEntry(value, index); + return __EnumerationHelper(cont, value, index); + } + + PyObject* GetNextGroup(long index) { + bool cont; + wxString value; + + cont = self->GetNextGroup(value, index); + return __EnumerationHelper(cont, value, index); + } + + PyObject* GetNextEntry(long index) { + bool cont; + wxString value; + + cont = self->GetNextEntry(value, index); + return __EnumerationHelper(cont, value, index); + } + } + + + int GetNumberOfEntries(bool bRecursive = FALSE); + int GetNumberOfGroups(bool bRecursive = FALSE); + wxString GetPath(); + wxString GetVendorName(); + bool HasEntry(wxString& strName); + bool HasGroup(const wxString& strName); + bool IsExpandingEnvVars(); + bool IsRecordingDefaults(); + + wxString Read(const wxString& key, const wxString& defaultVal = wxPyEmptyStr); + %name(ReadInt)long Read(const wxString& key, long defaultVal = 0); + %name(ReadFloat)double Read(const wxString& key, double defaultVal = 0.0); + + void SetAppName(const wxString& appName); + void SetExpandEnvVars (bool bDoIt = TRUE); + void SetPath(const wxString& strPath); + void SetRecordDefaults(bool bDoIt = TRUE); + void SetVendorName(const wxString& vendorName); + + bool Write(const wxString& key, const wxString& value); + %name(WriteInt)bool Write(const wxString& key, long value); + %name(WriteFloat)bool Write(const wxString& key, double value); + +}; + + +//--------------------------------------------------------------------------- +///////////////////////////////////////////////////////////////////////////// +// +// $Log$ +// Revision 1.1 1998/12/15 20:41:23 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. +// +// Other assorted fixes and additions. +// diff --git a/utils/wxPython/src/utilsc.def b/utils/wxPython/src/utilsc.def new file mode 100644 index 0000000000..ddb56a1c38 --- /dev/null +++ b/utils/wxPython/src/utilsc.def @@ -0,0 +1,2 @@ +EXPORTS + initutilsc diff --git a/utils/wxPython/src/windows.i b/utils/wxPython/src/windows.i index 1b87c1ef6f..362e2b1dde 100644 --- a/utils/wxPython/src/windows.i +++ b/utils/wxPython/src/windows.i @@ -36,7 +36,7 @@ %import misc.i %import gdi.i -%pragma(python) code = "import wxp" +%pragma(python) code = "import wx" //--------------------------------------------------------------------------- @@ -66,7 +66,7 @@ public: long style = 0, char* name = "panel"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void CaptureMouse(); void Center(int direction = wxHORIZONTAL); @@ -86,25 +86,29 @@ public: wxColour GetBackgroundColour(); int GetCharHeight(); int GetCharWidth(); - void GetClientSize(int *OUTPUT, int *OUTPUT); + %name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT); + wxSize GetClientSize(); wxLayoutConstraints * GetConstraints(); #ifdef __WXMSW__ wxButton* GetDefaultItem(); #endif //wxEvtHandler* GetEventHandler(); - wxFont* GetFont(); + wxFont& GetFont(); wxColour GetForegroundColour(); wxWindow * GetGrandParent(); int GetId(); - void GetPosition(int *OUTPUT, int *OUTPUT); wxString GetLabel(); wxString GetName(); wxWindow * GetParent(); + %name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT); + wxPoint GetPosition(); + wxRect GetRect(); int GetReturnCode(); int GetScrollThumb(int orientation); int GetScrollPos(int orientation); int GetScrollRange(int orientation); - void GetSize(int *OUTPUT, int *OUTPUT); + %name(GetSizeTuple) void GetSize(int *OUTPUT, int *OUTPUT); + wxSize GetSize(); void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE) wxString GetTitle(); long GetWindowStyleFlag(); @@ -127,6 +131,7 @@ public: void ReleaseMouse(); void ScreenToClient(int *BOTH, int *BOTH); void ScrollWindow(int dx, int dy, const wxRect* rect = NULL); + void SetAcceleratorTable(const wxAcceleratorTable& accel); void SetAutoLayout(bool autoLayout); void SetBackgroundColour(const wxColour& colour); void SetConstraints(wxLayoutConstraints *constraints); @@ -157,7 +162,6 @@ public: void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1); void SetClientSize(int width, int height); //void SetPalette(wxPalette* palette); - //void SetColourMap(wxColourMap *colourMap); void SetCursor(const wxCursor&cursor); //void SetEventHandler(wxEvtHandler* handler); void SetTitle(const wxString& title); @@ -169,8 +173,21 @@ public: void WarpPointer(int x, int y); #endif + %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt); + %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz); + + %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt); + %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz); + }; +%pragma(python) code = " +def wxDLG_PNT(win, point): + return win.ConvertDialogPointToPixels(point) + +def wxDLG_SZE(win, size): + return win.ConvertDialogPointToPixels(size) +" // Static method(s) #ifdef __WXMSW__ @@ -193,7 +210,7 @@ public: long style = wxTAB_TRAVERSAL, const char* name = "panel"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" void InitDialog(); }; @@ -210,7 +227,7 @@ public: long style = wxDEFAULT_DIALOG_STYLE, const char* name = "dialogBox"); - %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" void Centre(int direction = wxBOTH); void EndModal(int retCode); @@ -235,8 +252,8 @@ public: long style = wxHSCROLL | wxVSCROLL, char* name = "scrolledWindow"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wxp._StdOnScrollCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)" void EnableScrolling(bool xScrolling, bool yScrolling); void GetScrollPixelsPerUnit(int* OUTPUT, int* OUTPUT); @@ -347,7 +364,27 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.7 1998/12/15 20:41:25 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. +// +// Other assorted fixes and additions. +// // Revision 1.6 1998/10/02 06:40:43 RD +// // Version 0.4 of wxPython for MSW. // // Revision 1.5 1998/08/17 18:29:40 RD diff --git a/utils/wxPython/src/windows2.i b/utils/wxPython/src/windows2.i index 40b18656d5..57dd0d69f7 100644 --- a/utils/wxPython/src/windows2.i +++ b/utils/wxPython/src/windows2.i @@ -35,7 +35,7 @@ %import controls.i %import events.i -%pragma(python) code = "import wxp" +%pragma(python) code = "import wx" //--------------------------------------------------------------------------- @@ -53,17 +53,17 @@ public: wxString& GetTextValue(); void SetTextValue(const wxString& str); - wxFont* GetFont(); - void SetFont(wxFont *f); + wxFont& GetFont(); + void SetFont(wxFont& f); wxColour& GetTextColour(); void SetTextColour(const wxColour& colour); wxColour& GetBackgroundColour(); void SetBackgroundColour(const wxColour& colour); - wxBrush* GetBackgroundBrush(); + wxBrush& GetBackgroundBrush(); int GetAlignment(); void SetAlignment(int align); wxBitmap* GetCellBitmap(); - void SetCellBitmap(wxBitmap *bitmap); + void SetCellBitmap(wxBitmap* bitmap); }; @@ -77,16 +77,16 @@ public: long style=0, char* name="grid"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK)" void AdjustScrollbars(); @@ -124,8 +124,8 @@ public: //wxGridCell *** GetCells(); wxColour& GetCellTextColour(int row, int col); %name(GetDefCellTextColour)wxColour& GetCellTextColour(); - wxFont* GetCellTextFont(int row, int col); - %name(GetDefCellTextFont)wxFont* GetCellTextFont(); + wxFont& GetCellTextFont(int row, int col); + %name(GetDefCellTextFont)wxFont& GetCellTextFont(); wxString& GetCellValue(int row, int col); int GetCols(); int GetColumnWidth(int col); @@ -138,7 +138,7 @@ public: wxColour& GetLabelBackgroundColour(); int GetLabelSize(int orientation); wxColour& GetLabelTextColour(); - wxFont* GetLabelTextFont(); + wxFont& GetLabelTextFont(); wxString& GetLabelValue(int orientation, int pos); int GetRowHeight(int row); int GetRows(); @@ -159,18 +159,18 @@ public: void SetCellBackgroundColour(const wxColour& colour); void SetCellTextColour(const wxColour& colour, int row, int col); %name(SetDefCellTextColour)void SetCellTextColour(const wxColour& colour); - void SetCellTextFont(wxFont *font, int row, int col); - %name(SetDefCellTextFont)void SetCellTextFont(wxFont *font); + void SetCellTextFont(wxFont& font, int row, int col); + %name(SetDefCellTextFont)void SetCellTextFont(wxFont& font); void SetCellValue(const wxString& val, int row, int col); void SetColumnWidth(int col, int width); - void SetDividerPen(wxPen *pen); + void SetDividerPen(wxPen& pen); void SetEditable(bool editable); void SetGridCursor(int row, int col); void SetLabelAlignment(int orientation, int alignment); void SetLabelBackgroundColour(const wxColour& value); void SetLabelSize(int orientation, int size); void SetLabelTextColour(const wxColour& value); - void SetLabelTextFont(wxFont *font); + void SetLabelTextFont(wxFont& font); void SetLabelValue(int orientation, const wxString& value, int pos); void SetRowHeight(int row, int height); @@ -222,7 +222,7 @@ public: long style = 0, char* name = "notebook"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" int GetPageCount(); int SetSelection(int nPage); @@ -265,7 +265,7 @@ public: long style=wxSP_3D|wxCLIP_CHILDREN, char* name = "splitterWindow"); - %pragma(python) addtomethod = "__init__:wxp._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" int GetBorderSize(); int GetMinimumPaneSize(); @@ -314,13 +314,13 @@ public: wxTaskBarIcon(); ~wxTaskBarIcon(); - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnRButtonDown', wxEVT_TASKBAR_RIGHT_DOWN)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnRButtonUp', wxEVT_TASKBAR_RIGHT_UP)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnLButtonDClick',wxEVT_TASKBAR_LEFT_DCLICK)" - %pragma(python) addtomethod = "__init__:wxp._checkForCallback(self, 'OnRButtonDClick',wxEVT_TASKBAR_RIGHT_DCLICK)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnRButtonDown', wxEVT_TASKBAR_RIGHT_DOWN)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnRButtonUp', wxEVT_TASKBAR_RIGHT_UP)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonDClick',wxEVT_TASKBAR_LEFT_DCLICK)" + %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnRButtonDClick',wxEVT_TASKBAR_RIGHT_DCLICK)" bool SetIcon(const wxIcon& icon, const char* tooltip = ""); bool RemoveIcon(void); @@ -331,7 +331,27 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.7 1998/12/15 20:41:25 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. +// +// Other assorted fixes and additions. +// // Revision 1.6 1998/11/25 08:45:28 RD +// // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon // Added events for wxGrid // Other various fixes and additions diff --git a/utils/wxPython/src/wxp.i b/utils/wxPython/src/wx.i similarity index 85% rename from utils/wxPython/src/wxp.i rename to utils/wxPython/src/wx.i index 870789e67e..5570148ada 100644 --- a/utils/wxPython/src/wxp.i +++ b/utils/wxPython/src/wx.i @@ -10,7 +10,7 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -%module wxp +%module wx %{ @@ -36,7 +36,9 @@ %import cmndlgs.i %import stattool.i %import frames.i - +#ifndef SEPARATE +%import utils.i +#endif %native(_wxStart) __wxStart; @@ -44,7 +46,7 @@ //--------------------------------------------------------------------------- -#define __version__ "0.4.2" +#define __version__ "0.5.0" wxPoint wxPyDefaultPosition; wxSize wxPyDefaultSize; @@ -111,6 +113,7 @@ extern "C" SWIGEXPORT(void,initcontrols2c)(); extern "C" SWIGEXPORT(void,initcmndlgsc)(); extern "C" SWIGEXPORT(void,initstattoolc)(); extern "C" SWIGEXPORT(void,initframesc)(); +extern "C" SWIGEXPORT(void,initutilsc)(); %} @@ -134,7 +137,9 @@ extern "C" SWIGEXPORT(void,initframesc)(); initcmndlgsc(); initstattoolc(); initframesc(); - +#ifndef SEPARATE + initutilsc(); +#endif %} //---------------------------------------------------------------------- @@ -147,6 +152,25 @@ extern "C" SWIGEXPORT(void,initframesc)(); ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.1 1998/12/15 20:41:27 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. +// +// Other assorted fixes and additions. +// // Revision 1.9 1998/10/20 07:38:04 RD // bug fix // diff --git a/utils/wxPython/src/wxc.def b/utils/wxPython/src/wxc.def new file mode 100644 index 0000000000..0cde9c79c3 --- /dev/null +++ b/utils/wxPython/src/wxc.def @@ -0,0 +1,2 @@ +EXPORTS + initwxc diff --git a/utils/wxPython/src/wxpc.rc b/utils/wxPython/src/wxc.rc similarity index 100% rename from utils/wxPython/src/wxpc.rc rename to utils/wxPython/src/wxc.rc diff --git a/utils/wxPython/src/wxpc.def b/utils/wxPython/src/wxpc.def deleted file mode 100644 index df5183662f..0000000000 --- a/utils/wxPython/src/wxpc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initwxpc diff --git a/utils/wxPython/tests/test1.py b/utils/wxPython/tests/test1.py index bbacba6e15..a35465e2db 100644 --- a/utils/wxPython/tests/test1.py +++ b/utils/wxPython/tests/test1.py @@ -12,7 +12,7 @@ #---------------------------------------------------------------------------- -from wxPython import * +from wxPython.wx import * #--------------------------------------------------------------------------- @@ -65,7 +65,27 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# 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. +# +# 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 diff --git a/utils/wxPython/tests/test2.py b/utils/wxPython/tests/test2.py index 72810d7e73..bca6b1ae0a 100644 --- a/utils/wxPython/tests/test2.py +++ b/utils/wxPython/tests/test2.py @@ -12,7 +12,7 @@ #---------------------------------------------------------------------------- -from wxPython import * +from wxPython.wx import * #--------------------------------------------------------------------------- @@ -23,6 +23,7 @@ class MyCanvas(wxWindow): def __init__(self, parent): wxWindow.__init__(self, parent, -1, wxPoint(0, 0), wxPyDefaultSize, wxSUNKEN_BORDER) + self.SetBackgroundColour(wxNamedColor("WHITE")) self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftButtonEvent) self.Connect(-1, -1, wxEVT_LEFT_UP, self.OnLeftButtonEvent) self.Connect(-1, -1, wxEVT_MOTION, self.OnLeftButtonEvent) @@ -118,9 +119,8 @@ class MyFrame(wxFrame): self.Destroy() def OnSize(self, event): - w,h = self.GetClientSize() - #self.canvas.SetSize(5, 5, w-10, h-10) - self.canvas.SetDimensions(0, 0, w, h) + size = self.GetClientSize() + self.canvas.SetDimensions(5, 5, size.width-10, size.height-10) #--------------------------------------------------------------------------- @@ -152,6 +152,25 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.2 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. +# +# Other assorted fixes and additions. +# # Revision 1.1 1998/08/09 08:28:05 RD # Initial version # diff --git a/utils/wxPython/tests/test3.py b/utils/wxPython/tests/test3.py index 39dba9b3bb..1fe3bf2a45 100644 --- a/utils/wxPython/tests/test3.py +++ b/utils/wxPython/tests/test3.py @@ -12,21 +12,25 @@ #---------------------------------------------------------------------------- -from wxPython import * +from wxPython.wx import * #--------------------------------------------------------------------------- class MyCanvas(wxWindow): + def __init__(self, parent, ID): + wxWindow.__init__(self, parent, ID) + self.SetBackgroundColour(wxNamedColor("WHITE")) + def OnPaint(self, event): dc = wxPaintDC(self) dc.BeginDrawing() - w, h = self.GetClientSize() + size = self.GetClientSize() font = wxFont(42, wxSWISS, wxNORMAL, wxNORMAL) dc.SetFont(font) st = "Python Rules!" tw,th, d,e = dc.GetTextExtent(st) - dc.DrawText(st, (w-tw)/2, (h-th)/2) + dc.DrawText(st, (size.width-tw)/2, (size.height-th)/2) dc.EndDrawing() #--------------------------------------------------------------------------- @@ -54,7 +58,7 @@ class MyFrame(wxFrame): wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(420, 200)) self.canvas = MyCanvas(self, -1) - self.CreateStatusBar(3) + self.CreateStatusBar(2) mainmenu = wxMenuBar() menu = wxMenu() menu.Append(100, 'A &Menu Item', 'the help text') @@ -80,9 +84,9 @@ class MyFrame(wxFrame): def OnSize(self, event): - w,h = self.GetClientSize() - self.canvas.SetSize(wxSize(w, h)) - self.SetStatusText("hello, this is a test: (%d, %d)" % (w,h)) + size = self.GetClientSize() + self.canvas.SetSize(size) + self.SetStatusText("hello, this is a test: (%d, %d)" % (size.width, size.height), 1) ## def OnMenuHighlight(self, event): ## mainmenu = self.GetMenuBar() @@ -143,6 +147,25 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.3 1998/12/15 20:44:35 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. +# +# Other assorted fixes and additions. +# # Revision 1.2 1998/08/22 19:51:17 RD # some tweaks for wxGTK # diff --git a/utils/wxPython/tests/test4.py b/utils/wxPython/tests/test4.py index db3702860d..ae177835ec 100644 --- a/utils/wxPython/tests/test4.py +++ b/utils/wxPython/tests/test4.py @@ -12,7 +12,7 @@ #---------------------------------------------------------------------------- -from wxPython import * +from wxPython.wx import * import time @@ -43,7 +43,7 @@ class TestSimpleControlsDlg(wxDialog): rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(80, y_pos), wxPyDefaultSize, sampleList, 3, wxRA_HORIZONTAL| wxNO_BORDER) EVT_RADIOBOX(self, 30, self.EvtRadioBox) - width, height = rb.GetSize() + width, height = rb.GetSizeTuple() y_pos = y_pos + height + 5 wxStaticText(self, -1, "wxChoice", wxPoint(5, y_pos), wxSize(75, 20)) @@ -64,7 +64,7 @@ class TestSimpleControlsDlg(wxDialog): EVT_LISTBOX(self, 60, self.EvtListBox) EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick) lb.SetSelection(0) - width, height = lb.GetSize() + width, height = lb.GetSizeTuple() y_pos = y_pos + height + 5 @@ -374,7 +374,7 @@ class TestCustomStatusBar(wxFrame): def __init__(self, parent): wxFrame.__init__(self, parent, -1, 'Test Custom StatusBar', wxPyDefaultPosition, wxSize(500, 300)) - wxWindow(self, -1) + wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE")) self.sb = CustomStatusBar(self) self.SetStatusBar(self.sb) @@ -392,9 +392,9 @@ class TestToolBar(wxFrame): wxPyDefaultPosition, wxSize(500, 300)) self.log = log - wxWindow(self, -1) + wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE")) - tb = self.CreateToolBar() + tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER) #tb = wxToolBar(self, -1, wxPyDefaultPosition, wxPyDefaultSize, # wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT) #self.SetToolBar(tb) @@ -469,7 +469,7 @@ class TestTreeCtrlPanel(wxPanel): def OnSize(self, event): - w,h = self.GetClientSize() + w,h = self.GetClientSizeTuple() self.tree.SetDimensions(0, 0, w, h) @@ -616,7 +616,7 @@ class AppFrame(wxFrame): def WriteText(self, str): self.log.WriteText(str) if wxPlatform == '__WXMSW__': - w, h = self.log.GetClientSize() + 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)) @@ -803,7 +803,27 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.9 1998/12/15 20:44:35 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. +# +# Other assorted fixes and additions. +# # Revision 1.8 1998/11/25 08:47:11 RD +# # Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon # Added events for wxGrid # Other various fixes and additions diff --git a/utils/wxPython/tests/test5.py b/utils/wxPython/tests/test5.py index 396e92a437..17976f73e4 100644 --- a/utils/wxPython/tests/test5.py +++ b/utils/wxPython/tests/test5.py @@ -12,7 +12,7 @@ #---------------------------------------------------------------------------- -from wxPython import * +from wxPython.wx import * #--------------------------------------------------------------------------- @@ -91,7 +91,27 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.2 1998/12/15 20:44:36 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. +# +# Other assorted fixes and additions. +# # Revision 1.1 1998/11/25 08:47:12 RD +# # Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon # Added events for wxGrid # Other various fixes and additions diff --git a/utils/wxPython/tests/test6.py b/utils/wxPython/tests/test6.py new file mode 100644 index 0000000000..f79a98f38f --- /dev/null +++ b/utils/wxPython/tests/test6.py @@ -0,0 +1,103 @@ +#!/bin/env python +#---------------------------------------------------------------------------- +# Name: test6.py +# Purpose: Testing wxConfig +# +# Author: Robin Dunn +# +# Created: 26-Nov-1998 +# RCS-ID: $Id$ +# Copyright: (c) 1998 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------------- + +import sys +from wxPython.wx import wxConfig + + +#---------------------------------------------------------------------------- + +def main(): + + cfg = wxConfig('test6', 'TCS') + + cmd = '' + if len(sys.argv) > 1: + cmd = sys.argv[1] + + if cmd == 'add': + cfg.SetPath('one/two/three') + cfg.Flush() + + cfg.Write('aaa', 'The quick brown fox jummped over the lazy dog.') + cfg.Write('bbb', 'This is a test of the emergency broadcast system') + + aList = ['one', 'two', 'buckle', 'my', 'shoe', 1966] + cfg.Write('ccc', str(aList)) + + cfg.Write('zzz/yyy', 'foobar') + cfg.Write('zzz/xxx', 'spam and eggs') + + cfg.Flush() + + elif cmd == 'enum': + traverse(cfg, '/') + + elif cmd == 'del': + cfg.DeleteAll() + + else: + print 'Specify command: add, enum, or del.' + + + +def traverse(cfg, path): + print path + cont, val, idx = cfg.GetFirstEntry() + while cont: + print "%s/%s = %s" % (path, val, cfg.Read(val)) + cont, val, idx = cfg.GetNextEntry(idx) + + cont, val, idx = cfg.GetFirstGroup() + while cont: + if path == '/': + newpath = path+val + else: + newpath = path+'/'+val + + cfg.SetPath(newpath) + traverse(cfg, newpath) + cfg.SetPath(path) + cont, val, idx = cfg.GetNextGroup(idx) + + + +if __name__ == '__main__': + #import pdb + #pdb.run('main()') + main() + + +#---------------------------------------------------------------------------- +# +# $Log$ +# Revision 1.1 1998/12/15 20:44:37 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. +# +# Other assorted fixes and additions. +# +#