X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7cb74906e1ea58aad0cca0a38d1cf87834f577e9..e815120e412d91e79c98dd0afac2a1e399f10810:/docs/latex/wx/helpprov.tex diff --git a/docs/latex/wx/helpprov.tex b/docs/latex/wx/helpprov.tex index 448c58839f..a72cf5046d 100644 --- a/docs/latex/wx/helpprov.tex +++ b/docs/latex/wx/helpprov.tex @@ -10,26 +10,38 @@ wxHelpProvider::Set(). No base class +\wxheading{Include files} + + + +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{See also} -\helpref{wxHelpContext}{wxhelpcontext}, \helpref{wxHelpContextButton}{wxhelpcontextbutton}, +\helpref{wxContextHelp}{wxcontexthelp}, \helpref{wxContextHelpButton}{wxcontexthelpbutton}, \helpref{wxSimpleHelpProvider}{wxsimplehelpprovider}, \helpref{wxHelpControllerHelpProvider}{wxhelpcontrollerhelpprovider}, -\helpref{wxWindow::SetHelpText}{wxwindowsethelptext}, \helpref{wxWindow::GetHelpText}{wxwindowgethelptext} +\helpref{wxWindow::SetHelpText}{wxwindowsethelptext}, \helpref{wxWindow::GetHelpTextAtPoint}{wxwindowgethelptextatpoint} \latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxHelpProvider::\destruct{wxHelpProvider}}\label{wxhelpproviderdtor} \func{}{\destruct{wxHelpProvider}}{\void} Virtual destructor for any base class. -\membersection{wxHelpProvider::Set}\label{wxhelpproviderset} -\func{wxHelpProvider*}{Set}{\param{wxHelpProvider* }{helpProvider}} +\membersection{wxHelpProvider::AddHelp}\label{wxhelpprovideraddhelp} + +\func{void}{AddHelp}{\param{wxWindowBase* }{window}, \param{const wxString\& }{text}} + +Associates the text with the given window or id. Although all help +providers have these functions to allow making \helpref{wxWindow::SetHelpText}{wxwindowsethelptext} +work, not all of them implement the functions. -Get/set the current, application-wide help provider. Returns -the previous one. \membersection{wxHelpProvider::Get}\label{wxhelpproviderget} @@ -38,6 +50,7 @@ the previous one. Unlike some other classes, the help provider is not created on demand. This must be explicitly done by the application. + \membersection{wxHelpProvider::GetHelp}\label{wxhelpprovidergethelp} \func{wxString}{GetHelp}{\param{const wxWindowBase* }{window}} @@ -46,29 +59,61 @@ Gets the help string for this window. Its interpretation is dependent on the hel except that empty string always means that no help is associated with the window. -\membersection{wxHelpProvider::ShowHelp}\label{wxhelpprovidershowhelp} +\func{void}{AddHelp}{\param{wxWindowID }{id}, \param{const wxString\& }{text}} -\func{bool}{ShowHelp}{\param{wxWindowBase* }{window}} +This version associates the given text with all windows with this id. +May be used to set the same help string for all Cancel buttons in +the application, for example. -Shows help for the given window. Uses \helpref{GetHelp}{wxhelpprovidergethelp} internally if -applicable. -Returns TRUE if it was done, or FALSE if no help was available -for this window. +\membersection{wxHelpProvider::RemoveHelp}\label{wxhelpproviderremovehelp} -\membersection{wxHelpProvider::AddHelp}\label{wxhelpprovideraddhelp} +\func{void}{RemoveHelp}{\param{wxWindowBase* }{window}} -\func{void}{AddHelp}{\param{wxWindowBase* }{window}, \param{const wxString\& }{text}} +Removes the association between the window pointer and the help text. This is +called by the wxWindow destructor. Without this, the table of help strings will fill up +and when window pointers are reused, the wrong help string will be found. -Associates the text with the given window or id. Although all help -providers have these functions to allow making \helpref{wxWindow::SetHelpText}{wxwindowsethelptext} -work, not all of them implement the functions. -\membersection{wxHelpProvider::AddHelp}\label{wxhelpprovideraddhelp} +\membersection{wxHelpProvider::Set}\label{wxhelpproviderset} -\func{void}{AddHelp}{\param{wxWindowID }{id}, \param{const wxString\& }{text}} +\func{wxHelpProvider*}{Set}{\param{wxHelpProvider* }{helpProvider}} -This version associates the given text with all windows with this id. -May be used to set the same help string for all Cancel buttons in -the application, for example. +Get/set the current, application-wide help provider. Returns +the previous one. + + +\membersection{wxHelpProvider::ShowHelpAtPoint}\label{wxhelpprovidershowhelpatpoint} + +\func{bool}{ShowHelpAtPoint}{\param{wxWindowBase* }{window}, \param{const wxPoint & }{point}, \param{wxHelpEvent::Origin }{origin}} + +This function may be overridden to show help for the window when it should +depend on the position inside the window, By default this method forwards to +\helpref{ShowHelp}{wxhelpprovidershowhelp}, so it is enough to only implement +the latter if the help doesn't depend on the position. + +Returns \true if help was shown, or \false if no help was available for this +window. + +\wxheading{Parameters} + +\docparam{window}{Window to show help text for.} + +\docparam{point}{Coordinates of the mouse at the moment of help event emission.} + +\docparam{origin}{Help event origin, see \helpref{wxHelpEvent::GetOrigin}{wxhelpeventgetorigin}.} + +\newsince{2.7.0} + + +\membersection{wxHelpProvider::ShowHelp}\label{wxhelpprovidershowhelp} + +\func{bool}{ShowHelp}{\param{wxWindowBase* }{window}} + +Shows help for the given window. Override this function if the help doesn't +depend on the exact position inside the window, otherwise you need to override +\helpref{ShowHelpAtPoint}{wxhelpprovidershowhelpatpoint}. + +Returns \true if help was shown, or \false if no help was available for this +window.