]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/helpprov.tex
patch 1306473
[wxWidgets.git] / docs / latex / wx / helpprov.tex
1 \section{\class{wxHelpProvider}}\label{wxhelpprovider}
2
3 wxHelpProvider is an abstract class used by a program implementing context-sensitive help to
4 show the help text for the given window.
5
6 The current help provider must be explicitly set by the application using
7 wxHelpProvider::Set().
8
9 \wxheading{Derived from}
10
11 No base class
12
13 \wxheading{Include files}
14
15 <wx/cshelp.h>
16
17 \wxheading{See also}
18
19 \helpref{wxContextHelp}{wxcontexthelp}, \helpref{wxContextHelpButton}{wxcontexthelpbutton},
20 \helpref{wxSimpleHelpProvider}{wxsimplehelpprovider}, \helpref{wxHelpControllerHelpProvider}{wxhelpcontrollerhelpprovider},
21 \helpref{wxWindow::SetHelpText}{wxwindowsethelptext}, \helpref{wxWindow::GetHelpText}{wxwindowgethelptext}
22
23 \latexignore{\rtfignore{\wxheading{Members}}}
24
25 \membersection{wxHelpProvider::\destruct{wxHelpProvider}}\label{wxhelpproviderdtor}
26
27 \func{}{\destruct{wxHelpProvider}}{\void}
28
29 Virtual destructor for any base class.
30
31 \membersection{wxHelpProvider::AddHelp}\label{wxhelpprovideraddhelp}
32
33 \func{void}{AddHelp}{\param{wxWindowBase* }{window}, \param{const wxString\& }{text}}
34
35 Associates the text with the given window or id. Although all help
36 providers have these functions to allow making \helpref{wxWindow::SetHelpText}{wxwindowsethelptext}
37 work, not all of them implement the functions.
38
39 \membersection{wxHelpProvider::Get}\label{wxhelpproviderget}
40
41 \func{wxHelpProvider*}{Get}{\void}
42
43 Unlike some other classes, the help provider is not created on demand.
44 This must be explicitly done by the application.
45
46 \membersection{wxHelpProvider::GetHelp}\label{wxhelpprovidergethelp}
47
48 \func{wxString}{GetHelp}{\param{const wxWindowBase* }{window}}
49
50 Gets the help string for this window. Its interpretation is dependent on the help provider
51 except that empty string always means that no help is associated with
52 the window.
53
54 \func{void}{AddHelp}{\param{wxWindowID }{id}, \param{const wxString\& }{text}}
55
56 This version associates the given text with all windows with this id.
57 May be used to set the same help string for all Cancel buttons in
58 the application, for example.
59
60 \membersection{wxHelpProvider::RemoveHelp}\label{wxhelpproviderremovehelp}
61
62 \func{void}{RemoveHelp}{\param{wxWindowBase* }{window}}
63
64 Removes the association between the window pointer and the help text. This is
65 called by the wxWindow destructor. Without this, the table of help strings will fill up
66 and when window pointers are reused, the wrong help string will be found.
67
68 \membersection{wxHelpProvider::Set}\label{wxhelpproviderset}
69
70 \func{wxHelpProvider*}{Set}{\param{wxHelpProvider* }{helpProvider}}
71
72 Get/set the current, application-wide help provider. Returns
73 the previous one.
74
75 \membersection{wxHelpProvider::ShowHelp}\label{wxhelpprovidershowhelp}
76
77 \func{bool}{ShowHelp}{\param{wxWindowBase* }{window}}
78
79 Shows help for the given window. Uses \helpref{GetHelp}{wxhelpprovidergethelp} internally if
80 applicable.
81
82 Returns true if it was done, or false if no help was available
83 for this window.
84