X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce1546160882d1ac98932420d7aeb4ff21d06301..7ddb15416407390de67cc26b04e91ea99a521f57:/interface/wx/richtooltip.h diff --git a/interface/wx/richtooltip.h b/interface/wx/richtooltip.h index e8c6a99694..62f6c4fdb7 100644 --- a/interface/wx/richtooltip.h +++ b/interface/wx/richtooltip.h @@ -133,17 +133,21 @@ public: //@} /** - Set timeout after which the tooltip should disappear, in milliseconds. + Set timeout after which the tooltip should disappear and + optionally set a delay before the tooltip is shown, in milliseconds. - By default the tooltip is hidden after system-dependent interval of - time elapses but this method can be used to change this or also disable - hiding the tooltip automatically entirely by passing 0 in this parameter - (but doing this will prevent the native MSW version from being used). + By default the tooltip is shown immediately and hidden after a + system-dependent interval of time elapses. This method can be used to + change this or also disable hiding the tooltip automatically entirely + by passing 0 in this parameter (but doing this will prevent the native + MSW version from being used). Notice that the tooltip will always be hidden if the user presses a key or clicks a mouse button. + + Parameter @a millisecondsDelay is new since wxWidgets 2.9.5. */ - void SetTimeout(unsigned milliseconds); + void SetTimeout(unsigned millisecondsTimeout, unsigned millisecondsDelay = 0); /** Choose the tip kind, possibly none. @@ -171,15 +175,22 @@ public: void SetTitleFont(const wxFont& font); /** - Show the tooltip for the given window. + Show the tooltip for the given window and optionally specify where to + show the tooltip. + + By default the tooltip tip points to the (middle of the) specified + window which must be non-@NULL or, if @a rect is non-@NULL, the middle + of the specified wxRect. - The tooltip tip points to the (middle of the) specified window which - must be non-@NULL. + The coordinates of the @a rect parameter are relative to the given window. Currently the native MSW implementation is used only if @a win is a - wxTextCtrl. This limitation may be removed in the future. + wxTextCtrl and @a rect is @NULL. This limitation may be removed in the + future. + + Parameter @a rect is new since wxWidgets 2.9.5. */ - void ShowFor(wxWindow* win); + void ShowFor(wxWindow* win, const wxRect* rect = NULL); /** Destructor.