1 \section{\class{wxHelpController
}}\label{wxhelpcontroller
}
3 This is a family of classes by which
4 applications may invoke a help viewer to provide on-line help.
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.
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.
16 Although all help controller classes actually derive from wxHelpControllerBase and have
17 names of the form wxXXXHelpController, the
18 appropriate class is aliased to the name wxHelpController for each platform.
20 There are currently the following help controller classes defined:
22 \begin{itemize
}\itemsep=
0pt
23 \item wxWinHelpController, for controlling Windows Help.
24 \item wxExtHelpController, for controlling external browsers under Unix.
25 The default browser is Netscape Navigator.
26 \item wxXLPHelpController, for controlling wxHelp (from wxWindows
1).
29 \wxheading{Derived from
}
31 wxHelpControllerBase\\
32 \helpref{wxObject
}{wxobject
}
34 \wxheading{Include files
}
36 <wx/help.h> (wxWindows chooses the appropriate help controller class)\\
37 <wx/helpbase.h> (wxHelpControllerBase class)\\
38 <wx/helpwin.h> (Windows Help controller)\\
39 <wx/generic/helpext.h> (external HTML browser controller)
40 <wx/generic/helpxlp.h> (wxHelp controller)
42 \latexignore{\rtfignore{\wxheading{Members
}}}
44 \membersection{wxHelpController::wxHelpController
}
46 \func{}{wxHelpController
}{\void}
48 Constructs a help instance object, but does not invoke the help viewer.
50 \membersection{wxHelpController::
\destruct{wxHelpController
}}
52 \func{}{\destruct{wxHelpController
}}{\void}
54 Destroys the help instance, closing down the viewer if it is running.
56 \membersection{wxHelpController::Initialize
}\label{wxhelpcontrollerinitialize
}
58 \func{virtual void
}{Initialize
}{\param{const wxString\&
}{file
}}
60 \func{virtual void
}{Initialize
}{\param{const wxString\&
}{file
},
\param{int
}{ server
}}
62 Initializes the help instance with a help filename, and optionally a server (socket)
63 number if using wxHelp. Does not invoke the help viewer.
64 This must be called directly after the help instance object is created and before
65 any attempts to communicate with the viewer.
67 You may omit the file extension and a suitable one will be chosen.
69 \membersection{wxHelpController::DisplayBlock
}\label{wxhelpcontrollerdisplayblock
}
71 \func{virtual bool
}{DisplayBlock
}{\param{long
}{ blockNo
}}
73 If the help viewer is not running, runs it and displays the file at the given block number.
75 {\it wxHelp:
} this is the wxHelp block number.
77 {\it WinHelp:
} Refers to the context number.
79 {\it External HTML help:
} the same as for
\helpref{wxHelpController::DisplaySection
}{wxhelpcontrollerdisplaysection
}.
81 \membersection{wxHelpController::DisplayContents
}\label{wxhelpcontrollerdisplaycontents
}
83 \func{virtual bool
}{DisplayContents
}{\void}
85 If the help viewer is not running, runs it and displays the
88 \membersection{wxHelpController::DisplaySection
}\label{wxhelpcontrollerdisplaysection
}
90 \func{virtual bool
}{DisplaySection
}{\param{int
}{ sectionNo
}}
92 If the help viewer is not running, runs it and displays the given section.
94 {\it wxHelp:
} Sections are numbered starting from
1. Section numbers may be viewed by running wxHelp in edit mode.
96 {\it WinHelp:
} {\it sectionNo
} is a context id.
98 {\it External HTML help:
} wxExtHelpController implements
{\it sectionNo
} as an id in a map file, which is of the form:
102 1 wx34.html#classref ; Class reference
103 2 wx204.html ; Function reference
106 \membersection{wxHelpController::KeywordSearch
}\label{wxhelpcontrollerkeywordsearch
}
108 \func{virtual bool
}{KeywordSearch
}{\param{const wxString\&
}{keyWord
}}
110 If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
111 match is found, the file is displayed at this section.
113 {\it wxHelp:
} If more than one
114 match is found, the Search dialog is displayed with the matches.
116 {\it WinHelp:
} If more than one match is found,
117 the first topic is displayed.
119 {\it External HTML help:
} If more than one match is found,
120 a choice of topics is displayed.
122 \membersection{wxHelpController::LoadFile
}\label{wxhelpcontrollerloadfile
}
124 \func{virtual bool
}{LoadFile
}{\param{const wxString\&
}{file = ""
}}
126 If the help viewer is not running, runs it and loads the given file.
127 If the filename is not supplied or is
128 NULL, the file specified in
{\bf Initialize
} is used. If the viewer is
129 already displaying the specified file, it will not be reloaded. This
130 member function may be used before each display call in case the user
131 has opened another file.
133 \membersection{wxHelpController::SetViewer
}\label{wxhelpcontrollersetviewer
}
135 \func{virtual void
}{SetViewer
}{\param{const wxString\&
}{viewer
},
\param{long
}{ flags
}}
137 Sets detailed viewer information. So far this is only relevant to wxExtHelpController.
139 \wxheading{Parameters
}
141 \docparam{viewer
}{This defaults to "netscape" for wxExtHelpController.
}
143 \docparam{flags
}{This defaults to wxHELP
\_NETSCAPE for wxExtHelpController, indicating
144 that the viewer is a variant of Netscape Navigator.
}
146 \membersection{wxHelpController::OnQuit
}\label{wxhelpcontrolleronquit
}
148 \func{virtual bool
}{OnQuit
}{\void}
150 Overridable member called when this application's viewer is quit by the user.
152 This does not work for all help controllers.
154 \membersection{wxHelpController::Quit
}\label{wxhelpcontrollerquit
}
156 \func{virtual bool
}{Quit
}{\void}
158 If the viewer is running, quits it by disconnecting.
160 For Windows Help, the viewer will only close if no other application is using it.