1 \section{\class{wxHelpControllerBase
}}\label{wxhelpcontrollerbase
}
3 This class defines the interface by which
4 applications may invoke a help viewer to provide on-line help.
6 Other classes derive from this class to provide actual implementations
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.
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.
19 \wxheading{Derivation
}
21 \helpref{wxObject
}{wxobject
}
25 \helpref{wxWinHelpController
}{wxwinhelpcontroller
}
27 \wxheading{Include file
}
29 {\tt <wx/helpbase.h>
} (for just wxHelpControllerBase)
31 {\tt <wx/help.h>
} (to include the platform-specific controller, e.g. wxWinHelpController)
34 \latexignore{\rtfignore{\wxheading{Members
}}}
36 \membersection{wxHelpControllerBase::wxHelpControllerBase
}
38 \func{}{wxHelpControllerBase
}{\void}
40 Constructs a help instance object, but does not invoke the help viewer.
42 \membersection{wxHelpControllerBase::
\destruct{wxHelpControllerBase
}}
44 \func{}{\destruct{wxHelpControllerBase
}}{\void}
46 Destroys the help instance, closing down the viewer if it is running.
48 \membersection{wxHelpControllerBase::Initialize
}\label{wxhelpcontrollerbaseinitialize
}
50 \func{virtual void
}{Initialize
}{\param{const wxString\&
}{file
}}
52 \func{virtual void
}{Initialize
}{\param{const wxString\&
}{file
},
\param{int
}{ server
}}
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.
59 You may omit the file extension and a suitable one will be chosen.
61 \membersection{wxHelpControllerBase::DisplayBlock
}\label{wxhelpcontrollerbasedisplayblock
}
63 \func{virtual bool
}{DisplayBlock
}{\param{long
}{ blockNo
}}
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.
69 \membersection{wxHelpControllerBase::DisplayContents
}\label{wxhelpcontrollerbasedisplaycontents
}
71 \func{virtual bool
}{DisplayContents
}{\void}
73 If the help viewer is not running, runs it and displays the
76 \membersection{wxHelpControllerBase::DisplaySection
}\label{wxhelpcontrollerbasedisplaysection
}
78 \func{virtual bool
}{DisplaySection
}{\param{int
}{ sectionNo
}}
80 If the help viewer is not running, runs it and displays the given section.
81 Sections are numbered starting from
1.
83 For wxHelp, section numbers may be viewed by running wxHelp in edit mode.
85 DisplaySection does not apply to WinHelp.
87 \membersection{wxHelpControllerBase::KeywordSearch
}\label{wxhelpcontrollerbasekeywordsearch
}
89 \func{virtual bool
}{KeywordSearch
}{\param{const wxString\&
}{keyWord
}}
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).
96 \membersection{wxHelpControllerBase::LoadFile
}\label{wxhelpcontrollerbaseloadfile
}
98 \func{virtual bool
}{LoadFile
}{\param{const wxString\&
}{file = NULL
}}
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.
107 \membersection{wxHelpControllerBase::OnQuit
}\label{wxhelpcontrollerbaseonquit
}
109 \func{virtual bool
}{OnQuit
}{\void}
111 Overridable member called when this application's viewer is quit by the user.
113 This only works for wxXLPHelpController.
115 \membersection{wxHelpControllerBase::Quit
}\label{wxhelpcontrollerbasequit
}
117 \func{virtual bool
}{Quit
}{\void}
119 If the viewer is running, quits it by disconnecting.
121 For Windows Help, the viewer will only close if no other application is using it.