X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0f278d7763de93b4ddacb3f553de0006585407c8..3cfde7c049bddf6fd3b4c2e35a6b8ecdcdc1d74f:/interface/wx/toplevel.h?ds=sidebyside diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h index aded9fab57..822e2edc7f 100644 --- a/interface/wx/toplevel.h +++ b/interface/wx/toplevel.h @@ -42,6 +42,9 @@ enum directly, but all of its methods are also applicable for the two classes above. + Note that the instances of wxTopLevelWindow are managed by wxWidgets in the + internal top level window list. + @library{wxcore} @category{managedwnd} @@ -50,6 +53,42 @@ enum class wxTopLevelWindow : public wxWindow { public: + /** + Default ctor. + */ + wxTopLevelWindow(); + + /** + Constructor creating the top level window. + */ + wxTopLevelWindow(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + /** + Destructor. Remember that wxTopLevelWindows do not get immediately + destroyed when the user (or the app) closes them; they have a + @b delayed destruction. + + See @ref overview_windowdeletion for more info. + */ + virtual ~wxTopLevelWindow(); + + /** + Creates the top level window. + */ + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + /** Returns @true if the platform supports making the window translucent. @@ -99,7 +138,7 @@ public: @see GetIcons() */ - const wxIcon GetIcon() const; + wxIcon GetIcon() const; /** Returns all icons associated with the window, there will be none of them @@ -108,7 +147,7 @@ public: @see wxIconBundle */ - const wxIconBundle GetIcons() const; + const wxIconBundle& GetIcons() const; /** Gets a string containing the window title. @@ -133,7 +172,7 @@ public: @see IsIconized(), Maximize(), wxIconizeEvent. */ - void Iconize(bool iconize); + virtual void Iconize(bool iconize = true); /** Returns @true if this window is currently active, i.e. if the user is @@ -176,6 +215,12 @@ public: */ bool IsUsingNativeDecorations() const; + /** + See wxWindow::SetAutoLayout(): when auto layout is on, this function gets + called automatically when the window is resized. + */ + virtual bool Layout(); + /** Maximizes or restores the window. @@ -184,7 +229,7 @@ public: @see Iconize() */ - void Maximize(bool maximize); + virtual void Maximize(bool maximize = true); /** Use a system-dependent way to attract users attention to the window when @@ -210,7 +255,7 @@ public: @see GetDefaultItem() */ - void SetDefaultItem(wxWindow* win); + wxWindow* SetDefaultItem(wxWindow* win); /** Sets the icon for this window. @@ -368,7 +413,7 @@ public: fully transparent, and a value of 255 sets the window to be fully opaque. */ - virtual bool SetTransparent(int alpha); + virtual bool SetTransparent(wxByte alpha); /** This virtual function is not meant to be called directly but can be