]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/helpinst.tex
FreeBSD patch to sckaddr.cpp; include more files in manual; misc
[wxWidgets.git] / docs / latex / wx / helpinst.tex
1 \section{\class{wxHelpControllerBase}}\label{wxhelpcontrollerbase}
2
3 This class defines the interface by which
4 applications may invoke a help viewer to provide on-line help.
5
6 Other classes derive from this class to provide actual implementations
7 of help controllers.
8
9 A help controller allows an application to display help, at the contents
10 or at a particular topic, and shut the help program down on termination.
11 This avoids proliferation of many instances of the help viewer whenever the
12 user requests a different topic via the application's menus or buttons.
13
14 Typically, an application will create a help controller instance
15 when it starts, and immediately call {\bf Initialize}\rtfsp
16 to associate a filename with it. The help viewer will only get run, however,
17 just 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
40 Constructs a help instance object, but does not invoke the help viewer.
41
42 \membersection{wxHelpControllerBase::\destruct{wxHelpControllerBase}}
43
44 \func{}{\destruct{wxHelpControllerBase}}{\void}
45
46 Destroys 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
54 Initializes the help instance with a help filename, and optionally a server (socket)
55 number. Does not invoke the help viewer.
56 This must be called directly after the help instance object is created and before
57 any attempts to communicate with the viewer.
58
59 You 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
65 If the help viewer is not running, runs it and displays the file at the given block number.
66 The interpretation of {\it blockNo} differs between help viewers. If using Windows Help, this
67 refers 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
73 If the help viewer is not running, runs it and displays the
74 contents.
75
76 \membersection{wxHelpControllerBase::DisplaySection}\label{wxhelpcontrollerbasedisplaysection}
77
78 \func{virtual bool}{DisplaySection}{\param{int}{ sectionNo}}
79
80 If the help viewer is not running, runs it and displays the given section.
81 Sections are numbered starting from 1.
82
83 For wxHelp, section numbers may be viewed by running wxHelp in edit mode.
84
85 DisplaySection does not apply to WinHelp.
86
87 \membersection{wxHelpControllerBase::KeywordSearch}\label{wxhelpcontrollerbasekeywordsearch}
88
89 \func{virtual bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
90
91 If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
92 match is found, the file is displayed at this section. If more than one
93 match is found, the Search dialog is displayed with the matches (wxHelp)
94 or 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
100 If the help viewer is not running, runs it and loads the given file.
101 If the filename is not supplied or is
102 NULL, the file specified in {\bf Initialize} is used. If the viewer is
103 already displaying the specified file, it will not be reloaded. This
104 member function may be used before each display call in case the user
105 has opened another file.
106
107 \membersection{wxHelpControllerBase::OnQuit}\label{wxhelpcontrollerbaseonquit}
108
109 \func{virtual bool}{OnQuit}{\void}
110
111 Overridable member called when this application's viewer is quit by the user.
112
113 This only works for wxXLPHelpController.
114
115 \membersection{wxHelpControllerBase::Quit}\label{wxhelpcontrollerbasequit}
116
117 \func{virtual bool}{Quit}{\void}
118
119 If the viewer is running, quits it by disconnecting.
120
121 For Windows Help, the viewer will only close if no other application is using it.
122