X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e0e38957893a11c9bfc2c334a696c73a9eaf39d..23efa4bfb9104d6ef947a217efa80b2bc5bf9e76:/interface/wx/window.h diff --git a/interface/wx/window.h b/interface/wx/window.h index 4b7f8a7c0a..71b0f46344 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -657,7 +657,7 @@ public: @see FindWindow() */ - static wxWindow* FindWindowById(long id, wxWindow* parent = NULL); + static wxWindow* FindWindowById(long id, const wxWindow* parent = 0); /** Find a window by its label. @@ -671,10 +671,10 @@ public: @see FindWindow() */ static wxWindow* FindWindowByLabel(const wxString& label, - wxWindow* parent = NULL); + const wxWindow* parent = 0); /** - Find a window by its name (as given in a window constructor or @b Create + Find a window by its name (as given in a window constructor or Create() function call). If @a parent is @NULL, the search will start from all top-level frames @@ -687,7 +687,7 @@ public: @see FindWindow() */ static wxWindow* FindWindowByName(const wxString& name, - wxWindow* parent = NULL); + const wxWindow* parent = 0); /** Sizes the window so that it fits around its subwindows. @@ -1060,28 +1060,34 @@ public: */ wxWindow* GetParent() const; + //@{ /** This function shows a popup menu at the given position in this window and - returns the selected id. It can be more convenient than the general purpose - PopupMenu() function for simple menus proposing a choice in a list of - strings to the user. + returns the selected id. - @param menu - The menu to show - @param pos - The position at which to show the menu in client coordinates + It can be more convenient than the general purpose PopupMenu() function + for simple menus proposing a choice in a list of strings to the user. - @return The selected menu item id or wxID_NONE if none selected or an - error occurred. - */ - int GetPopupMenuSelectionFromUser(wxMenu& menu, const wxPoint& pos); + Notice that to avoid unexpected conflicts between the (usually + consecutive range of) ids used by the menu passed to this function and + the existing EVT_UPDATE_UI() handlers, this function temporarily + disables UI updates for the window, so you need to manually disable + (or toggle or ...) any items which should be disabled in the menu + before showing it. - /** - See the GetPopupMenuSelectionFromUser(wxMenu&, const wxPoint&) overload. - This overload differs only because it takes two integers for the - menu position instead of a wxPoint. + The parameter @a menu is the menu to show. + The parameter @a pos (or the parameters @a x and @a y) is the + position at which to show the menu in client coordinates. + + @return + The selected menu item id or @c wxID_NONE if none selected or an + error occurred. + + @since 2.9.0 */ + int GetPopupMenuSelectionFromUser(wxMenu& menu, const wxPoint& pos); int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y); + //@} /** This gets the position of the window in pixels, relative to the parent window @@ -1271,11 +1277,14 @@ public: */ virtual wxSize GetWindowBorderSize() const; + //@{ /** - Gets the window style that was passed to the constructor or @b Create - method. @b GetWindowStyle() is another name for the same function. + Gets the window style that was passed to the constructor or Create() + method. GetWindowStyle() is another name for the same function. */ virtual long GetWindowStyleFlag() const; + long GetWindowStyle() const; + //@} /** Returns the value previously passed to SetWindowVariant(). @@ -2361,7 +2370,10 @@ public: @param thumbSize The size of the thumb, or visible portion of the scrollbar, in scroll units. @param range - The maximum position of the scrollbar. + The maximum position of the scrollbar. Value of -1 can be used to + ask for the scrollbar to be shown but in the disabled state: this + can be used to avoid removing the scrollbar even when it is not + needed (currently this is only implemented in wxMSW port). @param refresh @true to redraw the scrollbar, @false otherwise. @@ -2543,11 +2555,7 @@ public: void SetVirtualSize(const wxSize& size); //@} - /** - Identical to SetWindowStyleFlag(). - */ - void SetWindowStyle(long style); - + //@{ /** Sets the style of the window. Please note that some styles cannot be changed after the window creation and that Refresh() might need to be be called @@ -2558,6 +2566,8 @@ public: @see GetWindowStyleFlag() */ virtual void SetWindowStyleFlag(long style); + void SetWindowStyle(long style); + //@} /** This function can be called under all platforms but only does anything under @@ -2813,7 +2823,7 @@ protected: // Global functions/macros // ============================================================================ -/** @ingroup group_funcmacro_misc */ +/** @addtogroup group_funcmacro_misc */ //@{ /**