]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/helpinst.tex
Small mods to manual
[wxWidgets.git] / docs / latex / wx / helpinst.tex
CommitLineData
a660d684
KB
1\section{\class{wxHelpInstance}}\label{wxhelpinstance}
2
3NOTE: this documentation is out of date (see comments below).
4
5The {\bf wxHelpInstance} class implements the interface by which
6applications may invoke wxHelp to provide on-line help. Each instance
7of the class maintains one connection to an instance of wxHelp which
8belongs to the application, and which is shut down when the Quit
9member of {\bf wxHelpInstance} is called (for example in the {\bf
10OnClose} member of an application's main frame). Under MS Windows,
11there is currently only one instance of wxHelp which is used by all
12applications.
13
14Since there is a DDE link between the two programs, each subsequent
15request to display a file or section uses the existing instance of
16wxHelp, rather than starting a new instance each time. wxHelp thus
17appears to the user to be an extension of the current application.
18wxHelp may also be invoked independently of a client application.
19
20Normally an application will create an instance of {\bf
21wxHelpInstance} when it starts, and immediately call {\bf Initialize}\rtfsp
22to associate a filename with it. wxHelp will only get run, however,
23just before the first call to display something. See the test program
24supplied with the wxHelp source.
25
26Include the file {\tt wx\_help.h} to use this API, even if you have
27included {\tt wx.h}.
28
29If you give TRUE to the constructor, you can use the native help system
30where appropriate (currently under Windows only). Omit the file extension
31to allow wxWindows to choose the appropriate file for the platform.
32
33TODO: no longer derive this from a client class, but maybe have several implementations,
34e.g. wxHelpInstanceBase, wxHelpInstanceDDE, wxHelpInstanceWinHelp, wxHelpInstanceHTML, etc.
35
36\wxheading{Derivation}
37
38TODO
39
40\wxheading{See also}
41
42TODO
43
44\latexignore{\rtfignore{\wxheading{Members}}}
45
46\membersection{wxHelpInstance::wxHelpInstance}
47
48\func{}{wxHelpInstance}{\param{bool}{ native}}
49
50Constructs a help instance object, but does not invoke wxHelp.
51If {\it native} is TRUE, tries to use the native help system where
52possible (Windows Help under MS Windows, wxHelp on other platforms).
53
54\membersection{wxHelpInstance::\destruct{wxHelpInstance}}
55
56\func{}{\destruct{wxHelpInstance}}{\void}
57
58Destroys the help instance, closing down wxHelp for this application
59if it is running.
60
61\membersection{wxHelpInstance::Initialize}
62
63\func{void}{Initialize}{\param{const wxString\& }{file}, \param{int}{ server = -1}}
64
65Initializes the help instance with a help filename, and optionally a server (socket)
66number (one is chosen at random if this parameter is omitted). Does not invoke wxHelp.
67This must be called directly after the help instance object is created and before
68any attempts to communicate with wxHelp.
69
70You may omit the file extension, and in fact this is recommended if you
71wish to support .xlp files under X and .hlp under Windows.
72
73\membersection{wxHelpInstance::DisplayBlock}
74
75\func{bool}{DisplayBlock}{\param{long}{ blockNo}}
76
77If wxHelp is not running, runs wxHelp and displays the file at the given block number.
78If using Windows Help, displays the file at the given context number.
79
80\membersection{wxHelpInstance::DisplayContents}
81
82\func{bool}{DisplayContents}{\void}
83
84If wxHelp is not running, runs wxHelp (or Windows Help) and displays the
85contents (the first section of the file).
86
87\membersection{wxHelpInstance::DisplaySection}
88
89\func{bool}{DisplaySection}{\param{int}{ sectionNo}}
90
91If wxHelp is not running, runs wxHelp and displays the given section.
92Sections are numbered starting from 1, and section numbers may be viewed by running
93wxHelp in edit mode.
94
95\membersection{wxHelpInstance::KeywordSearch}
96
97\func{bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
98
99If wxHelp (or Windows Help) is not running, runs wxHelp (or Windows
100Help), and searches for sections matching the given keyword. If one
101match is found, the file is displayed at this section. If more than one
102match is found, the Search dialog is displayed with the matches (wxHelp)
103or the first topic is displayed (Windows Help).
104
105\membersection{wxHelpInstance::LoadFile}
106
107\func{bool}{LoadFile}{\param{const wxString\& }{file = NULL}}
108
109If wxHelp (or Windows Help) is not running, runs wxHelp (or Windows
110Help), and loads the given file. If the filename is not supplied or is
111NULL, the file specified in {\bf Initialize} is used. If wxHelp is
112already displaying the specified file, it will not be reloaded. This
113member function may be used before each display call in case the user
114has opened another file.
115
116\membersection{wxHelpInstance::OnQuit}
117
118\func{bool}{OnQuit}{\void}
119
120Overridable member called when this application's wxHelp is quit
121(no effect if Windows Help is being used instead).
122
123\membersection{wxHelpInstance::Quit}
124
125\func{bool}{Quit}{\void}
126
127If wxHelp is running, quits wxHelp by disconnecting (no effect for Windows
128Help).
129
130