]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/winhelp.tex
Motif and other mods
[wxWidgets.git] / docs / latex / wx / winhelp.tex
1 \section{\class{wxWinHelpController}}\label{wxwinhelpcontroller}
2
3 This class provides the means to control a WinHelp instance.
4 Under Windows, wxHelpController is defined to be a synonym for wxWinHelpController.
5
6 A help controller allows an application to display help, at the contents
7 or at a particular topic, and shut the help program down on termination.
8 This avoids proliferation of many instances of the help viewer whenever the
9 user requests a different topic via the application's menus or buttons.
10
11 Typically, an application will create a help controller instance
12 when it starts, and immediately call {\bf Initialize}\rtfsp
13 to associate a filename with it. The help viewer will only get run, however,
14 just before the first call to display something.
15
16 \wxheading{Derivation}
17
18 \helpref{wxObject}{wxobject}
19
20 \wxheading{See also}
21
22 \helpref{wxHelpControllerBase}{wxhelpcontrollerbase}
23
24 \wxheading{Include file}
25
26 {\tt <wx/help.h>}
27
28 \latexignore{\rtfignore{\wxheading{Members}}}
29
30 \membersection{wxWinHelpController::wxWinHelpController}
31
32 \func{}{wxWinHelpController}{\void}
33
34 Constructs a help instance object, but does not invoke the help viewer.
35
36 \membersection{wxWinHelpController::\destruct{wxWinHelpController}}
37
38 \func{}{\destruct{wxWinHelpController}}{\void}
39
40 Destroys the help instance, closing down the viewer if it is running.
41
42 \membersection{wxWinHelpController::Initialize}\label{wxwinhelpcontrollerinitialize}
43
44 \func{void}{Initialize}{\param{const wxString\& }{file}}
45
46 Initializes the help instance with a help filename. Does not invoke the help viewer.
47 This must be called directly after the help instance object is created and before
48 any attempts to communicate with the viewer.
49
50 You may omit the file extension and a suitable one will be chosen.
51
52 \membersection{wxWinHelpController::DisplayBlock}\label{wxwinhelpcontrollerdisplayblock}
53
54 \func{bool}{DisplayBlock}{\param{long}{ blockNo}}
55
56 If the help viewer is not running, runs it and displays the file at the given block number.
57 The interpretation of {\it blockNo} differs between help viewers. If using Windows Help, this
58 refers to the context number.
59
60 \membersection{wxWinHelpController::DisplayContents}\label{wxwinhelpcontrollerdisplaycontents}
61
62 \func{bool}{DisplayContents}{\void}
63
64 If the help viewer is not running, runs it and displays the
65 contents.
66
67 \membersection{wxWinHelpController::DisplaySection}\label{wxwinhelpcontrollerdisplaysection}
68
69 \func{bool}{DisplaySection}{\param{int}{ sectionNo}}
70
71 DisplaySection does not apply to WinHelp.
72
73 \membersection{wxWinHelpController::KeywordSearch}\label{wxwinhelpcontrollerkeywordsearch}
74
75 \func{bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
76
77 If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
78 match is found, the file is displayed at this section. If more than one
79 match is found, the first topic is displayed (Windows Help).
80
81 \membersection{wxWinHelpController::LoadFile}\label{wxwinhelpcontrollerloadfile}
82
83 \func{bool}{LoadFile}{\param{const wxString\& }{file = NULL}}
84
85 If the help viewer is not running, runs it and loads the given file.
86 If the filename is not supplied or is
87 NULL, the file specified in {\bf Initialize} is used. If the viewer is
88 already displaying the specified file, it will not be reloaded. This
89 member function may be used before each display call in case the user
90 has opened another file.
91
92 \membersection{wxWinHelpController::OnQuit}\label{wxwinhelpcontrolleronquit}
93
94 \func{bool}{OnQuit}{\void}
95
96 Overridable member called when this application's viewer is quit by the user.
97
98 Not implemented.
99
100 \membersection{wxWinHelpController::Quit}\label{wxwinhelpcontrollerquit}
101
102 \func{bool}{Quit}{\void}
103
104 If the viewer is running, quits it by disconnecting.
105
106 For Windows Help, the viewer will only close if no other application is using it.
107