## Lists

Doxygen has a number of ways to create lists of items.

Using dashes

By putting a number of column-aligned minus signs at the start of a line, a bullet list will automatically be generated. Numbered lists can also be generated by using a minus followed by a hash. Nesting of lists is allowed.

Here is an example:

      /*!
       *  A list of events:
       *    - mouse events
       *         -# mouse move event
       *         -# mouse click event\n
       *            More info about the click event.
       *         -# mouse double click event
       *    - keyboard events
       *         -# key down event
       *         -# key up event
       *
       *  More text here.
       */

The result will be:

A list of events:

- mouse events
  1. mouse move event
  2. mouse click event
     More info about the click event.
  3. mouse double click event
- keyboard events
  1. key down event
  2. key up event

More text here.

If you use tabs within lists, please make sure that TAB_SIZE in the configuration file is set to the correct tab size.

Using HTML commands

If you like you can also use HTML commands inside the documentation blocks. Using these commands has the advantage that it is more natural for list items that consists of multiple paragraphs.

Here is the above example with HTML commands:

      /*!
       *  A list of events:
       *  <ul>
       *  <li> mouse events
       *     <ol>
       *     <li>mouse move event
       *     <li>mouse click event\n
       *         More info about the click event.
       *     <li>mouse double click event
       *     </ol>
       *  <li> keyboard events
       *     <ol>
       *     <li>key down event
       *     <li>key up event
       *     </ol>
       *  </ul>
       *  More text here.
       */

Note:
  The indentation here is not important.

Using \arg or @li

For compatibility with the Troll Tech's internal documentation tool and with KDoc, doxygen has two commands that can be used to create simple unnested lists.

See \arg and \li for more info.

Go to the next section or return to the index.