X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b58d5e2d952e2b3bb03de42098d1399ba23f53e8..9ac884500ce30c58e24b0a6af1288b576d2e03e4:/wxPython/src/_toplvl.i diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index 836b7dd90c..4a95c46301 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, @@ -195,6 +189,10 @@ by pressing such as the OK button on a wx.Dialog.", ""); virtual wxWindow *, GetTmpDefaultItem() const, "Return the temporary default item, which can be None.", ""); + %property(DefaultItem, GetDefaultItem, SetDefaultItem, doc="See `GetDefaultItem` and `SetDefaultItem`"); + %property(Icon, GetIcon, SetIcon, doc="See `GetIcon` and `SetIcon`"); + %property(Title, GetTitle, SetTitle, doc="See `GetTitle` and `SetTitle`"); + %property(TmpDefaultItem, GetTmpDefaultItem, SetTmpDefaultItem, doc="See `GetTmpDefaultItem` and `SetTmpDefaultItem`"); }; @@ -318,6 +316,11 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + %property(MenuBar, GetMenuBar, SetMenuBar, doc="See `GetMenuBar` and `SetMenuBar`"); + %property(StatusBar, GetStatusBar, SetStatusBar, doc="See `GetStatusBar` and `SetStatusBar`"); + %property(StatusBarPane, GetStatusBarPane, SetStatusBarPane, doc="See `GetStatusBarPane` and `SetStatusBarPane`"); + %property(ToolBar, GetToolBar, SetToolBar, doc="See `GetToolBar` and `SetToolBar`"); }; //--------------------------------------------------------------------------- @@ -379,10 +382,24 @@ public: // lines into a vertical wxBoxSizer wxSizer* CreateTextSizer( const wxString &message ); - // places buttons into a horizontal wxBoxSizer - wxSizer* CreateButtonSizer( long flags, - bool separated = false, - wxCoord distance = 0 ); + + // returns a horizontal wxBoxSizer containing the given buttons + // + // notice that the returned sizer can be NULL if no buttons are put in the + // sizer (this mostly happens under smart phones and other atypical + // platforms which have hardware buttons replacing OK/Cancel and such) + %Rename(_CreateButtonSizer, + wxSizer* , CreateButtonSizer( long flags )); + %pythoncode { + def CreateButtonSizer(self, flags, *ignored): + return self._CreateButtonSizer(flags) + } + + // returns the sizer containing CreateButtonSizer() below a separating + // static line for the platforms which use static lines for items + // separation (i.e. not Mac) + wxSizer *CreateSeparatedButtonSizer(long flags); + wxStdDialogButtonSizer* CreateStdDialogButtonSizer( long flags ); //void SetModal( bool flag ); @@ -399,6 +416,10 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + %property(AffirmativeId, GetAffirmativeId, SetAffirmativeId, doc="See `GetAffirmativeId` and `SetAffirmativeId`"); + %property(EscapeId, GetEscapeId, SetEscapeId, doc="See `GetEscapeId` and `SetEscapeId`"); + %property(ReturnCode, GetReturnCode, SetReturnCode, doc="See `GetReturnCode` and `SetReturnCode`"); }; //--------------------------------------------------------------------------- @@ -462,6 +483,8 @@ public: void SetBitmap(const wxBitmap& bitmap); wxBitmap& GetBitmap(); + + %property(Bitmap, GetBitmap, SetBitmap, doc="See `GetBitmap` and `SetBitmap`"); }; @@ -483,6 +506,10 @@ public: long GetSplashStyle() const; wxSplashScreenWindow* GetSplashWindow() const; int GetTimeout() const; + + %property(SplashStyle, GetSplashStyle, doc="See `GetSplashStyle`"); + %property(SplashWindow, GetSplashWindow, doc="See `GetSplashWindow`"); + %property(Timeout, GetTimeout, doc="See `GetTimeout`"); };