]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/helpinst.tex
Corrected memory.cpp checkpoint bug; added Tex2RTF
[wxWidgets.git] / docs / latex / wx / helpinst.tex
... / ...
CommitLineData
1\section{\class{wxHelpController}}\label{wxhelpcontroller}
2
3This is a family of classes by which
4applications may invoke a help viewer to provide on-line help.
5
6A help controller allows an application to display help, at the contents
7or at a particular topic, and shut the help program down on termination.
8This avoids proliferation of many instances of the help viewer whenever the
9user requests a different topic via the application's menus or buttons.
10
11Typically, an application will create a help controller instance
12when it starts, and immediately call {\bf Initialize}\rtfsp
13to associate a filename with it. The help viewer will only get run, however,
14just before the first call to display something.
15
16Although all help controller classes actually derive from wxHelpControllerBase and have
17names of the form wxXXXHelpController, the
18appropriate class is aliased to the name wxHelpController for each platform.
19
20There are currently the following help controller classes defined:
21
22\begin{itemize}\itemsep=0
23\item wxWinHelpController, for controlling Windows Help.
24\item wxExtHelpController, for controlling external browsers under Unix.
25The default browser is Netscape Navigator.
26\end{itemize}
27
28\wxheading{Derivation}
29
30wxHelpControllerBase\\
31\helpref{wxObject}{wxobject}
32
33\wxheading{Include file}
34
35{\tt <wx/help.h>}
36
37\latexignore{\rtfignore{\wxheading{Members}}}
38
39\membersection{wxHelpController::wxHelpController}
40
41\func{}{wxHelpController}{\void}
42
43Constructs a help instance object, but does not invoke the help viewer.
44
45\membersection{wxHelpController::\destruct{wxHelpController}}
46
47\func{}{\destruct{wxHelpController}}{\void}
48
49Destroys the help instance, closing down the viewer if it is running.
50
51\membersection{wxHelpController::Initialize}\label{wxhelpcontrollerinitialize}
52
53\func{virtual void}{Initialize}{\param{const wxString\& }{file}}
54
55\func{virtual void}{Initialize}{\param{const wxString\& }{file}, \param{int}{ server}}
56
57Initializes the help instance with a help filename, and optionally a server (socket)
58number. Does not invoke the help viewer.
59This must be called directly after the help instance object is created and before
60any attempts to communicate with the viewer.
61
62You may omit the file extension and a suitable one will be chosen.
63
64\membersection{wxHelpController::DisplayBlock}\label{wxhelpcontrollerdisplayblock}
65
66\func{virtual bool}{DisplayBlock}{\param{long}{ blockNo}}
67
68If the help viewer is not running, runs it and displays the file at the given block number.
69The interpretation of {\it blockNo} differs between help viewers. If using Windows Help, this
70refers to the context number. If wxHelp, this is the wxHelp block number.
71
72\membersection{wxHelpController::DisplayContents}\label{wxhelpcontrollerdisplaycontents}
73
74\func{virtual bool}{DisplayContents}{\void}
75
76If the help viewer is not running, runs it and displays the
77contents.
78
79\membersection{wxHelpController::DisplaySection}\label{wxhelpcontrollerdisplaysection}
80
81\func{virtual bool}{DisplaySection}{\param{int}{ sectionNo}}
82
83If the help viewer is not running, runs it and displays the given section.
84Sections are numbered starting from 1.
85
86For wxHelp, section numbers may be viewed by running wxHelp in edit mode.
87
88DisplaySection does not apply to WinHelp.
89
90\membersection{wxHelpController::KeywordSearch}\label{wxhelpcontrollerkeywordsearch}
91
92\func{virtual bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
93
94If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
95match is found, the file is displayed at this section. If more than one
96match is found, the Search dialog is displayed with the matches (wxHelp)
97or the first topic is displayed (Windows Help).
98
99\membersection{wxHelpController::LoadFile}\label{wxhelpcontrollerloadfile}
100
101\func{virtual bool}{LoadFile}{\param{const wxString\& }{file = NULL}}
102
103If the help viewer is not running, runs it and loads the given file.
104If the filename is not supplied or is
105NULL, the file specified in {\bf Initialize} is used. If the viewer is
106already displaying the specified file, it will not be reloaded. This
107member function may be used before each display call in case the user
108has opened another file.
109
110\membersection{wxHelpController::OnQuit}\label{wxhelpcontrolleronquit}
111
112\func{virtual bool}{OnQuit}{\void}
113
114Overridable member called when this application's viewer is quit by the user.
115
116This does not work for all help controllers.
117
118\membersection{wxHelpController::Quit}\label{wxhelpcontrollerquit}
119
120\func{virtual bool}{Quit}{\void}
121
122If the viewer is running, quits it by disconnecting.
123
124For Windows Help, the viewer will only close if no other application is using it.
125