X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..ebd75440d5b792f76cd0179e84e7e4ee2f942ecb:/interface/wx/toplevel.h?ds=sidebyside diff --git a/interface/wx/toplevel.h b/interface/wx/toplevel.h index f0432e2e68..2c30dada11 100644 --- a/interface/wx/toplevel.h +++ b/interface/wx/toplevel.h @@ -36,7 +36,6 @@ enum /** @class wxTopLevelWindow - @wxheader{toplevel.h} wxTopLevelWindow is a common base class for wxDialog and wxFrame. It is an abstract base class meaning that you never work with objects of this class @@ -85,7 +84,7 @@ public: (including GTK+) where the window manager may not support this operation and there is no way to find out. */ - bool EnableCloseButton(bool enable = true); + virtual bool EnableCloseButton(bool enable = true); /** Returns a pointer to the button which is the default for this window, or @@ -100,7 +99,7 @@ public: @see GetIcons() */ - const wxIcon GetIcon() const; + wxIcon GetIcon() const; /** Returns all icons associated with the window, there will be none of them @@ -109,14 +108,14 @@ public: @see wxIconBundle */ - const wxIconBundle GetIcons() const; + const wxIconBundle& GetIcons() const; /** Gets a string containing the window title. @see SetTitle() */ - wxString GetTitle() const; + virtual wxString GetTitle() const; /** Unique to the wxWinCE port. Responds to showing/hiding SIP (soft input @@ -134,13 +133,13 @@ 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 currently working with it. */ - bool IsActive() const; + virtual bool IsActive(); /** Returns @true if this window is expected to be always maximized, either @@ -154,17 +153,17 @@ public: @see ShowFullScreen() */ - bool IsFullScreen(); + virtual bool IsFullScreen() const; /** Returns @true if the window is iconized. */ - bool IsIconized() const; + virtual bool IsIconized() const; /** Returns @true if the window is maximized. */ - bool IsMaximized() const; + virtual bool IsMaximized() const; /** This method is specific to wxUniversal port. @@ -185,7 +184,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 @@ -204,14 +203,14 @@ public: supporting it. */ - void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); + virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); /** Changes the default item for the panel, usually @a win is a button. @see GetDefaultItem() */ - void SetDefaultItem(wxWindow* win); + wxWindow* SetDefaultItem(wxWindow* win); /** Sets the icon for this window. @@ -223,7 +222,9 @@ public: reference counting, the copy is very quick. It is safe to delete @a icon after calling this function. - @see wxIcon + @note In wxMSW, @a icon must be either 16x16 or 32x32 icon. + + @see wxIcon, SetIcons() */ void SetIcon(const wxIcon& icon); @@ -236,9 +237,12 @@ public: @param icons The icons to associate with this window. - @see wxIconBundle. + @note In wxMSW, @a icons must contain a 16x16 or 32x32 icon, + preferably both. + + @see wxIconBundle */ - void SetIcons(const wxIconBundle& icons); + virtual void SetIcons(const wxIconBundle& icons); /** Sets action or menu activated by pressing left hardware button on the @@ -261,12 +265,12 @@ public: /** A simpler interface for setting the size hints than SetSizeHints(). */ - void SetMaxSize(const wxSize& size); + virtual void SetMaxSize(const wxSize& size); /** A simpler interface for setting the size hints than SetSizeHints(). */ - void SetMinSize(const wxSize& size); + virtual void SetMinSize(const wxSize& size); /** Sets action or menu activated by pressing right hardware button on the @@ -276,7 +280,7 @@ public: Identifier for this button. @param label Text to be displayed on the screen area dedicated to this hardware - button. + button. @param subMenu The menu to be opened after pressing this hardware button. @@ -293,13 +297,21 @@ public: window to the normal rectangular shape simply call SetShape() again with an empty wxRegion. Returns @true if the operation is successful. */ - bool SetShape(const wxRegion& region); + virtual bool SetShape(const wxRegion& region); /** Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), no constraints will be used. + @param minW + The minimum width. + @param minH + The minimum height. + @param maxW + The maximum width. + @param maxH + The maximum height. @param incW Specifies the increment for sizing the width (GTK/Motif/Xt only). @param incH @@ -311,16 +323,19 @@ public: wxWindow::SetSize(). */ - virtual void SetSizeHints(int minW, int minH, int maxW = -1, - int maxH = -1, - int incW = -1, - int incH = -1); + virtual void SetSizeHints(int minW, int minH, + int maxW = -1, int maxH = -1, + int incW = -1, int incH = -1); /** Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), no constraints will be used. + @param minSize + The minimum size of the window. + @param maxSize + The maximum size of the window. @param incSize Increment size (only taken into account under X11-based ports such as wxGTK/wxMotif/wxX11). @@ -353,7 +368,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 @@ -384,7 +399,7 @@ public: @see IsFullScreen() */ - bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); /** This method is specific to wxUniversal port. @@ -418,7 +433,7 @@ public: decorations are used by default and so it may make sense to call this method with default argument if the application can't use custom decorations at all for some reason. - + @see UseNativeDecorations() */ void UseNativeDecorationsByDefault(bool native = true);