wxExtHelpController.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <html><head><TITLE>wxExtHelpController</TITLE></head>
  2. <body>
  3. <H2><A HREF ="#DOC.DOCU" > <IMG BORDER=0 SRC=down.gif></A> class wxExtHelpController </H2><BLOCKQUOTE>
  4. This class implements help via an external browser
  5. </BLOCKQUOTE>
  6. <hr>
  7. <DL>
  8. <DL>
  9. <DT><h3>Public Methods</h3><DD><DT><A HREF="#DOC.8.6"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>DisplayBlock</B>(long blockNo) </B>
  10. <DD><I>Display help for id sectionNo -- identical with DisplaySection()</I>
  11. <DT><A HREF="#DOC.8.4"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>DisplayContents</B>(void) </B>
  12. <DD><I>Display list of all help entries</I>
  13. <DT><A HREF="#DOC.8.5"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>DisplaySection</B>(int sectionNo) </B>
  14. <DD><I>Display help for id sectionNo</I>
  15. <DT><A HREF="#DOC.8.1"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>Initialize</B>(const wxString&amp; file, int WXUNUSED(server)) </B>
  16. <DD><I>This must be called to tell the controller where to find the
  17. documentation</I>
  18. <DT><A HREF="#DOC.8.2"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>Initialize</B>(const wxString&amp; file) </B>
  19. <DD><I>This must be called to tell the controller where to find the
  20. documentation</I>
  21. <DT><A HREF="#DOC.8.7"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>KeywordSearch</B>(const wxString&amp; k) </B>
  22. <DD><I>Search comment/documentation fields in map file and present a
  23. list to chose from</I>
  24. <DT><A HREF="#DOC.8.3"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>LoadFile</B>(const wxString&amp; file = "") </B>
  25. <DD><I>If file is "", reloads file given in Initialize</I>
  26. <DT><A HREF="#DOC.8.10"> <IMG BORDER=0 SRC=icon1.gif></A> virtual void <B>OnQuit</B>(void) </B>
  27. <DD><I>does nothing</I>
  28. <DT><A HREF="#DOC.8.9"> <IMG BORDER=0 SRC=icon1.gif></A> virtual bool <B>Quit</B>(void) </B>
  29. <DD><I>does nothing</I>
  30. <DT><A HREF="#DOC.8.8"> <IMG BORDER=0 SRC=icon1.gif></A> void <B>SetBrowser</B>(wxString const &amp; browsername = <!2><A HREF="#DOC.4">WXEXTHELP_DEFAULTBROWSER</A>, bool isNetscape = <!2><A HREF="#DOC.5">WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE</A>) </B>
  31. <DD><I>Tell it which browser to use</I>
  32. </DL><DL>
  33. <DT><h3>Private Fields</h3><DD><DT><A HREF="#DOC.8.15"> <IMG BORDER=0 SRC=icon1.gif></A> bool <B>m_BrowserIsNetscape</B> </B>
  34. <DD><I>Is the viewer a variant of netscape?</I>
  35. <DT><A HREF="#DOC.8.14"> <IMG BORDER=0 SRC=icon1.gif></A> wxString <B>m_BrowserName</B> </B>
  36. <DD><I>How to call the html viewer</I>
  37. <DT><A HREF="#DOC.8.11"> <IMG BORDER=0 SRC=icon1.gif></A> wxString <B>m_MapFile</B> </B>
  38. <DD><I>Filename of currently active map file</I>
  39. <DT><A HREF="#DOC.8.13"> <IMG BORDER=0 SRC=icon1.gif></A> wxExtHelpMapList* <B>m_MapList</B> </B>
  40. <DD><I>A list containing all id,url,documentation triples</I>
  41. <DT><A HREF="#DOC.8.12"> <IMG BORDER=0 SRC=icon1.gif></A> int <B>m_NumOfEntries</B> </B>
  42. <DD><I>How many entries do we have in the map file?</I>
  43. </DL><DL>
  44. <DT><h3>Private Methods</h3><DD><DT><A HREF="#DOC.8.16"> <IMG BORDER=0 SRC=icon1.gif></A> bool <B>CallBrowser</B>(wxString const &amp;) </B>
  45. <DD><I>Call the browser using a relative URL</I>
  46. </DL></DL>
  47. <A NAME="DOC.DOCU">
  48. <hr>
  49. <h2> Documentation </h2>
  50. <BLOCKQUOTE>
  51. This class implements help via an external browser.
  52. It requires the name of a directory containing the documentation
  53. and a file mapping numerical Section numbers to relative URLS.<P>The map file contains two or three fields per line:
  54. numeric_id relative_URL [; comment/documentation]<P>The numeric_id is the id used to look up the entry in
  55. DisplaySection()/DisplayBlock(). The relative_URL is a filename of
  56. an html file, relative to the help directory. The optional
  57. comment/documentation field (after a ';') is used for keyword
  58. searches, so some meaningful text here does not hurt.
  59. If the documentation itself contains a ';', only the part before
  60. that will be displayed in the listbox, but all of it used for search.<P>Lines starting with ';' will be ignored.<P>This confuses DOC++, so I leave it out for now:
  61. <TT>ifdef USE_HELP</TT>: public wxHelpControllerBase
  62. {
  63. DECLARE_CLASS(wxExtHelpController)
  64. <TT>else</TT>{
  65. <TT>endif
  66. </BLOCKQUOTE>
  67. <DL>
  68. <A NAME="Initialize">
  69. <A NAME ="DOC.8.1">
  70. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool Initialize(const wxString&amp; file, int WXUNUSED(server))</B></TT>
  71. <DD>This must be called to tell the controller where to find the
  72. documentation
  73. <DL><DT><B>Returns:</B><DD>true on success
  74. <DT><B>Parameters:</B><DD><B>file</B> - - NOT a filename, but a directory name.
  75. <br></DL><P>
  76. <A NAME="Initialize">
  77. <A NAME ="DOC.8.2">
  78. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool Initialize(const wxString&amp; file)</B></TT>
  79. <DD>This must be called to tell the controller where to find the
  80. documentation
  81. <DL><DT><B>Returns:</B><DD>true on success
  82. <DT><B>Parameters:</B><DD><B>file</B> - - NOT a filename, but a directory name.
  83. <br></DL><P>
  84. <A NAME="LoadFile">
  85. <A NAME ="DOC.8.3">
  86. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool LoadFile(const wxString&amp; file = "")</B></TT>
  87. <DD>If file is "", reloads file given in Initialize.
  88. @file Name of help directory.
  89. <DL><DT><B>Returns:</B><DD>true on success
  90. </DL><P>
  91. <A NAME="DisplayContents">
  92. <A NAME ="DOC.8.4">
  93. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool DisplayContents(void)</B></TT>
  94. <DD>Display list of all help entries
  95. <DL><DT><B>Returns:</B><DD>true on success
  96. </DL><P>
  97. <A NAME="DisplaySection">
  98. <A NAME ="DOC.8.5">
  99. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool DisplaySection(int sectionNo)</B></TT>
  100. <DD>Display help for id sectionNo
  101. <DL><DT><B>Returns:</B><DD>true on success
  102. </DL><P>
  103. <A NAME="DisplayBlock">
  104. <A NAME ="DOC.8.6">
  105. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool DisplayBlock(long blockNo)</B></TT>
  106. <DD>Display help for id sectionNo -- identical with DisplaySection()
  107. <DL><DT><B>Returns:</B><DD>true on success
  108. </DL><P>
  109. <A NAME="KeywordSearch">
  110. <A NAME ="DOC.8.7">
  111. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool KeywordSearch(const wxString&amp; k)</B></TT>
  112. <DD>Search comment/documentation fields in map file and present a
  113. list to chose from.
  114. @key k string to search for, empty string will list all entries
  115. <DL><DT><B>Returns:</B><DD>true on success
  116. </DL><P>
  117. <A NAME="Quit">
  118. <A NAME ="DOC.8.9">
  119. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual bool Quit(void)</B></TT>
  120. <DD>does nothing
  121. <DL></DL><P>
  122. <A NAME="OnQuit">
  123. <A NAME ="DOC.8.10">
  124. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> virtual void OnQuit(void)</B></TT>
  125. <DD>does nothing
  126. <DL></DL><P>
  127. <A NAME="SetBrowser">
  128. <A NAME ="DOC.8.8">
  129. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void SetBrowser(wxString const &amp; browsername = <!2><A HREF="#DOC.4">WXEXTHELP_DEFAULTBROWSER</A>, bool isNetscape = <!2><A HREF="#DOC.5">WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE</A>)</B></TT>
  130. <DD>Tell it which browser to use.
  131. The Netscape support will check whether Netscape is already
  132. running (by looking at the .netscape/lock file in the user's
  133. home directory) and tell it to load the page into the existing
  134. window.
  135. <DL><DT><B>Parameters:</B><DD><B>browsername</B> - The command to call a browser/html viewer.
  136. <br><B>isNetscape</B> - Set this to TRUE if the browser is some variant of Netscape.<br></DL><P>
  137. <A NAME="m_MapFile">
  138. <A NAME ="DOC.8.11">
  139. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> wxString m_MapFile</B></TT>
  140. <DD>Filename of currently active map file
  141. <DL></DL><P>
  142. <A NAME="m_NumOfEntries">
  143. <A NAME ="DOC.8.12">
  144. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> int m_NumOfEntries</B></TT>
  145. <DD>How many entries do we have in the map file?
  146. <DL></DL><P>
  147. <A NAME="m_MapList">
  148. <A NAME ="DOC.8.13">
  149. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> wxExtHelpMapList* m_MapList</B></TT>
  150. <DD>A list containing all id,url,documentation triples
  151. <DL></DL><P>
  152. <A NAME="m_BrowserName">
  153. <A NAME ="DOC.8.14">
  154. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> wxString m_BrowserName</B></TT>
  155. <DD>How to call the html viewer
  156. <DL></DL><P>
  157. <A NAME="m_BrowserIsNetscape">
  158. <A NAME ="DOC.8.15">
  159. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> bool m_BrowserIsNetscape</B></TT>
  160. <DD>Is the viewer a variant of netscape?
  161. <DL></DL><P>
  162. <A NAME="CallBrowser">
  163. <A NAME ="DOC.8.16">
  164. <DT><IMG BORDER=0 SRC=icon2.gif><TT><B> bool CallBrowser(wxString const &amp;)</B></TT>
  165. <DD>Call the browser using a relative URL
  166. <DL></DL><P></DL>
  167. <hr>
  168. <DL><DT><B>This class has no child classes.</B></DL>
  169. <DL></DL><P><I><A HREF="aindex.html"> alphabetic index</A></I> <I><A HREF="HIER.html"> hierarchy of classes</A></I><P></BODY><hr>
  170. <A HREF="http://www.zib.de/Visual/software/doc++/index.html"><IMG BORDER=0 ALIGN=RIGHT SRC=logo.gif></A>
  171. <P Align=Center><I>this page has been generated automatically by doc++
  172. <P Align=Center>(c)opyright by <A HREF="http://www.zib.de/zoeckler/"> Malte Z&oumlckler</A>, <A HREF="mailto:wunderling@zib.de"> Roland Wunderling </A><br>contact: <A HREF="mailto:doc++@zib.de"> doc++@zib.de </a>