X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1f7d2aa9cb1857cf87e105ebbd36a92676bbde..7f98d1209a3f941c7a001cc2e7c78c237a4629e6:/wxPython/src/_toplvl.i diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index 597b5c8399..261d41c041 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, @@ -176,7 +178,7 @@ public: // sends a size event to the window using its current size -- this has an // effect of refreshing the window layout // - virtual void SendSizeEvent() { } + virtual void SendSizeEvent(); // menu bar functions @@ -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, @@ -284,8 +286,8 @@ public: // the modal dialogs have a return code - usually the id of the last // pressed button - void SetReturnCode(int returnCode) { m_returnCode = returnCode; } - int GetReturnCode() const { return m_returnCode; } + void SetReturnCode(int returnCode); + int GetReturnCode() const; // splits text up at newlines and places the // lines into a vertical wxBoxSizer @@ -309,6 +311,11 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + %pythoncode { + def SendSizeEvent(self): + self.ProcessEvent(wx.SizeEvent((-1,-1))) + } }; //--------------------------------------------------------------------------- @@ -322,14 +329,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 +385,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);