X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76612558942ee9fa8829a60f5fba17b754012a30..0a5bb138a71dfc1c706fc0858fb2801500e2c2e8:/wxPython/src/_toplvl.i diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index 7578a8f837..b85506b0d1 100644 --- a/wxPython/src/_toplvl.i +++ b/wxPython/src/_toplvl.i @@ -130,6 +130,9 @@ public: virtual void SetTitle(const wxString& title); virtual wxString GetTitle() const; + // enable/disable close button [x] + virtual bool EnableCloseButton(bool enable ); + // Set the shape of the window to the given region. // Returns True if the platform supports this feature // (and the operation is successful.) @@ -168,15 +171,6 @@ public: "Center the window on screen", ""); %pythoncode { CentreOnScreen = CenterOnScreen } -#ifdef __WXMSW__ - bool EnableCloseButton(bool enable = true); -#else - %extend { - bool EnableCloseButton(bool enable = true) { return false; } - } -#endif - - DocDeclStr( virtual wxWindow *, GetDefaultItem() const, @@ -431,6 +425,14 @@ public: //--------------------------------------------------------------------------- %newgroup +%{ +#define wxDEFAULT_MINIFRAME_STYLE wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION_HORIZ +%} + +enum { + wxDEFAULT_MINIFRAME_STYLE +}; + MustHaveApp(wxMiniFrame); @@ -445,7 +447,7 @@ public: const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, + long style = wxDEFAULT_MINIFRAME_STYLE, const wxString& name = wxPyFrameNameStr); %RenameCtor(PreMiniFrame, wxMiniFrame()); @@ -454,7 +456,7 @@ public: const wxString& title = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, + long style = wxDEFAULT_MINIFRAME_STYLE, const wxString& name = wxPyFrameNameStr); };