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