You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

356 lines
10KB

  1. /**
  2. \page development Developer Information
  3. This chapter describes FLTK development and documentation.
  4. <H2>Example</H2>
  5. \verbatim
  6. /** \file
  7. Fl_Clock, Fl_Clock_Output widgets. */
  8. /**
  9. \class Fl_Clock_Output
  10. \brief This widget can be used to display a program-supplied time.
  11. The time shown on the clock is not updated. To display the current time,
  12. use Fl_Clock instead.
  13. \image html clock.png
  14. \image latex clock.png "" width=10cm
  15. \image html round_clock.png
  16. \image latex clock.png "" width=10cm
  17. \image html round_clock.png "" width=10cm */
  18. /**
  19. Returns the displayed time.
  20. Returns the time in seconds since the UNIX epoch (January 1, 1970).
  21. \see value(ulong)
  22. */
  23. ulong value() const {return value_;}
  24. /**
  25. Set the displayed time.
  26. Set the time in seconds since the UNIX epoch (January 1, 1970).
  27. \param[in] v seconds since epoch
  28. \see value()
  29. */
  30. void Fl_Clock_Output::value(ulong v) {
  31. [...]
  32. }
  33. /**
  34. Create an Fl_Clock widget using the given position, size, and label string.
  35. The default boxtype is \c FL_NO_BOX.
  36. \param[in] X, Y, W, H position and size of the widget
  37. \param[in] L widget label, default is no label
  38. */
  39. Fl_Clock::Fl_Clock(int X, int Y, int W, int H, const char *L)
  40. : Fl_Clock_Output(X, Y, W, H, L) {}
  41. /**
  42. Create an Fl_Clock widget using the given boxtype, position, size, and
  43. label string.
  44. \param[in] t boxtype
  45. \param[in] X, Y, W, H position and size of the widget
  46. \param[in] L widget label, default is no label
  47. */
  48. Fl_Clock::Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L)
  49. : Fl_Clock_Output(X, Y, W, H, L) {
  50. type(t);
  51. box(t==FL_ROUND_CLOCK ? FL_NO_BOX : FL_UP_BOX);
  52. }
  53. \endverbatim
  54. \note
  55. From Duncan: (will be removed later, just for now as a reminder)
  56. I've just added comments for the fl_color_chooser() functions, and
  57. in order to keep them and the general Function Reference information
  58. for them together, I created a new doxygen group, and used \\ingroup
  59. in the three comment blocks. This creates a new Modules page (which
  60. may not be what we want) with links to it from the File Members and
  61. Fl_Color_Chooser.H pages. It needs a bit more experimentation on my
  62. part unless someone already knows how this should be handled. (Maybe
  63. we can add it to a functions.dox file that defines a functions group
  64. and do that for all of the function documentation?)
  65. \b Update: the trick is not to create duplicate entries in a new group, but
  66. to move the function information into the doxygen comments for the
  67. class, and use the navigation links provided. Simply using \\relatesalso
  68. as the first doxygen command in the function's comment puts it in the
  69. appropriate place. There is no need to have \\defgroup and \\ingroup as
  70. well, and indeed they don't work. So, to summarize:
  71. \verbatim
  72. Gizmo.H
  73. /** \class Gizmo
  74. A gizmo that does everything
  75. */
  76. class Gizmo {
  77. etc
  78. };
  79. extern int popup_gizmo(...);
  80. Gizmo.cxx:
  81. /** \relatesalso Gizmo
  82. Pops up a gizmo dialog with a Gizmo in it
  83. */
  84. int popup_gizmo(...);
  85. \endverbatim
  86. <H3>Comments Within Doxygen Comment Blocks:</H3>
  87. You can use HTML comment statements to embed comments in doxygen comment blocks.
  88. These comments will not be visible in the generated document.
  89. \code
  90. The following text is a developer comment.
  91. <!-- *** This *** is *** invisible *** -->
  92. This will be visible again.
  93. \endcode
  94. will be shown as:
  95. The following text is a developer comment.
  96. <!-- *** This *** is *** invisible *** -->
  97. This will be visible again.
  98. <H3>Different Headlines:</H3>
  99. \code
  100. <H1>Headline in big text (H1)</H1>
  101. <H2>Headline in big text (H2)</H2>
  102. <H3>Headline in big text (H3)</H3>
  103. <H4>Headline in big text (H4)</H4>
  104. \endcode
  105. <H1>Headline in big text (H1)</H1>
  106. <H2>Headline in big text (H2)</H2>
  107. <H3>Headline in big text (H3)</H3>
  108. <H4>Headline in big text (H4)</H4>
  109. \section development_non-ascii Non-ASCII Characters
  110. \code
  111. Doxygen understands many HTML quoting characters like
  112. &quot;, &uuml;, &ccedil;, &Ccedil;, but not all HTML quoting characters.
  113. \endcode
  114. This will appear in the document:
  115. Doxygen understands many HTML quoting characters like
  116. &quot;, &uuml;, &ccedil;, &Ccedil;, but not all HTML quoting characters.
  117. For further informations about HTML quoting characters see
  118. \b http://www.doxygen.org/htmlcmds.html
  119. Alternatively you can use \b UTF-8 encoding within Doxygen comments.
  120. \section development_structure Document Structure
  121. \li \b \\page creates a named page
  122. \li \b \\section creates a named section within that page
  123. \li \b \\subsection creates a named subsection within the current section
  124. \li \b \\subsubsection creates a named subsubsection within the current subsection
  125. All these statements take a "name" as their first argument, and a title
  126. as their second argument. The title can contain spaces.
  127. The page, section, and subsection titles are formatted in blue color and
  128. a size like \b "<H1>", \b "<H2>", and \b "<H3>", and \b "<H4>", respectively.
  129. By <b>FLTK documentation convention</b>, a file like this one with a doxygen
  130. documentation chapter has the name <b>"<chapter>.dox".</b>
  131. The \b \\page statement at the top of the page is
  132. <b>"\page <chapter> This is the title"</b>.
  133. Sections within a documentation page must be called \b "<chapter>_<section>",
  134. where \b "<chapter>" is the name part of the file, and \b "<section>" is a
  135. unique section name within the page that can be referenced in links. The
  136. same for subsections and subsubsections.
  137. These doxygen page and section commands work only in special documentation
  138. chapters, not within normal source or header documentation blocks. However,
  139. links \b from normal (e.g. class) documentation \b to documentation sections
  140. \b do \b work.
  141. This page has
  142. \code
  143. \page development I - Developer Information
  144. \endcode
  145. at its top.
  146. This section is
  147. \code
  148. \section development_structure Document structure
  149. \endcode
  150. The following section is
  151. \code
  152. \section development_links Creating Links
  153. \endcode
  154. \section development_links Creating Links
  155. Links to other documents and external links can be embedded with
  156. - doxygen \\ref links to other doxygen \\page, \\section,
  157. \\subsection and \\anchor locations
  158. - HTML links without markup - doxygen creates "http://..."
  159. links automatically
  160. - standard, non-Doxygen, HTML links
  161. \code
  162. - see chapter \ref unicode creates a link to the named chapter
  163. unicode that has been created with a \page statement.
  164. - For further informations about quoting see
  165. http://www.doxygen.org/htmlcmds.html
  166. - see <a href="http://www.nedit.org/">Nedit</a> creates
  167. a standard HTML link
  168. \endcode
  169. appears as:
  170. - see chapter \ref unicode creates a link to the named chapter
  171. unicode that has been created with a \\page statement.
  172. - For further informations about quoting see
  173. http://www.doxygen.org/htmlcmds.html
  174. - see <a href="http://www.nedit.org/">Nedit</a> creates
  175. a standard HTML link
  176. \section development_paragraphs Paragraph Layout
  177. There is no real need to use HTML \<P\> and \</P\> tags within the text
  178. to tell doxygen to start or stop a paragraph. In most cases, when doxygen
  179. encounters a blank line or some, but not all, \b \\commands in the text it
  180. knows that it as reached the start or end of a paragraph. Doxygen also
  181. offers the \b \\par command for special paragraph handling. It can be used
  182. to provide a paragraph title and also to indent a paragraph. Unfortunately
  183. \b \\par won't do what you expect if you want to have doxygen links and
  184. sometimes html tags don't work either.
  185. <!-- use verbatim rather than code to avoid links to code reference -->
  186. \verbatim
  187. \par Normal Paragraph with title
  188. This paragraph will have a title, but because there is a blank line
  189. between the \par and the text, it will have the normal layout.
  190. \par Indented Paragraph with title
  191. This paragraph will also have a title, but because there is no blank
  192. line between the \par and the text, it will be indented.
  193. \par
  194. It is also possible to have an indented paragraph without title.
  195. This is how you indent subsequent paragraphs.
  196. \par No link to Fl_Widget::draw()
  197. Note that the paragraph title is treated as plain text.
  198. Doxygen type links will not work.
  199. HTML characters and tags may or may not work.
  200. Fl_Widget::draw() links and &quot;html&quot; tags work<br>
  201. \par
  202. Use a single line ending with <br> for complicated paragraph titles.
  203. \endverbatim
  204. The above code produces the following paragraphs:
  205. \par Normal Paragraph with title
  206. This paragraph will have a title, but because there is a blank line
  207. between the \\par and the text, it will have the normal layout.
  208. \par Indented Paragraph with title
  209. This paragraph will also have a title, but because there is no blank
  210. line between the \\par and the text, it will be indented.
  211. \par
  212. It is also possible to have an indented paragraph without title.
  213. This is how you indent subsequent paragraphs.
  214. \par No link to Fl_Widget::draw()
  215. Note that the paragraph title is treated as plain text.
  216. Doxygen type links will not work.
  217. HTML characters and tags may or may not work.
  218. Fl_Widget::draw() links and &quot;html&quot; tags work<br>
  219. \par
  220. Use a single line ending with \<br\> for complicated paragraph titles.
  221. \section development_navigation_test Navigation Elements
  222. Each introduction (tutorial) page ends with navigation elements. These
  223. elements must only be included in the html documentation, therefore
  224. they must be separated with \\htmlonly and \\endhtmlonly.
  225. The following code gives the navigation bar at the bottom of this page:
  226. \verbatim
  227. \htmlonly
  228. <hr>
  229. <table summary="navigation bar" width="100%" border="0">
  230. <tr>
  231. <td width="45%" align="LEFT">
  232. <a class="el" href="migration_1_3.html">
  233. [Prev]
  234. Migrating Code from FLTK 1.1 to 1.3
  235. </a>
  236. </td>
  237. <td width="10%" align="CENTER">
  238. <a class="el" href="index.html">[Index]</a>
  239. </td>
  240. <td width="45%" align="RIGHT">
  241. <a class="el" href="license.html">
  242. Software License
  243. [Next]
  244. </a>
  245. </td>
  246. </tr>
  247. </table>
  248. \endhtmlonly
  249. \endverbatim
  250. \htmlonly
  251. <hr>
  252. <table summary="navigation bar" width="100%" border="0">
  253. <tr>
  254. <td width="45%" align="LEFT">
  255. <a class="el" href="migration_1_3.html">
  256. [Prev]
  257. Migrating Code from FLTK 1.1 to 1.3
  258. </a>
  259. </td>
  260. <td width="10%" align="CENTER">
  261. <a class="el" href="index.html">[Index]</a>
  262. </td>
  263. <td width="45%" align="RIGHT">
  264. <a class="el" href="license.html">
  265. Software License
  266. [Next]
  267. </a>
  268. </td>
  269. </tr>
  270. </table>
  271. \endhtmlonly
  272. */