From 09f3d4e679f5742c54fb062ede846b77606a9c5b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 31 Aug 2001 21:38:03 +0000 Subject: [PATCH] Added XRCed to the wxPython Tools directory, contributed by Roman Rolinsky. Added wrappers for the default ctor and the Create methods for most window classes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/.cvsignore | 1 + wxPython/CHANGES.txt | 13 + wxPython/src/calendar.i | 9 + wxPython/src/cmndlgs.i | 15 +- wxPython/src/controls.i | 205 ++- wxPython/src/controls2.i | 106 +- wxPython/src/frames.i | 14 +- wxPython/src/grid.i | 1 - wxPython/src/mdi.i | 26 +- wxPython/src/msw/calendar.cpp | 95 ++ wxPython/src/msw/calendar.py | 8 + wxPython/src/msw/cmndlgs.py | 7 - wxPython/src/msw/controls.cpp | 2662 +++++++++++++++++++++++++++++--- wxPython/src/msw/controls.py | 190 ++- wxPython/src/msw/controls2.cpp | 215 ++- wxPython/src/msw/controls2.py | 18 +- wxPython/src/msw/frames.cpp | 220 +++ wxPython/src/msw/frames.py | 18 +- wxPython/src/msw/mdi.cpp | 286 ++++ wxPython/src/msw/mdi.py | 28 +- wxPython/src/msw/sizers.cpp | 31 + wxPython/src/msw/sizers.py | 4 + wxPython/src/msw/stattool.cpp | 240 +++ wxPython/src/msw/stattool.py | 24 + wxPython/src/msw/windows.cpp | 604 ++++++-- wxPython/src/msw/windows.py | 59 +- wxPython/src/msw/windows2.cpp | 592 ++++--- wxPython/src/msw/windows2.py | 86 +- wxPython/src/msw/windows3.cpp | 257 +++ wxPython/src/msw/windows3.py | 35 +- wxPython/src/sizers.i | 1 + wxPython/src/stattool.i | 25 +- wxPython/src/windows.i | 125 +- wxPython/src/windows2.i | 295 +--- wxPython/src/windows3.i | 25 +- wxPython/tools/XRCed/CHANGES | 19 + wxPython/tools/XRCed/README | 60 + wxPython/tools/XRCed/TODO | 28 + wxPython/tools/XRCed/images.py | 286 ++++ wxPython/tools/XRCed/params.py | 317 ++++ wxPython/tools/XRCed/xrced.py | 1325 ++++++++++++++++ wxPython/tools/XRCed/xrced.xrc | 89 ++ wxPython/tools/XRCed/xxx.py | 507 ++++++ 43 files changed, 8211 insertions(+), 960 deletions(-) create mode 100644 wxPython/tools/XRCed/CHANGES create mode 100644 wxPython/tools/XRCed/README create mode 100644 wxPython/tools/XRCed/TODO create mode 100644 wxPython/tools/XRCed/images.py create mode 100644 wxPython/tools/XRCed/params.py create mode 100644 wxPython/tools/XRCed/xrced.py create mode 100644 wxPython/tools/XRCed/xrced.xrc create mode 100644 wxPython/tools/XRCed/xxx.py diff --git a/wxPython/.cvsignore b/wxPython/.cvsignore index bf3bcde0de..d5373151f7 100644 --- a/wxPython/.cvsignore +++ b/wxPython/.cvsignore @@ -4,5 +4,6 @@ build build.local dist licence +s.bat temp update.log diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index bcd74b74ad..447d88fb8d 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -15,6 +15,19 @@ Added the new virtual list capabilities to wxListCtrl. Added a wxSTC style editor from Riaan Booysen to the sample apps. +Added XRCed to the wxPython Tools directory, contributed by Roman +Rolinsky. + +Added a new "constructor" to most of the window classes that calls the +default C++ contructor, (the on with no parameters) and also added the +coresponding Create(...) method. This allows you to do a 2-step +creation of windows which is sometimes required for doing things such +as setting extended style flags before the window is created, or for +passing the object to the XRC resource system to be created from the +resource. The name of the new "constructor" is the original name of +the class with a "Pre" in it. For example, wxPreWindow, wxPreFrame, +etc. + diff --git a/wxPython/src/calendar.i b/wxPython/src/calendar.i index ee24ecbe02..aeaed635ae 100644 --- a/wxPython/src/calendar.i +++ b/wxPython/src/calendar.i @@ -157,6 +157,15 @@ public: const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const char* name = "calendar"); + %name(wxPreCalendarCtrl)wxCalendarCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const char* name = "calendar"); // set/get the current date // ------------------------ diff --git a/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i index 321c4e7ddd..08c8a37919 100644 --- a/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -54,8 +54,6 @@ class wxColourDialog : public wxDialog { public: wxColourDialog(wxWindow* parent, wxColourData* data = NULL); - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" - wxColourData& GetColourData(); int ShowModal(); }; @@ -71,8 +69,6 @@ public: long style = 0, const wxPoint& pos = wxDefaultPosition); - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" - wxString GetPath(); wxString GetMessage(); long GetStyle(); @@ -93,8 +89,6 @@ public: long style = 0, const wxPoint& pos = wxDefaultPosition); - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" - wxString GetDirectory(); wxString GetFilename(); int GetFilterIndex(); @@ -160,9 +154,8 @@ public: return new wxSingleChoiceDialog(parent, *message, *caption, LCOUNT, choices, NULL, style, *pos); } - } - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" + } int GetSelection(); wxString GetStringSelection(); @@ -182,8 +175,6 @@ public: long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition); - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" - wxString GetValue(); void SetValue(const wxString& value); int ShowModal(); @@ -216,8 +207,6 @@ class wxFontDialog : public wxDialog { public: wxFontDialog(wxWindow* parent, wxFontData* data); - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" - wxFontData& GetFontData(); int ShowModal(); }; @@ -233,8 +222,6 @@ public: long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition); - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" - int ShowModal(); }; diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 73d21cf13d..cb5f78b5f2 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -64,8 +64,16 @@ public: long style=0, const wxValidator& validator=wxDefaultValidator, const char* name="control"); + %name(wxPreControl)wxControl(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos=wxDefaultPosition, + const wxSize& size=wxDefaultSize, + long style=0, + const wxValidator& validator=wxDefaultValidator, + const char* name="control"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Command(wxCommandEvent& event); wxString GetLabel(); @@ -83,20 +91,25 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, char* name = "button"); + %name(wxPreButton)wxButton(); + + bool Create(wxWindow* parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + char* name = "button"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void SetDefault(); void SetBackgroundColour(const wxColour& colour); void SetForegroundColour(const wxColour& colour); -}; + void SetImageLabel(const wxBitmap& bitmap); + void SetImageMargins(wxCoord x, wxCoord y); -%inline %{ - wxSize wxButton_GetDefaultSize() { - return wxButton::GetDefaultSize(); - } -%} + static wxSize GetDefaultSize(); +}; //---------------------------------------------------------------------- @@ -108,8 +121,15 @@ public: long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, char* name = "button"); + %name(wxPreBitmapButton)wxBitmapButton(); + + bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, + char* name = "button"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" wxBitmap& GetBitmapLabel(); wxBitmap& GetBitmapDisabled(); @@ -135,8 +155,15 @@ public: long style = 0, const wxValidator& val = wxDefaultValidator, char* name = "checkBox"); + %name(wxPreCheckBox)wxCheckBox(); + + bool Create(wxWindow* parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& val = wxDefaultValidator, + char* name = "checkBox"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool GetValue(); void SetValue(const bool state); @@ -153,8 +180,16 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, char* name = "choice"); + %name(wxPreChoice)wxChoice(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int LCOUNT=0, wxString* choices=NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + char* name = "choice"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Append(const wxString& item); void Clear(); @@ -188,8 +223,16 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, char* name = "comboBox"); + %name(wxPreComboBox)wxComboBox(); + + bool Create(wxWindow* parent, wxWindowID id, char* value = "", + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int LCOUNT=0, wxString* choices=NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + char* name = "comboBox"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Append(const wxString& item); // TODO: void Append(const wxString& item, char* clientData); @@ -228,8 +271,15 @@ public: long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, char* name = "gauge"); + %name(wxPreGauge)wxGauge(); + + bool Create(wxWindow* parent, wxWindowID id, int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + char* name = "gauge"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" int GetBezelFace(); int GetRange(); @@ -250,6 +300,13 @@ public: const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticBox"); + %name(wxPreStaticBox)wxStaticBox(); + + bool Create(wxWindow* parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + char* name = "staticBox"); }; @@ -263,6 +320,13 @@ public: const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, const char* name = "staticLine" ); + %name(wxPreStaticLine)wxStaticLine(); + + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const char* name = "staticLine" ); }; @@ -275,8 +339,14 @@ public: const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticText"); + %name(wxPreStaticText)wxStaticText(); + + bool Create(wxWindow* parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + char* name = "staticText"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" wxString GetLabel(); void SetLabel(const wxString& label); @@ -293,8 +363,16 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, char* name = "listBox"); + %name(wxPreListBox)wxListBox(); + + bool Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int LCOUNT, wxString* choices = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + char* name = "listBox"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Append(const wxString& item); // TODO: void Append(const wxString& item, char* clientData); @@ -348,8 +426,17 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, char* name = "listBox"); + %name(wxPreCheckListBox)wxCheckListBox(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int LCOUNT = 0, + wxString* choices = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + char* name = "listBox"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool IsChecked(int uiIndex); void Check(int uiIndex, int bCheck = TRUE); @@ -395,8 +482,15 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, char* name = "text"); + %name(wxPreTextCtrl)wxTextCtrl(); + + bool Create(wxWindow* parent, wxWindowID id, char* value = "", + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + char* name = "text"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Clear(); void Copy(); @@ -458,8 +552,15 @@ public: long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, char* name = "scrollBar"); + %name(wxPreScrollBar)wxScrollBar(); + + bool Create(wxWindow* parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + char* name = "scrollBar"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" int GetRange(); int GetPageSize(); @@ -481,6 +582,13 @@ public: const wxSize& size = wxDefaultSize, long style = wxSP_HORIZONTAL, char* name = "spinButton"); + %name(wxPreSpinButton)wxSpinButton(); + + bool Create(wxWindow* parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_HORIZONTAL, + char* name = "spinButton"); int GetMax(); int GetMin(); @@ -499,8 +607,15 @@ public: const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticBitmap"); + %name(wxPreStaticBitmap)wxStaticBitmap(); + + bool Create(wxWindow* parent, wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + char* name = "staticBitmap"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" const wxBitmap& GetBitmap(); void SetBitmap(const wxBitmap& bitmap); @@ -520,8 +635,18 @@ public: long style = wxRA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, char* name = "radioBox"); + %name(wxPreRadioBox)wxRadioBox(); + + bool Create(wxWindow* parent, wxWindowID id, + const wxString& label, + const wxPoint& point = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int LCOUNT = 0, wxString* choices = NULL, + int majorDimension = 0, + long style = wxRA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + char* name = "radioBox"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Enable(bool enable); %name(EnableItem)void Enable(int n, bool enable); @@ -564,8 +689,16 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, char* name = "radioButton"); + %name(wxPreRadioButton)wxRadioButton(); + + bool Create(wxWindow* parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + char* name = "radioButton"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool GetValue(); void SetValue(bool value); @@ -582,8 +715,16 @@ public: long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, char* name = "slider"); + %name(wxPreSlider)wxSlider(); + + bool Create(wxWindow* parent, wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& point = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + char* name = "slider"); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void ClearSel(); void ClearTicks(); @@ -619,6 +760,16 @@ public: long style = wxSP_ARROW_KEYS, int min = 0, int max = 100, int initial = 0, const char* name = "wxSpinCtrl"); + %name(wxPreSpinCtrl)wxSpinCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id = -1, + const char* value = "", + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS, + int min = 0, int max = 100, int initial = 0, + const char* name = "wxSpinCtrl"); int GetMax(); @@ -644,6 +795,16 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const char* name = "toggle"); + %name(wxPreToggleButton)wxToggleButton(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const char* name = "toggle"); void SetValue(bool value); bool GetValue() const ; diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 4539b8e79d..990e3f1e11 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -332,10 +332,11 @@ public: }; -%{ +%{ // C++ Version of a Python aware class class wxPyListCtrl : public wxListCtrl { DECLARE_ABSTRACT_CLASS(wxPyListCtrl); public: + wxPyListCtrl() : wxListCtrl() {} wxPyListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -344,6 +345,15 @@ public: char* name) : wxListCtrl(parent, id, pos, size, style, validator, name) {} + bool Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + char* name) { + return wxListCtrl::Create(parent, id, pos, size, style, validator, name); + } + DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText); DEC_PYCALLBACK_INT_LONG(OnGetItemImage); DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr); @@ -367,9 +377,16 @@ public: long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, char* name = "listCtrl"); + %name(wxPreListCtrl)wxPyListCtrl(); + + bool Create(wxWindow* parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + char* name = "listCtrl"); void _setSelf(PyObject* self, PyObject* _class); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" %pragma(python) addtomethod = "__init__:self._setSelf(self, wxListCtrl)" @@ -875,10 +892,11 @@ public: -%{ +%{ // C++ version of Python aware wxTreeCtrl class wxPyTreeCtrl : public wxTreeCtrl { DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl); public: + wxPyTreeCtrl() : wxTreeCtrl() {} wxPyTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -887,6 +905,16 @@ public: char* name) : wxTreeCtrl(parent, id, pos, size, style, validator, name) {} + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + char* name) { + return wxTreeCtrl::Create(parent, id, pos, size, style, validator, name); + } + + int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) { int rval = 0; @@ -921,9 +949,16 @@ public: long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, char* name = "wxTreeCtrl"); + %name(wxPreTreeCtrl)wxPyTreeCtrl(); + + bool Create(wxWindow *parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, + const wxValidator& validator = wxDefaultValidator, + char* name = "wxTreeCtrl"); void _setSelf(PyObject* self, PyObject* _class); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" %pragma(python) addtomethod = "__init__:self._setSelf(self, wxTreeCtrl)" size_t GetCount(); @@ -1135,69 +1170,6 @@ public: }; -//---------------------------------------------------------------------- - -#ifdef SKIPTHIS -#ifdef __WXMSW__ - - -enum { - /* tab control event types */ - wxEVT_COMMAND_TAB_SEL_CHANGED, - wxEVT_COMMAND_TAB_SEL_CHANGING, -}; - - -class wxTabEvent : public wxCommandEvent { -public: -}; - - - -class wxTabCtrl : public wxControl { -public: - wxTabCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - char* name = "tabCtrl"); - - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" - - bool DeleteAllItems(); - bool DeleteItem(int item); - wxImageList* GetImageList(); - int GetItemCount(); - // TODO: void* GetItemData(); - int GetItemImage(int item); - - %addmethods { - %new wxRect* GetItemRect(int item) { - wxRect* rect = new wxRect; - self->GetItemRect(item, *rect); - return rect; - } - } - - wxString GetItemText(int item); - bool GetRowCount(); - int GetSelection(); - int HitTest(const wxPoint& pt, long& OUTPUT); - void InsertItem(int item, const wxString& text, - int imageId = -1, void* clientData = NULL); - // TODO: bool SetItemData(int item, void* data); - bool SetItemImage(int item, int image); - void SetImageList(wxImageList* imageList); - void SetItemSize(const wxSize& size); - bool SetItemText(int item, const wxString& text); - void SetPadding(const wxSize& padding); - int SetSelection(int item); - -}; - -#endif -#endif - //---------------------------------------------------------------------- %init %{ diff --git a/wxPython/src/frames.i b/wxPython/src/frames.i index 69fc74db4e..86c9ad7fe6 100644 --- a/wxPython/src/frames.i +++ b/wxPython/src/frames.i @@ -52,8 +52,13 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); + %name(wxPreFrame)wxFrame(); - %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" + bool Create(wxWindow* parent, const wxWindowID id, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + char* name = "frame"); void Centre(int direction = wxBOTH); wxStatusBar* CreateStatusBar(int number = 1, @@ -99,8 +104,13 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); + %name(wxPreMiniFrame)wxMiniFrame(); - %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" + bool Create(wxWindow* parent, const wxWindowID id, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + char* name = "frame"); }; diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 82c34448b9..72ca7ec3ca 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -1265,7 +1265,6 @@ public: long style = wxWANTS_CHARS, const char* name = wxPanelNameStr ); - //~wxGrid(); enum wxGridSelectionModes {wxGridSelectCells, wxGridSelectRows, diff --git a/wxPython/src/mdi.i b/wxPython/src/mdi.i index 7a69321a9d..21b4336e5e 100644 --- a/wxPython/src/mdi.i +++ b/wxPython/src/mdi.i @@ -41,8 +41,15 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const char* name = "frame"); + %name(wxPreMDIParentFrame)wxMDIParentFrame(); - %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" + bool Create(wxWindow *parent, + const wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const char* name = "frame"); void ActivateNext(); void ActivatePrevious(); @@ -75,8 +82,16 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const char* name = "frame"); + %name(wxPreMDIChildFrame)wxMDIChildFrame(); + + bool Create(wxMDIParentFrame* parent, + const wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const char* name = "frame"); - %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" void Activate(); void Maximize(bool maximize); @@ -90,6 +105,13 @@ public: class wxMDIClientWindow : public wxWindow { public: wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); + %name(wxPreMDIClientWindow)wxMDIClientWindow(); + + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" + + bool Create(wxMDIParentFrame* parent, long style = 0); + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" }; diff --git a/wxPython/src/msw/calendar.cpp b/wxPython/src/msw/calendar.cpp index 67e70978ed..7271adb524 100644 --- a/wxPython/src/msw/calendar.cpp +++ b/wxPython/src/msw/calendar.cpp @@ -957,6 +957,99 @@ static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define new_wxPreCalendarCtrl() (new wxCalendarCtrl()) +static PyObject *_wrap_new_wxPreCalendarCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreCalendarCtrl",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarCtrl *)new_wxPreCalendarCtrl(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxCalendarCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxDateTime * _arg3 = (wxDateTime *) &wxDefaultDateTime; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) (wxCAL_SHOW_HOLIDAYS); + char * _arg7 = (char *) "calendar"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","date","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOls:wxCalendarCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_Create. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxCalendarCtrl_Create. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxCalendarCtrl_SetDate(_swigobj,_swigarg0) (_swigobj->SetDate(_swigarg0)) static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1677,6 +1770,8 @@ static PyMethodDef calendarcMethods[] = { { "wxCalendarCtrl_EnableYearChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableYearChange, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_GetDate", (PyCFunction) _wrap_wxCalendarCtrl_GetDate, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_SetDate", (PyCFunction) _wrap_wxCalendarCtrl_SetDate, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_Create", (PyCFunction) _wrap_wxCalendarCtrl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreCalendarCtrl", (PyCFunction) _wrap_new_wxPreCalendarCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxCalendarCtrl", (PyCFunction) _wrap_new_wxCalendarCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarEvent_GetWeekDay", (PyCFunction) _wrap_wxCalendarEvent_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarEvent_GetDate", (PyCFunction) _wrap_wxCalendarEvent_GetDate, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/calendar.py b/wxPython/src/msw/calendar.py index 68f6bf2c7b..5f722a0675 100644 --- a/wxPython/src/msw/calendar.py +++ b/wxPython/src/msw/calendar.py @@ -134,6 +134,9 @@ class wxCalendarCtrlPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_Create,(self,) + _args, _kwargs) + return val def SetDate(self, *_args, **_kwargs): val = apply(calendarc.wxCalendarCtrl_SetDate,(self,) + _args, _kwargs) return val @@ -208,6 +211,11 @@ class wxCalendarCtrl(wxCalendarCtrlPtr): +def wxPreCalendarCtrl(*_args,**_kwargs): + val = wxCalendarCtrlPtr(apply(calendarc.new_wxPreCalendarCtrl,_args,_kwargs)) + val.thisown = 1 + return val + diff --git a/wxPython/src/msw/cmndlgs.py b/wxPython/src/msw/cmndlgs.py index 05e508a769..02d1e711d8 100644 --- a/wxPython/src/msw/cmndlgs.py +++ b/wxPython/src/msw/cmndlgs.py @@ -71,7 +71,6 @@ class wxColourDialog(wxColourDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxColourDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) @@ -104,7 +103,6 @@ class wxDirDialog(wxDirDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxDirDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) @@ -170,7 +168,6 @@ class wxFileDialog(wxFileDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFileDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) @@ -197,7 +194,6 @@ class wxSingleChoiceDialog(wxSingleChoiceDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) @@ -221,7 +217,6 @@ class wxTextEntryDialog(wxTextEntryDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxTextEntryDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) @@ -302,7 +297,6 @@ class wxFontDialog(wxFontDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFontDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) @@ -320,7 +314,6 @@ class wxMessageDialog(wxMessageDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxMessageDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index e8d193695f..9675f958ff 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -106,10 +106,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #else static char* wxStringErrorMsg = "string type is required for parameter"; #endif - - wxSize wxButton_GetDefaultSize() { - return wxButton::GetDefaultSize(); - } #ifdef __cplusplus extern "C" { #endif @@ -128,26 +124,6 @@ static PyObject *_wrap_wxDefaultValidator_get() { return pyobj; } -static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSize * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxButton_GetDefaultSize",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxButton_GetDefaultSize()); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - static void *SwigwxControlTowxWindow(void *ptr) { wxControl *src; wxWindow *dest; @@ -237,6 +213,99 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +#define new_wxPreControl() (new wxControl()) +static PyObject *_wrap_new_wxPreControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxControl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreControl",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxControl *)new_wxPreControl(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxControl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxControl * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) 0; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; + char * _arg7 = (char *) "control"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _argo6 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlOs:wxControl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxControl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControl_Create. Expected _wxControl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxControl_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -480,6 +549,123 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +#define new_wxPreButton() (new wxButton()) +static PyObject *_wrap_new_wxPreButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxButton * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreButton",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxButton *)new_wxPreButton(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxButton_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxButton * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "button"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "self","parent","id","label","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxButton_Create. Expected _wxButton_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxButton_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxButton_SetDefault(_swigobj) (_swigobj->SetDefault()) static PyObject *_wrap_wxButton_SetDefault(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -580,43 +766,130 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar return _resultobj; } -static void *SwigwxBitmapButtonTowxButton(void *ptr) { - wxBitmapButton *src; - wxButton *dest; - src = (wxBitmapButton *) ptr; - dest = (wxButton *) src; - return (void *) dest; -} +#define wxButton_SetImageLabel(_swigobj,_swigarg0) (_swigobj->SetImageLabel(_swigarg0)) +static PyObject *_wrap_wxButton_SetImageLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxButton * _arg0; + wxBitmap * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","bitmap", NULL }; -static void *SwigwxBitmapButtonTowxControl(void *ptr) { - wxBitmapButton *src; - wxControl *dest; - src = (wxBitmapButton *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetImageLabel",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxButton_SetImageLabel. Expected _wxButton_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetImageLabel. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxButton_SetImageLabel(_arg0,*_arg1); -static void *SwigwxBitmapButtonTowxWindow(void *ptr) { - wxBitmapButton *src; - wxWindow *dest; - src = (wxBitmapButton *) ptr; - dest = (wxWindow *) src; - return (void *) dest; + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; } -static void *SwigwxBitmapButtonTowxEvtHandler(void *ptr) { - wxBitmapButton *src; - wxEvtHandler *dest; - src = (wxBitmapButton *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} +#define wxButton_SetImageMargins(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetImageMargins(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxButton_SetImageMargins(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxButton * _arg0; + wxCoord _arg1; + wxCoord _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; -static void *SwigwxBitmapButtonTowxObject(void *ptr) { - wxBitmapButton *src; - wxObject *dest; - src = (wxBitmapButton *) ptr; - dest = (wxObject *) src; + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxButton_SetImageMargins",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxButton_SetImageMargins. Expected _wxButton_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxButton_SetImageMargins(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxButton_GetDefaultSize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxButton::GetDefaultSize()); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static void *SwigwxBitmapButtonTowxButton(void *ptr) { + wxBitmapButton *src; + wxButton *dest; + src = (wxBitmapButton *) ptr; + dest = (wxButton *) src; + return (void *) dest; +} + +static void *SwigwxBitmapButtonTowxControl(void *ptr) { + wxBitmapButton *src; + wxControl *dest; + src = (wxBitmapButton *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxBitmapButtonTowxWindow(void *ptr) { + wxBitmapButton *src; + wxWindow *dest; + src = (wxBitmapButton *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxBitmapButtonTowxEvtHandler(void *ptr) { + wxBitmapButton *src; + wxEvtHandler *dest; + src = (wxBitmapButton *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxBitmapButtonTowxObject(void *ptr) { + wxBitmapButton *src; + wxObject *dest; + src = (wxBitmapButton *) ptr; + dest = (wxObject *) src; return (void *) dest; } @@ -694,6 +967,108 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define new_wxPreBitmapButton() (new wxBitmapButton()) +static PyObject *_wrap_new_wxPreBitmapButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreBitmapButton",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBitmapButton *)new_wxPreBitmapButton(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxBitmapButton_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxBitmapButton * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxBitmap * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxBU_AUTODRAW; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "button"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "self","parent","id","bitmap","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxBitmapButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmapButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_Create. Expected _wxBitmapButton_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxBitmapButton_Create. Expected _wxBitmap_p."); + return NULL; + } + } + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxBitmapButton_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxBitmapButton_GetBitmapLabel(_swigobj) (_swigobj->GetBitmapLabel()) static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1193,6 +1568,123 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxPreCheckBox() (new wxCheckBox()) +static PyObject *_wrap_new_wxPreCheckBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCheckBox * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreCheckBox",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCheckBox *)new_wxPreCheckBox(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckBox_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCheckBox_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCheckBox * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "checkBox"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "self","parent","id","label","pos","size","style","val","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxCheckBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_Create. Expected _wxCheckBox_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCheckBox_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxCheckBox_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxCheckBox_GetValue(_swigobj) (_swigobj->GetValue()) static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1370,17 +1862,131 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define wxChoice_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) -static PyObject *_wrap_wxChoice_Append(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxPreChoice() (new wxChoice()) +static PyObject *_wrap_new_wxPreChoice(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxChoice * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","item", NULL }; + wxChoice * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxChoice_Append",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreChoice",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxChoice *)new_wxPreChoice(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxChoice_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxChoice_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) +static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxChoice * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + int _arg5 = (int ) 0; + wxString * _arg6 = (wxString *) NULL; + long _arg7 = (long ) 0; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; + char * _arg9 = (char *) "choice"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _obj6 = 0; + PyObject * _argo8 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","choices","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOs:wxChoice_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_arg9)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxChoice_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxChoice_Create. Expected _wxChoice_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxChoice_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj6) +{ + _arg6 = wxString_LIST_helper(_obj6); + if (_arg6 == NULL) { + return NULL; + } +} + if (_argo8) { + if (_argo8 == Py_None) { _arg8 = NULL; } + else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxChoice_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + if (_obj6) { + _arg5 = PyList_Size(_obj6); + } + else { + _arg5 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + delete [] _arg6; +} + return _resultobj; +} + +#define wxChoice_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) +static PyObject *_wrap_wxChoice_Append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxChoice * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","item", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxChoice_Append",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1972,6 +2578,121 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxPreComboBox() (new wxComboBox()) +static PyObject *_wrap_new_wxPreComboBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxComboBox * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreComboBox",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxComboBox *)new_wxPreComboBox(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxComboBox_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxComboBox_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxComboBox * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + char * _arg3 = (char *) ""; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + int _arg6 = (int ) 0; + wxString * _arg7 = (wxString *) NULL; + long _arg8 = (long ) 0; + wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; + char * _arg10 = (char *) "comboBox"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _obj7 = 0; + PyObject * _argo9 = 0; + char *_kwnames[] = { "self","parent","id","value","pos","size","choices","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|sOOOlOs:wxComboBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_obj7,&_arg8,&_argo9,&_arg10)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxComboBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_Create. Expected _wxComboBox_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxComboBox_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_obj7) +{ + _arg7 = wxString_LIST_helper(_obj7); + if (_arg7 == NULL) { + return NULL; + } +} + if (_argo9) { + if (_argo9 == Py_None) { _arg9 = NULL; } + else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of wxComboBox_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + if (_obj7) { + _arg6 = PyList_Size(_obj7); + } + else { + _arg6 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + delete [] _arg7; +} + return _resultobj; +} + #define wxComboBox_Append(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2782,6 +3503,100 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } +#define new_wxPreGauge() (new wxGauge()) +static PyObject *_wrap_new_wxPreGauge(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGauge * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreGauge",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGauge *)new_wxPreGauge(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGauge_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGauge_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGauge * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + int _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxGA_HORIZONTAL; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "gauge"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "self","parent","id","range","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii|OOlOs:wxGauge_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGauge_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGauge_Create. Expected _wxGauge_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGauge_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxGauge_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxGauge_GetBezelFace(_swigobj) (_swigobj->GetBezelFace()) static PyObject *_wrap_wxGauge_GetBezelFace(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3122,6 +3937,114 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreStaticBox() (new wxStaticBox()) +static PyObject *_wrap_new_wxPreStaticBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStaticBox * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticBox",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStaticBox *)new_wxPreStaticBox(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBox_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStaticBox_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStaticBox * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + char * _arg7 = (char *) "staticBox"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","label","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxStaticBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBox_Create. Expected _wxStaticBox_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBox_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + static void *SwigwxStaticLineTowxControl(void *ptr) { wxStaticLine *src; wxControl *dest; @@ -3210,6 +4133,90 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreStaticLine() (new wxStaticLine()) +static PyObject *_wrap_new_wxPreStaticLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStaticLine * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticLine",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStaticLine *)new_wxPreStaticLine(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticLine_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStaticLine_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxStaticLine_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStaticLine * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxLI_HORIZONTAL; + char * _arg6 = (char *) "staticLine"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxStaticLine_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticLine_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticLine_Create. Expected _wxStaticLine_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticLine_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxStaticTextTowxControl(void *ptr) { wxStaticText *src; wxControl *dest; @@ -3322,6 +4329,114 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreStaticText() (new wxStaticText()) +static PyObject *_wrap_new_wxPreStaticText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStaticText * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticText",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStaticText *)new_wxPreStaticText(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticText_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStaticText_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStaticText * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + char * _arg7 = (char *) "staticText"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","label","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxStaticText_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticText_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticText_Create. Expected _wxStaticText_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticText_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxStaticText_GetLabel(_swigobj) (_swigobj->GetLabel()) static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3439,88 +4554,202 @@ static void *SwigwxListBoxTowxObject(void *ptr) { return (void *) dest; } -#define new_wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) -static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxListBox(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) +static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListBox * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + int _arg4; + wxString * _arg5 = (wxString *) NULL; + long _arg6 = (long ) 0; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "listBox"; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOs:new_wxListBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_arg8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxListBox. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj5) +{ + _arg5 = wxString_LIST_helper(_obj5); + if (_arg5 == NULL) { + return NULL; + } +} + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxListBox. Expected _wxValidator_p."); + return NULL; + } + } +{ + if (_obj5) { + _arg4 = PyList_Size(_obj5); + } + else { + _arg4 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + delete [] _arg5; +} + return _resultobj; +} + +#define new_wxPreListBox() (new wxListBox()) +static PyObject *_wrap_new_wxPreListBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListBox * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreListBox",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListBox *)new_wxPreListBox(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListBox_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) +static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxListBox * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxDefaultSize; - int _arg4; - wxString * _arg5 = (wxString *) NULL; - long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "listBox"; + bool _result; + wxListBox * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + int _arg5; + wxString * _arg6 = (wxString *) NULL; + long _arg7 = (long ) 0; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; + char * _arg9 = (char *) "listBox"; PyObject * _argo0 = 0; + PyObject * _argo1 = 0; wxPoint temp; - PyObject * _obj2 = 0; - wxSize temp0; PyObject * _obj3 = 0; - PyObject * _obj5 = 0; - PyObject * _argo7 = 0; - char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL }; - char _ptemp[128]; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _obj6 = 0; + PyObject * _argo8 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","choices","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOs:new_wxListBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOs:wxListBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_arg9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxListBox. Expected _wxWindow_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListBox_Create. Expected _wxListBox_p."); return NULL; } } - if (_obj2) + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListBox_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) { - _arg2 = &temp; - if (! wxPoint_helper(_obj2, &_arg2)) + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) return NULL; } - if (_obj3) + if (_obj4) { - _arg3 = &temp0; - if (! wxSize_helper(_obj3, &_arg3)) + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) return NULL; } - if (_obj5) + if (_obj6) { - _arg5 = wxString_LIST_helper(_obj5); - if (_arg5 == NULL) { + _arg6 = wxString_LIST_helper(_obj6); + if (_arg6 == NULL) { return NULL; } } - if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxListBox. Expected _wxValidator_p."); + if (_argo8) { + if (_argo8 == Py_None) { _arg8 = NULL; } + else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxListBox_Create. Expected _wxValidator_p."); return NULL; } } { - if (_obj5) { - _arg4 = PyList_Size(_obj5); + if (_obj6) { + _arg5 = PyList_Size(_obj6); } else { - _arg4 = 0; + _arg5 = 0; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} _resultobj = Py_BuildValue("i",_result); { - delete [] _arg5; + delete [] _arg6; } return _resultobj; } @@ -4379,6 +5608,120 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define new_wxPreCheckListBox() (new wxCheckListBox()) +static PyObject *_wrap_new_wxPreCheckListBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCheckListBox * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreCheckListBox",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCheckListBox *)new_wxPreCheckListBox(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckListBox_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCheckListBox_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) +static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCheckListBox * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + int _arg5 = (int ) 0; + wxString * _arg6 = (wxString *) NULL; + long _arg7 = (long ) 0; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; + char * _arg9 = (char *) "listBox"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _obj6 = 0; + PyObject * _argo8 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","choices","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOs:wxCheckListBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_arg9)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckListBox_Create. Expected _wxCheckListBox_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCheckListBox_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj6) +{ + _arg6 = wxString_LIST_helper(_obj6); + if (_arg6 == NULL) { + return NULL; + } +} + if (_argo8) { + if (_argo8 == Py_None) { _arg8 = NULL; } + else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxCheckListBox_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + if (_obj6) { + _arg5 = PyList_Size(_obj6); + } + else { + _arg5 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + delete [] _arg6; +} + return _resultobj; +} + #define wxCheckListBox_IsChecked(_swigobj,_swigarg0) (_swigobj->IsChecked(_swigarg0)) static PyObject *_wrap_wxCheckListBox_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4951,47 +6294,141 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|sOOlOs:new_wxTextCtrl",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|sOOlOs:new_wxTextCtrl",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTextCtrl. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxTextCtrl. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPreTextCtrl() (new wxTextCtrl()) +static PyObject *_wrap_new_wxPreTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextCtrl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreTextCtrl",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTextCtrl *)new_wxPreTextCtrl(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTextCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextCtrl * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + char * _arg3 = (char *) ""; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "text"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "self","parent","id","value","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|sOOlOs:wxTextCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTextCtrl. Expected _wxWindow_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Create. Expected _wxTextCtrl_p."); return NULL; } } - if (_obj3) + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextCtrl_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj4) { - _arg3 = &temp; - if (! wxPoint_helper(_obj3, &_arg3)) + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) return NULL; } - if (_obj4) + if (_obj5) { - _arg4 = &temp0; - if (! wxSize_helper(_obj4, &_arg4)) + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) return NULL; } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxTextCtrl. Expected _wxValidator_p."); + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxTextCtrl_Create. Expected _wxValidator_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -6477,6 +7914,99 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreScrollBar() (new wxScrollBar()) +static PyObject *_wrap_new_wxPreScrollBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxScrollBar * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreScrollBar",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxScrollBar *)new_wxPreScrollBar(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxScrollBar_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxScrollBar * _arg0; + wxWindow * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxSB_HORIZONTAL; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; + char * _arg7 = (char *) "scrollBar"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _argo6 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOs:wxScrollBar_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrollBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_Create. Expected _wxScrollBar_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScrollBar_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxScrollBar_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxScrollBar_GetRange(_swigobj) (_swigobj->GetRange()) static PyObject *_wrap_wxScrollBar_GetRange(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6741,6 +8271,90 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreSpinButton() (new wxSpinButton()) +static PyObject *_wrap_new_wxPreSpinButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinButton * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSpinButton",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSpinButton *)new_wxPreSpinButton(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSpinButton_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxSpinButton_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSpinButton * _arg0; + wxWindow * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxSP_HORIZONTAL; + char * _arg6 = (char *) "spinButton"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOls:wxSpinButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinButton_Create. Expected _wxSpinButton_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSpinButton_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSpinButton_GetMax(_swigobj) (_swigobj->GetMax()) static PyObject *_wrap_wxSpinButton_GetMax(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6928,56 +8542,149 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje long _arg5 = (long ) 0; char * _arg6 = (char *) "staticBitmap"; PyObject * _argo0 = 0; - PyObject * _argo2 = 0; + PyObject * _argo2 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "parent","id","bitmap","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxStaticBitmap",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticBitmap. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxStaticBitmap. Expected _wxBitmap_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPreStaticBitmap() (new wxStaticBitmap()) +static PyObject *_wrap_new_wxPreStaticBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStaticBitmap * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticBitmap",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStaticBitmap_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStaticBitmap * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxBitmap * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + char * _arg7 = (char *) "staticBitmap"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo3 = 0; wxPoint temp; - PyObject * _obj3 = 0; - wxSize temp0; PyObject * _obj4 = 0; - char *_kwnames[] = { "parent","id","bitmap","pos","size","style","name", NULL }; - char _ptemp[128]; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","bitmap","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxStaticBitmap",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxStaticBitmap_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_arg7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStaticBitmap. Expected _wxWindow_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBitmap_Create. Expected _wxStaticBitmap_p."); return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxStaticBitmap. Expected _wxBitmap_p."); + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_Create. Expected _wxWindow_p."); return NULL; } } - if (_obj3) + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxStaticBitmap_Create. Expected _wxBitmap_p."); + return NULL; + } + } + if (_obj4) { - _arg3 = &temp; - if (! wxPoint_helper(_obj3, &_arg3)) + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) return NULL; } - if (_obj4) + if (_obj5) { - _arg4 = &temp0; - if (! wxSize_helper(_obj4, &_arg4)) + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) return NULL; } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -7234,6 +8941,145 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxPreRadioBox() (new wxRadioBox()) +static PyObject *_wrap_new_wxPreRadioBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRadioBox * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreRadioBox",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRadioBox *)new_wxPreRadioBox(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioBox_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxRadioBox_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10)) +static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRadioBox * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + int _arg6 = (int ) 0; + wxString * _arg7 = (wxString *) NULL; + int _arg8 = (int ) 0; + long _arg9 = (long ) wxRA_HORIZONTAL; + wxValidator * _arg10 = (wxValidator *) &wxDefaultValidator; + char * _arg11 = (char *) "radioBox"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _obj7 = 0; + PyObject * _argo10 = 0; + char *_kwnames[] = { "self","parent","id","label","point","size","choices","majorDimension","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOOilOs:wxRadioBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_obj7,&_arg8,&_arg9,&_argo10,&_arg11)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRadioBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_Create. Expected _wxRadioBox_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRadioBox_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_obj7) +{ + _arg7 = wxString_LIST_helper(_obj7); + if (_arg7 == NULL) { + return NULL; + } +} + if (_argo10) { + if (_argo10 == Py_None) { _arg10 = NULL; } + else if (SWIG_GetPtrObj(_argo10,(void **) &_arg10,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 11 of wxRadioBox_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + if (_obj7) { + _arg6 = PyList_Size(_obj7); + } + else { + _arg6 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} +{ + delete [] _arg7; +} + return _resultobj; +} + #define wxRadioBox_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) static PyObject *_wrap_wxRadioBox_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7809,39 +9655,156 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } if (_obj3) { - _arg3 = &temp; - if (! wxPoint_helper(_obj3, &_arg3)) + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxRadioButton. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define new_wxPreRadioButton() (new wxRadioButton()) +static PyObject *_wrap_new_wxPreRadioButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRadioButton * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreRadioButton",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxRadioButton *)new_wxPreRadioButton(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxRadioButton_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRadioButton * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "radioButton"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "self","parent","id","label","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxRadioButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRadioButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioButton_Create. Expected _wxRadioButton_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRadioButton_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) return NULL; } - if (_obj4) + if (_obj5) { - _arg4 = &temp0; - if (! wxSize_helper(_obj4, &_arg4)) + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) return NULL; } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxRadioButton. Expected _wxValidator_p."); + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxRadioButton_Create. Expected _wxValidator_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioButton_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} _resultobj = Py_BuildValue("i",_result); { - if (_obj2) - delete _arg2; + if (_obj3) + delete _arg3; } return _resultobj; } @@ -8005,6 +9968,102 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +#define new_wxPreSlider() (new wxSlider()) +static PyObject *_wrap_new_wxPreSlider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSlider * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSlider",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSlider *)new_wxPreSlider(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSlider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSlider_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSlider * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + int _arg3; + int _arg4; + int _arg5; + wxPoint * _arg6 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg7 = (wxSize *) &wxDefaultSize; + long _arg8 = (long ) wxSL_HORIZONTAL; + wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; + char * _arg10 = (char *) "slider"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj6 = 0; + wxSize temp0; + PyObject * _obj7 = 0; + PyObject * _argo9 = 0; + char *_kwnames[] = { "self","parent","id","value","minValue","maxValue","point","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiiii|OOlOs:wxSlider_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_arg5,&_obj6,&_obj7,&_arg8,&_argo9,&_arg10)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSlider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSlider_Create. Expected _wxSlider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSlider_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj6) +{ + _arg6 = &temp; + if (! wxPoint_helper(_obj6, &_arg6)) + return NULL; +} + if (_obj7) +{ + _arg7 = &temp0; + if (! wxSize_helper(_obj7, &_arg7)) + return NULL; +} + if (_argo9) { + if (_argo9 == Py_None) { _arg9 = NULL; } + else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of wxSlider_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSlider_ClearSel(_swigobj) (_swigobj->ClearSel()) static PyObject *_wrap_wxSlider_ClearSel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8648,6 +10707,94 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxPreSpinCtrl() (new wxSpinCtrl()) +static PyObject *_wrap_new_wxPreSpinCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSpinCtrl",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSpinCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_wxSpinCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSpinCtrl * _arg0; + wxWindow * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + char * _arg3 = (char *) ""; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxSP_ARROW_KEYS; + int _arg7 = (int ) 0; + int _arg8 = (int ) 100; + int _arg9 = (int ) 0; + char * _arg10 = (char *) "wxSpinCtrl"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","value","pos","size","style","min","max","initial","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|isOOliiis:wxSpinCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_arg6,&_arg7,&_arg8,&_arg9,&_arg10)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_Create. Expected _wxSpinCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSpinCtrl_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSpinCtrl_GetMax(_swigobj) (_swigobj->GetMax()) static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8912,6 +11059,123 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define new_wxPreToggleButton() (new wxToggleButton()) +static PyObject *_wrap_new_wxPreToggleButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToggleButton * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreToggleButton",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxToggleButton *)new_wxPreToggleButton(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxToggleButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxToggleButton_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7)) +static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxToggleButton * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) 0; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; + char * _arg8 = (char *) "toggle"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _argo7 = 0; + char *_kwnames[] = { "self","parent","id","label","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxToggleButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToggleButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToggleButton_Create. Expected _wxToggleButton_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToggleButton_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_argo7) { + if (_argo7 == Py_None) { _arg7 = NULL; } + else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxToggleButton_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxToggleButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxToggleButton_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) static PyObject *_wrap_wxToggleButton_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9027,12 +11291,16 @@ static PyMethodDef controlscMethods[] = { { "wxToggleButton_SetLabel", (PyCFunction) _wrap_wxToggleButton_SetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxToggleButton_GetValue", (PyCFunction) _wrap_wxToggleButton_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxToggleButton_SetValue", (PyCFunction) _wrap_wxToggleButton_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxToggleButton_Create", (PyCFunction) _wrap_wxToggleButton_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreToggleButton", (PyCFunction) _wrap_new_wxPreToggleButton, METH_VARARGS | METH_KEYWORDS }, { "new_wxToggleButton", (PyCFunction) _wrap_new_wxToggleButton, METH_VARARGS | METH_KEYWORDS }, { "wxSpinCtrl_SetValue", (PyCFunction) _wrap_wxSpinCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSpinCtrl_SetRange", (PyCFunction) _wrap_wxSpinCtrl_SetRange, METH_VARARGS | METH_KEYWORDS }, { "wxSpinCtrl_GetValue", (PyCFunction) _wrap_wxSpinCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSpinCtrl_GetMin", (PyCFunction) _wrap_wxSpinCtrl_GetMin, METH_VARARGS | METH_KEYWORDS }, { "wxSpinCtrl_GetMax", (PyCFunction) _wrap_wxSpinCtrl_GetMax, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_Create", (PyCFunction) _wrap_wxSpinCtrl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreSpinCtrl", (PyCFunction) _wrap_new_wxPreSpinCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxSpinCtrl", (PyCFunction) _wrap_new_wxSpinCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetValue", (PyCFunction) _wrap_wxSlider_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetTick", (PyCFunction) _wrap_wxSlider_SetTick, METH_VARARGS | METH_KEYWORDS }, @@ -9053,9 +11321,13 @@ static PyMethodDef controlscMethods[] = { { "wxSlider_GetLineSize", (PyCFunction) _wrap_wxSlider_GetLineSize, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_ClearTicks", (PyCFunction) _wrap_wxSlider_ClearTicks, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_ClearSel", (PyCFunction) _wrap_wxSlider_ClearSel, METH_VARARGS | METH_KEYWORDS }, + { "wxSlider_Create", (PyCFunction) _wrap_wxSlider_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreSlider", (PyCFunction) _wrap_new_wxPreSlider, METH_VARARGS | METH_KEYWORDS }, { "new_wxSlider", (PyCFunction) _wrap_new_wxSlider, METH_VARARGS | METH_KEYWORDS }, { "wxRadioButton_SetValue", (PyCFunction) _wrap_wxRadioButton_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxRadioButton_GetValue", (PyCFunction) _wrap_wxRadioButton_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxRadioButton_Create", (PyCFunction) _wrap_wxRadioButton_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreRadioButton", (PyCFunction) _wrap_new_wxPreRadioButton, METH_VARARGS | METH_KEYWORDS }, { "new_wxRadioButton", (PyCFunction) _wrap_new_wxRadioButton, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_ShowItem", (PyCFunction) _wrap_wxRadioBox_ShowItem, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_Show", (PyCFunction) _wrap_wxRadioBox_Show, METH_VARARGS | METH_KEYWORDS }, @@ -9071,16 +11343,22 @@ static PyMethodDef controlscMethods[] = { { "wxRadioBox_FindString", (PyCFunction) _wrap_wxRadioBox_FindString, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_EnableItem", (PyCFunction) _wrap_wxRadioBox_EnableItem, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_Enable", (PyCFunction) _wrap_wxRadioBox_Enable, METH_VARARGS | METH_KEYWORDS }, + { "wxRadioBox_Create", (PyCFunction) _wrap_wxRadioBox_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreRadioBox", (PyCFunction) _wrap_new_wxPreRadioBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxRadioBox", (PyCFunction) _wrap_new_wxRadioBox, METH_VARARGS | METH_KEYWORDS }, { "wxStaticBitmap_SetIcon", (PyCFunction) _wrap_wxStaticBitmap_SetIcon, METH_VARARGS | METH_KEYWORDS }, { "wxStaticBitmap_SetBitmap", (PyCFunction) _wrap_wxStaticBitmap_SetBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxStaticBitmap_GetBitmap", (PyCFunction) _wrap_wxStaticBitmap_GetBitmap, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticBitmap_Create", (PyCFunction) _wrap_wxStaticBitmap_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreStaticBitmap", (PyCFunction) _wrap_new_wxPreStaticBitmap, METH_VARARGS | METH_KEYWORDS }, { "new_wxStaticBitmap", (PyCFunction) _wrap_new_wxStaticBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxSpinButton_SetValue", (PyCFunction) _wrap_wxSpinButton_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSpinButton_SetRange", (PyCFunction) _wrap_wxSpinButton_SetRange, METH_VARARGS | METH_KEYWORDS }, { "wxSpinButton_GetValue", (PyCFunction) _wrap_wxSpinButton_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSpinButton_GetMin", (PyCFunction) _wrap_wxSpinButton_GetMin, METH_VARARGS | METH_KEYWORDS }, { "wxSpinButton_GetMax", (PyCFunction) _wrap_wxSpinButton_GetMax, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinButton_Create", (PyCFunction) _wrap_wxSpinButton_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreSpinButton", (PyCFunction) _wrap_new_wxPreSpinButton, METH_VARARGS | METH_KEYWORDS }, { "new_wxSpinButton", (PyCFunction) _wrap_new_wxSpinButton, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_SetScrollbar", (PyCFunction) _wrap_wxScrollBar_SetScrollbar, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_SetThumbPosition", (PyCFunction) _wrap_wxScrollBar_SetThumbPosition, METH_VARARGS | METH_KEYWORDS }, @@ -9089,6 +11367,8 @@ static PyMethodDef controlscMethods[] = { { "wxScrollBar_GetThumbPosition", (PyCFunction) _wrap_wxScrollBar_GetThumbPosition, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_GetPageSize", (PyCFunction) _wrap_wxScrollBar_GetPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_GetRange", (PyCFunction) _wrap_wxScrollBar_GetRange, METH_VARARGS | METH_KEYWORDS }, + { "wxScrollBar_Create", (PyCFunction) _wrap_wxScrollBar_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreScrollBar", (PyCFunction) _wrap_new_wxPreScrollBar, METH_VARARGS | METH_KEYWORDS }, { "new_wxScrollBar", (PyCFunction) _wrap_new_wxScrollBar, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_write", (PyCFunction) _wrap_wxTextCtrl_write, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetMaxLength", (PyCFunction) _wrap_wxTextCtrl_SetMaxLength, METH_VARARGS | METH_KEYWORDS }, @@ -9130,6 +11410,8 @@ static PyMethodDef controlscMethods[] = { { "wxTextCtrl_Cut", (PyCFunction) _wrap_wxTextCtrl_Cut, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Copy", (PyCFunction) _wrap_wxTextCtrl_Copy, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Clear", (PyCFunction) _wrap_wxTextCtrl_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_Create", (PyCFunction) _wrap_wxTextCtrl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreTextCtrl", (PyCFunction) _wrap_new_wxPreTextCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxTextCtrl", (PyCFunction) _wrap_new_wxTextCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_GetFont", (PyCFunction) _wrap_wxTextAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_GetBackgroundColour", (PyCFunction) _wrap_wxTextAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, @@ -9146,6 +11428,8 @@ static PyMethodDef controlscMethods[] = { { "wxCheckListBox_InsertItems", (PyCFunction) _wrap_wxCheckListBox_InsertItems, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_Check", (PyCFunction) _wrap_wxCheckListBox_Check, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_IsChecked", (PyCFunction) _wrap_wxCheckListBox_IsChecked, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckListBox_Create", (PyCFunction) _wrap_wxCheckListBox_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreCheckListBox", (PyCFunction) _wrap_new_wxPreCheckListBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxCheckListBox", (PyCFunction) _wrap_new_wxCheckListBox, METH_VARARGS | METH_KEYWORDS }, { "wxListBox_SetStringSelection", (PyCFunction) _wrap_wxListBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS }, { "wxListBox_SetString", (PyCFunction) _wrap_wxListBox_SetString, METH_VARARGS | METH_KEYWORDS }, @@ -9166,11 +11450,19 @@ static PyMethodDef controlscMethods[] = { { "wxListBox_Delete", (PyCFunction) _wrap_wxListBox_Delete, METH_VARARGS | METH_KEYWORDS }, { "wxListBox_Clear", (PyCFunction) _wrap_wxListBox_Clear, METH_VARARGS | METH_KEYWORDS }, { "wxListBox_Append", (PyCFunction) _wrap_wxListBox_Append, METH_VARARGS | METH_KEYWORDS }, + { "wxListBox_Create", (PyCFunction) _wrap_wxListBox_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreListBox", (PyCFunction) _wrap_new_wxPreListBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxListBox", (PyCFunction) _wrap_new_wxListBox, METH_VARARGS | METH_KEYWORDS }, { "wxStaticText_SetLabel", (PyCFunction) _wrap_wxStaticText_SetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxStaticText_GetLabel", (PyCFunction) _wrap_wxStaticText_GetLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticText_Create", (PyCFunction) _wrap_wxStaticText_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreStaticText", (PyCFunction) _wrap_new_wxPreStaticText, METH_VARARGS | METH_KEYWORDS }, { "new_wxStaticText", (PyCFunction) _wrap_new_wxStaticText, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticLine_Create", (PyCFunction) _wrap_wxStaticLine_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreStaticLine", (PyCFunction) _wrap_new_wxPreStaticLine, METH_VARARGS | METH_KEYWORDS }, { "new_wxStaticLine", (PyCFunction) _wrap_new_wxStaticLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticBox_Create", (PyCFunction) _wrap_wxStaticBox_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreStaticBox", (PyCFunction) _wrap_new_wxPreStaticBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxStaticBox", (PyCFunction) _wrap_new_wxStaticBox, METH_VARARGS | METH_KEYWORDS }, { "wxGauge_SetValue", (PyCFunction) _wrap_wxGauge_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxGauge_SetShadowWidth", (PyCFunction) _wrap_wxGauge_SetShadowWidth, METH_VARARGS | METH_KEYWORDS }, @@ -9180,6 +11472,8 @@ static PyMethodDef controlscMethods[] = { { "wxGauge_GetShadowWidth", (PyCFunction) _wrap_wxGauge_GetShadowWidth, METH_VARARGS | METH_KEYWORDS }, { "wxGauge_GetRange", (PyCFunction) _wrap_wxGauge_GetRange, METH_VARARGS | METH_KEYWORDS }, { "wxGauge_GetBezelFace", (PyCFunction) _wrap_wxGauge_GetBezelFace, METH_VARARGS | METH_KEYWORDS }, + { "wxGauge_Create", (PyCFunction) _wrap_wxGauge_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreGauge", (PyCFunction) _wrap_new_wxPreGauge, METH_VARARGS | METH_KEYWORDS }, { "new_wxGauge", (PyCFunction) _wrap_new_wxGauge, METH_VARARGS | METH_KEYWORDS }, { "wxComboBox_SetEditable", (PyCFunction) _wrap_wxComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS }, { "wxComboBox_SetValue", (PyCFunction) _wrap_wxComboBox_SetValue, METH_VARARGS | METH_KEYWORDS }, @@ -9202,6 +11496,8 @@ static PyMethodDef controlscMethods[] = { { "wxComboBox_Copy", (PyCFunction) _wrap_wxComboBox_Copy, METH_VARARGS | METH_KEYWORDS }, { "wxComboBox_Clear", (PyCFunction) _wrap_wxComboBox_Clear, METH_VARARGS | METH_KEYWORDS }, { "wxComboBox_Append", (PyCFunction) _wrap_wxComboBox_Append, METH_VARARGS | METH_KEYWORDS }, + { "wxComboBox_Create", (PyCFunction) _wrap_wxComboBox_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreComboBox", (PyCFunction) _wrap_new_wxPreComboBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxComboBox", (PyCFunction) _wrap_new_wxComboBox, METH_VARARGS | METH_KEYWORDS }, { "wxChoice_SetString", (PyCFunction) _wrap_wxChoice_SetString, METH_VARARGS | METH_KEYWORDS }, { "wxChoice_SetStringSelection", (PyCFunction) _wrap_wxChoice_SetStringSelection, METH_VARARGS | METH_KEYWORDS }, @@ -9216,9 +11512,13 @@ static PyMethodDef controlscMethods[] = { { "wxChoice_Delete", (PyCFunction) _wrap_wxChoice_Delete, METH_VARARGS | METH_KEYWORDS }, { "wxChoice_Clear", (PyCFunction) _wrap_wxChoice_Clear, METH_VARARGS | METH_KEYWORDS }, { "wxChoice_Append", (PyCFunction) _wrap_wxChoice_Append, METH_VARARGS | METH_KEYWORDS }, + { "wxChoice_Create", (PyCFunction) _wrap_wxChoice_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreChoice", (PyCFunction) _wrap_new_wxPreChoice, METH_VARARGS | METH_KEYWORDS }, { "new_wxChoice", (PyCFunction) _wrap_new_wxChoice, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_SetValue", (PyCFunction) _wrap_wxCheckBox_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_GetValue", (PyCFunction) _wrap_wxCheckBox_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckBox_Create", (PyCFunction) _wrap_wxCheckBox_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreCheckBox", (PyCFunction) _wrap_new_wxPreCheckBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxCheckBox", (PyCFunction) _wrap_new_wxCheckBox, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_GetMarginY", (PyCFunction) _wrap_wxBitmapButton_GetMarginY, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_GetMarginX", (PyCFunction) _wrap_wxBitmapButton_GetMarginX, METH_VARARGS | METH_KEYWORDS }, @@ -9231,16 +11531,24 @@ static PyMethodDef controlscMethods[] = { { "wxBitmapButton_GetBitmapFocus", (PyCFunction) _wrap_wxBitmapButton_GetBitmapFocus, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_GetBitmapDisabled", (PyCFunction) _wrap_wxBitmapButton_GetBitmapDisabled, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_GetBitmapLabel", (PyCFunction) _wrap_wxBitmapButton_GetBitmapLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmapButton_Create", (PyCFunction) _wrap_wxBitmapButton_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreBitmapButton", (PyCFunction) _wrap_new_wxPreBitmapButton, METH_VARARGS | METH_KEYWORDS }, { "new_wxBitmapButton", (PyCFunction) _wrap_new_wxBitmapButton, METH_VARARGS | METH_KEYWORDS }, + { "wxButton_GetDefaultSize", (PyCFunction) _wrap_wxButton_GetDefaultSize, METH_VARARGS | METH_KEYWORDS }, + { "wxButton_SetImageMargins", (PyCFunction) _wrap_wxButton_SetImageMargins, METH_VARARGS | METH_KEYWORDS }, + { "wxButton_SetImageLabel", (PyCFunction) _wrap_wxButton_SetImageLabel, METH_VARARGS | METH_KEYWORDS }, { "wxButton_SetForegroundColour", (PyCFunction) _wrap_wxButton_SetForegroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxButton_SetBackgroundColour", (PyCFunction) _wrap_wxButton_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxButton_SetDefault", (PyCFunction) _wrap_wxButton_SetDefault, METH_VARARGS | METH_KEYWORDS }, + { "wxButton_Create", (PyCFunction) _wrap_wxButton_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreButton", (PyCFunction) _wrap_new_wxPreButton, METH_VARARGS | METH_KEYWORDS }, { "new_wxButton", (PyCFunction) _wrap_new_wxButton, METH_VARARGS | METH_KEYWORDS }, { "wxControl_SetLabel", (PyCFunction) _wrap_wxControl_SetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxControl_GetLabel", (PyCFunction) _wrap_wxControl_GetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxControl_Command", (PyCFunction) _wrap_wxControl_Command, METH_VARARGS | METH_KEYWORDS }, + { "wxControl_Create", (PyCFunction) _wrap_wxControl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreControl", (PyCFunction) _wrap_new_wxPreControl, METH_VARARGS | METH_KEYWORDS }, { "new_wxControl", (PyCFunction) _wrap_new_wxControl, METH_VARARGS | METH_KEYWORDS }, - { "wxButton_GetDefaultSize", (PyCFunction) _wrap_wxButton_GetDefaultSize, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus diff --git a/wxPython/src/msw/controls.py b/wxPython/src/msw/controls.py index 374650953a..67b775fe87 100644 --- a/wxPython/src/msw/controls.py +++ b/wxPython/src/msw/controls.py @@ -15,6 +15,9 @@ class wxControlPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxControl_Create,(self,) + _args, _kwargs) + return val def Command(self, *_args, **_kwargs): val = apply(controlsc.wxControl_Command,(self,) + _args, _kwargs) return val @@ -30,15 +33,22 @@ class wxControl(wxControlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxControl,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreControl(*_args,**_kwargs): + val = wxControlPtr(apply(controlsc.new_wxPreControl,_args,_kwargs)) + val.thisown = 1 + return val + class wxButtonPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxButton_Create,(self,) + _args, _kwargs) + return val def SetDefault(self, *_args, **_kwargs): val = apply(controlsc.wxButton_SetDefault,(self,) + _args, _kwargs) return val @@ -48,21 +58,34 @@ class wxButtonPtr(wxControlPtr): def SetForegroundColour(self, *_args, **_kwargs): val = apply(controlsc.wxButton_SetForegroundColour,(self,) + _args, _kwargs) return val + def SetImageLabel(self, *_args, **_kwargs): + val = apply(controlsc.wxButton_SetImageLabel,(self,) + _args, _kwargs) + return val + def SetImageMargins(self, *_args, **_kwargs): + val = apply(controlsc.wxButton_SetImageMargins,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxButton(wxButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxButton,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreButton(*_args,**_kwargs): + val = wxButtonPtr(apply(controlsc.new_wxPreButton,_args,_kwargs)) + val.thisown = 1 + return val + class wxBitmapButtonPtr(wxButtonPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxBitmapButton_Create,(self,) + _args, _kwargs) + return val def GetBitmapLabel(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_GetBitmapLabel,(self,) + _args, _kwargs) if val: val = wxBitmapPtr(val) @@ -106,15 +129,22 @@ class wxBitmapButton(wxBitmapButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxBitmapButton,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreBitmapButton(*_args,**_kwargs): + val = wxBitmapButtonPtr(apply(controlsc.new_wxPreBitmapButton,_args,_kwargs)) + val.thisown = 1 + return val + class wxCheckBoxPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxCheckBox_Create,(self,) + _args, _kwargs) + return val def GetValue(self, *_args, **_kwargs): val = apply(controlsc.wxCheckBox_GetValue,(self,) + _args, _kwargs) return val @@ -127,15 +157,22 @@ class wxCheckBox(wxCheckBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckBox,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreCheckBox(*_args,**_kwargs): + val = wxCheckBoxPtr(apply(controlsc.new_wxPreCheckBox,_args,_kwargs)) + val.thisown = 1 + return val + class wxChoicePtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxChoice_Create,(self,) + _args, _kwargs) + return val def Append(self, *_args, **_kwargs): val = apply(controlsc.wxChoice_Append,(self,) + _args, _kwargs) return val @@ -185,15 +222,22 @@ class wxChoice(wxChoicePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxChoice,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreChoice(*_args,**_kwargs): + val = wxChoicePtr(apply(controlsc.new_wxPreChoice,_args,_kwargs)) + val.thisown = 1 + return val + class wxComboBoxPtr(wxChoicePtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxComboBox_Create,(self,) + _args, _kwargs) + return val def Append(self, *_args, **_kwargs): val = apply(controlsc.wxComboBox_Append,(self,) + _args, _kwargs) return val @@ -263,15 +307,22 @@ class wxComboBox(wxComboBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxComboBox,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreComboBox(*_args,**_kwargs): + val = wxComboBoxPtr(apply(controlsc.new_wxPreComboBox,_args,_kwargs)) + val.thisown = 1 + return val + class wxGaugePtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxGauge_Create,(self,) + _args, _kwargs) + return val def GetBezelFace(self, *_args, **_kwargs): val = apply(controlsc.wxGauge_GetBezelFace,(self,) + _args, _kwargs) return val @@ -302,15 +353,22 @@ class wxGauge(wxGaugePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxGauge,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreGauge(*_args,**_kwargs): + val = wxGaugePtr(apply(controlsc.new_wxPreGauge,_args,_kwargs)) + val.thisown = 1 + return val + class wxStaticBoxPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxStaticBox_Create,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxStaticBox(wxStaticBoxPtr): @@ -320,11 +378,19 @@ class wxStaticBox(wxStaticBoxPtr): +def wxPreStaticBox(*_args,**_kwargs): + val = wxStaticBoxPtr(apply(controlsc.new_wxPreStaticBox,_args,_kwargs)) + val.thisown = 1 + return val + class wxStaticLinePtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxStaticLine_Create,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxStaticLine(wxStaticLinePtr): @@ -334,11 +400,19 @@ class wxStaticLine(wxStaticLinePtr): +def wxPreStaticLine(*_args,**_kwargs): + val = wxStaticLinePtr(apply(controlsc.new_wxPreStaticLine,_args,_kwargs)) + val.thisown = 1 + return val + class wxStaticTextPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxStaticText_Create,(self,) + _args, _kwargs) + return val def GetLabel(self, *_args, **_kwargs): val = apply(controlsc.wxStaticText_GetLabel,(self,) + _args, _kwargs) return val @@ -351,15 +425,22 @@ class wxStaticText(wxStaticTextPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticText,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreStaticText(*_args,**_kwargs): + val = wxStaticTextPtr(apply(controlsc.new_wxPreStaticText,_args,_kwargs)) + val.thisown = 1 + return val + class wxListBoxPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxListBox_Create,(self,) + _args, _kwargs) + return val def Append(self, *_args, **_kwargs): val = apply(controlsc.wxListBox_Append,(self,) + _args, _kwargs) return val @@ -424,15 +505,22 @@ class wxListBox(wxListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxListBox,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreListBox(*_args,**_kwargs): + val = wxListBoxPtr(apply(controlsc.new_wxPreListBox,_args,_kwargs)) + val.thisown = 1 + return val + class wxCheckListBoxPtr(wxListBoxPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxCheckListBox_Create,(self,) + _args, _kwargs) + return val def IsChecked(self, *_args, **_kwargs): val = apply(controlsc.wxCheckListBox_IsChecked,(self,) + _args, _kwargs) return val @@ -451,10 +539,14 @@ class wxCheckListBox(wxCheckListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckListBox,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreCheckListBox(*_args,**_kwargs): + val = wxCheckListBoxPtr(apply(controlsc.new_wxPreCheckListBox,_args,_kwargs)) + val.thisown = 1 + return val + class wxTextAttrPtr : def __init__(self,this): @@ -507,6 +599,9 @@ class wxTextCtrlPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Create,(self,) + _args, _kwargs) + return val def Clear(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_Clear,(self,) + _args, _kwargs) return val @@ -634,15 +729,22 @@ class wxTextCtrl(wxTextCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxTextCtrl,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreTextCtrl(*_args,**_kwargs): + val = wxTextCtrlPtr(apply(controlsc.new_wxPreTextCtrl,_args,_kwargs)) + val.thisown = 1 + return val + class wxScrollBarPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxScrollBar_Create,(self,) + _args, _kwargs) + return val def GetRange(self, *_args, **_kwargs): val = apply(controlsc.wxScrollBar_GetRange,(self,) + _args, _kwargs) return val @@ -670,15 +772,22 @@ class wxScrollBar(wxScrollBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxScrollBar,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreScrollBar(*_args,**_kwargs): + val = wxScrollBarPtr(apply(controlsc.new_wxPreScrollBar,_args,_kwargs)) + val.thisown = 1 + return val + class wxSpinButtonPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinButton_Create,(self,) + _args, _kwargs) + return val def GetMax(self, *_args, **_kwargs): val = apply(controlsc.wxSpinButton_GetMax,(self,) + _args, _kwargs) return val @@ -703,11 +812,19 @@ class wxSpinButton(wxSpinButtonPtr): +def wxPreSpinButton(*_args,**_kwargs): + val = wxSpinButtonPtr(apply(controlsc.new_wxPreSpinButton,_args,_kwargs)) + val.thisown = 1 + return val + class wxStaticBitmapPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxStaticBitmap_Create,(self,) + _args, _kwargs) + return val def GetBitmap(self, *_args, **_kwargs): val = apply(controlsc.wxStaticBitmap_GetBitmap,(self,) + _args, _kwargs) if val: val = wxBitmapPtr(val) @@ -724,15 +841,22 @@ class wxStaticBitmap(wxStaticBitmapPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticBitmap,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreStaticBitmap(*_args,**_kwargs): + val = wxStaticBitmapPtr(apply(controlsc.new_wxPreStaticBitmap,_args,_kwargs)) + val.thisown = 1 + return val + class wxRadioBoxPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxRadioBox_Create,(self,) + _args, _kwargs) + return val def Enable(self, *_args, **_kwargs): val = apply(controlsc.wxRadioBox_Enable,(self,) + _args, _kwargs) return val @@ -786,15 +910,22 @@ class wxRadioBox(wxRadioBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioBox,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreRadioBox(*_args,**_kwargs): + val = wxRadioBoxPtr(apply(controlsc.new_wxPreRadioBox,_args,_kwargs)) + val.thisown = 1 + return val + class wxRadioButtonPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxRadioButton_Create,(self,) + _args, _kwargs) + return val def GetValue(self, *_args, **_kwargs): val = apply(controlsc.wxRadioButton_GetValue,(self,) + _args, _kwargs) return val @@ -807,15 +938,22 @@ class wxRadioButton(wxRadioButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioButton,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreRadioButton(*_args,**_kwargs): + val = wxRadioButtonPtr(apply(controlsc.new_wxPreRadioButton,_args,_kwargs)) + val.thisown = 1 + return val + class wxSliderPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxSlider_Create,(self,) + _args, _kwargs) + return val def ClearSel(self, *_args, **_kwargs): val = apply(controlsc.wxSlider_ClearSel,(self,) + _args, _kwargs) return val @@ -879,15 +1017,22 @@ class wxSlider(wxSliderPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxSlider,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreSlider(*_args,**_kwargs): + val = wxSliderPtr(apply(controlsc.new_wxPreSlider,_args,_kwargs)) + val.thisown = 1 + return val + class wxSpinCtrlPtr(wxSpinButtonPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_Create,(self,) + _args, _kwargs) + return val def GetMax(self, *_args, **_kwargs): val = apply(controlsc.wxSpinCtrl_GetMax,(self,) + _args, _kwargs) return val @@ -912,11 +1057,19 @@ class wxSpinCtrl(wxSpinCtrlPtr): +def wxPreSpinCtrl(*_args,**_kwargs): + val = wxSpinCtrlPtr(apply(controlsc.new_wxPreSpinCtrl,_args,_kwargs)) + val.thisown = 1 + return val + class wxToggleButtonPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controlsc.wxToggleButton_Create,(self,) + _args, _kwargs) + return val def SetValue(self, *_args, **_kwargs): val = apply(controlsc.wxToggleButton_SetValue,(self,) + _args, _kwargs) return val @@ -935,6 +1088,11 @@ class wxToggleButton(wxToggleButtonPtr): +def wxPreToggleButton(*_args,**_kwargs): + val = wxToggleButtonPtr(apply(controlsc.new_wxPreToggleButton,_args,_kwargs)) + val.thisown = 1 + return val + diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 30ace10460..4b8ec2d207 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -95,10 +95,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #else static char* wxStringErrorMsg = "string type is required for parameter"; #endif - + // C++ Version of a Python aware class class wxPyListCtrl : public wxListCtrl { DECLARE_ABSTRACT_CLASS(wxPyListCtrl); public: + wxPyListCtrl() : wxListCtrl() {} wxPyListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -107,6 +108,15 @@ public: char* name) : wxListCtrl(parent, id, pos, size, style, validator, name) {} + bool Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + char* name) { + return wxListCtrl::Create(parent, id, pos, size, style, validator, name); + } + DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText); DEC_PYCALLBACK_INT_LONG(OnGetItemImage); DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr); @@ -168,10 +178,11 @@ public: PyObject* m_obj; }; - + // C++ version of Python aware wxTreeCtrl class wxPyTreeCtrl : public wxTreeCtrl { DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl); public: + wxPyTreeCtrl() : wxTreeCtrl() {} wxPyTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -180,6 +191,16 @@ public: char* name) : wxTreeCtrl(parent, id, pos, size, style, validator, name) {} + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + char* name) { + return wxTreeCtrl::Create(parent, id, pos, size, style, validator, name); + } + + int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) { int rval = 0; @@ -3033,6 +3054,99 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxPreListCtrl() (new wxPyListCtrl()) +static PyObject *_wrap_new_wxPreListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyListCtrl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreListCtrl",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyListCtrl *)new_wxPreListCtrl(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyListCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxListCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyListCtrl * _arg0; + wxWindow * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) (wxLC_ICON); + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; + char * _arg7 = (char *) "listCtrl"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _argo6 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOs:wxListCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_Create. Expected _wxPyListCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxListCtrl_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxListCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxListCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6063,6 +6177,99 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxPreTreeCtrl() (new wxPyTreeCtrl()) +static PyObject *_wrap_new_wxPreTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTreeCtrl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreTreeCtrl",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyTreeCtrl *)new_wxPreTreeCtrl(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTreeCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxTreeCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyTreeCtrl * _arg0; + wxWindow * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) (wxTR_HAS_BUTTONS)|(wxTR_LINES_AT_ROOT); + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; + char * _arg7 = (char *) "wxTreeCtrl"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _argo6 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOs:wxTreeCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Create. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxTreeCtrl_Create. Expected _wxValidator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTreeCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxTreeCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8945,6 +9152,8 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_GetIndent", (PyCFunction) _wrap_wxTreeCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetCount", (PyCFunction) _wrap_wxTreeCtrl_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl__setSelf", (PyCFunction) _wrap_wxTreeCtrl__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_Create", (PyCFunction) _wrap_wxTreeCtrl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreTreeCtrl", (PyCFunction) _wrap_new_wxPreTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeCtrl", (PyCFunction) _wrap_new_wxTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetLabel", (PyCFunction) _wrap_wxTreeEvent_GetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetCode", (PyCFunction) _wrap_wxTreeEvent_GetCode, METH_VARARGS | METH_KEYWORDS }, @@ -9031,6 +9240,8 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_SetBackgroundColour", (PyCFunction) _wrap_wxListCtrl_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_SetForegroundColour", (PyCFunction) _wrap_wxListCtrl_SetForegroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl__setSelf", (PyCFunction) _wrap_wxListCtrl__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_Create", (PyCFunction) _wrap_wxListCtrl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreListCtrl", (PyCFunction) _wrap_new_wxPreListCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxListCtrl", (PyCFunction) _wrap_new_wxListCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_GetItem", (PyCFunction) _wrap_wxListEvent_GetItem, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_GetMask", (PyCFunction) _wrap_wxListEvent_GetMask, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index 222411a5c9..3841de93c2 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -423,6 +423,9 @@ class wxListCtrlPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_Create,(self,) + _args, _kwargs) + return val def _setSelf(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl__setSelf,(self,) + _args, _kwargs) return val @@ -619,11 +622,15 @@ class wxListCtrl(wxListCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) self._setSelf(self, wxListCtrl) +def wxPreListCtrl(*_args,**_kwargs): + val = wxListCtrlPtr(apply(controls2c.new_wxPreListCtrl,_args,_kwargs)) + val.thisown = 1 + return val + class wxTreeItemAttrPtr : def __init__(self,this): @@ -755,6 +762,9 @@ class wxTreeCtrlPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_Create,(self,) + _args, _kwargs) + return val def _setSelf(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl__setSelf,(self,) + _args, _kwargs) return val @@ -1003,11 +1013,15 @@ class wxTreeCtrl(wxTreeCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxTreeCtrl,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) self._setSelf(self, wxTreeCtrl) +def wxPreTreeCtrl(*_args,**_kwargs): + val = wxTreeCtrlPtr(apply(controls2c.new_wxPreTreeCtrl,_args,_kwargs)) + val.thisown = 1 + return val + diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index 728925df27..bde9d567eb 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -198,6 +198,114 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } +#define new_wxPreFrame() (new wxFrame()) +static PyObject *_wrap_new_wxPreFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreFrame",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFrame *)new_wxPreFrame(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxDEFAULT_FRAME_STYLE; + char * _arg7 = (char *) "frame"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Create. Expected _wxFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxFrame_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) static PyObject *_wrap_wxFrame_Centre(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1219,6 +1327,114 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreMiniFrame() (new wxMiniFrame()) +static PyObject *_wrap_new_wxPreMiniFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMiniFrame * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMiniFrame",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMiniFrame *)new_wxPreMiniFrame(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMiniFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMiniFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxMiniFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMiniFrame * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxDEFAULT_FRAME_STYLE; + char * _arg7 = (char *) "frame"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxMiniFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMiniFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMiniFrame_Create. Expected _wxMiniFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMiniFrame_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMiniFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + static void *SwigwxTipWindowTowxFrame(void *ptr) { wxTipWindow *src; wxFrame *dest; @@ -1313,6 +1529,8 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject static PyMethodDef framescMethods[] = { { "new_wxTipWindow", (PyCFunction) _wrap_new_wxTipWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxMiniFrame_Create", (PyCFunction) _wrap_wxMiniFrame_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreMiniFrame", (PyCFunction) _wrap_new_wxPreMiniFrame, METH_VARARGS | METH_KEYWORDS }, { "new_wxMiniFrame", (PyCFunction) _wrap_new_wxMiniFrame, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_IsFullScreen", (PyCFunction) _wrap_wxFrame_IsFullScreen, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_ShowFullScreen", (PyCFunction) _wrap_wxFrame_ShowFullScreen, METH_VARARGS | METH_KEYWORDS }, @@ -1341,6 +1559,8 @@ static PyMethodDef framescMethods[] = { { "wxFrame_CreateToolBar", (PyCFunction) _wrap_wxFrame_CreateToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateStatusBar", (PyCFunction) _wrap_wxFrame_CreateStatusBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Centre", (PyCFunction) _wrap_wxFrame_Centre, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_Create", (PyCFunction) _wrap_wxFrame_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreFrame", (PyCFunction) _wrap_new_wxPreFrame, METH_VARARGS | METH_KEYWORDS }, { "new_wxFrame", (PyCFunction) _wrap_new_wxFrame, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; diff --git a/wxPython/src/msw/frames.py b/wxPython/src/msw/frames.py index 7a82522e75..71a24418d8 100644 --- a/wxPython/src/msw/frames.py +++ b/wxPython/src/msw/frames.py @@ -19,6 +19,9 @@ class wxFramePtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Create,(self,) + _args, _kwargs) + return val def Centre(self, *_args, **_kwargs): val = apply(framesc.wxFrame_Centre,(self,) + _args, _kwargs) return val @@ -108,25 +111,36 @@ class wxFrame(wxFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxFrame,_args,_kwargs) self.thisown = 1 - #wx._StdFrameCallbacks(self) +def wxPreFrame(*_args,**_kwargs): + val = wxFramePtr(apply(framesc.new_wxPreFrame,_args,_kwargs)) + val.thisown = 1 + return val + class wxMiniFramePtr(wxFramePtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(framesc.wxMiniFrame_Create,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxMiniFrame(wxMiniFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxMiniFrame,_args,_kwargs) self.thisown = 1 - #wx._StdFrameCallbacks(self) +def wxPreMiniFrame(*_args,**_kwargs): + val = wxMiniFramePtr(apply(framesc.new_wxPreMiniFrame,_args,_kwargs)) + val.thisown = 1 + return val + class wxTipWindowPtr(wxFramePtr): def __init__(self,this): diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index d3a6ea7de9..7439341b3c 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -204,6 +204,114 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define new_wxPreMDIParentFrame() (new wxMDIParentFrame()) +static PyObject *_wrap_new_wxPreMDIParentFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMDIParentFrame * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMDIParentFrame",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMDIParentFrame *)new_wxPreMDIParentFrame(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIParentFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMDIParentFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxMDIParentFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMDIParentFrame * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL; + char * _arg7 = (char *) "frame"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxMDIParentFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIParentFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_Create. Expected _wxMDIParentFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIParentFrame_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMDIParentFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxMDIParentFrame_ActivateNext(_swigobj) (_swigobj->ActivateNext()) static PyObject *_wrap_wxMDIParentFrame_ActivateNext(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -642,6 +750,114 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define new_wxPreMDIChildFrame() (new wxMDIChildFrame()) +static PyObject *_wrap_new_wxPreMDIChildFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMDIChildFrame * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMDIChildFrame",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMDIChildFrame *)new_wxPreMDIChildFrame(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIChildFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMDIChildFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxMDIChildFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMDIChildFrame * _arg0; + wxMDIParentFrame * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxDEFAULT_FRAME_STYLE; + char * _arg7 = (char *) "frame"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxMDIChildFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIChildFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIChildFrame_Create. Expected _wxMDIChildFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMDIParentFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIChildFrame_Create. Expected _wxMDIParentFrame_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMDIChildFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxMDIChildFrame_Activate(_swigobj) (_swigobj->Activate()) static PyObject *_wrap_wxMDIChildFrame_Activate(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -789,11 +1005,79 @@ static PyObject *_wrap_new_wxMDIClientWindow(PyObject *self, PyObject *args, PyO return _resultobj; } +#define new_wxPreMDIClientWindow() (new wxMDIClientWindow()) +static PyObject *_wrap_new_wxPreMDIClientWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMDIClientWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreMDIClientWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMDIClientWindow *)new_wxPreMDIClientWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMDIClientWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMDIClientWindow_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMDIClientWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMDIClientWindow * _arg0; + wxMDIParentFrame * _arg1; + long _arg2 = (long ) 0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","parent","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|l:wxMDIClientWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIClientWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIClientWindow_Create. Expected _wxMDIClientWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMDIParentFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIClientWindow_Create. Expected _wxMDIParentFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMDIClientWindow_Create(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef mdicMethods[] = { + { "wxMDIClientWindow_Create", (PyCFunction) _wrap_wxMDIClientWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreMDIClientWindow", (PyCFunction) _wrap_new_wxPreMDIClientWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxMDIClientWindow", (PyCFunction) _wrap_new_wxMDIClientWindow, METH_VARARGS | METH_KEYWORDS }, { "wxMDIChildFrame_Restore", (PyCFunction) _wrap_wxMDIChildFrame_Restore, METH_VARARGS | METH_KEYWORDS }, { "wxMDIChildFrame_Maximize", (PyCFunction) _wrap_wxMDIChildFrame_Maximize, METH_VARARGS | METH_KEYWORDS }, { "wxMDIChildFrame_Activate", (PyCFunction) _wrap_wxMDIChildFrame_Activate, METH_VARARGS | METH_KEYWORDS }, + { "wxMDIChildFrame_Create", (PyCFunction) _wrap_wxMDIChildFrame_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreMDIChildFrame", (PyCFunction) _wrap_new_wxPreMDIChildFrame, METH_VARARGS | METH_KEYWORDS }, { "new_wxMDIChildFrame", (PyCFunction) _wrap_new_wxMDIChildFrame, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_Tile", (PyCFunction) _wrap_wxMDIParentFrame_Tile, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_SetToolBar", (PyCFunction) _wrap_wxMDIParentFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, @@ -806,6 +1090,8 @@ static PyMethodDef mdicMethods[] = { { "wxMDIParentFrame_ArrangeIcons", (PyCFunction) _wrap_wxMDIParentFrame_ArrangeIcons, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_ActivatePrevious", (PyCFunction) _wrap_wxMDIParentFrame_ActivatePrevious, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_ActivateNext", (PyCFunction) _wrap_wxMDIParentFrame_ActivateNext, METH_VARARGS | METH_KEYWORDS }, + { "wxMDIParentFrame_Create", (PyCFunction) _wrap_wxMDIParentFrame_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreMDIParentFrame", (PyCFunction) _wrap_new_wxPreMDIParentFrame, METH_VARARGS | METH_KEYWORDS }, { "new_wxMDIParentFrame", (PyCFunction) _wrap_new_wxMDIParentFrame, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; diff --git a/wxPython/src/msw/mdi.py b/wxPython/src/msw/mdi.py index 10d7074168..0aca061891 100644 --- a/wxPython/src/msw/mdi.py +++ b/wxPython/src/msw/mdi.py @@ -21,6 +21,9 @@ class wxMDIParentFramePtr(wxFramePtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(mdic.wxMDIParentFrame_Create,(self,) + _args, _kwargs) + return val def ActivateNext(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_ActivateNext,(self,) + _args, _kwargs) return val @@ -60,15 +63,22 @@ class wxMDIParentFrame(wxMDIParentFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIParentFrame,_args,_kwargs) self.thisown = 1 - #wx._StdFrameCallbacks(self) +def wxPreMDIParentFrame(*_args,**_kwargs): + val = wxMDIParentFramePtr(apply(mdic.new_wxPreMDIParentFrame,_args,_kwargs)) + val.thisown = 1 + return val + class wxMDIChildFramePtr(wxFramePtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(mdic.wxMDIChildFrame_Create,(self,) + _args, _kwargs) + return val def Activate(self, *_args, **_kwargs): val = apply(mdic.wxMDIChildFrame_Activate,(self,) + _args, _kwargs) return val @@ -84,15 +94,22 @@ class wxMDIChildFrame(wxMDIChildFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIChildFrame,_args,_kwargs) self.thisown = 1 - #wx._StdFrameCallbacks(self) +def wxPreMDIChildFrame(*_args,**_kwargs): + val = wxMDIChildFramePtr(apply(mdic.new_wxPreMDIChildFrame,_args,_kwargs)) + val.thisown = 1 + return val + class wxMDIClientWindowPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(mdic.wxMDIClientWindow_Create,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxMDIClientWindow(wxMDIClientWindowPtr): @@ -101,8 +118,15 @@ class wxMDIClientWindow(wxMDIClientWindowPtr): self.thisown = 1 #wx._StdWindowCallbacks(self) #wx._StdOnScrollCallbacks(self) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) + +def wxPreMDIClientWindow(*_args,**_kwargs): + val = wxMDIClientWindowPtr(apply(mdic.new_wxPreMDIClientWindow,_args,_kwargs)) + val.thisown = 1 + return val diff --git a/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp index e8913f2a83..00eba9bd2e 100644 --- a/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -118,6 +118,36 @@ static void *SwigwxSizerItemTowxObject(void *ptr) { return (void *) dest; } +#define wxSizerItem_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxSizerItem_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxSizerItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetPosition. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxSizerItem_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxSizerItem_GetSize(_swigobj) (_swigobj->GetSize()) static PyObject *_wrap_wxSizerItem_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2904,6 +2934,7 @@ static PyMethodDef sizerscMethods[] = { { "wxSizerItem_SetDimension", (PyCFunction) _wrap_wxSizerItem_SetDimension, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_CalcMin", (PyCFunction) _wrap_wxSizerItem_CalcMin, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetSize", (PyCFunction) _wrap_wxSizerItem_GetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetPosition", (PyCFunction) _wrap_wxSizerItem_GetPosition, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus diff --git a/wxPython/src/msw/sizers.py b/wxPython/src/msw/sizers.py index add97c33f2..16cd952a4b 100644 --- a/wxPython/src/msw/sizers.py +++ b/wxPython/src/msw/sizers.py @@ -18,6 +18,10 @@ class wxSizerItemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetPosition(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val def GetSize(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index 4dd2b586fb..d73f7719d5 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -176,6 +176,72 @@ static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreStatusBar() (new wxStatusBar()) +static PyObject *_wrap_new_wxPreStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStatusBar * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStatusBar",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStatusBar *)new_wxPreStatusBar(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStatusBar_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStatusBar_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxStatusBar_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStatusBar * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + long _arg3 = (long ) wxST_SIZEGRIP; + char * _arg4 = (char *) "statusBar"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","parent","id","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|ls:wxStatusBar_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStatusBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStatusBar_Create. Expected _wxStatusBar_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStatusBar_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStatusBar_Create(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static wxRect * wxStatusBar_GetFieldRect(wxStatusBar *self,long item) { wxRect* rect= new wxRect; self->GetFieldRect(item, *rect); @@ -3058,6 +3124,90 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +#define new_wxPreToolBar() (new wxToolBar()) +static PyObject *_wrap_new_wxPreToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolBar * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreToolBar",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxToolBar *)new_wxPreToolBar(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBar_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxToolBar_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxToolBar_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxToolBar * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + char * _arg6 = (char *) wxToolBarNameStr; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxToolBar_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_Create. Expected _wxToolBar_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBar_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxToolBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxToolBar_FindToolForPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindToolForPosition(_swigarg0,_swigarg1)) static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3184,6 +3334,90 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define new_wxPreToolBarSimple() (new wxToolBarSimple()) +static PyObject *_wrap_new_wxPreToolBarSimple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolBarSimple * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreToolBarSimple",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxToolBarSimple *)new_wxPreToolBarSimple(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarSimple_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxToolBarSimple_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxToolBarSimple_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxToolBarSimple * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + char * _arg6 = (char *) wxToolBarNameStr; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxToolBarSimple_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarSimple_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarSimple_Create. Expected _wxToolBarSimple_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarSimple_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxToolBarSimple_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxToolBarSimple_FindToolForPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindToolForPosition(_swigarg0,_swigarg1)) static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3216,8 +3450,12 @@ static PyObject *_wrap_wxToolBarSimple_FindToolForPosition(PyObject *self, PyObj static PyMethodDef stattoolcMethods[] = { { "wxToolBarSimple_FindToolForPosition", (PyCFunction) _wrap_wxToolBarSimple_FindToolForPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarSimple_Create", (PyCFunction) _wrap_wxToolBarSimple_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreToolBarSimple", (PyCFunction) _wrap_new_wxPreToolBarSimple, METH_VARARGS | METH_KEYWORDS }, { "new_wxToolBarSimple", (PyCFunction) _wrap_new_wxToolBarSimple, METH_VARARGS | METH_KEYWORDS }, { "wxToolBar_FindToolForPosition", (PyCFunction) _wrap_wxToolBar_FindToolForPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBar_Create", (PyCFunction) _wrap_wxToolBar_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreToolBar", (PyCFunction) _wrap_new_wxPreToolBar, METH_VARARGS | METH_KEYWORDS }, { "new_wxToolBar", (PyCFunction) _wrap_new_wxToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_GetToolSize", (PyCFunction) _wrap_wxToolBarBase_GetToolSize, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_GetToolBitmapSize", (PyCFunction) _wrap_wxToolBarBase_GetToolBitmapSize, METH_VARARGS | METH_KEYWORDS }, @@ -3294,6 +3532,8 @@ static PyMethodDef stattoolcMethods[] = { { "wxStatusBar_GetStatusText", (PyCFunction) _wrap_wxStatusBar_GetStatusText, METH_VARARGS | METH_KEYWORDS }, { "wxStatusBar_GetFieldsCount", (PyCFunction) _wrap_wxStatusBar_GetFieldsCount, METH_VARARGS | METH_KEYWORDS }, { "wxStatusBar_GetFieldRect", (PyCFunction) _wrap_wxStatusBar_GetFieldRect, METH_VARARGS | METH_KEYWORDS }, + { "wxStatusBar_Create", (PyCFunction) _wrap_wxStatusBar_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreStatusBar", (PyCFunction) _wrap_new_wxPreStatusBar, METH_VARARGS | METH_KEYWORDS }, { "new_wxStatusBar", (PyCFunction) _wrap_new_wxStatusBar, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; diff --git a/wxPython/src/msw/stattool.py b/wxPython/src/msw/stattool.py index 6f15993044..d691c4579a 100644 --- a/wxPython/src/msw/stattool.py +++ b/wxPython/src/msw/stattool.py @@ -17,6 +17,9 @@ class wxStatusBarPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(stattoolc.wxStatusBar_Create,(self,) + _args, _kwargs) + return val def GetFieldRect(self, *_args, **_kwargs): val = apply(stattoolc.wxStatusBar_GetFieldRect,(self,) + _args, _kwargs) if val: val = wxRectPtr(val) ; val.thisown = 1 @@ -55,6 +58,11 @@ class wxStatusBar(wxStatusBarPtr): +def wxPreStatusBar(*_args,**_kwargs): + val = wxStatusBarPtr(apply(stattoolc.new_wxPreStatusBar,_args,_kwargs)) + val.thisown = 1 + return val + class wxToolBarToolBasePtr(wxObjectPtr): def __init__(self,this): @@ -291,6 +299,9 @@ class wxToolBarPtr(wxToolBarBasePtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBar_Create,(self,) + _args, _kwargs) + return val def FindToolForPosition(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBar_FindToolForPosition,(self,) + _args, _kwargs) return val @@ -304,11 +315,19 @@ class wxToolBar(wxToolBarPtr): +def wxPreToolBar(*_args,**_kwargs): + val = wxToolBarPtr(apply(stattoolc.new_wxPreToolBar,_args,_kwargs)) + val.thisown = 1 + return val + class wxToolBarSimplePtr(wxToolBarBasePtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarSimple_Create,(self,) + _args, _kwargs) + return val def FindToolForPosition(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarSimple_FindToolForPosition,(self,) + _args, _kwargs) return val @@ -322,6 +341,11 @@ class wxToolBarSimple(wxToolBarSimplePtr): +def wxPreToolBarSimple(*_args,**_kwargs): + val = wxToolBarSimplePtr(apply(stattoolc.new_wxPreToolBarSimple,_args,_kwargs)) + val.thisown = 1 + return val + diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index b0b02922b3..6379a08eda 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -141,47 +141,15 @@ IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); - wxWindow* wxWindow_FindFocus() { - return wxWindow::FindFocus(); - } - wxWindow* wxWindow_FromHWND(unsigned long hWnd) { wxWindow* win = new wxWindow; win->SetHWND(hWnd); win->SubclassWin(hWnd); return win; } - - int wxWindow_NewControlId() { - return wxWindow::NewControlId(); - } - int wxWindow_NextControlId(int id) { - return wxWindow::NextControlId(id); - } - int wxWindow_PrevControlId(int id) { - return wxWindow::PrevControlId(id); - } #ifdef __cplusplus extern "C" { #endif -static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxWindow_FindFocus(); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } - return _resultobj; -} - static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxWindow * _result; @@ -201,62 +169,6 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec return _resultobj; } -static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_NewControlId",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxWindow_NewControlId(); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - int _arg0; - char *_kwnames[] = { "id", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_NextControlId",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxWindow_NextControlId(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - int _arg0; - char *_kwnames[] = { "id", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_PrevControlId",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxWindow_PrevControlId(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static void *SwigwxEvtHandlerTowxObject(void *ptr) { wxEvtHandler *src; wxObject *dest; @@ -964,6 +876,90 @@ static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +#define new_wxPreWindow() (new wxWindow()) +static PyObject *_wrap_new_wxPreWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)new_wxPreWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) 0; + char * _arg6 = (char *) "panel"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxWindow_CaptureMouse(_swigobj) (_swigobj->CaptureMouse()) static PyObject *_wrap_wxWindow_CaptureMouse(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3436,6 +3432,42 @@ static PyObject *_wrap_wxWindow_Refresh(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxWindow_RefreshRect(_swigobj,_swigarg0) (_swigobj->RefreshRect(_swigarg0)) +static PyObject *_wrap_wxWindow_RefreshRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_RefreshRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_RefreshRect. Expected _wxWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_RefreshRect(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_ReleaseMouse(_swigobj) (_swigobj->ReleaseMouse()) static PyObject *_wrap_wxWindow_ReleaseMouse(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5326,6 +5358,34 @@ static PyObject *_wrap_wxWindow_Thaw(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +#define wxWindow_Update(_swigobj) (_swigobj->Update()) +static PyObject *_wrap_wxWindow_Update(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_Update",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Update. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_Update(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_GetHelpText(_swigobj) (_swigobj->GetHelpText()) static PyObject *_wrap_wxWindow_GetHelpText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5581,6 +5641,80 @@ static PyObject *_wrap_wxWindow_PageDown(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxWindow::FindFocus(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_NewControlId",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxWindow::NewControlId(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_NextControlId",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxWindow::NextControlId(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_PrevControlId",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxWindow::PrevControlId(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxPanelTowxWindow(void *ptr) { wxPanel *src; wxWindow *dest; @@ -5661,6 +5795,90 @@ static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } +#define new_wxPrePanel() (new wxPanel()) +static PyObject *_wrap_new_wxPrePanel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPanel * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPrePanel",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPanel *)new_wxPrePanel(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPanel_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPanel_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxPanel_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPanel * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxTAB_TRAVERSAL; + char * _arg6 = (char *) "panel"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxPanel_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPanel_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPanel_Create. Expected _wxPanel_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPanel_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPanel_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPanel_InitDialog(_swigobj) (_swigobj->InitDialog()) static PyObject *_wrap_wxPanel_InitDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5866,6 +6084,114 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +#define new_wxPreDialog() (new wxDialog()) +static PyObject *_wrap_new_wxPreDialog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDialog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreDialog",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDialog *)new_wxPreDialog(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDialog_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDialog * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxDEFAULT_DIALOG_STYLE; + char * _arg7 = (char *) "dialogBox"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxDialog_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Create. Expected _wxDialog_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDialog_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxDialog_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6412,6 +6738,90 @@ static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define new_wxPreScrolledWindow() (new wxScrolledWindow()) +static PyObject *_wrap_new_wxPreScrolledWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxScrolledWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreScrolledWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxScrolledWindow *)new_wxPreScrolledWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrolledWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxScrolledWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxScrolledWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxScrolledWindow * _arg0; + wxWindow * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxHSCROLL|wxVSCROLL; + char * _arg6 = (char *) "scrolledWindow"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOls:wxScrolledWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_Create. Expected _wxScrolledWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScrolledWindow_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxScrolledWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxScrolledWindow_EnableScrolling(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnableScrolling(_swigarg0,_swigarg1)) static PyObject *_wrap_wxScrolledWindow_EnableScrolling(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10761,6 +11171,8 @@ static PyMethodDef windowscMethods[] = { { "wxScrolledWindow_GetScrollPixelsPerUnit", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPixelsPerUnit, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_GetScrollPageSize", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_EnableScrolling", (PyCFunction) _wrap_wxScrolledWindow_EnableScrolling, METH_VARARGS | METH_KEYWORDS }, + { "wxScrolledWindow_Create", (PyCFunction) _wrap_wxScrolledWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreScrolledWindow", (PyCFunction) _wrap_new_wxPreScrolledWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxScrolledWindow", (PyCFunction) _wrap_new_wxScrolledWindow, METH_VARARGS | METH_KEYWORDS }, { "wxDialog_CreateButtonSizer", (PyCFunction) _wrap_wxDialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS }, { "wxDialog_CreateTextSizer", (PyCFunction) _wrap_wxDialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS }, @@ -10776,11 +11188,19 @@ static PyMethodDef windowscMethods[] = { { "wxDialog_GetTitle", (PyCFunction) _wrap_wxDialog_GetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxDialog_EndModal", (PyCFunction) _wrap_wxDialog_EndModal, METH_VARARGS | METH_KEYWORDS }, { "wxDialog_Centre", (PyCFunction) _wrap_wxDialog_Centre, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_Create", (PyCFunction) _wrap_wxDialog_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreDialog", (PyCFunction) _wrap_new_wxPreDialog, METH_VARARGS | METH_KEYWORDS }, { "new_wxDialog", (PyCFunction) _wrap_new_wxDialog, METH_VARARGS | METH_KEYWORDS }, { "wxPanel_SetDefaultItem", (PyCFunction) _wrap_wxPanel_SetDefaultItem, METH_VARARGS | METH_KEYWORDS }, { "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS }, { "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS }, + { "wxPanel_Create", (PyCFunction) _wrap_wxPanel_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPrePanel", (PyCFunction) _wrap_new_wxPrePanel, METH_VARARGS | METH_KEYWORDS }, { "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PageDown", (PyCFunction) _wrap_wxWindow_PageDown, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PageUp", (PyCFunction) _wrap_wxWindow_PageUp, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_LineDown", (PyCFunction) _wrap_wxWindow_LineDown, METH_VARARGS | METH_KEYWORDS }, @@ -10789,6 +11209,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_ScrollLines", (PyCFunction) _wrap_wxWindow_ScrollLines, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetHelpText", (PyCFunction) _wrap_wxWindow_SetHelpText, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetHelpText", (PyCFunction) _wrap_wxWindow_GetHelpText, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_Update", (PyCFunction) _wrap_wxWindow_Update, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Thaw", (PyCFunction) _wrap_wxWindow_Thaw, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Freeze", (PyCFunction) _wrap_wxWindow_Freeze, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS }, @@ -10845,6 +11266,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Reparent", (PyCFunction) _wrap_wxWindow_Reparent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_RemoveChild", (PyCFunction) _wrap_wxWindow_RemoveChild, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ReleaseMouse", (PyCFunction) _wrap_wxWindow_ReleaseMouse, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_RefreshRect", (PyCFunction) _wrap_wxWindow_RefreshRect, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Refresh", (PyCFunction) _wrap_wxWindow_Refresh, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PopupMenu", (PyCFunction) _wrap_wxWindow_PopupMenu, METH_VARARGS | METH_KEYWORDS }, @@ -10917,6 +11339,8 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Centre", (PyCFunction) _wrap_wxWindow_Centre, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Center", (PyCFunction) _wrap_wxWindow_Center, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CaptureMouse", (PyCFunction) _wrap_wxWindow_CaptureMouse, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_Create", (PyCFunction) _wrap_wxWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreWindow", (PyCFunction) _wrap_new_wxPreWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindow", (PyCFunction) _wrap_new_wxWindow, METH_VARARGS | METH_KEYWORDS }, { "wxPyValidator__setSelf", (PyCFunction) _wrap_wxPyValidator__setSelf, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyValidator", (PyCFunction) _wrap_new_wxPyValidator, METH_VARARGS | METH_KEYWORDS }, @@ -10937,11 +11361,7 @@ static PyMethodDef windowscMethods[] = { { "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index 86a35d04a2..78d8b5a804 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -109,6 +109,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_Create,(self,) + _args, _kwargs) + return val def CaptureMouse(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_CaptureMouse,(self,) + _args, _kwargs) return val @@ -335,6 +338,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def Refresh(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Refresh,(self,) + _args, _kwargs) return val + def RefreshRect(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_RefreshRect,(self,) + _args, _kwargs) + return val def ReleaseMouse(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_ReleaseMouse,(self,) + _args, _kwargs) return val @@ -514,6 +520,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def Thaw(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Thaw,(self,) + _args, _kwargs) return val + def Update(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_Update,(self,) + _args, _kwargs) + return val def GetHelpText(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetHelpText,(self,) + _args, _kwargs) return val @@ -551,15 +560,22 @@ class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxWindow,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreWindow(*_args,**_kwargs): + val = wxWindowPtr(apply(windowsc.new_wxPreWindow,_args,_kwargs)) + val.thisown = 1 + return val + class wxPanelPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windowsc.wxPanel_Create,(self,) + _args, _kwargs) + return val def InitDialog(self, *_args, **_kwargs): val = apply(windowsc.wxPanel_InitDialog,(self,) + _args, _kwargs) return val @@ -575,15 +591,22 @@ class wxPanel(wxPanelPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPanel,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPrePanel(*_args,**_kwargs): + val = wxPanelPtr(apply(windowsc.new_wxPrePanel,_args,_kwargs)) + val.thisown = 1 + return val + class wxDialogPtr(wxPanelPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windowsc.wxDialog_Create,(self,) + _args, _kwargs) + return val def Centre(self, *_args, **_kwargs): val = apply(windowsc.wxDialog_Centre,(self,) + _args, _kwargs) return val @@ -632,15 +655,22 @@ class wxDialog(wxDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxDialog,_args,_kwargs) self.thisown = 1 - #wx._StdDialogCallbacks(self) +def wxPreDialog(*_args,**_kwargs): + val = wxDialogPtr(apply(windowsc.new_wxPreDialog,_args,_kwargs)) + val.thisown = 1 + return val + class wxScrolledWindowPtr(wxPanelPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windowsc.wxScrolledWindow_Create,(self,) + _args, _kwargs) + return val def EnableScrolling(self, *_args, **_kwargs): val = apply(windowsc.wxScrolledWindow_EnableScrolling,(self,) + _args, _kwargs) return val @@ -702,11 +732,14 @@ class wxScrolledWindow(wxScrolledWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxScrolledWindow,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) - #wx._StdOnScrollCallbacks(self) +def wxPreScrolledWindow(*_args,**_kwargs): + val = wxScrolledWindowPtr(apply(windowsc.new_wxPreScrolledWindow,_args,_kwargs)) + val.thisown = 1 + return val + class wxMenuPtr(wxEvtHandlerPtr): def __init__(self,this): @@ -1029,24 +1062,24 @@ class wxMenuItem(wxMenuItemPtr): #-------------- FUNCTION WRAPPERS ------------------ -def wxWindow_FindFocus(*_args, **_kwargs): - val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs) - return val - def wxWindow_FromHWND(*_args, **_kwargs): val = apply(windowsc.wxWindow_FromHWND,_args,_kwargs) return val +wxValidator_IsSilent = windowsc.wxValidator_IsSilent + +wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError + +def wxWindow_FindFocus(*_args, **_kwargs): + val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs) + return val + wxWindow_NewControlId = windowsc.wxWindow_NewControlId wxWindow_NextControlId = windowsc.wxWindow_NextControlId wxWindow_PrevControlId = windowsc.wxWindow_PrevControlId -wxValidator_IsSilent = windowsc.wxValidator_IsSilent - -wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError - wxMenuItem_GetLabelFromText = windowsc.wxMenuItem_GetLabelFromText wxMenuItem_GetDefaultMarginWidth = windowsc.wxMenuItem_GetDefaultMarginWidth diff --git a/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp index fa53c53b6f..7bab71a865 100644 --- a/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -133,6 +133,36 @@ static void *SwigwxNotebookEventTowxObject(void *ptr) { return (void *) dest; } +#define new_wxNotebookEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxNotebookEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxNotebookEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebookEvent * _result; + wxEventType _arg0 = (wxEventType ) wxEVT_NULL; + int _arg1 = (int ) 0; + int _arg2 = (int ) -1; + int _arg3 = (int ) -1; + char *_kwnames[] = { "commandType","id","nSel","nOldSel", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxNotebookEvent",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxNotebookEvent *)new_wxNotebookEvent(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebookEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxNotebookEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -335,6 +365,90 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define new_wxPreNotebook() (new wxNotebook()) +static PyObject *_wrap_new_wxPreNotebook(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreNotebook",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxNotebook *)new_wxPreNotebook(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxNotebook_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxNotebook_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) 0; + char * _arg6 = (char *) "notebook"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxNotebook_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_Create. Expected _wxNotebook_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxNotebook_GetPageCount(_swigobj) (_swigobj->GetPageCount()) static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1061,6 +1175,42 @@ static void *SwigwxSplitterEventTowxObject(void *ptr) { return (void *) dest; } +#define new_wxSplitterEvent(_swigarg0,_swigarg1) (new wxSplitterEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxSplitterEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterEvent * _result; + wxEventType _arg0 = (wxEventType ) wxEVT_NULL; + wxSplitterWindow * _arg1 = (wxSplitterWindow *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "type","splitter", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iO:new_wxSplitterEvent",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxSplitterEvent. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSplitterEvent *)new_wxSplitterEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSplitterEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxSplitterEvent_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) static PyObject *_wrap_wxSplitterEvent_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1282,27 +1432,83 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxSplitterWindow_GetBorderSize(_swigobj) (_swigobj->GetBorderSize()) -static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxPreSplitterWindow() (new wxSplitterWindow()) +static PyObject *_wrap_new_wxPreSplitterWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + wxSplitterWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSplitterWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSplitterWindow *)new_wxPreSplitterWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSplitterWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSplitterWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; wxSplitterWindow * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxSP_3D|wxCLIP_CHILDREN; + char * _arg6 = (char *) "splitterWindow"; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","point","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetBorderSize",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSplitterWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetBorderSize. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Create. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Create. Expected _wxWindow_p."); return NULL; } } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetBorderSize(_arg0); + _result = (bool )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1310,87 +1516,88 @@ static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject * return _resultobj; } -#define wxSplitterWindow_GetMinimumPaneSize(_swigobj) (_swigobj->GetMinimumPaneSize()) -static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_GetWindow1(_swigobj) (_swigobj->GetWindow1()) +static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + wxWindow * _result; wxSplitterWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetMinimumPaneSize",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow1",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetMinimumPaneSize. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow1. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } -#define wxSplitterWindow_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) -static PyObject *_wrap_wxSplitterWindow_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_GetWindow2(_swigobj) (_swigobj->GetWindow2()) +static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + wxWindow * _result; wxSplitterWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashPosition",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow2",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashPosition. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow2. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetSashPosition(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } -#define wxSplitterWindow_GetSashSize(_swigobj) (_swigobj->GetSashSize()) -static PyObject *_wrap_wxSplitterWindow_GetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_SetSplitMode(_swigobj,_swigarg0) (_swigobj->SetSplitMode(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetSplitMode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; wxSplitterWindow * _arg0; + int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","mode", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashSize",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSplitMode",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashSize. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSplitMode. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetSashSize(_arg0); + wxSplitterWindow_SetSplitMode(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -1422,120 +1629,167 @@ static PyObject *_wrap_wxSplitterWindow_GetSplitMode(PyObject *self, PyObject *a return _resultobj; } -#define wxSplitterWindow_GetWindow1(_swigobj) (_swigobj->GetWindow1()) -static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_Initialize(_swigobj,_swigarg0) (_swigobj->Initialize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_Initialize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxWindow * _result; wxSplitterWindow * _arg0; + wxWindow * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow1",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSplitterWindow_Initialize",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow1. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Initialize. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Initialize. Expected _wxWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); + wxSplitterWindow_Initialize(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxSplitterWindow_GetWindow2(_swigobj) (_swigobj->GetWindow2()) -static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_SplitVertically(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitVertically(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSplitterWindow_SplitVertically(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxWindow * _result; + bool _result; wxSplitterWindow * _arg0; + wxWindow * _arg1; + wxWindow * _arg2; + int _arg3 = (int ) 0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow2",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitVertically",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow2. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitVertically. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); + _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSplitterWindow_Initialize(_swigobj,_swigarg0) (_swigobj->Initialize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_Initialize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_SplitHorizontally(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitHorizontally(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSplitterWindow * _arg0; wxWindow * _arg1; + wxWindow * _arg2; + int _arg3 = (int ) 0; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","window", NULL }; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSplitterWindow_Initialize",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitHorizontally",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Initialize. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitHorizontally. Expected _wxSplitterWindow_p."); return NULL; } } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Initialize. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_Initialize(_arg0,_arg1); + _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSplitterWindow_IsSplit(_swigobj) (_swigobj->IsSplit()) -static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_Unsplit(_swigobj,_swigarg0) (_swigobj->Unsplit(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_Unsplit(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxSplitterWindow * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","toRemove", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_IsSplit",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxSplitterWindow_Unsplit",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_IsSplit. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Unsplit. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Unsplit. Expected _wxWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_IsSplit(_arg0); + _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1589,57 +1843,55 @@ static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject * return _resultobj; } -#define wxSplitterWindow_SetBorderSize(_swigobj,_swigarg0) (_swigobj->SetBorderSize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_IsSplit(_swigobj) (_swigobj->IsSplit()) +static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSplitterWindow * _arg0; - int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","width", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetBorderSize",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_IsSplit",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetBorderSize. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_IsSplit. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetBorderSize(_arg0,_arg1); + _result = (bool )wxSplitterWindow_IsSplit(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSplitterWindow_SetSashPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSashPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_SetSashSize(_swigobj,_swigarg0) (_swigobj->SetSashSize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSplitterWindow * _arg0; int _arg1; - int _arg2 = (int ) TRUE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","position","redraw", NULL }; + char *_kwnames[] = { "self","width", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxSplitterWindow_SetSashPosition",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSashSize",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashPosition. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashSize. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); + wxSplitterWindow_SetSashSize(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1648,8 +1900,8 @@ static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject return _resultobj; } -#define wxSplitterWindow_SetSashSize(_swigobj,_swigarg0) (_swigobj->SetSashSize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_SetBorderSize(_swigobj,_swigarg0) (_swigobj->SetBorderSize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSplitterWindow * _arg0; int _arg1; @@ -1657,18 +1909,18 @@ static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *ar char *_kwnames[] = { "self","width", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSashSize",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetBorderSize",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashSize. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetBorderSize. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetSashSize(_arg0,_arg1); + wxSplitterWindow_SetBorderSize(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1677,104 +1929,115 @@ static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *ar return _resultobj; } -#define wxSplitterWindow_SetMinimumPaneSize(_swigobj,_swigarg0) (_swigobj->SetMinimumPaneSize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_GetSashSize(_swigobj) (_swigobj->GetSashSize()) +static PyObject *_wrap_wxSplitterWindow_GetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + int _result; wxSplitterWindow * _arg0; - int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","paneSize", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetMinimumPaneSize",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashSize",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetMinimumPaneSize. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashSize. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); + _result = (int )wxSplitterWindow_GetSashSize(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSplitterWindow_SetSplitMode(_swigobj,_swigarg0) (_swigobj->SetSplitMode(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetSplitMode(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_GetBorderSize(_swigobj) (_swigobj->GetBorderSize()) +static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + int _result; wxSplitterWindow * _arg0; - int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","mode", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSplitMode",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetBorderSize",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSplitMode. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetBorderSize. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetSplitMode(_arg0,_arg1); + _result = (int )wxSplitterWindow_GetBorderSize(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSplitterWindow_SplitHorizontally(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitHorizontally(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_SetSashPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSashPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxSplitterWindow * _arg0; - wxWindow * _arg1; - wxWindow * _arg2; - int _arg3 = (int ) 0; + int _arg1; + bool _arg2 = (bool ) TRUE; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","position","redraw", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitHorizontally",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxSplitterWindow_SetSashPosition",_kwnames,&_argo0,&_arg1,&tempbool2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitHorizontally. Expected _wxSplitterWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashPosition. Expected _wxSplitterWindow_p."); return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) +static PyObject *_wrap_wxSplitterWindow_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashPosition",_kwnames,&_argo0)) return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashPosition. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); + _result = (int )wxSplitterWindow_GetSashPosition(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1782,83 +2045,56 @@ static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObje return _resultobj; } -#define wxSplitterWindow_SplitVertically(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitVertically(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxSplitterWindow_SplitVertically(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_SetMinimumPaneSize(_swigobj,_swigarg0) (_swigobj->SetMinimumPaneSize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxSplitterWindow * _arg0; - wxWindow * _arg1; - wxWindow * _arg2; - int _arg3 = (int ) 0; + int _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; + char *_kwnames[] = { "self","min", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitVertically",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetMinimumPaneSize",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitVertically. Expected _wxSplitterWindow_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetMinimumPaneSize. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); + wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxSplitterWindow_Unsplit(_swigobj,_swigarg0) (_swigobj->Unsplit(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_Unsplit(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSplitterWindow_GetMinimumPaneSize(_swigobj) (_swigobj->GetMinimumPaneSize()) +static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; + int _result; wxSplitterWindow * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","toRemove", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxSplitterWindow_Unsplit",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetMinimumPaneSize",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Unsplit. Expected _wxSplitterWindow_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Unsplit. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetMinimumPaneSize. Expected _wxSplitterWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); + _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -2103,30 +2339,33 @@ static PyMethodDef windows2cMethods[] = { { "wxTaskBarIcon_SetIcon", (PyCFunction) _wrap_wxTaskBarIcon_SetIcon, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTaskBarIcon", (PyCFunction) _wrap_delete_wxTaskBarIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxTaskBarIcon", (PyCFunction) _wrap_new_wxTaskBarIcon, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_Unsplit", (PyCFunction) _wrap_wxSplitterWindow_Unsplit, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SplitVertically", (PyCFunction) _wrap_wxSplitterWindow_SplitVertically, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SplitHorizontally", (PyCFunction) _wrap_wxSplitterWindow_SplitHorizontally, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_SetSplitMode, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_GetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_SetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_SetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SetSashSize", (PyCFunction) _wrap_wxSplitterWindow_SetSashSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_SetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_SetSashPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_GetBorderSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetSashSize", (PyCFunction) _wrap_wxSplitterWindow_GetSashSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_SetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_SetBorderSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_ReplaceWindow", (PyCFunction) _wrap_wxSplitterWindow_ReplaceWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetSashSize", (PyCFunction) _wrap_wxSplitterWindow_SetSashSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_IsSplit", (PyCFunction) _wrap_wxSplitterWindow_IsSplit, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_ReplaceWindow", (PyCFunction) _wrap_wxSplitterWindow_ReplaceWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_Unsplit", (PyCFunction) _wrap_wxSplitterWindow_Unsplit, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SplitHorizontally", (PyCFunction) _wrap_wxSplitterWindow_SplitHorizontally, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SplitVertically", (PyCFunction) _wrap_wxSplitterWindow_SplitVertically, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_Initialize", (PyCFunction) _wrap_wxSplitterWindow_Initialize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_GetSplitMode, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_SetSplitMode, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_GetWindow2", (PyCFunction) _wrap_wxSplitterWindow_GetWindow2, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_GetWindow1", (PyCFunction) _wrap_wxSplitterWindow_GetWindow1, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_GetSplitMode, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetSashSize", (PyCFunction) _wrap_wxSplitterWindow_GetSashSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_GetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_GetBorderSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_Create", (PyCFunction) _wrap_wxSplitterWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreSplitterWindow", (PyCFunction) _wrap_new_wxPreSplitterWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxSplitterWindow", (PyCFunction) _wrap_new_wxSplitterWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterEvent_SetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_SetSashPosition, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterEvent_GetWindowBeingRemoved", (PyCFunction) _wrap_wxSplitterEvent_GetWindowBeingRemoved, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterEvent_GetY", (PyCFunction) _wrap_wxSplitterEvent_GetY, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterEvent_GetX", (PyCFunction) _wrap_wxSplitterEvent_GetX, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterEvent_GetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSplitterEvent", (PyCFunction) _wrap_new_wxSplitterEvent, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_ResizeChildren", (PyCFunction) _wrap_wxNotebook_ResizeChildren, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPage", (PyCFunction) _wrap_wxNotebook_GetPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_InsertPage", (PyCFunction) _wrap_wxNotebook_InsertPage, METH_VARARGS | METH_KEYWORDS }, @@ -2147,11 +2386,14 @@ static PyMethodDef windows2cMethods[] = { { "wxNotebook_AdvanceSelection", (PyCFunction) _wrap_wxNotebook_AdvanceSelection, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetSelection", (PyCFunction) _wrap_wxNotebook_SetSelection, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPageCount", (PyCFunction) _wrap_wxNotebook_GetPageCount, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_Create", (PyCFunction) _wrap_wxNotebook_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreNotebook", (PyCFunction) _wrap_new_wxPreNotebook, METH_VARARGS | METH_KEYWORDS }, { "new_wxNotebook", (PyCFunction) _wrap_new_wxNotebook, METH_VARARGS | METH_KEYWORDS }, { "wxNotebookEvent_SetSelection", (PyCFunction) _wrap_wxNotebookEvent_SetSelection, METH_VARARGS | METH_KEYWORDS }, { "wxNotebookEvent_SetOldSelection", (PyCFunction) _wrap_wxNotebookEvent_SetOldSelection, METH_VARARGS | METH_KEYWORDS }, { "wxNotebookEvent_GetOldSelection", (PyCFunction) _wrap_wxNotebookEvent_GetOldSelection, METH_VARARGS | METH_KEYWORDS }, { "wxNotebookEvent_GetSelection", (PyCFunction) _wrap_wxNotebookEvent_GetSelection, METH_VARARGS | METH_KEYWORDS }, + { "new_wxNotebookEvent", (PyCFunction) _wrap_new_wxNotebookEvent, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus diff --git a/wxPython/src/msw/windows2.py b/wxPython/src/msw/windows2.py index 5c036b69ee..a8b29e7f30 100644 --- a/wxPython/src/msw/windows2.py +++ b/wxPython/src/msw/windows2.py @@ -32,8 +32,9 @@ class wxNotebookEventPtr(wxNotifyEventPtr): def __repr__(self): return "" % (self.this,) class wxNotebookEvent(wxNotebookEventPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windows2c.new_wxNotebookEvent,_args,_kwargs) + self.thisown = 1 @@ -42,6 +43,9 @@ class wxNotebookPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_Create,(self,) + _args, _kwargs) + return val def GetPageCount(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetPageCount,(self,) + _args, _kwargs) return val @@ -108,10 +112,14 @@ class wxNotebook(wxNotebookPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows2c.new_wxNotebook,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreNotebook(*_args,**_kwargs): + val = wxNotebookPtr(apply(windows2c.new_wxPreNotebook,_args,_kwargs)) + val.thisown = 1 + return val + class wxSplitterEventPtr(wxCommandEventPtr): def __init__(self,this): @@ -135,8 +143,9 @@ class wxSplitterEventPtr(wxCommandEventPtr): def __repr__(self): return "" % (self.this,) class wxSplitterEvent(wxSplitterEventPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windows2c.new_wxSplitterEvent,_args,_kwargs) + self.thisown = 1 @@ -145,20 +154,8 @@ class wxSplitterWindowPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 - def GetBorderSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetBorderSize,(self,) + _args, _kwargs) - return val - def GetMinimumPaneSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetMinimumPaneSize,(self,) + _args, _kwargs) - return val - def GetSashPosition(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetSashPosition,(self,) + _args, _kwargs) - return val - def GetSashSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetSashSize,(self,) + _args, _kwargs) - return val - def GetSplitMode(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetSplitMode,(self,) + _args, _kwargs) + def Create(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_Create,(self,) + _args, _kwargs) return val def GetWindow1(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_GetWindow1,(self,) + _args, _kwargs) @@ -166,38 +163,53 @@ class wxSplitterWindowPtr(wxWindowPtr): def GetWindow2(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_GetWindow2,(self,) + _args, _kwargs) return val + def SetSplitMode(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetSplitMode,(self,) + _args, _kwargs) + return val + def GetSplitMode(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetSplitMode,(self,) + _args, _kwargs) + return val def Initialize(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_Initialize,(self,) + _args, _kwargs) return val - def IsSplit(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs) + def SplitVertically(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SplitVertically,(self,) + _args, _kwargs) + return val + def SplitHorizontally(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SplitHorizontally,(self,) + _args, _kwargs) + return val + def Unsplit(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_Unsplit,(self,) + _args, _kwargs) return val def ReplaceWindow(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs) return val + def IsSplit(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs) + return val + def SetSashSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetSashSize,(self,) + _args, _kwargs) + return val def SetBorderSize(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs) return val + def GetSashSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetSashSize,(self,) + _args, _kwargs) + return val + def GetBorderSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetBorderSize,(self,) + _args, _kwargs) + return val def SetSashPosition(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_SetSashPosition,(self,) + _args, _kwargs) return val - def SetSashSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SetSashSize,(self,) + _args, _kwargs) + def GetSashPosition(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetSashPosition,(self,) + _args, _kwargs) return val def SetMinimumPaneSize(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_SetMinimumPaneSize,(self,) + _args, _kwargs) return val - def SetSplitMode(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SetSplitMode,(self,) + _args, _kwargs) - return val - def SplitHorizontally(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SplitHorizontally,(self,) + _args, _kwargs) - return val - def SplitVertically(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SplitVertically,(self,) + _args, _kwargs) - return val - def Unsplit(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_Unsplit,(self,) + _args, _kwargs) + def GetMinimumPaneSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetMinimumPaneSize,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) @@ -205,10 +217,14 @@ class wxSplitterWindow(wxSplitterWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows2c.new_wxSplitterWindow,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreSplitterWindow(*_args,**_kwargs): + val = wxSplitterWindowPtr(apply(windows2c.new_wxPreSplitterWindow,_args,_kwargs)) + val.thisown = 1 + return val + class wxTaskBarIconPtr(wxEvtHandlerPtr): def __init__(self,this): diff --git a/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp index 0fb5abe64c..f3d302a7b2 100644 --- a/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -118,6 +118,34 @@ static void *SwigwxSashEventTowxObject(void *ptr) { return (void *) dest; } +#define new_wxSashEvent(_swigarg0,_swigarg1) (new wxSashEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxSashEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSashEvent * _result; + int _arg0 = (int ) 0; + wxSashEdgePosition _arg1 = (wxSashEdgePosition ) (wxSASH_NONE); + char *_kwnames[] = { "id","edge", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxSashEvent",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxSashEvent_SetEdge(_swigobj,_swigarg0) (_swigobj->SetEdge(_swigarg0)) static PyObject *_wrap_wxSashEvent_SetEdge(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -378,6 +406,90 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define new_wxPreSashWindow() (new wxSashWindow()) +static PyObject *_wrap_new_wxPreSashWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSashWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSashWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSashWindow *)new_wxPreSashWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSashWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSashWindow * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D); + char * _arg6 = (char *) "sashWindow"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSashWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSashWindow_Create. Expected _wxSashWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSashWindow_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSashWindow_GetSashVisible(_swigobj,_swigarg0) (_swigobj->GetSashVisible(_swigarg0)) static PyObject *_wrap_wxSashWindow_GetSashVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -887,6 +999,33 @@ static void *SwigwxQueryLayoutInfoEventTowxObject(void *ptr) { return (void *) dest; } +#define new_wxQueryLayoutInfoEvent(_swigarg0) (new wxQueryLayoutInfoEvent(_swigarg0)) +static PyObject *_wrap_new_wxQueryLayoutInfoEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxQueryLayoutInfoEvent * _result; + wxWindowID _arg0 = (wxWindowID ) 0; + char *_kwnames[] = { "id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxQueryLayoutInfoEvent",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxQueryLayoutInfoEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxQueryLayoutInfoEvent_SetRequestedLength(_swigobj,_swigarg0) (_swigobj->SetRequestedLength(_swigarg0)) static PyObject *_wrap_wxQueryLayoutInfoEvent_SetRequestedLength(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1197,6 +1336,33 @@ static void *SwigwxCalculateLayoutEventTowxObject(void *ptr) { return (void *) dest; } +#define new_wxCalculateLayoutEvent(_swigarg0) (new wxCalculateLayoutEvent(_swigarg0)) +static PyObject *_wrap_new_wxCalculateLayoutEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalculateLayoutEvent * _result; + wxWindowID _arg0 = (wxWindowID ) 0; + char *_kwnames[] = { "id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxCalculateLayoutEvent",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalculateLayoutEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxCalculateLayoutEvent_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0)) static PyObject *_wrap_wxCalculateLayoutEvent_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1408,6 +1574,90 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py return _resultobj; } +#define new_wxPreSashLayoutWindow() (new wxSashLayoutWindow()) +static PyObject *_wrap_new_wxPreSashLayoutWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSashLayoutWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSashLayoutWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashLayoutWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSashLayoutWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSashLayoutWindow * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D); + char * _arg6 = (char *) "layoutWindow"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashLayoutWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSashLayoutWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSashLayoutWindow_Create. Expected _wxSashLayoutWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSashLayoutWindow_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxSashLayoutWindow_GetAlignment(_swigobj) (_swigobj->GetAlignment()) static PyObject *_wrap_wxSashLayoutWindow_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1769,11 +2019,14 @@ static PyMethodDef windows3cMethods[] = { { "wxSashLayoutWindow_SetAlignment", (PyCFunction) _wrap_wxSashLayoutWindow_SetAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxSashLayoutWindow_GetOrientation", (PyCFunction) _wrap_wxSashLayoutWindow_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { "wxSashLayoutWindow_GetAlignment", (PyCFunction) _wrap_wxSashLayoutWindow_GetAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxSashLayoutWindow_Create", (PyCFunction) _wrap_wxSashLayoutWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreSashLayoutWindow", (PyCFunction) _wrap_new_wxPreSashLayoutWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxSashLayoutWindow", (PyCFunction) _wrap_new_wxSashLayoutWindow, METH_VARARGS | METH_KEYWORDS }, { "wxCalculateLayoutEvent_GetRect", (PyCFunction) _wrap_wxCalculateLayoutEvent_GetRect, METH_VARARGS | METH_KEYWORDS }, { "wxCalculateLayoutEvent_SetRect", (PyCFunction) _wrap_wxCalculateLayoutEvent_SetRect, METH_VARARGS | METH_KEYWORDS }, { "wxCalculateLayoutEvent_GetFlags", (PyCFunction) _wrap_wxCalculateLayoutEvent_GetFlags, METH_VARARGS | METH_KEYWORDS }, { "wxCalculateLayoutEvent_SetFlags", (PyCFunction) _wrap_wxCalculateLayoutEvent_SetFlags, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalculateLayoutEvent", (PyCFunction) _wrap_new_wxCalculateLayoutEvent, METH_VARARGS | METH_KEYWORDS }, { "wxQueryLayoutInfoEvent_GetAlignment", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_GetAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxQueryLayoutInfoEvent_SetAlignment", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_SetAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxQueryLayoutInfoEvent_GetOrientation", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS }, @@ -1784,6 +2037,7 @@ static PyMethodDef windows3cMethods[] = { { "wxQueryLayoutInfoEvent_SetFlags", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_SetFlags, METH_VARARGS | METH_KEYWORDS }, { "wxQueryLayoutInfoEvent_GetRequestedLength", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_GetRequestedLength, METH_VARARGS | METH_KEYWORDS }, { "wxQueryLayoutInfoEvent_SetRequestedLength", (PyCFunction) _wrap_wxQueryLayoutInfoEvent_SetRequestedLength, METH_VARARGS | METH_KEYWORDS }, + { "new_wxQueryLayoutInfoEvent", (PyCFunction) _wrap_new_wxQueryLayoutInfoEvent, METH_VARARGS | METH_KEYWORDS }, { "wxSashWindow_SetSashBorder", (PyCFunction) _wrap_wxSashWindow_SetSashBorder, METH_VARARGS | METH_KEYWORDS }, { "wxSashWindow_SetSashVisible", (PyCFunction) _wrap_wxSashWindow_SetSashVisible, METH_VARARGS | METH_KEYWORDS }, { "wxSashWindow_SetMinimumSizeY", (PyCFunction) _wrap_wxSashWindow_SetMinimumSizeY, METH_VARARGS | METH_KEYWORDS }, @@ -1801,6 +2055,8 @@ static PyMethodDef windows3cMethods[] = { { "wxSashWindow_GetEdgeMargin", (PyCFunction) _wrap_wxSashWindow_GetEdgeMargin, METH_VARARGS | METH_KEYWORDS }, { "wxSashWindow_GetDefaultBorderSize", (PyCFunction) _wrap_wxSashWindow_GetDefaultBorderSize, METH_VARARGS | METH_KEYWORDS }, { "wxSashWindow_GetSashVisible", (PyCFunction) _wrap_wxSashWindow_GetSashVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxSashWindow_Create", (PyCFunction) _wrap_wxSashWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreSashWindow", (PyCFunction) _wrap_new_wxPreSashWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxSashWindow", (PyCFunction) _wrap_new_wxSashWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSashEvent_GetDragStatus", (PyCFunction) _wrap_wxSashEvent_GetDragStatus, METH_VARARGS | METH_KEYWORDS }, { "wxSashEvent_SetDragStatus", (PyCFunction) _wrap_wxSashEvent_SetDragStatus, METH_VARARGS | METH_KEYWORDS }, @@ -1808,6 +2064,7 @@ static PyMethodDef windows3cMethods[] = { { "wxSashEvent_SetDragRect", (PyCFunction) _wrap_wxSashEvent_SetDragRect, METH_VARARGS | METH_KEYWORDS }, { "wxSashEvent_GetEdge", (PyCFunction) _wrap_wxSashEvent_GetEdge, METH_VARARGS | METH_KEYWORDS }, { "wxSashEvent_SetEdge", (PyCFunction) _wrap_wxSashEvent_SetEdge, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSashEvent", (PyCFunction) _wrap_new_wxSashEvent, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus diff --git a/wxPython/src/msw/windows3.py b/wxPython/src/msw/windows3.py index dca7c48405..5a5bec634e 100644 --- a/wxPython/src/msw/windows3.py +++ b/wxPython/src/msw/windows3.py @@ -47,8 +47,9 @@ class wxSashEventPtr(wxCommandEventPtr): def __repr__(self): return "" % (self.this,) class wxSashEvent(wxSashEventPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windows3c.new_wxSashEvent,_args,_kwargs) + self.thisown = 1 @@ -57,6 +58,9 @@ class wxSashWindowPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windows3c.wxSashWindow_Create,(self,) + _args, _kwargs) + return val def GetSashVisible(self, *_args, **_kwargs): val = apply(windows3c.wxSashWindow_GetSashVisible,(self,) + _args, _kwargs) return val @@ -114,10 +118,14 @@ class wxSashWindow(wxSashWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashWindow,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) +def wxPreSashWindow(*_args,**_kwargs): + val = wxSashWindowPtr(apply(windows3c.new_wxPreSashWindow,_args,_kwargs)) + val.thisown = 1 + return val + class wxQueryLayoutInfoEventPtr(wxEventPtr): def __init__(self,this): @@ -157,8 +165,9 @@ class wxQueryLayoutInfoEventPtr(wxEventPtr): def __repr__(self): return "" % (self.this,) class wxQueryLayoutInfoEvent(wxQueryLayoutInfoEventPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windows3c.new_wxQueryLayoutInfoEvent,_args,_kwargs) + self.thisown = 1 @@ -183,8 +192,9 @@ class wxCalculateLayoutEventPtr(wxEventPtr): def __repr__(self): return "" % (self.this,) class wxCalculateLayoutEvent(wxCalculateLayoutEventPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windows3c.new_wxCalculateLayoutEvent,_args,_kwargs) + self.thisown = 1 @@ -193,6 +203,9 @@ class wxSashLayoutWindowPtr(wxSashWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(windows3c.wxSashLayoutWindow_Create,(self,) + _args, _kwargs) + return val def GetAlignment(self, *_args, **_kwargs): val = apply(windows3c.wxSashLayoutWindow_GetAlignment,(self,) + _args, _kwargs) return val @@ -214,12 +227,14 @@ class wxSashLayoutWindow(wxSashLayoutWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashLayoutWindow,_args,_kwargs) self.thisown = 1 - #wx._StdWindowCallbacks(self) - #wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT) - #wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO) +def wxPreSashLayoutWindow(*_args,**_kwargs): + val = wxSashLayoutWindowPtr(apply(windows3c.new_wxPreSashLayoutWindow,_args,_kwargs)) + val.thisown = 1 + return val + class wxLayoutAlgorithmPtr(wxObjectPtr): def __init__(self,this): diff --git a/wxPython/src/sizers.i b/wxPython/src/sizers.i index 5721368051..74f92b4d46 100644 --- a/wxPython/src/sizers.i +++ b/wxPython/src/sizers.i @@ -43,6 +43,7 @@ public: //wxSizerItem( wxWindow *window, int option, int flag, int border, wxObject* userData ); //wxSizerItem( wxSizer *sizer, int option, int flag, int border, wxObject* userData ); + wxPoint GetPosition(); wxSize GetSize(); wxSize CalcMin(); void SetDimension( wxPoint pos, wxSize size ); diff --git a/wxPython/src/stattool.i b/wxPython/src/stattool.i index 03a28cfb5e..1a6482b228 100644 --- a/wxPython/src/stattool.i +++ b/wxPython/src/stattool.i @@ -46,6 +46,11 @@ public: const wxSize& size = wxDefaultSize, long style = wxST_SIZEGRIP, char* name = "statusBar"); + %name(wxPreStatusBar)wxStatusBar(); + + bool Create(wxWindow* parent, wxWindowID id, + long style = wxST_SIZEGRIP, + char* name = "statusBar"); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -61,10 +66,6 @@ public: int GetBorderX(); int GetBorderY(); -// void DrawField(wxDC& dc, int i); -// void DrawFieldText(wxDC& dc, int i); -// void InitColours(void); - void SetFieldsCount(int number = 1); void SetStatusText(const wxString& text, int i = 0); void SetStatusWidths(int LCOUNT, int* choices); @@ -283,6 +284,14 @@ public: const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const char* name = wxToolBarNameStr); + %name(wxPreToolBar)wxToolBar(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER | wxTB_HORIZONTAL, + const char* name = wxToolBarNameStr); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" @@ -300,6 +309,14 @@ public: const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const char* name = wxToolBarNameStr); + %name(wxPreToolBarSimple)wxToolBarSimple(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER | wxTB_HORIZONTAL, + const char* name = wxToolBarNameStr); %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index d5a7222622..c12a316811 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -73,30 +73,6 @@ public: } } -// %pragma(python) addtoclass = " -// _prop_list_ = {} -// " -// %pragma(python) addtoclass = " -// def __getattr__(self, name): -// pl = self._prop_list_ -// if pl.has_key(name): -// getFunc, setFunc = pl[name] -// if getFunc: -// return getattr(self, getFunc)() -// else: -// raise TypeError, '%s property is write-only' % name -// raise AttributeError, name - -// def __setattr__(self, name, value): -// pl = self._prop_list_ -// if pl.has_key(name): -// getFunc, setFunc = pl[name] -// if setFunc: -// return getattr(self, setFunc)(value) -// else: -// raise TypeError, '%s property is read-only' % name -// self.__dict__[name] = value -// " }; @@ -114,13 +90,6 @@ public: static bool IsSilent(); static void SetBellOnError(int doIt = TRUE); -// // Properties list -// %pragma(python) addtoclass = " -// _prop_list_ = { -// 'window' : ('GetWindow', 'SetWindow'), -// } -// _prop_list_.update(wxEvtHandler._prop_list_) -// " }; @@ -189,14 +158,18 @@ public: class wxWindow : public wxEvtHandler { public: - wxWindow(wxWindow* parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, char* name = "panel"); + %name(wxPreWindow)wxWindow(); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + bool Create(wxWindow* parent, const wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + char* name = "panel"); void CaptureMouse(); void Center(int direction = wxBOTH); @@ -295,6 +268,8 @@ public: void Raise(); void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL); + void RefreshRect(const wxRect& rect); + void ReleaseMouse(); void RemoveChild(wxWindow* child); bool Reparent( wxWindow* newParent ); @@ -385,6 +360,7 @@ public: void Freeze(); void Thaw(); + void Update(); wxString GetHelpText(); void SetHelpText(const wxString& helpText); @@ -396,40 +372,11 @@ public: bool PageUp(); bool PageDown(); + static wxWindow* FindFocus(); + static int NewControlId(); + static int NextControlId(int id); + static int PrevControlId(int id); - -// // Properties list -// %pragma(python) addtoclass = " -// _prop_list_ = { -// 'size' : ('GetSize', 'SetSize'), -// 'enabled' : ('IsEnabled', 'Enable'), -// 'background' : ('GetBackgroundColour', 'SetBackgroundColour'), -// 'foreground' : ('GetForegroundColour', 'SetForegroundColour'), -// 'children' : ('GetChildren', None), -// 'charHeight' : ('GetCharHeight', None), -// 'charWidth' : ('GetCharWidth', None), -// 'clientSize' : ('GetClientSize', 'SetClientSize'), -// 'font' : ('GetFont', 'SetFont'), -// 'grandParent' : ('GetGrandParent', None), -// 'handle' : ('GetHandle', None), -// 'label' : ('GetLabel', 'SetLabel'), -// 'name' : ('GetName', 'SetName'), -// 'parent' : ('GetParent', None), -// 'position' : ('GetPosition', 'SetPosition'), -// 'title' : ('GetTitle', 'SetTitle'), -// 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'), -// 'visible' : ('IsShown', 'Show'), -// 'toolTip' : ('GetToolTip', 'SetToolTip'), -// 'sizer' : ('GetSizer', 'SetSizer'), -// 'validator' : ('GetValidator', 'SetValidator'), -// 'dropTarget' : ('GetDropTarget', 'SetDropTarget'), -// 'caret' : ('GetCaret', 'SetCaret'), -// 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'), -// 'constraints' : ('GetConstraints', 'SetConstraints'), - -// } -// _prop_list_.update(wxEvtHandler._prop_list_) -// " }; @@ -449,12 +396,6 @@ def wxDLG_SZE(win, size_width, height=None): return win.ConvertDialogSizeToPixels(wxSize(size_width, height)) " -%inline %{ - wxWindow* wxWindow_FindFocus() { - return wxWindow::FindFocus(); - } -%} - #ifdef __WXMSW__ %inline %{ @@ -467,18 +408,6 @@ wxWindow* wxWindow_FromHWND(unsigned long hWnd) { %} #endif -%inline %{ - int wxWindow_NewControlId() { - return wxWindow::NewControlId(); - } - int wxWindow_NextControlId(int id) { - return wxWindow::NextControlId(id); - } - int wxWindow_PrevControlId(int id) { - return wxWindow::PrevControlId(id); - } -%} - //--------------------------------------------------------------------------- @@ -490,8 +419,14 @@ public: const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const char* name = "panel"); + %name(wxPrePanel)wxPanel(); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + bool Create(wxWindow* parent, + const wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL, + const char* name = "panel"); void InitDialog(); wxButton* GetDefaultItem(); @@ -510,8 +445,15 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const char* name = "dialogBox"); + %name(wxPreDialog)wxDialog(); - %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" + bool Create(wxWindow* parent, + const wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const char* name = "dialogBox"); void Centre(int direction = wxBOTH); void EndModal(int retCode); @@ -547,9 +489,14 @@ public: const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, char* name = "scrolledWindow"); - - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" + %name(wxPreScrolledWindow)wxScrolledWindow(); + + bool Create(wxWindow* parent, + const wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHSCROLL | wxVSCROLL, + char* name = "scrolledWindow"); void EnableScrolling(bool xScrolling, bool yScrolling); int GetScrollPageSize(int orient); diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index cfddb6a4d3..cb9e18dec7 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -42,207 +42,6 @@ //--------------------------------------------------------------------------- -#ifdef OLD_GRID - -enum { - wxGRID_TEXT_CTRL, - wxGRID_HSCROLL, - wxGRID_VSCROLL -}; - -class wxGridCell { -public: - wxGridCell(); - ~wxGridCell(); - - wxString& GetTextValue(); - void SetTextValue(const wxString& str); - wxFont& GetFont(); - void SetFont(wxFont& f); - wxColour GetTextColour(); - void SetTextColour(const wxColour& colour); - wxColour GetBackgroundColour(); - void SetBackgroundColour(const wxColour& colour); - wxBrush& GetBackgroundBrush(); - int GetAlignment(); - void SetAlignment(int align); - wxBitmap* GetCellBitmap(); - void SetCellBitmap(wxBitmap* bitmap); -}; - - - - -class wxGrid : public wxPanel { -public: - wxGrid(wxWindow* parent, wxWindowID id, - const wxPoint& pos=wxDefaultPosition, - const wxSize& size=wxDefaultSize, - long style=0, - char* name="grid"); - - %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(); - bool AppendCols(int n=1, int updateLabels=TRUE); - bool AppendRows(int n=1, int updateLabels=TRUE); - void BeginBatch(); - bool CellHitTest(int x, int y, int *OUTPUT, int *OUTPUT); - - %addmethods { - // TODO: For now we are just ignoring the initial cellValues - // and widths. Add support for loading them from - // Python sequence objects. - bool CreateGrid(int rows, int cols, - //PyObject* cellValues = NULL, - //PyObject* widths = NULL, - short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, - short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT) { - return self->CreateGrid(rows, cols, NULL, NULL, - defaultWidth, defaultHeight); - } - } - - bool CurrentCellVisible(); - bool DeleteCols(int pos=0, int n=1, bool updateLabels=TRUE); - bool DeleteRows(int pos=0, int n=1, bool updateLabels=TRUE); - void EndBatch(); - - int GetBatchCount(); - wxGridCell* GetCell(int row, int col); - int GetCellAlignment(int row, int col); - %name(GetDefCellAlignment)int GetCellAlignment(); - wxColour GetCellBackgroundColour(int row, int col); - %name(GetDefCellBackgroundColour) wxColour& GetCellBackgroundColour(); - - //wxGridCell *** GetCells(); - %addmethods { - PyObject* GetCells() { - int row, col; - PyObject* rows = PyList_New(0); - for (row=0; row < self->GetRows(); row++) { - PyObject* rowList = PyList_New(0); - for (col=0; col < self->GetCols(); col++) { - wxGridCell* cell = self->GetCell(row, col); - - bool doSave = wxPyRestoreThread(); - PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell"); - wxPySaveThread(doSave); - - if (PyList_Append(rowList, pyCell) == -1) - return NULL; - } - if (PyList_Append(rows, rowList) == -1) - return NULL; - } - return rows; - } - } - wxColour GetCellTextColour(int row, int col); - %name(GetDefCellTextColour)wxColour& GetCellTextColour(); - wxFont& GetCellTextFont(int row, int col); - %name(GetDefCellTextFont)wxFont& GetCellTextFont(); - wxString& GetCellValue(int row, int col); - int GetCols(); - int GetColumnWidth(int col); - wxRect GetCurrentRect(); - int GetCursorColumn(); - int GetCursorRow(); - bool GetEditable(); - wxScrollBar * GetHorizScrollBar(); - int GetLabelAlignment(int orientation); - wxColour GetLabelBackgroundColour(); - int GetLabelSize(int orientation); - wxColour GetLabelTextColour(); - wxFont& GetLabelTextFont(); - wxString& GetLabelValue(int orientation, int pos); - int GetRowHeight(int row); - int GetRows(); - int GetScrollPosX(); - int GetScrollPosY(); - wxTextCtrl* GetTextItem(); - wxScrollBar* GetVertScrollBar(); - - bool InsertCols(int pos=0, int n=1, bool updateLabels=TRUE); - bool InsertRows(int pos=0, int n=1, bool updateLabels=TRUE); - - void OnActivate(bool active); - - void SetCellAlignment(int alignment, int row, int col); - %name(SetDefCellAlignment)void SetCellAlignment(int alignment); - void SetCellBackgroundColour(const wxColour& colour, int row, int col); - %name(SetDefCellBackgroundColour) - 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 SetCellValue(const wxString& val, int row, int col); - void SetColumnWidth(int col, int width); - 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 SetLabelValue(int orientation, const wxString& value, int pos); - void SetRowHeight(int row, int height); - - void UpdateDimensions(); - - bool GetEditInPlace(); - void SetEditInPlace(int edit = TRUE); - -}; - - -class wxGridEvent : public wxEvent { -public: - int m_row; - int m_col; - int m_x; - int m_y; - bool m_control; - bool m_shift; - wxGridCell* m_cell; - - int GetRow(); - int GetCol(); - wxPoint GetPosition(); - bool ControlDown(); - bool ShiftDown(); - wxGridCell* GetCell(); -}; - - -enum { - wxEVT_GRID_SELECT_CELL, - wxEVT_GRID_CREATE_CELL, - wxEVT_GRID_CHANGE_LABELS, - wxEVT_GRID_CHANGE_SEL_LABEL, - wxEVT_GRID_CELL_CHANGE, - wxEVT_GRID_CELL_LCLICK, - wxEVT_GRID_CELL_RCLICK, - wxEVT_GRID_LABEL_LCLICK, - wxEVT_GRID_LABEL_RCLICK, -}; - -#endif - -//--------------------------------------------------------------------------- - enum { /* notebook control event types */ wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, @@ -252,6 +51,9 @@ enum { class wxNotebookEvent : public wxNotifyEvent { public: + wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, + int nSel = -1, int nOldSel = -1); + int GetSelection(); int GetOldSelection(); void SetOldSelection(int page); @@ -268,8 +70,14 @@ public: const wxSize& size = wxDefaultSize, long style = 0, char* name = "notebook"); + %name(wxPreNotebook)wxNotebook(); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + char* name = "notebook"); int GetPageCount(); int SetSelection(int nPage); @@ -333,6 +141,9 @@ enum class wxSplitterEvent : public wxCommandEvent { public: + wxSplitterEvent(wxEventType type = wxEVT_NULL, + wxSplitterWindow *splitter = NULL); + int GetSashPosition(); int GetX(); int GetY(); @@ -350,28 +161,76 @@ public: const wxSize& size = wxDefaultSize, long style=wxSP_3D|wxCLIP_CHILDREN, char* name = "splitterWindow"); + %name(wxPreSplitterWindow)wxSplitterWindow(); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + bool Create(wxWindow* parent, wxWindowID id, + const wxPoint& point = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style=wxSP_3D|wxCLIP_CHILDREN, + char* name = "splitterWindow"); - int GetBorderSize(); - int GetMinimumPaneSize(); - int GetSashPosition(); - int GetSashSize(); + + // Gets the only or left/top pane + wxWindow *GetWindow1(); + + // Gets the right/bottom pane + wxWindow *GetWindow2(); + + // Sets the split mode + void SetSplitMode(int mode); + + // Gets the split mode int GetSplitMode(); - wxWindow* GetWindow1(); - wxWindow* GetWindow2(); - void Initialize(wxWindow* window); + + // Initialize with one window + void Initialize(wxWindow *window); + + // Associates the given window with window 2, drawing the appropriate sash + // and changing the split mode. + // Does nothing and returns FALSE if the window is already split. + // A sashPosition of 0 means choose a default sash position, + // negative sashPosition specifies the size of right/lower pane as it's + // absolute value rather than the size of left/upper pane. + virtual bool SplitVertically(wxWindow *window1, + wxWindow *window2, + int sashPosition = 0); + virtual bool SplitHorizontally(wxWindow *window1, + wxWindow *window2, + int sashPosition = 0); + + // Removes the specified (or second) window from the view + // Doesn't actually delete the window. + bool Unsplit(wxWindow *toRemove = NULL); + + // Replaces one of the windows with another one (neither old nor new + // parameter should be NULL) + bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew); + + // Is the window split? bool IsSplit(); - bool ReplaceWindow(wxWindow * winOld, wxWindow * winNew); - void SetBorderSize(int width); - void SetSashPosition(int position, int redraw = TRUE); + // Sets the sash size void SetSashSize(int width); - void SetMinimumPaneSize(int paneSize); - void SetSplitMode(int mode); - bool SplitHorizontally(wxWindow* window1, wxWindow* window2, int sashPosition = 0); - bool SplitVertically(wxWindow* window1, wxWindow* window2, int sashPosition = 0); - bool Unsplit(wxWindow* toRemove = NULL); + + // Sets the border size + void SetBorderSize(int width); + + // Gets the sash size + int GetSashSize(); + + // Gets the border size + int GetBorderSize(); + + // Set the sash position + void SetSashPosition(int position, bool redraw = TRUE); + + // Gets the sash position + int GetSashPosition(); + + // If this is zero, we can remove panes by dragging the sash. + void SetMinimumPaneSize(int min); + int GetMinimumPaneSize(); + }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/windows3.i b/wxPython/src/windows3.i index 58c9c0c76a..6b99ab1f32 100644 --- a/wxPython/src/windows3.i +++ b/wxPython/src/windows3.i @@ -61,6 +61,8 @@ enum wxSashDragStatus class wxSashEvent : public wxCommandEvent { public: + wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE); + void SetEdge(wxSashEdgePosition edge); wxSashEdgePosition GetEdge(); void SetDragRect(const wxRect& rect); @@ -78,8 +80,13 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const char* name = "sashWindow"); + %name(wxPreSashWindow)wxSashWindow(); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + bool Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCLIP_CHILDREN | wxSW_3D, + const char* name = "sashWindow"); bool GetSashVisible(wxSashEdgePosition edge); int GetDefaultBorderSize(); @@ -126,6 +133,7 @@ enum { class wxQueryLayoutInfoEvent: public wxEvent { public: + wxQueryLayoutInfoEvent(wxWindowID id = 0); void SetRequestedLength(int length); int GetRequestedLength(); @@ -143,6 +151,8 @@ public: class wxCalculateLayoutEvent: public wxEvent { public: + wxCalculateLayoutEvent(wxWindowID id = 0); + void SetFlags(int flags); int GetFlags(); void SetRect(const wxRect& rect); @@ -157,11 +167,13 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const char* name = "layoutWindow"); + %name(wxPreSashLayoutWindow)wxSashLayoutWindow(); - %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)" - %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)" - + bool Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCLIP_CHILDREN | wxSW_3D, + const char* name = "layoutWindow"); wxLayoutAlignment GetAlignment(); wxLayoutOrientation GetOrientation(); @@ -185,6 +197,3 @@ public: //--------------------------------------------------------------------------- - - -//--------------------------------------------------------------------------- diff --git a/wxPython/tools/XRCed/CHANGES b/wxPython/tools/XRCed/CHANGES new file mode 100644 index 0000000000..7b15733c1e --- /dev/null +++ b/wxPython/tools/XRCed/CHANGES @@ -0,0 +1,19 @@ +0.0.3 +----- + +Faster preview window refresh. + +Cut/Paste works better. + +Some tree icons. + +Tree item names. + +Bugfixes. + + +0.0.2 +----- + +The first release. + diff --git a/wxPython/tools/XRCed/README b/wxPython/tools/XRCed/README new file mode 100644 index 0000000000..ee7108f4e2 --- /dev/null +++ b/wxPython/tools/XRCed/README @@ -0,0 +1,60 @@ +******************************************************************************** + + XRCed README + +******************************************************************************** + +Installation on UNIX +-------------------- + +XRCed was developed using Python 2.1.1. xml.dom.minidom module should be +available. XML support requires Expat package (http://expat.sourceforge.net), +and you have to uncomment expat lines in Modules/Setup file of Python source: + +EXPAT_DIR=$(HOME)/expat +pyexpat pyexpat.c -I$(EXPAT_DIR)/xmlparse -L$(EXPAT_DIR) -lexpat + +wxPython version used was 2.3.1, which itself uses wxGTK 2.3.1. wxPython +should be modified to support some extra functions. To update it, go to +wxPython source directory and untar "wxPython-update.tgz" (included with +xrced) file there. Then recompile (run "b 21" for example) it and install as +usual (or you can set your environment to use it from the source tree). + + +Short manual +------------ + +To start xrced, change to the directory where you installed it and run +"python2.1 xrced.py". + +To create an object, first you should select some object in the tree (or the +root item if it's empty) then press the right mouse button and select right +(in another sense now :) ) command. The pulldown menu is context-dependent on +the selected object. + +XRCed tries to guess if new object should be added as a next sibling or a +child of current object, depending on the possibility of the object to have +child objects and expanded state (if tree item is collapsed, new object will +be sibling). You can change this behavior to create siblings by pressing and +holding the Control key before clicking the mouse. + +Same applies for copy/paste, but at the moment Control key is ignored. + +Panel on the right contains object properties. Properties which are optional +should be "checked" first. XMLID of the object is the textbox to the right of +the class name. + +All properties can be edited as text, and some are supplied with special +editing controls. + +To display the preview window double-click a top-level object (you should +assign an XMLID to it first). After that, if you select a child object, it +becomes highlighted, and if you change it, preview is updated when you select +another item or press Ctrl-R (refresh). To turn off automatic update, toggle +"View->Auto-refresh" or toolbar auto-refresh button (to the right of refresh +button). + + +-------------------------------------------------------------------------------- + +Copyright 2001 Roman Rolinsky diff --git a/wxPython/tools/XRCed/TODO b/wxPython/tools/XRCed/TODO new file mode 100644 index 0000000000..dc6e7b2047 --- /dev/null +++ b/wxPython/tools/XRCed/TODO @@ -0,0 +1,28 @@ +TODO for XRCed +============== + +* Undo/Redo + +* menu - accel not displayed in preview + +* tree icons + +* paste as sibling (toolbar toggle button) + +* replace object with abother, keeping children + +* write tmp file for current dialog/panel/etc. + +* XML indents + +* select same notebook pages after update + +* put some default values in tree ctrl etc. + +* special (fast) update for some values: pos/size, value/content, sizeritem + stuff (?), well, as much as possible + +* highlighting with better method + +* import XRC/WXR files + diff --git a/wxPython/tools/XRCed/images.py b/wxPython/tools/XRCed/images.py new file mode 100644 index 0000000000..3cb6d15471 --- /dev/null +++ b/wxPython/tools/XRCed/images.py @@ -0,0 +1,286 @@ +#---------------------------------------------------------------------- +# This file was generated by img2py.py +# +from wxPython.wx import wxBitmapFromXPMData, wxImageFromBitmap +import cPickle, zlib + + +def getNewData(): + return cPickle.loads(zlib.decompress( +"x\xda\xd3\xc8)0\xe4\nV72Q02V0Q0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xf2\ +\x81\x9d0\xbdX$A\xf2\ +\xf9\xc3Z\x12\x010%\x15\xf2\x11` S\x82\x1e\x00-\xd9\x8b\xfa" )) + +def getNewBitmap(): + return wxBitmapFromXPMData(getNewData()) + +def getNewImage(): + return wxImageFromBitmap(getNewBitmap()) + +#---------------------------------------------------------------------- +def getOpenData(): + return cPickle.loads(zlib.decompress( +'x\xda\xcd\x92\xb1\n\xc3 \x10\x86\xf7<\xc5A\x07\x0b\x81#IK\xb1\xab\x01\xc7:d\ +\xb95\x84N\r\xbd\xbe\xff\xd4hb\xb5j\xbb\xb6\xbf\x08~|\xde)\xe2~~\xb4\xd5 \ +\xba#t\x078A+\xaaq\x10\x08\x13\xa8y\x9cn\x8e\xccB\xbbsc\x87c\xb2\xac\xa5\xee\ +\x9b\x95a\xe1\x0b\xdf\xaf\x0e\xd8K-\x1d\xd7\x96\x95Tas9\x7f"\x11\xf1\xa3D7\ +\xf1K[Leh\xe7\x97A"1\xe1\x9a\xfcB\xc8\xb4\r4\xb9\xf4\x8eJ\x92C\xdf\xf2\x99\ +\xb5\x8f\xab\x8e+9v\x89\xa4\xd4\xc52so\xf2\x95\xcd\xc5/dB~\xfb\x13\xf0\t\x81\ +T\x87G' )) + +def getOpenBitmap(): + return wxBitmapFromXPMData(getOpenData()) + +def getOpenImage(): + return wxImageFromBitmap(getOpenBitmap()) + +#---------------------------------------------------------------------- +def getSaveData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV72Q02V0U0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xfc\ +\x81\xc5\x81C\x9c\x8e\xb4*\xc4\xd5BF3t\xc9\ +Z\x8a\x93\xc5\xf3\xfd\'\xef.vP\xee\xe6\xfe\t\x81\x9f/\xdf\r!\xc7\xf5\xddwS\ +\x18\xce0\x9c\xe0\x02}\xe8\xe6) ,p[\xe7\xe5\xa9\x8d\xb8\x1d"\'E\xedE\xfa5\ +\xca\xd2\x0e\xdc\xef\xf4zh\xa9\x02s\xcacN_hg_\x88\x1a\x0fV\xce/\xfd\x87\x15\ +\x1d\x88\xbcIc\x9b\x95\xf4 \xcbDl\xb0\x92c\xf2\xf0m\xb2i\xca\xa5\xe2\x98(r1\ +\x1e\xc11\xa1H\x1c\xb3\xc53\x1b\xdcb\xc16\\\xb2\xdfO\xc0\x0f5t\x92\x06' )) + +def getCopyBitmap(): + return wxBitmapFromXPMData(getCopyData()) + +def getCopyImage(): + return wxImageFromBitmap(getCopyBitmap()) + +#---------------------------------------------------------------------- +def getPasteData(): + return cPickle.loads(zlib.decompress( +'x\xda\xcd\x92\xb1\n\x830\x10\x86w\x9f\xe2\xa0\x83\x85\xc0\x11m\xa1\xe9\x16Z\ +p\xec\r.YE:U\x9a\xbe\xff\xe4]48x\xe9V\xe8\'\xc2\xfd|\xf7g\x88\x1e\xa7OS\xf5u\ +{\x86\xf6\x04\x17h\xeaj\xe8k\x84\x11n\xd30\xbeR2\x9c\x0e\x96q6e\x92|\xb5\xf2\ +\xa4\x1c$w\xae\xbb\xdb%G\xc9\xce\xba\xbc\x0f\x9c\x1f\xf1\xfdL\xc1\xe7\xe5\ +\xce\xadR\xe7\x0f$2\xaa\x14\x81!\xe0\xb6\xb0I\x8c1"\xab\x90\x86\xbd\xe4\x9e \ +\x13\xed\xe5\x8a*7ti\x16\n\xd2\x0b\xc6|\x93\xde\xe8\x92\x0f\x95\x97\x8aM\xee\ +R\xa9)]R\xae\xaf\xd0\x04 \xc6dH\xfbd\x94\xf9\xe9\x9f\x803\xb0L\x99\x05' )) + +def getPasteBitmap(): + return wxBitmapFromXPMData(getPasteData()) + +def getPasteImage(): + return wxImageFromBitmap(getPasteBitmap()) + +#---------------------------------------------------------------------- +def getRefreshData(): + return cPickle.loads(zlib.decompress( +'x\xda\xad\xd2\xbb\x0e\xc20\x0c\x05\xd0\xbd_q%\x860]\xf55\xc0\x0f0\xb2t\xf1\ +\x8a\x10\x1bj\xf9\xff\x89\xbc\x9a\x9a\xe2\xc2Rg\x89u\x14+vr|\xbe\x9ajpm\x8f\ +\xb6C\x87\xc6U\xb7\xc1\t\xee8\x9c\xeb\xb0b\x0e\x9f_\xa7\xf1\x11\x13\x06\xbc\ +\x9cj\x1f\x19\xed\xd8\r\x19b\x03\xbd\x88R\x85\x8c&XTc\xb2\xb0\x11\x13\x89_\ +\xc8\xb4\xd9(\xab\xeb~`"\x13\x91\xc9F\xd5\xee\x9e8w@\x1bY\xae\xfd]6\x9f\xb0&\ +4\x1f\xa5\x8dQY\xaa\x9a\x8f]\x86\xb1nED\x8a\xfd\xfdC|\x03\xab\xaaw\xdd' )) + +def getRefreshBitmap(): + return wxBitmapFromXPMData(getRefreshData()) + +def getRefreshImage(): + return wxImageFromBitmap(getRefreshBitmap()) + +#---------------------------------------------------------------------- +def getAutoRefreshData(): + return cPickle.loads(zlib.decompress( +'x\xda\xad\xd21\x0e\xc20\x0c\x05\xd0\xbd\xa7\xb0\xc4\x10&+-\x1d\xca\x05\x18Y\ +\xba\xfc\x15!6\x84\xb9\xffD\x9c8%R\x92\x8a\x01gh\xacW9\xb2\x93\xe3\xf3=\x0e\ +\xab\x9bf\x9aN4\xd3\xe8\x86\xdb\xea@w:\x9c\xbd\xae\x98S\xc8\xaf\xf2z\xc4D\ +\x14\xbd_\x16\x9f\x905\xbf\x84\xcc\xe7\x9f\xdb\xf17d\x8d\x0e\x06A\xa1\x05r4\ +\xd0WKL\xa6\x1b4\x91i\x0f9m:eA\x12\x025*\x05\x03\x9b\x96\xad\x00\xf6i\xa1\ +\x85luk\xec\x94\xdd\xc5\xd4\x81\xb4\xcb\xf2\xa6\x10\xa9\xca\xdahbO\xa8\xd1\ +\x06\x84\xce\x95Q\x1e\x7f\xe7\xb2\xb3U\xad\xc0\x8e\xfb\xe9\r\xf1\x07\xdbD\ +\x86\x9f' )) + +def getAutoRefreshBitmap(): + return wxBitmapFromXPMData(getAutoRefreshData()) + +def getAutoRefreshImage(): + return wxImageFromBitmap(getAutoRefreshBitmap()) + +#---------------------------------------------------------------------- +def getTreePanelData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S04Q0Q0T\xe7J\x0cV\xd7SHVp\xcaIL\xce\x06\xf3\xf2\ +\x811\x82\xf9`@\ +\xc8LLo\xea\x01\x00\xb5\x9cde' )) + +def getTreeDialogBitmap(): + return wxBitmapFromXPMData(getTreeDialogData()) + +def getTreeDialogImage(): + return wxImageFromBitmap(getTreeDialogBitmap()) + +#---------------------------------------------------------------------- +def getTreeFrameData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u\x05\x85d\x05\xa7\x9c\xc4\ +\xe4l0O\x0f\xc8S6\x00\x027\x0b0?\x02\xc4w1p1q1\x80\xaaF\x05\x10A=\x14@\xb2 V\ +3#P\xc0p\x10\xc4\xf4\xa6\x1e\x00\xe3\x8f`,' )) + +def getTreeFrameBitmap(): + return wxBitmapFromXPMData(getTreeFrameData()) + +def getTreeFrameImage(): + return wxImageFromBitmap(getTreeFrameBitmap()) + +#---------------------------------------------------------------------- +def getTreeMenuBarData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"S\x05Cu\xae\xc4`\xf5\x08\x85d\x05\xa7\x9c\xc4\ +\xe4l0\xcf\x1f\xc8S\xb64\xb04\xb14\x00\xf3\x15\x80|\xbf\xfc\xbcT0G\x0f$\xe9f\ +\xe1\xe6\xecf\x01\xe6\xe7\x83\xf8.\x06.&.0\xc5\xa8\x80\x1a\x82z\xa8 \x02"\ +\x98\x8f\x0c\xfca\x82\xfe \x00#I\x17\xc4b\xa6?*\x80\x08F\xa0\x01\x1a\xf9]\ +\x0f\x00\x9b\xde`\xb2' )) + +def getTreeMenuBarBitmap(): + return wxBitmapFromXPMData(getTreeMenuBarData()) + +def getTreeMenuBarImage(): + return wxImageFromBitmap(getTreeMenuBarBitmap()) + +#---------------------------------------------------------------------- +def getTreeMenuData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"S\x05Cu\xae\xc4`\xf5\x08\x85d\x05\xa7\x9c\xc4\ +\xe4l0\xcf\x1f\xc8S\xb64\xb04\xb14\x00\xf3\x15\x80|\xbf\xfc\xbcT0G\x0f$\xe9f\ +\xe1\xe6\xecf\x01\xe6\xe7\x83\xf8.\x06.&.0\xc5\nzp\x10\xa1\xa0\x00\x17\xcc\ +\x87\x02\x7f\x14A\x7f0 [p(\x9b\xe9\x0f\x03H\x82\x11\x08\x00\x16\xd4\x03\x00&\ +sj\xf9' )) + +def getTreeMenuBitmap(): + return wxBitmapFromXPMData(getTreeMenuData()) + +def getTreeMenuImage(): + return wxImageFromBitmap(getTreeMenuBitmap()) + +#---------------------------------------------------------------------- +def getTreeSizerHData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ +\x01\xc8\xf7\xcb\xcfK\x85rP\x01\xa9\x82z\xa8\x00*\x08Q\x01\xa3\x06\xaf 6\xc7\ +S\x12 z\x00\xf8\xc9>T' )) + +def getTreeSizerHBitmap(): + return wxBitmapFromXPMData(getTreeSizerHData()) + +def getTreeSizerHImage(): + return wxImageFromBitmap(getTreeSizerHBitmap()) + +#---------------------------------------------------------------------- +def getTreeSizerVData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ +\x01\xc8\xf7\xcb\xcfK\x85r\x14\x14\xf4`\x00\xc8F\x08*@\xc0\x00\t\x0e\x11\'!\ +\x03\xa0\xa0\x1e\x00\xfaC>*' )) + +def getTreeSizerVBitmap(): + return wxBitmapFromXPMData(getTreeSizerVData()) + +def getTreeSizerVImage(): + return wxImageFromBitmap(getTreeSizerVBitmap()) + +#---------------------------------------------------------------------- +def getTreeStaticBoxSizerHData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0\ +/\x02\xc8S630313\x00\xf3\x15\x80|\xbf\xfc\xbcT(\x07\x15\xc0\x05\xf5\xb0\x08\ +\xea!\x8bB\x04#\x14\xf4\xf4\xf4\x14"`\x00.\x08R\x19\x01Q\x08\x17\x84\xf0\x06\ +\x93 *\xc0\x1f \xc4\x08\xea\x01\x00\x0b\xa9Jm' )) + +def getTreeStaticBoxSizerHBitmap(): + return wxBitmapFromXPMData(getTreeStaticBoxSizerHData()) + +def getTreeStaticBoxSizerHImage(): + return wxImageFromBitmap(getTreeStaticBoxSizerHBitmap()) + +#---------------------------------------------------------------------- +def getTreeStaticBoxSizerVData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"c\x05Cu\xae\xc4`u=\x85d\x05\xa7\x9c\xc4\xe4l0\ +/\x02\xc8S630313\x00\xf3\x15\x80|\xbf\xfc\xbcT(\x07\x0c\xf4\xa0\xb4\x02\x92\ +\xa0\x1e\\\x14.\x18\xa1\xa0\xa7\xa7\xa7\x10\x11\x11\x81&\x08V\x89&\x08\x01\ +\xb4\x17\x84\x81\xc1`\xbb\x1e\x00U+IU' )) + +def getTreeStaticBoxSizerVBitmap(): + return wxBitmapFromXPMData(getTreeStaticBoxSizerVData()) + +def getTreeStaticBoxSizerVImage(): + return wxImageFromBitmap(getTreeStaticBoxSizerVBitmap()) + +#---------------------------------------------------------------------- +def getTreeSizerGridData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ +\x01\xc8\xf7\xcb\xcfK\x85p\xf4P\x01TP\x01\x0c`\x14\xbd\x05\x87\x88\x93\xd0\ +\x00PP\x0f\x00!\xb1?\xce' )) + +def getTreeSizerGridBitmap(): + return wxBitmapFromXPMData(getTreeSizerGridData()) + +def getTreeSizerGridImage(): + return wxImageFromBitmap(getTreeSizerGridBitmap()) + +#---------------------------------------------------------------------- +def getTreeSizerFlexGridData(): + return cPickle.loads(zlib.decompress( +'x\xda\xd3\xc8)0\xe4\nV74S\x00"#\x05Cu\xae\xc4`u=\x85d\x05e3\x033\x133\x030_\ +\x01\xc8\xf7\xcb\xcfK\x85p\xf4P\x01TP\x01\x08\xc0\x04\x98A\x1dA\xbaYD/\xc7\ +\xa3\x01\xa0\xa0\x1e\x00>\x91?\xce' )) + +def getTreeSizerFlexGridBitmap(): + return wxBitmapFromXPMData(getTreeSizerFlexGridData()) + +def getTreeSizerFlexGridImage(): + return wxImageFromBitmap(getTreeSizerFlexGridBitmap()) + diff --git a/wxPython/tools/XRCed/params.py b/wxPython/tools/XRCed/params.py new file mode 100644 index 0000000000..7f985230fd --- /dev/null +++ b/wxPython/tools/XRCed/params.py @@ -0,0 +1,317 @@ +# Name: params.py +# Purpose: Classes for parameter introduction +# Author: Roman Rolinsky +# Created: 22.08.2001 + +from wxPython.wx import * +from wxPython.xrc import * +import string + +# Object which is currently processed +currentXXX = None +def SetCurrentXXX(xxx): + global currentXXX + currentXXX = xxx + +# Register objects in the view +registered = {} +def Register(param, obj): + registered[param] = obj +def GetRegistered(param): + return registered[param] +def ClearRegister(): + registered.clear() + +genericStyles = ['wxSIMPLE_BORDER', 'wxSUNKEN_BORDER', 'wxRAISED_BORDER', + 'wxTAB_TRAVERSAL', 'wxWANTS_CHARS', 'wxVSCROLL', 'wxHSCROLL'] + +class ParamBinaryOr(wxPanel): + ID_TEXT_CTRL = wxNewId() + ID_BUTTON_CHOICES = wxNewId() + def __init__(self, parent, id, value, size, name, param): + wxPanel.__init__(self, parent, id, name=name) + self.SetBackgroundColour(panel.GetBackgroundColour()) + Register(param, self) + sizer = wxBoxSizer() + self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, value, size=wxSize(200,-1)) + sizer.Add(self.text, 0, wxRIGHT, 10) + self.button = wxButton(self, self.ID_BUTTON_CHOICES, 'Edit...') + sizer.Add(self.button) + self.SetAutoLayout(true) + self.SetSizer(sizer) + sizer.Fit(self) + EVT_BUTTON(self, self.ID_BUTTON_CHOICES, self.OnButtonChoices) + EVT_TEXT(self, self.ID_TEXT_CTRL, self.OnChange) + def OnChange(self, evt): + panel.SetModified(true) + evt.Skip() + def GetValue(self): + return self.text.GetValue() + def SetValue(self, value): + self.text.SetValue(value) + def OnButtonChoices(self, evt): + dlg = wxDialog(self, -1, 'Choices', size=wxSize(250,300)) + topSizer = wxBoxSizer(wxVERTICAL) + listBox = wxCheckListBox(dlg, -1, choices=self.values) + value = map(string.strip, string.split(self.text.GetValue(), '|')) + if value == ['']: value = [] + ignored = [] + for i in value: + try: + listBox.Check(self.values.index(i)) + except ValueError: + # Try to find equal + if self.equal.has_key(i): + listBox.Check(self.values.index(self.equal[i])) + else: + print 'Unknown flag: %s: ignored.' % i + ignored.append(i) + topSizer.Add(listBox, 1, wxEXPAND) + sizer = wxBoxSizer() + buttonOk = wxButton(dlg, wxID_OK, 'OK') + buttonOk.SetDefault() + sizer.Add(buttonOk, 0, wxRIGHT, 10) + sizer.Add(0, 0, 1) + sizer.Add(wxButton(dlg, wxID_CANCEL, 'Cancel')) + topSizer.Add(sizer, 0, wxALL | wxEXPAND, 10) + dlg.SetAutoLayout(true) + dlg.SetSizer(topSizer) + dlg.Center() + if dlg.ShowModal() != wxID_OK: return + value = [] + for i in range(listBox.Number()): + if listBox.IsChecked(i): + value.append(self.values[i]) + # Add ignored flags + value.extend(ignored) + self.SetValue(reduce(lambda a,b: a+'|'+b, value)) + panel.SetModified(true) + +class ParamFlag(ParamBinaryOr): + values = ['wxTOP', 'wxBOTTOM', 'wxLEFT', 'wxRIGHT', 'wxALL', + 'wxEXPAND', 'wxSHAPED', 'wxALIGN_CENTRE', 'wxALIGN_RIGHT', + 'wxALIGN_BOTTOM', 'wxALIGN_CENTRE_VERTICAL', + 'wxALIGN_CENTRE_HORIZONTAL'] + equal = {'wxALIGN_CENTER': 'wxALIGN_CENTRE', + 'wxALIGN_CENTER_VERTICAL': 'wxALIGN_CENTRE_VERTICAL', + 'wxALIGN_CENTER_HORIZONTAL': 'wxALIGN_CENTRE_HORIZONTAL'} + def __init__(self, parent, id, value, size, name, param): + ParamBinaryOr.__init__(self, parent, id, value, size, name, param) + +class ParamStyle(ParamBinaryOr): + equal = {'wxALIGN_CENTER': 'wxALIGN_CENTRE'} + def __init__(self, parent, id, value, size, name, param): + self.values = currentXXX.styles + genericStyles + ParamBinaryOr.__init__(self, parent, id, value, size, name, param) + +class ParamInt(wxPanel): + ID_SPIN_CTRL = wxNewId() + def __init__(self, parent, id, value, size, name, param): + wxPanel.__init__(self, parent, id, name=name) + sizer = wxBoxSizer() + self.spin = wxSpinCtrl(self, self.ID_SPIN_CTRL, value, size=wxSize(50,-1)) + self.SetBackgroundColour(panel.GetBackgroundColour()) + sizer.Add(self.spin) + self.SetAutoLayout(true) + self.SetSizer(sizer) + sizer.Fit(self) + Register(param, self) + EVT_SPINCTRL(self, self.ID_SPIN_CTRL, self.OnChange) + def GetValue(self): + return str(self.spin.GetValue()) + def SetValue(self, value): + if not value: value = 0 + self.spin.SetValue(int(value)) + def OnChange(self, evt): + panel.SetModified(true) + evt.Skip() + +class ParamText(wxTextCtrl): + def __init__(self, parent, id, value, size, name, param): + wxTextCtrl.__init__(self, parent, id, value, size=wxSize(200,-1), name=name) + Register(param, self) + EVT_TEXT(self, id, self.OnChange) + def OnChange(self, evt): + panel.SetModified(true) + evt.Skip() + +class ParamAccel(wxTextCtrl): + def __init__(self, parent, id, value, size, name, param): + wxTextCtrl.__init__(self, parent, id, value, size=wxSize(50,-1), name=name) + Register(param, self) + EVT_TEXT(self, id, self.OnChange) + def OnChange(self, evt): + panel.SetModified(true) + evt.Skip() + +class ParamPosSize(wxTextCtrl): + def __init__(self, parent, id, value, size, name, param): + wxTextCtrl.__init__(self, parent, id, value, size=wxSize(80,-1), name=name) + Register(param, self) + EVT_TEXT(self, id, self.OnChange) + def OnChange(self, evt): + panel.SetModified(true) + evt.Skip() + +class ContentDialog(wxDialog): + def __init__(self, parent, value): + # Use another constructor + w = frame.res.LoadDialog(parent, 'ID_DIALOG_CONTENT') + self.this = w.this + w.thisown = 0 + self.thisown = 1 + #frame.res.LoadOnDialog(self, parent, 'ID_DIALOG_CONTENT') + self.Center() + self.list = self.FindWindowByName('ID_LIST') + # Set list items + for v in value: + self.list.Append(v) + # !!! Bug in XRC or wxWin listbox select random items + self.FindWindowByName('wxID_OK').SetFocus() + # Callbacks + self.ID_BUTTON_APPEND = XMLID('ID_BUTTON_APPEND') + self.ID_BUTTON_REMOVE = XMLID('ID_BUTTON_REMOVE') + self.ID_BUTTON_UP = XMLID('ID_BUTTON_UP') + self.ID_BUTTON_DOWN = XMLID('ID_BUTTON_DOWN') + EVT_BUTTON(self, self.ID_BUTTON_UP, self.OnButtonUp) + EVT_BUTTON(self, self.ID_BUTTON_DOWN, self.OnButtonDown) + EVT_BUTTON(self, self.ID_BUTTON_APPEND, self.OnButtonAppend) + EVT_BUTTON(self, self.ID_BUTTON_REMOVE, self.OnButtonRemove) + EVT_UPDATE_UI(self, self.ID_BUTTON_UP, self.OnUpdateUI) + EVT_UPDATE_UI(self, self.ID_BUTTON_DOWN, self.OnUpdateUI) + EVT_UPDATE_UI(self, self.ID_BUTTON_REMOVE, self.OnUpdateUI) + def OnButtonUp(self, evt): + i = self.list.GetSelection() + str = self.list.GetString(i) + self.list.Delete(i) + self.list.InsertItems([str], i-1) + self.list.SetSelection(i-1) + def OnButtonDown(self, evt): + i = self.list.GetSelection() + str = self.list.GetString(i) + self.list.Delete(i) + self.list.InsertItems([str], i+1) + self.list.SetSelection(i+1) + def OnButtonAppend(self, evt): + str = wxGetTextFromUser('Enter new item:', 'Append', '', self) + self.list.Append(str) + def OnButtonRemove(self, evt): + self.list.Delete(self.list.GetSelection()) + def OnUpdateUI(self, evt): + if evt.GetId() == self.ID_BUTTON_REMOVE: + evt.Enable(self.list.GetSelection() != -1) + elif evt.GetId() == self.ID_BUTTON_UP: + evt.Enable(self.list.GetSelection() > 0) + elif evt.GetId() == self.ID_BUTTON_DOWN: + evt.Enable(self.list.GetSelection() < self.list.Number() - 1) + +class ParamContent(wxPanel): + ID_TEXT_CTRL = wxNewId() + ID_BUTTON_EDIT = wxNewId() + def __init__(self, parent, id, value, size, name, param): + wxPanel.__init__(self, parent, id, name=name) + self.SetBackgroundColour(panel.GetBackgroundColour()) + Register(param, self) + sizer = wxBoxSizer() + self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, str(value), size=wxSize(200,-1)) + sizer.Add(self.text, 0, wxRIGHT, 10) + self.button = wxButton(self, self.ID_BUTTON_EDIT, 'Edit...') + sizer.Add(self.button) + self.SetAutoLayout(true) + self.SetSizer(sizer) + sizer.Fit(self) + self.textModified = false + EVT_BUTTON(self, self.ID_BUTTON_EDIT, self.OnButtonEdit) + EVT_TEXT(self, self.ID_TEXT_CTRL, self.OnChange) + def OnChange(self, evt): + panel.SetModified(true) + self.textModified = true + evt.Skip() + def GetValue(self): + if self.textModified: # text has newer value + return eval(self.text.GetValue()) + return self.value + def SetValue(self, value): + self.value = value + self.text.SetValue(str(value)) # update text ctrl + def OnButtonEdit(self, evt): + if self.textModified: # text has newer value + self.value = eval(self.text.GetValue()) + dlg = ContentDialog(self, self.value) + if dlg.ShowModal() != wxID_OK: return + value = [] + for i in range(dlg.list.Number()): + value.append(dlg.list.GetString(i)) + # Add ignored flags + self.SetValue(value) + panel.SetModified(true) + self.textModified = false + +# Boxless radiobox +class RadioBox(wxPanel): + ID_RADIO_CHOICE = wxNewId() # economize on IDs, use names + def __init__(self, parent, id, choices, + pos=wxDefaultPosition, size=wxDefaultSize, name='radiobox'): + wxPanel.__init__(self, parent, id, pos, size, name=name) + self.SetBackgroundColour(panel.GetBackgroundColour()) + self.choices = choices + topSizer = wxBoxSizer() + for i in choices: + topSizer.Add(wxRadioButton(self, self.ID_RADIO_CHOICE, i, name=i)) + self.SetAutoLayout(true) + self.SetSizer(topSizer) + topSizer.Fit(self) + EVT_RADIOBUTTON(self, self.ID_RADIO_CHOICE, self.OnRadioChoice) + def SetStringSelection(self, value): + self.value = None + for i in self.choices: + w = self.FindWindowByName(i) + w.SetValue(i == value) + self.value = value + def OnRadioChoice(self, evt): + if not self.value: # procedure call + evt.Skip() + return + self.FindWindowByName(self.value).SetValue(false) + self.value = evt.GetEventObject().GetName() + panel.SetModified(true) + def GetStringSelection(self): + return self.value + +class ParamBool(RadioBox): + values = {'yes': '1', 'no': '0'} + seulav = {'1': 'yes', '0': 'no'} + def __init__(self, parent, id, value, size, name, param): + RadioBox.__init__(self, parent, id, choices = self.values.keys(), name=name) + Register(param, self) + self.SetValue(value) + def GetValue(self): + return self.values[self.GetStringSelection()] + def SetValue(self, value): + if not value: value = '1' + self.SetStringSelection(self.seulav[value]) + +class ParamOrient(RadioBox): + values = {'horizontal': 'wxHORIZONTAL', 'vertical': 'wxVERTICAL'} + seulav = {'wxHORIZONTAL': 'horizontal', 'wxVERTICAL': 'vertical'} + def __init__(self, parent, id, value, size, name, param): + RadioBox.__init__(self, parent, id, choices = self.values.keys(), name=name) + Register(param, self) + self.SetValue(value) + def GetValue(self): + return self.values[self.GetStringSelection()] + def SetValue(self, value): + if not value: value = 'wxHORIZONTAL' + self.SetStringSelection(self.seulav[value]) + +paramDict = { + 'flag': ParamFlag, + 'style': ParamStyle, + 'pos': ParamPosSize, 'size': ParamPosSize, + 'border': ParamInt, 'cols': ParamInt, 'rows': ParamInt, + 'vgap': ParamInt, 'hgap': ParamInt, + 'checkable': ParamBool, 'accel': ParamAccel, + 'label': ParamText, 'title': ParamText, 'value': ParamText, + 'content': ParamContent, 'selection': ParamInt, + 'min': ParamInt, 'max': ParamInt, + } diff --git a/wxPython/tools/XRCed/xrced.py b/wxPython/tools/XRCed/xrced.py new file mode 100644 index 0000000000..6d19390d8b --- /dev/null +++ b/wxPython/tools/XRCed/xrced.py @@ -0,0 +1,1325 @@ +# Name: xrced.py +# Purpose: XRC editor, main module +# Author: Roman Rolinsky +# Created: 20.08.2001 + +from wxPython.wx import * +from wxPython.xrc import * +from wxPython.html import * +import wxPython.lib.wxpTag +from xml.dom import minidom +import os +import tempfile + +import images + +# String constants +htmlHeader = '\n' +htmlFooter = '\n' +progname = 'XRCed' +version = '0.0.3' + +# Local modules +from xxx import * + +# Globals +testWin = None +testWinPos = wxDefaultPosition + +# 1 adds CMD command to Help menu +debug = 1 + +if debug: + import traceback + import time + +# Set menu to list items. +# Each menu command is a tuple (id, label, help) +# submenus are lists [id, label, help, submenu] +# and separators are any other type +def SetMenu(m, list): + for l in list: + if type(l) == types.TupleType: + apply(m.Append, l) + elif type(l) == types.ListType: + subMenu = wxMenu() + SetMenu(subMenu, l[2:]) + m.AppendMenu(wxNewId(), l[0], subMenu, l[1]) + else: # separator + m.AppendSeparator() + +# Properties panel +class Panel(wxHtmlWindow): + def __init__(self, parent, id): + wxHtmlWindow.__init__(self, parent, id) + self.SetBorders(5) + self.SetFonts('', '', [8, 10, 12, 14, 16, 19, 24]) + EVT_CHECKBOX(self, xxxObject.ID_CHECK_PARAMS, self.OnCheckParams) + EVT_CHECKBOX(self, xxxChildContainer.ID_CHECK_PARAMS, self.OnCheckParams) + self.modified = false + + def Clear(self): + self.SetPage(htmlHeader + 'select a tree item on the left' + htmlFooter) + + def OnCheckParams(self, evt): + selected = tree.GetSelection() + xxx = tree.GetPyData(selected) + if xxx.hasChild and evt.GetId() != xxxChildContainer.ID_CHECK_PARAMS: + xxx = xxx.child + # Set current object + param = evt.GetEventObject().GetName()[6:] + if xxx.hasChild: + w = GetRegistered('_'+param) + else: + w = GetRegistered(param) + elem = xxx.element + if evt.IsChecked(): + # Ad new text node in order of allParams + w.SetValue('') + textElem = tree.dom.createElement(param) + textNode = tree.dom.createTextNode('') + textElem.appendChild(textNode) + # Find place to put new element: first present element after param + found = false + for p in xxx.allParams[xxx.allParams.index(param) + 1:]: + # Content params don't have same type + if xxx.params.has_key(p) and p != 'content': + found = true + break + if found: + nextTextElem = xxx.params[p].parentNode + elem.insertBefore(textElem, nextTextElem) + else: + elem.appendChild(textElem) + xxx.params[param] = textNode + else: + # Remove parameter element and following text node + textElem = xxx.params[param].parentNode + newline = textElem.nextSibling + if newline and newline.nodeType == minidom.Node.TEXT_NODE: + elem.removeChild(newline) + elem.removeChild(textElem) + del xxx.params[param] + w.SetValue('') + w.Enable(evt.IsChecked()) + # Set modified flas + self.SetModified(true) + + # If some parameter was changed + def IsModified(self): + return self.modified + def SetModified(self, value): + self.modified = value + +class HightLightBox: + def __init__(self, pos, size): + w = testWin.panel + l1 = wxWindow(w, -1, pos, wxSize(size.x, 2)) + l1.SetBackgroundColour(wxRED) + l2 = wxWindow(w, -1, pos, wxSize(2, size.y)) + l2.SetBackgroundColour(wxRED) + l3 = wxWindow(w, -1, wxPoint(pos.x + size.x - 2, pos.y), wxSize(2, size.y)) + l3.SetBackgroundColour(wxRED) + l4 = wxWindow(w, -1, wxPoint(pos.x, pos.y + size.y - 2), wxSize(size.x, 2)) + l4.SetBackgroundColour(wxRED) + self.lines = [l1, l2, l3, l4] + # Move highlight to a new position + def Replace(self, pos, size): + self.lines[0].SetDimensions(pos.x, pos.y, size.x, 2, wxSIZE_ALLOW_MINUS_ONE) + self.lines[1].SetDimensions(pos.x, pos.y, 2, size.y, wxSIZE_ALLOW_MINUS_ONE) + self.lines[2].SetDimensions(pos.x + size.x - 2, pos.y, 2, size.y, + wxSIZE_ALLOW_MINUS_ONE) + self.lines[3].SetDimensions(pos.x, pos.y + size.y - 2, size.x, 2, + wxSIZE_ALLOW_MINUS_ONE) + # Remove it + def Remove(self): + map(wxWindow.Destroy, self.lines) + testWin.highLight = None + +class MemoryFile: + def __init__(self, name): + self.name = name + self.buffer = '' + def write(self, data): + self.buffer = self.buffer + data.encode() + def close(self): + f = open(self.name, 'w') + f.write(self.buffer) + f.close() + # !!! memory FS will work someday + #self.file = wxMemoryFSHandler_AddFile(self.name, self.buffer) + +class XML_Tree(wxTreeCtrl): + def __init__(self, parent, id): + wxTreeCtrl.__init__(self, parent, id) + self.SetBackgroundColour(wxColour(224, 248, 224)) + EVT_TREE_SEL_CHANGED(self, self.GetId(), self.OnSelChanged) + EVT_TREE_ITEM_ACTIVATED(self, self.GetId(), self.OnItemActivated) + EVT_RIGHT_DOWN(self, self.OnRightDown) + self.needUpdate = false + self.pendingHighLight = None + self.ctrl = false + self.dom = None + # Create image list + il = wxImageList(16, 16, true) + xxxPanel.image = il.AddIcon( wxIconFromXPMData(images.getTreePanelData()) ) + xxxDialog.image = il.AddIcon( wxIconFromXPMData(images.getTreeDialogData()) ) + xxxFrame.image = il.AddIcon( wxIconFromXPMData(images.getTreeFrameData()) ) + xxxMenuBar.image = il.AddIcon( wxIconFromXPMData(images.getTreeMenuBarData()) ) + xxxMenu.image = il.AddIcon( wxIconFromXPMData(images.getTreeMenuData()) ) + xxxSizer.imageH = il.AddIcon( wxIconFromXPMData(images.getTreeSizerHData()) ) + xxxSizer.imageV = il.AddIcon( wxIconFromXPMData(images.getTreeSizerVData()) ) + xxxStaticBoxSizer.imageH = il.AddIcon( wxIconFromXPMData(images.getTreeStaticBoxSizerHData()) ) + xxxStaticBoxSizer.imageV = il.AddIcon( wxIconFromXPMData(images.getTreeStaticBoxSizerVData()) ) + xxxGridSizer.image = il.AddIcon( wxIconFromXPMData(images.getTreeSizerGridData()) ) + xxxFlexGridSizer.image = il.AddIcon( wxIconFromXPMData(images.getTreeSizerFlexGridData()) ) + self.il = il + self.SetImageList(il) + + # !!! temporary solution for GetOldItem problem + def Unselect(self): + self.selection = wxTreeItemId() + wxTreeCtrl.Unselect(self) + def GetSelection(self): + return self.selection + + def ExpandAll(self, item): + if self.ItemHasChildren(item): + self.Expand(item) + i, cookie = self.GetFirstChild(item, 0) + children = [] + while i.IsOk(): + children.append(i) + i, cookie = self.GetNextChild(item, cookie) + for i in children: + self.ExpandAll(i) + + def SetData(self, dom): + self.dom = dom + # Find 'resource' child, add it's children + self.mainNode = dom.getElementsByTagName('resource')[0] + nodes = self.mainNode.childNodes[:] + for node in nodes: + if IsObject(node): + self.AddNode(self.GetRootItem(), None, node) + else: + self.mainNode.removeChild(node) + node.unlink() + self.Unselect() + + # Add tree item for given parent item if node is DOM element node with + # 'object' tag. xxxParent is parent xxx object + def AddNode(self, itemParent, xxxParent, node): + # Set item data to current node + xxx = MakeXXXFromDOM(xxxParent, node) + treeObj = xxx.treeObject() + # Append tree item + item = self.AppendItem(itemParent, treeObj.treeName(), + image=treeObj.treeImage(), + data=wxTreeItemData(xxx)) + # Try to find children objects + if treeObj.hasChildren: + nodes = treeObj.element.childNodes[:] + for n in nodes: + if IsObject(n): + self.AddNode(item, treeObj, n) + elif n.nodeType != minidom.Node.ELEMENT_NODE: + treeObj.element.removeChild(n) + n.unlink() + + + # Remove leaf of tree, return it's data object + def RemoveLeaf(self, leaf): + xxx = self.GetPyData(leaf) + node = xxx.element + parent = node.parentNode + parent.removeChild(node) + self.Delete(leaf) + # Update view? + #if testWin and self.GetItemAncestor(leaf) == testWin.item: + # if testWin.highLight: + # testWin.highLight.Remove() + # self.needUpdate = true + return node + + # Find position relative to the top-level window + def FindNodePos(self, item): + itemParent = self.GetItemParent(item) + if itemParent == self.GetRootItem(): return wxPoint(0, 0) + obj = self.FindNodeObject(item) + # Find first ancestor which is a wxWindow (not a sizer) + winParent = itemParent + while self.GetPyData(winParent).isSizer: + winParent = self.GetItemParent(winParent) + parentPos = self.FindNodePos(winParent) + return parentPos + obj.GetPosition() + + # Find window (or sizer) corresponding to a tree item. + def FindNodeObject(self, item): + itemParent = self.GetItemParent(item) + # If top-level, return testWin (or panel if wxFrame) + if itemParent == self.GetRootItem(): return testWin.panel + xxx = self.GetPyData(item).treeObject() + parentWin = self.FindNodeObject(itemParent) + # Top-level sizer? return window's sizer + if xxx.isSizer and isinstance(parentWin, wxWindowPtr): + return parentWin.GetSizer() + # Otherwise get parent's object and it's child + n = 0 # index of sibling + prev = self.GetPrevSibling(item) + while prev.IsOk(): + prev = self.GetPrevSibling(prev) + n += 1 + child = parentWin.GetChildren()[n] + # Return window or sizer for sizer items + if child.GetClassName() == 'wxSizerItem': + if child.IsWindow(): child = child.GetWindow() + elif child.IsSizer(): + child = child.GetSizer() + # Test for notebook sizers + if isinstance(child, wxNotebookSizerPtr): + child = child.GetNotebook() + return child + + def OnSelChanged(self, evt): + # Apply changes + # !!! problem with wxGTK + #oldItem = evt.GetOldItem() + oldItem = self.selection + if oldItem.IsOk(): + xxx = self.GetPyData(oldItem) + # If some data was modified, apply changes + if xxx: + if panel.IsModified(): + self.Apply(xxx, oldItem) + #if conf.autoRefresh: + if testWin and testWin.highLight: + testWin.highLight.Remove() + self.needUpdate = true + # Generate HTML view + item = evt.GetItem() + self.selection = item # !!! fix + xxx = self.GetPyData(item) + html = htmlHeader + # List of parameters tuples (parameter, isDefined) + if not xxx: # root item + html += 'this item has no properties' + htmlFooter + panel.SetPage(html) + if testWin and testWin.highLight: + testWin.highLight.Remove() + return + # Normal nodes + ClearRegister() # empty register + html += xxx.generateHtml() + html += htmlFooter + panel.SetPage(html) + # Set values, checkboxes to false, disable defaults + if xxx.hasChild: prefix = '_' + else: prefix = '' + for param in xxx.allParams: + if xxx.params.has_key(param): + if param == 'content': + value = [] + for text in xxx.params[param]: + value.append(str(text.data)) # convert from unicode + else: + value = xxx.params[param].data + GetRegistered(prefix + param).SetValue(value) + if not param in xxx.required: + panel.FindWindowByName('check_' + param).SetValue(true) + else: + GetRegistered(prefix + param).Enable(false) + # Same for the child of sizeritem + if xxx.hasChild: + xxx = xxx.child + for param in xxx.allParams: + if xxx.params.has_key(param): + if param == 'content': + value = [] + for text in xxx.params[param]: + value.append(str(text.data)) # convert from unicode + else: + value = xxx.params[param].data + GetRegistered(param).SetValue(value) + if not param in xxx.required: + panel.FindWindowByName('check_' + param).SetValue(true) + else: + GetRegistered(param).Enable(false) + # Clear flag + panel.SetModified(false) + # Hightlighting is done in OnIdle + tree.pendingHighLight = item + + # Find top-level parent + def GetItemAncestor(self, item): + while self.GetItemParent(item) != self.GetRootItem(): + item = self.GetItemParent(item) + return item + + # Highlight selected item + def HighLight(self, item): + self.pendingHighLight = None + if not testWin or self.GetPyData(testWin.item).className \ + not in ['wxDialog', 'wxPanel', 'wxFrame']: + return + # Top-level does not have highlight + if item == testWin.item: + if testWin.highLight: testWin.highLight.Remove() + return + # If a control from another window is selected, remove highlight + if self.GetItemAncestor(item) != testWin.item and testWin.highLight: + testWin.highLight.Remove() + return + # Get window/sizer object + obj, pos = self.FindNodeObject(item), self.FindNodePos(item) + size = obj.GetSize() + # For notebook, select item's page. + # For children of page, nothing happens (too much work) + if isinstance(self.GetPyData(item).parent, xxxNotebook): + notebook = self.FindNodeObject(self.GetItemParent(item)) + # Find position + n = 0 + prev = self.GetPrevSibling(item) + while prev.IsOk(): + n += 1 + prev = self.GetPrevSibling(prev) + notebook.SetSelection(n) + # Highlight + try: # finally I use exceptions + testWin.highLight.Replace(pos, size) + except AttributeError: + testWin.highLight = HightLightBox(pos, size) + testWin.highLight.item = item + + # Double-click + def OnItemActivated(self, evt): + item = evt.GetItem() + xxx = self.GetPyData(item) + if not xxx: return # if root selected, do nothing + if panel.IsModified(): + self.Apply(xxx, item) # apply changes + self.CreateTestWin(item) + + # (re)create test window + def CreateTestWin(self, node): + global testWin + # Create a window with this resource + xxx = self.GetPyData(node).treeObject() + if not xxx: return # if root selected, do nothing + # If noname element, display error + if not xxx.hasName or not xxx.name: + wxLogError("Can't display a noname element") + return + # Close old window, remember where it was + highLight = None + if testWin: + pos = testWin.GetPosition() + if node == testWin.item: + # Remember highlight if same top-level window + if testWin.highLight: + highLight = testWin.highLight.item + # !!! if 0 is removed, refresh is broken (notebook not deleted?) + if 0 and xxx.className == 'wxPanel': + if testWin.highLight: + testWin.pendingHighLight = highLight + testWin.highLight.Remove() + testWin.panel.Destroy() + testWin.panel = None + else: + testWin.Destroy() + testWin = None + else: + testWin.Destroy() + testWin = None + else: + pos = testWinPos + # Save in temporary file before activating + memFile = MemoryFile(tempfile.mktemp('xrc')) + #memFile = MemoryFile('core.xrc') # to write debug file + # Create partial XML file - faster for big files + + dom = minidom.Document() + mainNode = dom.createElement('resource') + dom.appendChild(mainNode) + + # Remove temporarily from old parent + elem = xxx.element + parent = elem.parentNode + next = elem.nextSibling + parent.replaceChild(self.dummyNode, elem) + # Append to new DOM, write it + mainNode.appendChild(elem) + dom.writexml(memFile) + # Put back in place + mainNode.removeChild(elem) + dom.unlink() + parent.replaceChild(elem, self.dummyNode) + + memFile.close() # write to wxMemoryFS + res = wxXmlResource('') + res.Load(memFile.name) + if xxx.className == 'wxFrame': + # Create new frame + testWin = wxPreFrame() + res.LoadFrame(testWin, frame, xxx.name) + testWin.panel = testWin + testWin.SetPosition(pos) + testWin.Show(true) + elif xxx.className == 'wxPanel': + # Create new frame + if not testWin: + testWin = wxFrame(frame, -1, 'Panel: ' + xxx.name, pos=pos) + testWin.panel = res.LoadPanel(testWin, xxx.name) + testWin.SetSize(testWin.panel.GetSize()) + testWin.Show(true) + elif xxx.className == 'wxDialog': + # Create new frame + testWin = res.LoadDialog(None, xxx.name) + testWin.panel = testWin + testWin.SetPosition(pos) + testWin.Show(true) + elif xxx.className == 'wxMenuBar': + testWin = wxFrame(frame, -1, 'MenuBar: ' + xxx.name, pos=pos) + # Set status bar to display help + testWin.CreateStatusBar() + testWin.menuBar = res.LoadMenuBar(xxx.name) + testWin.SetMenuBar(testWin.menuBar) + testWin.Show(true) + else: + wxLogMessage('No view for this element yet') + return + os.unlink(memFile.name) # remove tmp file + testWin.item = node + testWin.Connect(testWin.GetId(), -1, wxEVT_CLOSE_WINDOW, self.OnCloseTestWin) + testWin.highLight = None + if highLight and not tree.pendingHighLight: + self.HighLight(highLight) + + def OnCloseTestWin(self, evt): + global testWin, testWinPos + testWinPos = testWin.GetPosition() + testWin.Destroy() + testWin = None + evt.Skip() + + # True if next item should be inserted after current (vs. appended to it) + def NeedInsert(self, item): + xxx = self.GetPyData(item) + if not xxx: return false # root item + if self.ctrl: return true # if Ctrl pressed, always insert + if xxx.hasChildren and not self.ItemHasChildren(item): + return false + return not (self.IsExpanded(item) and self.ItemHasChildren(item)) + + # Pull-down + def OnRightDown(self, evt): + # Setup menu + pullDownMenu.menu = wxMenu() + item = self.GetSelection() + if not item.IsOk(): + pullDownMenu.menu.Append(pullDownMenu.ID_EXPAND, 'Expand', 'Expand tree') + else: + self.ctrl = evt.ControlDown() # save Ctrl state + m = wxMenu() # create menu + if item != self.GetRootItem(): needInsert = self.NeedInsert(item) + if item == self.GetRootItem() or \ + self.GetItemParent(item) == self.GetRootItem() and needInsert: + m.Append(pullDownMenu.ID_NEW_PANEL, 'Panel', 'Create panel') + m.Append(pullDownMenu.ID_NEW_DIALOG, 'Dialog', 'Create dialog') + m.Append(pullDownMenu.ID_NEW_FRAME, 'Frame', 'Create frame') + m.AppendSeparator() + m.Append(pullDownMenu.ID_NEW_MENU_BAR, 'MenuBar', 'Create menu bar') + m.Append(pullDownMenu.ID_NEW_MENU, 'Menu', 'Create menu') + else: + xxx = self.GetPyData(item) + if xxx.__class__ == xxxMenuBar: + m.Append(pullDownMenu.ID_NEW_MENU, 'Menu', 'Create menu') + elif xxx.__class__ in [xxxMenu, xxxMenuItem]: + SetMenu(m, pullDownMenu.menuControls) + else: + SetMenu(m, pullDownMenu.controls) + if not (xxx.isSizer or \ + xxx.parent and xxx.parent.isSizer): + m.Enable(pullDownMenu.ID_NEW_SPACER, false) + # Select correct label for create menu + if item == self.GetRootItem(): + pullDownMenu.menu.AppendMenu(wxNewId(), 'Create', m, 'Create top-level object') + else: + if not needInsert: + pullDownMenu.menu.AppendMenu(wxNewId(), 'Create child', m, + 'Create child object') + else: + pullDownMenu.menu.AppendMenu(wxNewId(), 'Create Sibling', m, + 'Create sibling of selected object') + pullDownMenu.menu.AppendSeparator() + pullDownMenu.menu.Append(wxID_CUT, 'Cut', 'Cut to the clipboard') + pullDownMenu.menu.Append(wxID_COPY, 'Copy', 'Copy to the clipboard') + pullDownMenu.menu.Append(wxID_PASTE, 'Paste', 'Paste from the clipboard') + pullDownMenu.menu.Append(pullDownMenu.ID_DELETE, + 'Delete', 'Delete object') + if item.IsOk() and self.ItemHasChildren(item): + pullDownMenu.menu.AppendSeparator() + pullDownMenu.menu.Append(pullDownMenu.ID_EXPAND, 'Expand', 'Expand subtree') + self.PopupMenu(pullDownMenu.menu, evt.GetPosition()) + pullDownMenu.menu.Destroy() + pullDownMenu.menu = None + + + # Clear tree + def Clear(self): + self.DeleteAllItems() + # Add minimal structure + root = self.AddRoot('XML tree') + self.Unselect() + if self.dom: self.dom.unlink() + self.dom = minidom.Document() + self.dummyNode = self.dom.createComment('dummy node') + # Create main node + self.mainNode = self.dom.createElement('resource') + self.dom.appendChild(self.mainNode) + + # Apply changes + def Apply(self, xxx, item): + if not xxx: return + # !!! Save undo info + if xxx.undo: xxx.undo.unlink() + xxx.undo = xxx.element.cloneNode(false) + if xxx.hasName: + name = GetRegistered('name').GetValue() + if xxx.name != name: + xxx.name = name + xxx.element.setAttribute('name', name) + self.SetItemText(item, xxx.treeName()) + if xxx.hasChild: prefix = '_' + else: prefix = '' + for param, data in xxx.params.items(): + value = GetRegistered(prefix + param).GetValue() + if param == 'content': + # If number if items is not the same, recreate children + if len(value) != len(data): + elem = xxx.element.getElementsByTagName('content')[0] + for n in elem.childNodes: + elem.removeChild(n) + data = [] + for str in value: + itemElem = tree.dom.createElement('item') + itemText = tree.dom.createTextNode(str) + itemElem.appendChild(itemText) + elem.appendChild(itemElem) + data.append(itemText) + xxx.params[param] = data + else: + for i in range(len(value)): + data[i].data = value[i] + else: + data.data = value + if xxx.hasChild: + self.Apply(xxx.child, item) + else: + # Change tree icon for sizers + if isinstance(xxx, xxxBoxSizer): + self.SetItemImage(item, xxx.treeImage()) + # Set global modified state + frame.modified = true + +class Frame(wxFrame): + def __init__(self, size): + wxFrame.__init__(self, None, -1, '', size=size) + self.CreateStatusBar() + + # Make menus + menuBar = wxMenuBar() + + menu = wxMenu() + menu.Append(wxID_NEW, '&New\tCtrl-N', 'New file') + menu.Append(wxID_OPEN, '&Open...\tCtrl-O', 'Open XRC file') + menu.Append(wxID_SAVE, '&Save\tCtrl-S', 'Save XRC file') + menu.Append(wxID_SAVEAS, 'Save &As...', 'Save XRC file under different name') + menu.AppendSeparator() + menu.Append(wxID_EXIT, '&Quit\tCtrl-Q', 'Exit application') + menuBar.Append(menu, '&File') + + menu = wxMenu() + menu.Append(wxID_UNDO, '&Undo\tCtrl-Z', 'Undo') + menu.Append(wxID_REDO, '&Redo\tCtrl-R', 'Redo') + menu.AppendSeparator() + menu.Append(wxID_CUT, 'Cut\tCtrl-X', 'Cut to the clipboard') + menu.Append(wxID_COPY, '&Copy\tCtrl-C', 'Copy to the clipboard') + menu.Append(wxID_PASTE, '&Paste\tCtrl-V', 'Paste from the clipboard') + self.ID_DELETE = wxNewId() + menu.Append(self.ID_DELETE, '&Delete\tCtrl-D', 'Delete object') + menuBar.Append(menu, '&Edit') + + menu = wxMenu() + self.ID_REFRESH = wxNewId() + menu.Append(self.ID_REFRESH, '&Refresh\tCtrl-R', 'Refresh view') + self.ID_AUTO_REFRESH = wxNewId() + menu.Append(self.ID_AUTO_REFRESH, '&Auto-refresh\tCtrl-A', + 'Toggle auto-refresh mode', true) + menu.Check(self.ID_AUTO_REFRESH, conf.autoRefresh) + menuBar.Append(menu, '&View') + + menu = wxMenu() + menu.Append(wxID_ABOUT, 'About...', 'About XCRed') + if debug: + self.ID_DEBUG_CMD = wxNewId() + menu.Append(self.ID_DEBUG_CMD, 'CMD', 'Python command line') + EVT_MENU(self, self.ID_DEBUG_CMD, self.OnDebugCMD) + menuBar.Append(menu, '&Help') + + self.menuBar = menuBar + self.SetMenuBar(menuBar) + + # Create toolbar + tb = self.CreateToolBar()#wxTB_DOCKABLE | wxTB_FLAT) + tb.SetToolBitmapSize((24,23)) + tb.AddSimpleTool(wxID_NEW, images.getNewBitmap(), 'New', 'New file') + tb.AddSimpleTool(wxID_OPEN, images.getOpenBitmap(), 'Open', 'Open file') + tb.AddSimpleTool(wxID_SAVE, images.getSaveBitmap(), 'Save', 'Save file') + tb.AddSeparator() + tb.AddSimpleTool(wxID_CUT, images.getCutBitmap(), 'Cut', 'Cut') + tb.AddSimpleTool(wxID_COPY, images.getCopyBitmap(), 'Copy', 'Copy') + tb.AddSimpleTool(wxID_PASTE, images.getPasteBitmap(), 'Paste', 'Paste') + tb.AddSeparator() + tb.AddSimpleTool(self.ID_REFRESH, images.getRefreshBitmap(), + 'Refresh', 'Refresh view') + tb.AddSimpleTool(self.ID_AUTO_REFRESH, images.getAutoRefreshBitmap(), + 'Auto-refresh', 'Toggle auto-refresh mode', true) + tb.ToggleTool(self.ID_AUTO_REFRESH, conf.autoRefresh) + self.tb = tb + tb.Realize() + + # File + EVT_MENU(self, wxID_NEW, self.OnNew) + EVT_MENU(self, wxID_OPEN, self.OnOpen) + EVT_MENU(self, wxID_SAVE, self.OnSaveOrSaveAs) + EVT_MENU(self, wxID_SAVEAS, self.OnSaveOrSaveAs) + EVT_MENU(self, wxID_EXIT, self.OnExit) + # Edit + EVT_MENU(self, wxID_UNDO, self.OnUndo) + EVT_MENU(self, wxID_REDO, self.OnRedo) + EVT_MENU(self, wxID_CUT, self.OnCut) + EVT_MENU(self, wxID_COPY, self.OnCopy) + EVT_MENU(self, wxID_PASTE, self.OnPaste) + EVT_MENU(self, self.ID_DELETE, self.OnDelete) + # View + EVT_MENU(self, self.ID_REFRESH, self.OnRefresh) + EVT_MENU(self, self.ID_AUTO_REFRESH, self.OnAutoRefresh) + # Help + EVT_MENU(self, wxID_ABOUT, self.OnAbout) + + # Update events + EVT_UPDATE_UI(self, wxID_CUT, self.OnUpdateUI) + EVT_UPDATE_UI(self, wxID_COPY, self.OnUpdateUI) + EVT_UPDATE_UI(self, wxID_PASTE, self.OnUpdateUI) + EVT_UPDATE_UI(self, self.ID_DELETE, self.OnUpdateUI) + + # Build interface + splitter = wxSplitterWindow(self, -1) + # Create tree + global tree + tree = XML_Tree(splitter, -1) + sys.modules['xxx'].tree = tree + # Create panel for parameters + global panel + #panel = wxPanel(self, -1) + # Sizer for static box + #sizer = wxBoxSizer() + panel = Panel(splitter, -1) + sys.modules['params'].panel = panel + #sizer.Add(panel, 1, wxEXPAND) + #box = wxStaticBox(panel, -1, 'Parameters') + #boxSizer = wxStaticBoxSizer(box) + #boxSizer.Add(wxButton(panel, -1, 'BUTT ON')) + #sizer.Add(boxSizer, 1, wxEXPAND | wxALL, 10) + #panel.SetAutoLayout(true) + #panel.SetSizer(sizer) + # Set plitter windows + splitter.SplitVertically(tree, panel, 200) + #topSizer = wxBoxSizer() + #topSizer.Add(splitter, 1, wxEXPAND) + #self.SetAutoLayout(true) + #self.SetSizer(topSizer) + + # Init pull-down menu data + class MenuData: pass + global pullDownMenu + pullDownMenu = MenuData() + pullDownMenu.menu = None + pullDownMenu.ID_NEW_PANEL = wxNewId() + pullDownMenu.ID_NEW_DIALOG = wxNewId() + pullDownMenu.ID_NEW_FRAME = wxNewId() + pullDownMenu.ID_NEW_MENU_BAR = wxNewId() + pullDownMenu.ID_NEW_MENU = wxNewId() + + pullDownMenu.ID_NEW_STATIC_TEXT = wxNewId() + pullDownMenu.ID_NEW_TEXT_CTRL = wxNewId() + + pullDownMenu.ID_NEW_BUTTON = wxNewId() + pullDownMenu.ID_NEW_BITMAP_BUTTON = wxNewId() + pullDownMenu.ID_NEW_RADIO_BUTTON = wxNewId() + pullDownMenu.ID_NEW_SPIN_BUTTON = wxNewId() + + pullDownMenu.ID_NEW_STATIC_BOX = wxNewId() + pullDownMenu.ID_NEW_CHECK_BOX = wxNewId() + pullDownMenu.ID_NEW_RADIO_BOX = wxNewId() + pullDownMenu.ID_NEW_COMBO_BOX = wxNewId() + pullDownMenu.ID_NEW_LIST_BOX = wxNewId() + + pullDownMenu.ID_NEW_STATIC_LINE = wxNewId() + pullDownMenu.ID_NEW_CHOICE = wxNewId() + pullDownMenu.ID_NEW_SLIDER = wxNewId() + pullDownMenu.ID_NEW_GAUGE = wxNewId() + pullDownMenu.ID_NEW_SCROLL_BAR = wxNewId() + pullDownMenu.ID_NEW_TREE_CTRL = wxNewId() + pullDownMenu.ID_NEW_LIST_CTRL = wxNewId() + pullDownMenu.ID_NEW_CHECK_LIST = wxNewId() + pullDownMenu.ID_NEW_NOTEBOOK = wxNewId() + pullDownMenu.ID_NEW_HTML_WINDOW = wxNewId() + pullDownMenu.ID_NEW_CALENDAR = wxNewId() + + pullDownMenu.ID_NEW_BOX_SIZER = wxNewId() + pullDownMenu.ID_NEW_STATIC_BOX_SIZER = wxNewId() + pullDownMenu.ID_NEW_GRID_SIZER = wxNewId() + pullDownMenu.ID_NEW_FLEX_GRID_SIZER = wxNewId() + pullDownMenu.ID_NEW_SPACER = wxNewId() + pullDownMenu.ID_NEW_MENU = wxNewId() + pullDownMenu.ID_NEW_MENU_ITEM = wxNewId() + pullDownMenu.ID_NEW_SEPARATOR = wxNewId() + pullDownMenu.ID_NEW_LAST = wxNewId() + pullDownMenu.ID_DELETE = self.ID_DELETE + pullDownMenu.ID_EXPAND = wxNewId() + EVT_MENU_RANGE(self, pullDownMenu.ID_NEW_PANEL, + pullDownMenu.ID_NEW_LAST, self.OnCreate) + EVT_MENU(self, pullDownMenu.ID_EXPAND, self.OnExpand) + # We connect to tree, but process in frame + EVT_MENU_HIGHLIGHT_ALL(tree, self.OnPullDownHighlight) + # Mapping from IDs to element names + self.createMap = { + pullDownMenu.ID_NEW_PANEL: 'wxPanel', + pullDownMenu.ID_NEW_DIALOG: 'wxDialog', + pullDownMenu.ID_NEW_FRAME: 'wxFrame', + pullDownMenu.ID_NEW_MENU_BAR: 'wxMenuBar', + pullDownMenu.ID_NEW_MENU: 'wxMenu', + + pullDownMenu.ID_NEW_STATIC_TEXT: 'wxStaticText', + pullDownMenu.ID_NEW_TEXT_CTRL: 'wxTextCtrl', + + pullDownMenu.ID_NEW_BUTTON: 'wxButton', + pullDownMenu.ID_NEW_BITMAP_BUTTON: 'wxBitmapButton', + pullDownMenu.ID_NEW_RADIO_BUTTON: 'wxRadioButton', + pullDownMenu.ID_NEW_SPIN_BUTTON: 'wxSpinButton', + + pullDownMenu.ID_NEW_STATIC_BOX: 'wxStaticBox', + pullDownMenu.ID_NEW_CHECK_BOX: 'wxCheckBox', + pullDownMenu.ID_NEW_RADIO_BOX: 'wxRadioBox', + pullDownMenu.ID_NEW_COMBO_BOX: 'wxComboBox', + pullDownMenu.ID_NEW_LIST_BOX: 'wxListBox', + + pullDownMenu.ID_NEW_STATIC_LINE: 'wxStaticLine', + pullDownMenu.ID_NEW_CHOICE: 'wxChoice', + pullDownMenu.ID_NEW_SLIDER: 'wxSlider', + pullDownMenu.ID_NEW_GAUGE: 'wxGauge', + pullDownMenu.ID_NEW_SCROLL_BAR: 'wxScrollBar', + pullDownMenu.ID_NEW_TREE_CTRL: 'wxTreeCtrl', + pullDownMenu.ID_NEW_LIST_CTRL: 'wxListCtrl', + pullDownMenu.ID_NEW_CHECK_LIST: 'wxCheckList', + pullDownMenu.ID_NEW_NOTEBOOK: 'wxNotebook', + pullDownMenu.ID_NEW_HTML_WINDOW: 'wxHtmlWindow', + pullDownMenu.ID_NEW_CALENDAR: 'wxCalendar', + + pullDownMenu.ID_NEW_BOX_SIZER: 'wxBoxSizer', + pullDownMenu.ID_NEW_STATIC_BOX_SIZER: 'wxStaticBoxSizer', + pullDownMenu.ID_NEW_GRID_SIZER: 'wxGridSizer', + pullDownMenu.ID_NEW_FLEX_GRID_SIZER: 'wxFlexGridSizer', + pullDownMenu.ID_NEW_SPACER: 'spacer', + pullDownMenu.ID_NEW_MENU: 'wxMenu', + pullDownMenu.ID_NEW_MENU_ITEM: 'wxMenuItem', + pullDownMenu.ID_NEW_SEPARATOR: 'separator', + } + pullDownMenu.controls = [ + ['control', 'Various controls', + (pullDownMenu.ID_NEW_STATIC_TEXT, 'Label', 'Create static label'), + (pullDownMenu.ID_NEW_STATIC_LINE, 'Line', 'Create static line'), + (pullDownMenu.ID_NEW_TEXT_CTRL, 'TextBox', 'Create text box control'), + (pullDownMenu.ID_NEW_CHOICE, 'Choice', 'Create choice control'), + (pullDownMenu.ID_NEW_SLIDER, 'Slider', 'Create slider control'), + (pullDownMenu.ID_NEW_GAUGE, 'Gauge', 'Create gauge control'), + (pullDownMenu.ID_NEW_SCROLL_BAR, 'ScrollBar', 'Create scroll bar'), + (pullDownMenu.ID_NEW_TREE_CTRL, 'TreeCtrl', 'Create tree control'), + (pullDownMenu.ID_NEW_LIST_CTRL, 'ListCtrl', 'Create list control'), + (pullDownMenu.ID_NEW_CHECK_LIST, 'CheckList', 'Create check list control'), + (pullDownMenu.ID_NEW_HTML_WINDOW, 'HtmlWindow', 'Create HTML window'), + (pullDownMenu.ID_NEW_CALENDAR, 'Calendar', 'Create calendar control'), + (pullDownMenu.ID_NEW_PANEL, 'Panel', 'Create panel'), + (pullDownMenu.ID_NEW_NOTEBOOK, 'Notebook', 'Create notebook control'), + ], + ['button', 'Buttons', + (pullDownMenu.ID_NEW_BUTTON, 'Button', 'Create button'), + (pullDownMenu.ID_NEW_BITMAP_BUTTON, 'BitmapButton', 'Create bitmap button'), + (pullDownMenu.ID_NEW_RADIO_BUTTON, 'RadioButton', 'Create radio button'), + (pullDownMenu.ID_NEW_SPIN_BUTTON, 'SpinButton', 'Create spin button'), + ], + ['box', 'Boxes', + (pullDownMenu.ID_NEW_STATIC_BOX, 'StaticBox', 'Create static box'), + (pullDownMenu.ID_NEW_CHECK_BOX, 'CheckBox', 'Create check box'), + (pullDownMenu.ID_NEW_RADIO_BOX, 'RadioBox', 'Create radio box'), + (pullDownMenu.ID_NEW_COMBO_BOX, 'ComboBox', 'Create combo box'), + (pullDownMenu.ID_NEW_LIST_BOX, 'ListBox', 'Create list box'), + ], + ['sizer', 'Sizers', + (pullDownMenu.ID_NEW_BOX_SIZER, 'BoxSizer', 'Create box sizer'), + (pullDownMenu.ID_NEW_STATIC_BOX_SIZER, 'StaticBoxSizer', + 'Create static box sizer'), + (pullDownMenu.ID_NEW_GRID_SIZER, 'GridSizer', 'Create grid sizer'), + (pullDownMenu.ID_NEW_FLEX_GRID_SIZER, 'FlexGridSizer', + 'Create flexgrid sizer'), + (pullDownMenu.ID_NEW_SPACER, 'Spacer', 'Create spacer'), + ] + ] + pullDownMenu.menuControls = [ + (pullDownMenu.ID_NEW_MENU, 'Menu', 'Create menu'), + (pullDownMenu.ID_NEW_MENU_ITEM, 'MenuItem', 'Create menu item'), + (pullDownMenu.ID_NEW_SEPARATOR, 'Separator', 'Create separator'), + ] + + # Initialize + self.Clear() + + # Other events + EVT_IDLE(self, self.OnIdle) + EVT_CLOSE(self, self.OnCloseWindow) + + def OnNew(self, evt): + self.Clear() + + def OnOpen(self, evt): + if not self.AskSave(): return + dlg = wxFileDialog(self, 'Open', os.path.dirname(self.dataFile), + '', '*.xrc', wxOPEN | wxCHANGE_DIR) + if dlg.ShowModal() == wxID_OK: + path = dlg.GetPath() + self.SetStatusText('Loading...') + wxYield() + wxBeginBusyCursor() + self.Open(path) + wxEndBusyCursor() + self.SetStatusText('Ready') + dlg.Destroy() + + def OnSaveOrSaveAs(self, evt): + if evt.GetId() == wxID_SAVEAS or not self.dataFile: + if self.dataFile: defaultName = '' + else: defaultName = 'UNTITLED.xrc' + dlg = wxFileDialog(self, 'Save As', os.path.dirname(self.dataFile), + defaultName, '*.xrc', + wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR) + if dlg.ShowModal() == wxID_CANCEL: return + path = dlg.GetPath() + dlg.Destroy() + else: + path = self.dataFile + self.SetStatusText('Saving...') + wxYield() + wxBeginBusyCursor() + self.Save(path) + self.dataFile = path + wxEndBusyCursor() + self.SetStatusText('Ready') + + def OnExit(self, evt): + self.Close() + + def OnUndo(self, evt): + print '*** being implemented' + print self.lastOp, self.undo + if self.lastOp == 'DELETE': + parent, prev, elem = self.undo + if prev.IsOk(): + xxx = MakeXXXFromDOM(tree.GetPyData(parent).treeObject(), elem) + item = tree.InsertItem( parent, prev, xxx.treeObject().className, + data=wxTreeItemData(xxx) ) + + def OnRedo(self, evt): + print '*** being implemented' + + def OnCut(self, evt): + selected = tree.GetSelection() + # Undo info + self.lastOp = 'CUT' + self.undo = [tree.GetItemParent(selected), tree.GetPrevSibling(selected)] + # Delete testWin? + global testWin + if testWin: + # If deleting top-level item, delete testWin + if selected == testWin.item: + testWin.Destroy() + testWin = None + else: + # Remove highlight, update testWin + if tree.GetItemAncestor(selected) == testWin.item: + if testWin.highLight: testWin.highLight.Remove() + tree.needUpdate = true + self.clipboard = tree.RemoveLeaf(selected) + tree.pendingHighLight = None + tree.Unselect() + panel.Clear() + self.modified = true + + def OnCopy(self, evt): + selected = tree.GetSelection() + xxx = tree.GetPyData(selected) + self.clipboard = xxx.element.cloneNode(true) + + def OnPaste(self, evt): + selected = tree.GetSelection() + appendChild = not tree.NeedInsert(selected) + xxx = tree.GetPyData(selected) + if not appendChild: + # If has next item, insert, else append to parent + nextItem = tree.GetNextSibling(selected) + if nextItem.IsOk(): + # Insert before nextItem + parentLeaf = tree.GetItemParent(selected) + else: # last child: change selected to parent + appendChild = true + selected = tree.GetItemParent(selected) + # Expanded container (must have children) + elif tree.IsExpanded(selected) and tree.ItemHasChildren(selected): + appendChild = false + nextItem = tree.GetFirstChild(selected, 0)[0] + parentLeaf = selected + # Parent should be tree element or None + if appendChild: + parent = tree.GetPyData(selected) + else: + parent = tree.GetPyData(parentLeaf) + if parent and parent.hasChild: parent = parent.child + + # Create a copy of clipboard element + elem = self.clipboard.cloneNode(true) + # Tempopary xxx object to test things + xxx = MakeXXXFromDOM(parent, elem) + className = xxx.treeObject().className + # Check parent and child relationships + # Parent is sizer or notebook, child is of wrong class or + # parent is normal window, child is child container: detach child + isChildContainer = isinstance(xxx, xxxChildContainer) + if not parent and isChildContainer or \ + (parent.isSizer and not isinstance(xxx, xxxSizerItem)) or \ + (isinstance(parent, xxxNotebook) and not isinstance(xxx, xxxNotebookPage)) or \ + (not parent.isSizer and not isinstance(parent, xxxNotebook) and \ + isChildContainer): + if isChildContainer: + elem.removeChild(xxx.child.element) # detach child + elem.unlink() # delete child container + elem = xxx.child.element # replace + # This should help garbage collection (!!! maybe not needed?) + xxx.child.parent = None + xxx.child = None + if parent: + # Parent is sizer or notebook, child is not child container + if parent.isSizer and not isChildContainer and \ + not isinstance(xxx, xxxSpacer): + # Create sizer item element + sizerItemElem = MakeEmptyDOM('sizeritem') + sizerItemElem.appendChild(elem) + elem = sizerItemElem + elif isinstance(parent, xxxNotebook) and not isChildContainer: + pageElem = MakeEmptyDOM('notebookpage') + pageElem.appendChild(elem) + elem = pageElem + xxx = MakeXXXFromDOM(parent, elem) + # Figure out if we must append a new child or sibling + if appendChild: + if parent: node = parent.element + else: node = tree.mainNode + node.appendChild(elem) + newItem = tree.AppendItem(selected, xxx.treeName(), image=xxx.treeImage(), + data=wxTreeItemData(xxx)) + else: + node = tree.GetPyData(nextItem).element + if parent: + elemParent = parent.element + else: + elemParent = tree.mainNode + elemParent.insertBefore(elem, node) + # Inserting before is difficult, se we insert after or first child + newItem = tree.InsertItem(parentLeaf, selected, xxx.treeName(), + image=xxx.treeImage(), data=wxTreeItemData(xxx)) + # Add children items + if xxx.hasChildren: + treeObj = xxx.treeObject() + for n in treeObj.element.childNodes: + if IsObject(n): + tree.AddNode(newItem, treeObj, n) + # Scroll to show new item + tree.EnsureVisible(newItem) + tree.SelectItem(newItem) + if not tree.IsVisible(newItem): + tree.ScrollTo(newItem) + tree.Refresh() + # Update view? + if testWin and tree.GetItemAncestor(newItem) == testWin.item: + if conf.autoRefresh: + tree.needUpdate = true + tree.pendingHighLight = newItem + else: + tree.pendingHighLight = None + self.modified = true + + def OnDelete(self, evt): + selected = tree.GetSelection() + # Undo info + self.lastOp = 'DELETE' + self.undo = [tree.GetItemParent(selected), tree.GetPrevSibling(selected)] + # Delete testWin? + global testWin + if testWin: + # If deleting top-level item, delete testWin + if selected == testWin.item: + testWin.Destroy() + testWin = None + else: + # Remove highlight, update testWin + if tree.GetItemAncestor(selected) == testWin.item: + if testWin.highLight: testWin.highLight.Remove() + tree.needUpdate = true + xnode = tree.RemoveLeaf(selected) + self.undo.append(xnode.cloneNode(true)) + xnode.unlink() + tree.pendingHighLight = None + tree.Unselect() + panel.Clear() + self.modified = true + + def OnRefresh(self, evt): + # If modified, apply first + selection = tree.GetSelection() + if selection.IsOk(): + xxx = tree.GetPyData(selection) + if xxx and panel.IsModified(): + tree.Apply(xxx, selection) + if testWin: + # (re)create + tree.CreateTestWin(testWin.item) + tree.needUpdate = false + + def OnAutoRefresh(self, evt): + conf.autoRefresh = evt.IsChecked() + self.menuBar.Check(self.ID_AUTO_REFRESH, conf.autoRefresh) + self.tb.ToggleTool(self.ID_AUTO_REFRESH, conf.autoRefresh) + + def OnAbout(self, evt): + dlg = wxMessageDialog(self, '%s %s\n\nRoman Rolinsky ' % \ + (progname, version), + 'About %s' % progname, wxOK | wxCENTRE) + dlg.ShowModal() + dlg.Destroy() + + # Simple emulation of python command line + def OnDebugCMD(self, evt): + while 1: + try: + exec raw_input('C:\> ') + except EOFError: + print '^D' + break + except: + (etype, value, tb) =sys.exc_info() + tblist =traceback.extract_tb(tb)[1:] + msg =string.join(traceback.format_exception_only(etype, value) + +traceback.format_list(tblist)) + print msg + + def OnCreate(self, evt): + selected = tree.GetSelection() + appendChild = not tree.NeedInsert(selected) + xxx = tree.GetPyData(selected) + if not appendChild: + # If has next item, insert, else append to parent + nextItem = tree.GetNextSibling(selected) + if nextItem.IsOk(): + # Insert before nextItem + parentLeaf = tree.GetItemParent(selected) + else: # last child: change selected to parent + appendChild = true + selected = tree.GetItemParent(selected) + # Expanded container (must have children) + elif tree.IsExpanded(selected) and tree.ItemHasChildren(selected): + appendChild = false + nextItem = tree.GetFirstChild(selected, 0)[0] + parentLeaf = selected + # Parent should be tree element or None + if appendChild: + parent = tree.GetPyData(selected) + else: + parent = tree.GetPyData(parentLeaf) + if parent and parent.hasChild: parent = parent.child + + # Create element + className = self.createMap[evt.GetId()] + xxx = MakeEmptyXXX(parent, className) + # Figure out if we must append a new child or sibling + elem = xxx.element + if appendChild: + if parent: node = parent.element + else: node = tree.mainNode + # Insert newline for debug purposes + node.appendChild(tree.dom.createTextNode('\n')) + node.appendChild(elem) + newItem = tree.AppendItem(selected, xxx.treeName(), image=xxx.treeImage(), + data=wxTreeItemData(xxx)) + else: + node = tree.GetPyData(nextItem).element + if parent: + elemParent = parent.element + else: + elemParent = tree.mainNode + elemParent.insertBefore(tree.dom.createTextNode('\n'), node) + elemParent.insertBefore(elem, node) + # Inserting before is difficult, se we insert after or first child + newItem = tree.InsertItem(parentLeaf, selected, + xxx.treeName(), image=xxx.treeImage(), + data=wxTreeItemData(xxx)) + tree.EnsureVisible(newItem) + tree.SelectItem(newItem) + if not tree.IsVisible(newItem): + tree.ScrollTo(newItem) + tree.Refresh() + # Update view? + if testWin and tree.GetItemAncestor(newItem) == testWin.item: + if conf.autoRefresh: + tree.needUpdate = true + tree.pendingHighLight = newItem + else: + tree.pendingHighLight = None + + def OnExpand(self, evt): + if tree.GetSelection().IsOk(): + tree.ExpandAll(tree.GetSelection()) + else: + tree.ExpandAll(tree.GetRootItem()) + + def OnPullDownHighlight(self, evt): + menuId = evt.GetMenuId() + help = '' + if menuId != -1: help = pullDownMenu.GetHelpString(menuId) + self.SetStatusText(help) + + def OnUpdateUI(self, evt): + if evt.GetId() in [wxID_CUT, wxID_COPY, self.ID_DELETE]: + enable = tree.GetSelection().IsOk() and \ + tree.GetSelection() != tree.GetRootItem() + evt.Enable(enable) + elif evt.GetId() == wxID_PASTE: + enable = self.clipboard != None + evt.Enable(enable) + + def OnIdle(self, evt): + if tree.needUpdate: + if conf.autoRefresh: + if testWin: + # (re)create + tree.CreateTestWin(testWin.item) + tree.needUpdate = false + elif tree.pendingHighLight: + tree.HighLight(tree.pendingHighLight) + evt.Skip() + + def OnCloseWindow(self, evt): + if not self.AskSave(): return + if testWin: testWin.Destroy() + conf.width, conf.height = self.GetSize() + evt.Skip() + + def Clear(self): + self.dataFile = '' + self.clipboard = None + self.modified = false + panel.SetModified(false) + panel.Clear() + tree.Clear() + global testWin + if testWin: + testWin.Destroy() + testWin = None + self.SetTitle(progname) + + def Open(self, path): + # Try to read the file + try: + open(path) + self.Clear() + # Build wx tree + dom = minidom.parse(path) + tree.SetData(dom) + self.dataFile = path + self.SetTitle(progname + ': ' + os.path.basename(path)) + except: + wxLogError('Error reading file: ' + path) + + def Save(self, path): + try: + memFile = MemoryFile(path) + tree.dom.writexml(memFile) + memFile.close() + self.modified = false + panel.SetModified(false) + except: + wxLogError('Error writing file: ' + path) + + def AskSave(self): + if not (self.modified or panel.IsModified()): return true + flags = wxICON_EXCLAMATION | wxYES_NO | wxCANCEL | wxCENTRE + dlg = wxMessageDialog( self, 'File is modified. Save before exit?', + 'Save before too late?', flags ) + say = dlg.ShowModal() + dlg.Destroy() + if say == wxID_YES: + self.OnSaveOrSaveAs(wxCommandEvent(wxID_SAVE)) + # If save was successful, modified flag is unset + if not self.modified: return true + elif say == wxID_NO: + self.modified = false + panel.SetModified(false) + return true + return false + +class App(wxApp): + def OnInit(self): + self.SetAppName("xrced") + # Settings + global conf + # !!! wxConfigBase_Get doesn't seem to work + conf = wxConfig(style=wxCONFIG_USE_LOCAL_FILE) + conf.autoRefresh = conf.ReadInt('autorefresh', true) + size = conf.ReadInt('width', 800), conf.ReadInt('height', 600) + # Add handlers + wxFileSystem_AddHandler(wxMemoryFSHandler()) + wxInitAllImageHandlers() + # Create main frame + global frame + frame = self.frame = Frame(size) + self.frame.Show(true) + # Load resources from XRC file (!!! should be transformed to .py later) + sys.modules['params'].frame = frame + frame.res = wxXmlResource('') + frame.res.Load(os.path.join(sys.path[0], 'xrced.xrc')) + return true + + def OnExit(self): + # Write config + wc = wxConfigBase_Get() + wc.WriteInt('autorefresh', conf.autoRefresh) + wc.WriteInt('width', conf.width) + wc.WriteInt('height', conf.height) + wc.Flush() + +def main(): + app = App() + app.MainLoop() + app.OnExit() + +if __name__ == '__main__': + main() diff --git a/wxPython/tools/XRCed/xrced.xrc b/wxPython/tools/XRCed/xrced.xrc new file mode 100644 index 0000000000..f675f87bb2 --- /dev/null +++ b/wxPython/tools/XRCed/xrced.xrc @@ -0,0 +1,89 @@ + + + +Content +250,300 + +wxVERTICAL + + + + +wxHORIZONTAL + + + + + + +wxTOP|wxBOTTOM|wxLEFT|wxEXPAND +5 + + + +wxVERTICAL + + + + +wxBOTTOM +5 + + + + + + + + + + + + + +wxBOTTOM +5 + + + + + + + +wxALL|wxEXPAND +5 + + + +wxEXPAND + + + + + +wxEXPAND + + + +wxHORIZONTAL + + + +1 + +wxRIGHT +10 + + + + + + + + +wxALL|wxALIGN_CENTRE_HORIZONTAL +10 + + + + \ No newline at end of file diff --git a/wxPython/tools/XRCed/xxx.py b/wxPython/tools/XRCed/xxx.py new file mode 100644 index 0000000000..0459af1a2f --- /dev/null +++ b/wxPython/tools/XRCed/xxx.py @@ -0,0 +1,507 @@ +# Name: xxx.py (xxx is easy to distinguish from 'wx' :) ) +# Purpose: XML interface classes +# Author: Roman Rolinsky +# Created: 22.08.2001 + +from wxPython.wx import * +from wxPython.xrc import * +from xml.dom import minidom +import wxPython.lib.wxpTag + +from params import * + +# Classes to interface DOM objects +class xxxObject: + # Param ids for controls + ID_CHECK_PARAMS = wxNewId() + ID_TEXT_PARAMS = wxNewId() + # Default behavior + hasChildren = false # has children elements? + hasName = true # has name attribute? + isSizer = hasChild = false + # Required paremeters: none by default + required = [] + # Default parameters with default values + default = {} + # Parameter types + paramDict = {} + # Additional styles + styles = [] + # Tree icon index + image = -1 + # Construct a new xxx object from DOM element + # parent is parent xxx object (or None if none), element is DOM element object + def __init__(self, parent, element): + self.parent = parent + self.element = element + self.undo = None + # Get attributes + self.className = element.getAttribute('class') + if self.hasName: self.name = element.getAttribute('name') + # Set parameters (text element children) + self.params = {} + nodes = element.childNodes[:] + for node in nodes: + if node.nodeType == minidom.Node.ELEMENT_NODE: + if node.tagName == 'object': + continue # do nothing for object children here + if not node.tagName in self.allParams: + print 'WARNING: unknown parameter for %s: %s' % \ + (self.className, node.tagName) + if node.tagName == 'content': # has items + # Param value is a list of text nodes + l = [] + nodes = node.childNodes[:] + for n in nodes: + if n.nodeType == minidom.Node.ELEMENT_NODE: + assert n.tagName == 'item', 'bad content content' + if not n.hasChildNodes(): + # If does not have child nodes, create empty text node + text = tree.dom.createTextNode('') + node.appendChild(text) + else: + # !!! normalize? + text = n.childNodes[0] # first child must be text node + assert text.nodeType == minidom.Node.TEXT_NODE + l.append(text) + else: + node.removeChild(n) + n.unlink() + self.params[node.tagName] = l + else: # simple parameter + if not node.hasChildNodes(): + # If does not have child nodes, create empty text node + text = tree.dom.createTextNode('') + node.appendChild(text) + else: + text = node.childNodes[0] # first child must be text node + assert text.nodeType == minidom.Node.TEXT_NODE + self.params[node.tagName] = text + else: + # Remove all other nodes + element.removeChild(node) + node.unlink() + + # Generate HTML + def generateHtml(self, prefix=''): + SetCurrentXXX(self) + html = '' % self.className + # Has id (name) attribute + if self.hasName: + html += """\ +""" % (self.ID_TEXT_PARAMS, self.name) + html += '
\ +%s + + + + +

' + html += '\n' + # Add required parameters + for param in self.allParams: + # Add checkbox or just text + if param in self.required: + html += '' % param + else: # optional parameter + html += """\ + +""" % (self.ID_CHECK_PARAMS, param, param + ' ') + # Add value part + if self.params.has_key(param): + if param == 'content': + l = [] + for text in self.params[param]: + l.append(str(text.data)) # convert from unicode + value = str(l) + else: + value = "('" + self.params[param].data + "')" + else: + value = "('')" + # Get parameter type + try: + # Local or overriden type + typeClass = self.paramDict[param].__name__ + except KeyError: + try: + # Standart type + typeClass = paramDict[param].__name__ + except KeyError: + # Default + typeClass = 'ParamText' + html += """\ + +""" % (typeClass, self.ID_TEXT_PARAMS, + prefix + param, value, prefix + param) + html += '
%s:
+ + + + +%s: + + + + +
\n' + return html + # Returns real tree object + def treeObject(self): + if self.hasChild: return self.child + return self + # Returns tree image index + def treeImage(self): + if self.hasChild: return self.child.treeImage() + return self.image + # Class name plus wx name + def treeName(self): + if self.hasChild: return self.child.treeName() + if self.hasName and self.name: return self.className + ' "' + self.name + '"' + return self.className + +################################################################################ + +class xxxContainer(xxxObject): + hasChildren = true + +################################################################################ +# Top-level windwos + +class xxxPanel(xxxContainer): + allParams = ['pos', 'size', 'style'] + +class xxxDialog(xxxContainer): + allParams = ['title', 'pos', 'size', 'style'] + required = ['title'] + styles = ['wxDIALOG_MODAL', 'wxCAPTION', 'wxDEFAULT_DIALOG_STYLE', + 'wxRESIZE_BORDER', 'wxSYSTEM_MENU', 'wxTHICK_FRAME', 'wxSTAY_ON_TOP'] + +class xxxFrame(xxxContainer): + allParams = ['title', 'centered', 'pos', 'size', 'style'] + paramDict = {'centered': ParamBool} + required = ['title'] + styles = ['wxDEFAULT_FRAME_STYLE', 'wxICONIZE', 'wxCAPTION', 'wxMINIMIZE', + 'wxICONIZE', 'wxMINIMIZE_BOX', 'wxMAXIMIZE', 'wxMAXIMIZE_BOX', + 'wxSTAY_ON_TOP', 'wxSYSTEM_MENU', 'wxRESIZE_BORDER', + 'wxFRAME_FLOAT_ON_PARENT', 'wxFRAME_TOOL_WINDOW'] + +################################################################################ +# Controls + +class xxxStaticText(xxxObject): + allParams = ['label', 'pos', 'size', 'style'] + required = ['label'] + styles = ['wxALIGN_LEFT', 'wxALIGN_RIGHT', 'wxALIGN_CENTRE', 'wxST_NO_AUTORESIZE'] + +class xxxStaticLine(xxxObject): + allParams = ['pos', 'size', 'style'] + styles = ['wxLI_HORIZONTAL', 'wxLI_VERTICAL'] + +class xxxTextCtrl(xxxObject): + allParams = ['value', 'pos', 'size', 'style'] + styles = ['wxTE_PROCESS_ENTER', 'wxTE_PROCESS_TAB', 'wxTE_MULTILINE', + 'wxTE_PASSWORD', 'wxTE_READONLY'] + +class xxxChoice(xxxObject): + allParams = ['content', 'selection', 'pos', 'size', 'style'] + required = ['content'] + +class xxxSlider(xxxObject): + allParams = ['value', 'min', 'max', 'pos', 'size', 'style', + 'tickfreq', 'pagesize', 'linesize', 'thumb', 'tick', + 'selmin', 'selmax'] + paramDict = {'value': ParamInt, 'tickfreq': ParamInt, 'pagesize': ParamInt, + 'linesize': ParamInt, 'thumb': ParamInt, 'thumb': ParamInt, + 'tick': ParamInt, 'selmin': ParamInt, 'selmax': ParamInt} + required = ['value', 'min', 'max'] + styles = ['wxSL_HORIZONTAL', 'wxSL_VERTICAL', 'wxSL_AUTOTICKS', 'wxSL_LABELS', + 'wxSL_LEFT', 'wxSL_RIGHT', 'wxSL_TOP', 'wxSL_SELRANGE'] + +class xxxGauge(xxxObject): + allParams = ['range', 'pos', 'size', 'style', 'value', 'shadow', 'bezel'] + paramDict = {'range': ParamInt, 'value': ParamInt, + 'shadow': ParamInt, 'bezel': ParamInt} + styles = ['wxGA_HORIZONTAL', 'wxGA_VERTICAL', 'wxGA_PROGRESSBAR', 'wxGA_SMOOTH'] + +class xxxScrollBar(xxxObject): + allParams = ['pos', 'size', 'style', 'value', 'thumbsize', 'range', 'pagesize'] + paramDict = {'value': ParamInt, 'range': ParamInt, 'thumbsize': ParamInt, + 'pagesize': ParamInt} + styles = ['wxSB_HORIZONTAL', 'wxSB_VERTICAL'] + +class xxxListCtrl(xxxObject): + allParams = ['pos', 'size', 'style'] + styles = ['wxLC_LIST', 'wxLC_REPORT', 'wxLC_ICON', 'wxLC_SMALL_ICON', + 'wxLC_ALIGN_TOP', 'wxLC_ALIGN_LEFT', 'wxLC_AUTOARRANGE', + 'wxLC_USER_TEXT', 'wxLC_EDIT_LABELS', 'wxLC_NO_HEADER', + 'wxLC_SINGLE_SEL', 'wxLC_SORT_ASCENDING', 'wxLC_SORT_DESCENDING'] + +# !!! temporary +xxxCheckList = xxxListCtrl + +class xxxTreeCtrl(xxxObject): + allParams = ['pos', 'size', 'style'] + styles = ['wxTR_HAS_BUTTONS', 'wxTR_NO_LINES', 'wxTR_LINES_AT_ROOT', + 'wxTR_EDIT_LABELS', 'wxTR_MULTIPLE'] + +class xxxHtmlWindow(xxxObject): + allParams = ['pos', 'size', 'style', 'borders', 'url', 'htmlcode'] + paramDict = {'borders': ParamInt} + styles = ['wxHW_SCROLLBAR_NEVER', 'wxHW_SCROLLBAR_AUTO'] + +class xxxCalendar(xxxObject): + allParams = ['pos', 'size', 'style'] + +class xxxNotebook(xxxContainer): + allParams = ['usenotebooksizer', 'pos', 'size', 'style'] + paramDict = {'usenotebooksizer': ParamBool} + styles = ['wxNB_FIXEDWIDTH', 'wxNB_LEFT', 'wxNB_RIGHT', 'wxNB_BOTTOM'] + +################################################################################ +# Buttons + +class xxxButton(xxxObject): + allParams = ['label', 'default', 'pos', 'size', 'style'] + paramDict = {'default': ParamBool} + required = ['label'] + styles = ['wxBU_LEFT', 'wxBU_TOP', 'wxBU_RIGHT', 'wxBU_BOTTOM'] + +class xxxBitmapButton(xxxObject): + allParams = ['bitmap', 'selected', 'focus', 'disabled', 'default', + 'pos', 'size', 'style'] + required = ['bitmap'] + styles = ['wxBU_LEFT', 'wxBU_TOP', 'wxBU_RIGHT', 'wxBU_BOTTOM'] + +class xxxRadioButton(xxxObject): + allParams = ['label', 'value', 'pos', 'size', 'style'] + paramDict = {'value': ParamBool} + required = ['label'] + styles = ['wxRB_GROUP'] + +class xxxSpinButton(xxxObject): + allParams = ['pos', 'size', 'style'] + styles = ['wxSP_HORIZONTAL', 'wxSP_VERTICAL', 'wxSP_ARROW_KEYS', 'wxSP_WRAP'] + +################################################################################ +# Boxes + +class xxxStaticBox(xxxObject): + allParams = ['label', 'pos', 'size', 'style'] + required = ['label'] + +class xxxRadioBox(xxxObject): + allParams = ['label', 'content', 'selection', 'dimension', 'pos', 'size', 'style'] + paramDict = {'dimension': ParamInt} + required = ['label', 'content'] + styles = ['wxRA_SPECIFY_ROWS', 'wxRA_SPECIFY_COLS'] + +class xxxCheckBox(xxxObject): + allParams = ['label', 'pos', 'size', 'style'] + required = ['label'] + +class xxxComboBox(xxxObject): + allParams = ['content', 'selection', 'value', 'pos', 'size', 'style'] + required = ['content'] + styles = ['wxCB_SIMPLE', 'wxCB_DROPDOWN', 'wxCB_READONLY', 'wxCB_DROPDOWN', + 'wxCB_SORT'] + +class xxxListBox(xxxObject): + allParams = ['content', 'selection', 'pos', 'size', 'style'] + required = ['content'] + styles = ['wxLB_SINGLE', 'wxLB_MULTIPLE', 'wxLB_EXTENDED', 'wxLB_HSCROLL', + 'wxLB_ALWAYS_SB', 'wxLB_NEEDED_SB', 'wxLB_SORT'] + +################################################################################ +# Sizers + +class xxxSizer(xxxContainer): + hasName = false + paramDict = {'orient': ParamOrient} + isSizer = true + +class xxxBoxSizer(xxxSizer): + allParams = ['orient'] + required = ['orient'] + default = {'orient': 'wxVERTICAL'} + # Tree icon depends on orientation + def treeImage(self): + if self.params['orient'].data == 'wxHORIZONTAL': return self.imageH + else: return self.imageV + +class xxxStaticBoxSizer(xxxBoxSizer): + allParams = ['label', 'orient'] + required = ['label', 'orient'] + default = {'orient': 'wxVERTICAL'} + +class xxxGridSizer(xxxSizer): + allParams = ['cols', 'rows', 'vgap', 'hgap'] + required = ['cols'] + default = {'cols': '2', 'rows': '2'} + +class xxxFlexGridSizer(xxxGridSizer): + pass + +# Container with only one child. +# Not shown in tree. +class xxxChildContainer(xxxObject): + # Special param ids + ID_CHECK_PARAMS = wxNewId() + ID_TEXT_PARAMS = wxNewId() + hasName = false + hasChild = true + def __init__(self, parent, element): + xxxObject.__init__(self, parent, element) + # Must have one child with 'object' tag, but we don't check it + nodes = element.childNodes[:] # create copy + for node in nodes: + if node.nodeType == minidom.Node.ELEMENT_NODE: + if node.tagName == 'object': + # Create new xxx object for child node + self.child = MakeXXXFromDOM(self, node) + self.child.parent = parent + # Copy hasChildren and isSizer attributes + self.hasChildren = self.child.hasChildren + self.isSizer = self.child.isSizer + return # success + else: + element.removeChild(node) + node.unlink() + assert 0, 'no child found' + def generateHtml(self): + return xxxObject.generateHtml(self, '_') + '


\n' + \ + self.child.generateHtml() + +class xxxSizerItem(xxxChildContainer): + allParams = ['option', 'flag', 'border'] + paramDict = {'option': ParamInt} + def __init__(self, parent, element): + xxxChildContainer.__init__(self, parent, element) + # Remove pos parameter - unnecessary for sizeritems + if 'pos' in self.child.allParams: + self.child.allParams = self.child.allParams[:] + self.child.allParams.remove('pos') + +class xxxNotebookPage(xxxChildContainer): + allParams = ['label', 'selected'] + paramDict = {'selected': ParamBool} + required = ['label'] + def __init__(self, parent, element): + xxxChildContainer.__init__(self, parent, element) + # pos and size dont matter for notebookpages + if 'pos' in self.child.allParams: + self.child.allParams = self.child.allParams[:] + self.child.allParams.remove('pos') + if 'size' in self.child.allParams: + self.child.allParams = self.child.allParams[:] + self.child.allParams.remove('size') + +class xxxSpacer(xxxObject): + hasName = false + allParams = ['size', 'option', 'flag', 'border'] + paramDict = {'option': ParamInt} + default = {'size': '0,0'} + +class xxxMenuBar(xxxContainer): + allParams = [] + +class xxxMenu(xxxContainer): + allParams = ['label'] + default = {'label': ''} + +class xxxMenuItem(xxxObject): + allParams = ['checkable', 'label', 'accel', 'help'] + default = {'label': ''} + +class xxxSeparator(xxxObject): + hasName = false + allParams = [] + +xxxDict = { + 'wxPanel': xxxPanel, + 'wxDialog': xxxDialog, + 'wxFrame': xxxFrame, + + 'wxButton': xxxButton, + 'wxBitmapButton': xxxBitmapButton, + 'wxRadioButton': xxxRadioButton, + 'wxSpinButton': xxxSpinButton, + + 'wxStaticBox': xxxStaticBox, + 'wxRadioBox': xxxRadioBox, + 'wxComboBox': xxxComboBox, + 'wxCheckBox': xxxCheckBox, + 'wxListBox': xxxListBox, + + 'wxStaticText': xxxStaticText, + 'wxStaticLine': xxxStaticLine, + 'wxTextCtrl': xxxTextCtrl, + 'wxChoice': xxxChoice, + 'wxSlider': xxxSlider, + 'wxGauge': xxxGauge, + 'wxScrollBar': xxxScrollBar, + 'wxTreeCtrl': xxxTreeCtrl, + 'wxListCtrl': xxxListCtrl, + 'wxCheckList': xxxCheckList, + 'wxNotebook': xxxNotebook, + 'notebookpage': xxxNotebookPage, + 'wxHtmlWindow': xxxHtmlWindow, + 'wxCalendar': xxxCalendar, + + 'wxBoxSizer': xxxBoxSizer, + 'wxStaticBoxSizer': xxxStaticBoxSizer, + 'wxGridSizer': xxxGridSizer, + 'wxFlexGridSizer': xxxFlexGridSizer, + 'sizeritem': xxxSizerItem, + 'spacer': xxxSpacer, + + 'wxMenuBar': xxxMenuBar, + 'wxMenu': xxxMenu, + 'wxMenuItem': xxxMenuItem, + 'separator': xxxSeparator, + } + +# Helper functions + +# Test for object elements +def IsObject(node): + return node.nodeType == minidom.Node.ELEMENT_NODE and node.tagName == 'object' + +# Make XXX object from some DOM object, selecting correct class +def MakeXXXFromDOM(parent, element): + return xxxDict[element.getAttribute('class')](parent, element) + +# Make empty DOM element +def MakeEmptyDOM(className): + elem = tree.dom.createElement('object') + elem.setAttribute('class', className) + # Set required and default parameters + xxxClass = xxxDict[className] + defaultNotRequired = filter(lambda x, l=xxxClass.required: x not in l, + xxxClass.default.keys()) + for param in xxxClass.required + defaultNotRequired: + textElem = tree.dom.createElement(param) + try: + textNode = tree.dom.createTextNode(xxxClass.default[param]) + except KeyError: + textNode = tree.dom.createTextNode('') + textElem.appendChild(textNode) + elem.appendChild(textElem) + return elem + +# Make empty XXX object +def MakeEmptyXXX(parent, className): + # Make corresponding DOM object first + elem = MakeEmptyDOM(className) + # If parent is a sizer, we should create sizeritem object, except for spacers + if parent: + if parent.isSizer and className != 'spacer': + sizerItemElem = MakeEmptyDOM('sizeritem') + sizerItemElem.appendChild(elem) + elem = sizerItemElem + elif isinstance(parent, xxxNotebook): + pageElem = MakeEmptyDOM('notebookpage') + pageElem.appendChild(elem) + elem = pageElem + # Now just make object + return MakeXXXFromDOM(parent, elem) + -- 2.45.2