diff --git a/wxPython/contrib/gizmos/gizmos.i b/wxPython/contrib/gizmos/gizmos.i index 7f5b9f5fd4..5e7044221c 100644 --- a/wxPython/contrib/gizmos/gizmos.i +++ b/wxPython/contrib/gizmos/gizmos.i @@ -146,13 +146,13 @@ public: %pythonAppend wxDynamicSashWindow "self._setOORInfo(self)" %pythonAppend wxDynamicSashWindow() "" - wxDynamicSashWindow(wxWindow *parent, wxWindowID id, + wxDynamicSashWindow(wxWindow *parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER, const wxString& name = wxPyDynamicSashNameStr); %name(PreDynamicSashWindow)wxDynamicSashWindow(); - bool Create(wxWindow *parent, wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER, const wxString& name = wxPyDynamicSashNameStr); @@ -186,8 +186,8 @@ public: %pythonAppend wxEditableListBox "self._setOORInfo(self)" %pythonAppend wxEditableListBox() "" - wxEditableListBox(wxWindow *parent, wxWindowID id, - const wxString& label, + wxEditableListBox(wxWindow *parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE, diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index 92636c139b..66b74c75ef 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -100,6 +100,11 @@ many toplevel functions and static methods will now check that a wx.App object has already been created and will raise a wx.PyNoAppError exception if not. +Added more default args as needed to allow most window types to be +constructed with only the parent window arg. In some cases other args +may be required for normal operation, but they can usually be set +after construction. + diff --git a/wxPython/src/_button.i b/wxPython/src/_button.i index cbba457512..de03872ce9 100644 --- a/wxPython/src/_button.i +++ b/wxPython/src/_button.i @@ -68,7 +68,8 @@ public: DocCtorStr( - wxButton(wxWindow* parent, wxWindowID id, const wxString& label, + wxButton(wxWindow* parent, wxWindowID id=-1, + const wxString& label=wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -82,7 +83,8 @@ public: PreButton); DocDeclStr( - bool , Create(wxWindow* parent, wxWindowID id, const wxString& label, + bool , Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label=wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -154,7 +156,8 @@ public: %pythonAppend wxBitmapButton() "" DocCtorStr( - wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, + wxBitmapButton(wxWindow* parent, wxWindowID id=-1, + const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, @@ -168,11 +171,12 @@ public: PreBitmapButton); DocDeclStr( - 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, + bool , Create(wxWindow* parent, wxWindowID id=-1, + const wxBitmap& bitmap = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), "Acutally create the GUI BitmapButton for 2-phase creation.", ""); diff --git a/wxPython/src/_checkbox.i b/wxPython/src/_checkbox.i index 0d7800accb..1b553a151b 100644 --- a/wxPython/src/_checkbox.i +++ b/wxPython/src/_checkbox.i @@ -87,7 +87,8 @@ public: %pythonAppend wxCheckBox() "" DocCtorStr( - wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, + wxCheckBox(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -102,7 +103,8 @@ public: DocDeclStr( - bool, Create(wxWindow* parent, wxWindowID id, const wxString& label, + bool, Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index de1705f176..7963a620e5 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -351,7 +351,7 @@ public: wxMultiChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - int choices=0, wxString* choices_array, + int choices=0, wxString* choices_array=NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition), "__init__(Window parent, String message, String caption, diff --git a/wxPython/src/_control.i b/wxPython/src/_control.i index 555f535ad9..966b3950a6 100644 --- a/wxPython/src/_control.i +++ b/wxPython/src/_control.i @@ -37,7 +37,7 @@ public: DocCtorStr( wxControl(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=0, @@ -53,7 +53,7 @@ __init__ as a plain old wx.Control is not very useful.", ""); DocDeclStr( bool , Create(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=0, diff --git a/wxPython/src/_gauge.i b/wxPython/src/_gauge.i index 0aad4c78f5..21f1472d7a 100644 --- a/wxPython/src/_gauge.i +++ b/wxPython/src/_gauge.i @@ -36,7 +36,7 @@ public: %pythonAppend wxGauge "self._setOORInfo(self)" %pythonAppend wxGauge() "" - wxGauge(wxWindow* parent, wxWindowID id, int range, + wxGauge(wxWindow* parent, wxWindowID id=-1, int range=100, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, @@ -44,7 +44,7 @@ public: const wxString& name = wxPyGaugeNameStr); %name(PreGauge)wxGauge(); - bool Create(wxWindow* parent, wxWindowID id, int range, + bool Create(wxWindow* parent, wxWindowID id=-1, int range=100, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, diff --git a/wxPython/src/_listbox.i b/wxPython/src/_listbox.i index f17f096ac1..2b3da1dc43 100644 --- a/wxPython/src/_listbox.i +++ b/wxPython/src/_listbox.i @@ -34,7 +34,7 @@ public: %pythonAppend wxListBox "self._setOORInfo(self)" %pythonAppend wxListBox() "" - wxListBox(wxWindow* parent, wxWindowID id, + wxListBox(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, //int choices=0, wxString* choices_array = NULL, @@ -44,7 +44,7 @@ public: const wxString& name = wxPyListBoxNameStr); %name(PreListBox)wxListBox(); - bool Create(wxWindow* parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, //int choices=0, wxString* choices_array = NULL, @@ -148,7 +148,7 @@ public: %pythonAppend wxCheckListBox "self._setOORInfo(self)" %pythonAppend wxCheckListBox() "" - wxCheckListBox(wxWindow *parent, wxWindowID id, + wxCheckListBox(wxWindow *parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, //int choices = 0, wxString* choices_array = NULL, @@ -158,7 +158,7 @@ public: const wxString& name = wxPyListBoxNameStr); %name(PreCheckListBox)wxCheckListBox(); - bool Create(wxWindow *parent, wxWindowID id, + bool Create(wxWindow *parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, //int choices = 0, wxString* choices_array = NULL, diff --git a/wxPython/src/_mdi.i b/wxPython/src/_mdi.i index 355c6cf1f8..dab48d326d 100644 --- a/wxPython/src/_mdi.i +++ b/wxPython/src/_mdi.i @@ -41,8 +41,8 @@ public: %pythonAppend wxMDIParentFrame() "" wxMDIParentFrame(wxWindow *parent, - const wxWindowID id, - const wxString& title, + const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, @@ -50,8 +50,8 @@ public: %name(PreMDIParentFrame)wxMDIParentFrame(); bool Create(wxWindow *parent, - const wxWindowID id, - const wxString& title, + const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, @@ -88,8 +88,8 @@ public: %pythonAppend wxMDIChildFrame() "" wxMDIChildFrame(wxMDIParentFrame* parent, - const wxWindowID id, - const wxString& title, + const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, @@ -97,8 +97,8 @@ public: %name(PreMDIChildFrame)wxMDIChildFrame(); bool Create(wxMDIParentFrame* parent, - const wxWindowID id, - const wxString& title, + const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index 853ffe03b3..ab17747cd7 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -178,7 +178,7 @@ public: %name(PreNotebook)wxNotebook(); bool Create(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -308,7 +308,7 @@ public: %name(PreListbook)wxListbook(); bool Create(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/wxPython/src/_pycontrol.i b/wxPython/src/_pycontrol.i index eb2a01b87f..dc1e8047b9 100644 --- a/wxPython/src/_pycontrol.i +++ b/wxPython/src/_pycontrol.i @@ -106,7 +106,7 @@ public: %pythonAppend wxPyControl "self._setOORInfo(self); self._setCallbackInfo(self, PyControl)" %pythonAppend wxPyControl() "" - wxPyControl(wxWindow* parent, const wxWindowID id, + wxPyControl(wxWindow* parent, const wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/wxPython/src/_pywindows.i b/wxPython/src/_pywindows.i index 4cc0976bd3..8edd2a3f37 100644 --- a/wxPython/src/_pywindows.i +++ b/wxPython/src/_pywindows.i @@ -136,7 +136,7 @@ public: %pythonAppend wxPyWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyWindow)" %pythonAppend wxPyWindow() "" - wxPyWindow(wxWindow* parent, const wxWindowID id, + wxPyWindow(wxWindow* parent, const wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -281,7 +281,7 @@ public: %pythonAppend wxPyPanel "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" %pythonAppend wxPyPanel() "" - wxPyPanel(wxWindow* parent, const wxWindowID id, + wxPyPanel(wxWindow* parent, const wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -418,7 +418,7 @@ public: %pythonAppend wxPyScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" %pythonAppend wxPyScrolledWindow() "" - wxPyScrolledWindow(wxWindow* parent, const wxWindowID id, + wxPyScrolledWindow(wxWindow* parent, const wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/wxPython/src/_radio.i b/wxPython/src/_radio.i index 9a2551def1..275dce10c6 100644 --- a/wxPython/src/_radio.i +++ b/wxPython/src/_radio.i @@ -31,8 +31,8 @@ public: %pythonAppend wxRadioBox "self._setOORInfo(self)" %pythonAppend wxRadioBox() "" - wxRadioBox(wxWindow* parent, wxWindowID id, - const wxString& label, + wxRadioBox(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, //int choices = 0, wxString* choices_array = NULL, @@ -43,8 +43,8 @@ public: const wxString& name = wxPyRadioBoxNameStr); %name(PreRadioBox)wxRadioBox(); - bool Create(wxWindow* parent, wxWindowID id, - const wxString& label, + bool Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, //int choices = 0, wxString* choices_array = NULL, @@ -104,8 +104,8 @@ public: %pythonAppend wxRadioButton "self._setOORInfo(self)" %pythonAppend wxRadioButton() "" - wxRadioButton(wxWindow* parent, wxWindowID id, - const wxString& label, + wxRadioButton(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -113,8 +113,8 @@ public: const wxString& name = wxPyRadioButtonNameStr); %name(PreRadioButton)wxRadioButton(); - bool Create(wxWindow* parent, wxWindowID id, - const wxString& label, + bool Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/wxPython/src/_sashwin.i b/wxPython/src/_sashwin.i index df6c53ebbf..63ab46c33b 100644 --- a/wxPython/src/_sashwin.i +++ b/wxPython/src/_sashwin.i @@ -56,14 +56,14 @@ public: %pythonAppend wxSashWindow "self._setOORInfo(self)" %pythonAppend wxSashWindow() "" - wxSashWindow(wxWindow* parent, wxWindowID id, + wxSashWindow(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const wxString& name = wxPySashNameStr); %name(PreSashWindow)wxSashWindow(); - bool Create(wxWindow* parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, @@ -244,14 +244,14 @@ public: %pythonAppend wxSashLayoutWindow "self._setOORInfo(self)" %pythonAppend wxSashLayoutWindow() "" - wxSashLayoutWindow(wxWindow* parent, wxWindowID id, + wxSashLayoutWindow(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const wxString& name = wxPySashLayoutNameStr); %name(PreSashLayoutWindow)wxSashLayoutWindow(); - bool Create(wxWindow* parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, diff --git a/wxPython/src/_slider.i b/wxPython/src/_slider.i index 17d51db2e6..6ecb209afe 100644 --- a/wxPython/src/_slider.i +++ b/wxPython/src/_slider.i @@ -34,8 +34,8 @@ public: %pythonAppend wxSlider "self._setOORInfo(self)" %pythonAppend wxSlider() "" - wxSlider(wxWindow* parent, wxWindowID id, - int value, int minValue, int maxValue, + wxSlider(wxWindow* parent, wxWindowID id=-1, + int value=0, int minValue=0, int maxValue=100, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, @@ -43,8 +43,8 @@ public: const wxString& name = wxPySliderNameStr); %name(PreSlider)wxSlider(); - bool Create(wxWindow* parent, wxWindowID id, - int value, int minValue, int maxValue, + bool Create(wxWindow* parent, wxWindowID id=-1, + int value=0, int minValue=0, int maxValue=100, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, diff --git a/wxPython/src/_statctrls.i b/wxPython/src/_statctrls.i index f2f726e60b..3c15670aaf 100644 --- a/wxPython/src/_statctrls.i +++ b/wxPython/src/_statctrls.i @@ -30,14 +30,16 @@ public: %pythonAppend wxStaticBox "self._setOORInfo(self)" %pythonAppend wxStaticBox() "" - wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label, + wxStaticBox(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyStaticBoxNameStr); %name(PreStaticBox)wxStaticBox(); - bool Create(wxWindow* parent, wxWindowID id, const wxString& label, + bool Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -59,14 +61,14 @@ public: %pythonAppend wxStaticLine "self._setOORInfo(self)" %pythonAppend wxStaticLine() "" - wxStaticLine( wxWindow *parent, wxWindowID id, + wxStaticLine( wxWindow *parent, wxWindowID id=-1, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString& name = wxPyStaticTextNameStr); %name(PreStaticLine)wxStaticLine(); - bool Create( wxWindow *parent, wxWindowID id, + bool Create( wxWindow *parent, wxWindowID id=-1, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -93,14 +95,16 @@ public: %pythonAppend wxStaticText "self._setOORInfo(self)" %pythonAppend wxStaticText() "" - wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label, + wxStaticText(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyStaticTextNameStr); %name(PreStaticText)wxStaticText(); - bool Create(wxWindow* parent, wxWindowID id, const wxString& label, + bool Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -120,16 +124,16 @@ public: %pythonAppend wxStaticBitmap "self._setOORInfo(self)" %pythonAppend wxStaticBitmap() "" - wxStaticBitmap(wxWindow* parent, wxWindowID id, - const wxBitmap& bitmap, + wxStaticBitmap(wxWindow* parent, wxWindowID id=-1, + const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyStaticBitmapNameStr); %name(PreStaticBitmap)wxStaticBitmap(); - bool Create(wxWindow* parent, wxWindowID id, - const wxBitmap& bitmap, + bool Create(wxWindow* parent, wxWindowID id=-1, + const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/wxPython/src/_statusbar.i b/wxPython/src/_statusbar.i index 4eb81820a0..0fc21a1f03 100644 --- a/wxPython/src/_statusbar.i +++ b/wxPython/src/_statusbar.i @@ -36,7 +36,7 @@ public: const wxString& name = wxPyStatusLineNameStr); %name(PreStatusBar)wxStatusBar(); - bool Create(wxWindow* parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id=-1, long style = wxST_SIZEGRIP, const wxString& name = wxPyStatusLineNameStr); diff --git a/wxPython/src/_textctrl.i b/wxPython/src/_textctrl.i index 7924ad77ca..9dc6789495 100644 --- a/wxPython/src/_textctrl.i +++ b/wxPython/src/_textctrl.i @@ -168,7 +168,7 @@ public: %pythonAppend wxTextCtrl "self._setOORInfo(self)" %pythonAppend wxTextCtrl() "" - wxTextCtrl(wxWindow* parent, wxWindowID id, + wxTextCtrl(wxWindow* parent, wxWindowID id=-1, const wxString& value = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -177,7 +177,7 @@ public: const wxString& name = wxPyTextCtrlNameStr); %name(PreTextCtrl)wxTextCtrl(); - bool Create(wxWindow* parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id=-1, const wxString& value = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, diff --git a/wxPython/src/_tglbtn.i b/wxPython/src/_tglbtn.i index d3947cc5e3..3241807ee6 100644 --- a/wxPython/src/_tglbtn.i +++ b/wxPython/src/_tglbtn.i @@ -59,8 +59,8 @@ public: %pythonAppend wxToggleButton() "" wxToggleButton(wxWindow *parent, - wxWindowID id, - const wxString& label, + wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -69,8 +69,8 @@ public: %name(PreToggleButton)wxToggleButton(); bool Create(wxWindow *parent, - wxWindowID id, - const wxString& label, + wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index 0c9ad075ce..c7d22e0b2c 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -282,6 +282,7 @@ public: %# For consistency with the backwards compatible methods above, here are %# some non-'Label' versions of the Check and Radio methods + def AddCheckTool(self, id, bitmap, bmpDisabled = wx.NullBitmap, shortHelp = '', longHelp = '', @@ -392,7 +393,7 @@ public: %pythonAppend wxToolBar() "" wxToolBar(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, @@ -400,7 +401,7 @@ public: %name(PreToolBar)wxToolBar(); bool Create(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index 597b5c8399..d615218244 100644 --- a/wxPython/src/_toplvl.i +++ b/wxPython/src/_toplvl.i @@ -152,14 +152,16 @@ public: %pythonAppend wxFrame "self._setOORInfo(self)" %pythonAppend wxFrame() "" - wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title, + wxFrame(wxWindow* parent, const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxPyFrameNameStr); %name(PreFrame)wxFrame(); - bool Create(wxWindow* parent, const wxWindowID id, const wxString& title, + bool Create(wxWindow* parent, const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, @@ -265,8 +267,8 @@ public: %pythonAppend wxDialog() "" wxDialog(wxWindow* parent, - const wxWindowID id, - const wxString& title, + const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, @@ -274,8 +276,8 @@ public: %name(PreDialog)wxDialog(); bool Create(wxWindow* parent, - const wxWindowID id, - const wxString& title, + const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, @@ -322,14 +324,16 @@ public: %pythonAppend wxMiniFrame "self._setOORInfo(self)" %pythonAppend wxMiniFrame() "" - wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title, + wxMiniFrame(wxWindow* parent, const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxPyFrameNameStr); %name(PreMiniFrame)wxMiniFrame(); - bool Create(wxWindow* parent, const wxWindowID id, const wxString& title, + bool Create(wxWindow* parent, const wxWindowID id=-1, + const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, @@ -376,7 +380,7 @@ public: %pythonAppend wxSplashScreen "self._setOORInfo(self)" wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, - wxWindow* parent, wxWindowID id, + wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP); diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 63a951f25a..1248073fb7 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -491,7 +491,7 @@ the borders, scrollbars, other decorations...)", ""); DocStr(GetBestSize, - "This functions returns the best acceptable minimal size for the + "This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 5d28b11971..d63ccda64f 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -1555,7 +1555,7 @@ public: %pythonAppend wxGrid "self._setOORInfo(self)" wxGrid( wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, @@ -1565,7 +1565,7 @@ public: bool Create( wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS,