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=
0
23 \item wxWinHelpController, for controlling Windows Help.
24 \item wxExtHelpController, for controlling external browsers under Unix.
25 The default browser is Netscape Navigator.
28 \wxheading{Derivation
}
30 wxHelpControllerBase\\
31 \helpref{wxObject
}{wxobject
}
33 \wxheading{Include file
}
37 \latexignore{\rtfignore{\wxheading{Members
}}}
39 \membersection{wxHelpController::wxHelpController
}
41 \func{}{wxHelpController
}{\void}
43 Constructs a help instance object, but does not invoke the help viewer.
45 \membersection{wxHelpController::
\destruct{wxHelpController
}}
47 \func{}{\destruct{wxHelpController
}}{\void}
49 Destroys the help instance, closing down the viewer if it is running.
51 \membersection{wxHelpController::Initialize
}\label{wxhelpcontrollerinitialize
}
53 \func{virtual void
}{Initialize
}{\param{const wxString\&
}{file
}}
55 \func{virtual void
}{Initialize
}{\param{const wxString\&
}{file
},
\param{int
}{ server
}}
57 Initializes the help instance with a help filename, and optionally a server (socket)
58 number. Does not invoke the help viewer.
59 This must be called directly after the help instance object is created and before
60 any attempts to communicate with the viewer.
62 You may omit the file extension and a suitable one will be chosen.
64 \membersection{wxHelpController::DisplayBlock
}\label{wxhelpcontrollerdisplayblock
}
66 \func{virtual bool
}{DisplayBlock
}{\param{long
}{ blockNo
}}
68 If the help viewer is not running, runs it and displays the file at the given block number.
69 The interpretation of
{\it blockNo
} differs between help viewers. If using Windows Help, this
70 refers to the context number. If wxHelp, this is the wxHelp block number.
72 \membersection{wxHelpController::DisplayContents
}\label{wxhelpcontrollerdisplaycontents
}
74 \func{virtual bool
}{DisplayContents
}{\void}
76 If the help viewer is not running, runs it and displays the
79 \membersection{wxHelpController::DisplaySection
}\label{wxhelpcontrollerdisplaysection
}
81 \func{virtual bool
}{DisplaySection
}{\param{int
}{ sectionNo
}}
83 If the help viewer is not running, runs it and displays the given section.
84 Sections are numbered starting from
1.
86 For wxHelp, section numbers may be viewed by running wxHelp in edit mode.
88 DisplaySection does not apply to WinHelp.
90 \membersection{wxHelpController::KeywordSearch
}\label{wxhelpcontrollerkeywordsearch
}
92 \func{virtual bool
}{KeywordSearch
}{\param{const wxString\&
}{keyWord
}}
94 If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one
95 match is found, the file is displayed at this section. If more than one
96 match is found, the Search dialog is displayed with the matches (wxHelp)
97 or the first topic is displayed (Windows Help).
99 \membersection{wxHelpController::LoadFile
}\label{wxhelpcontrollerloadfile
}
101 \func{virtual bool
}{LoadFile
}{\param{const wxString\&
}{file = NULL
}}
103 If the help viewer is not running, runs it and loads the given file.
104 If the filename is not supplied or is
105 NULL, the file specified in
{\bf Initialize
} is used. If the viewer is
106 already displaying the specified file, it will not be reloaded. This
107 member function may be used before each display call in case the user
108 has opened another file.
110 \membersection{wxHelpController::OnQuit
}\label{wxhelpcontrolleronquit
}
112 \func{virtual bool
}{OnQuit
}{\void}
114 Overridable member called when this application's viewer is quit by the user.
116 This does not work for all help controllers.
118 \membersection{wxHelpController::Quit
}\label{wxhelpcontrollerquit
}
120 \func{virtual bool
}{Quit
}{\void}
122 If the viewer is running, quits it by disconnecting.
124 For Windows Help, the viewer will only close if no other application is using it.