Lists#

Breathe has support for lists in the doxygen documentation. They are output as follows.

For unordered lists with list items prefixed with +:

.. doxygenclass:: SimpleList_1
   :project: lists

It renders as:


class SimpleList_1#

This is a list example.

Following is a list using ‘+’ for bullets:

  • One item.

  • Two items.

  • Three items.

  • Four.

And this is some more text.


Unordered lists with list items prefixed with - render as:


class SimpleList_2#

This is a list example.

Following is a list using ‘-’ for bullets:

  • One item.

  • Two items.

  • Three items.

  • Four.

And this is some more text.


Unordered lists with list items prefixed with * render as:


class SimpleList_3#

This is a list example.

Following is a list using ‘*’ for bullets:

  • One item.

  • Two items.

  • Three items.

  • Four.

And this is some more text.


Unordered lists defined using HTML tags <ul><li> render as:


class SimpleList_6#

This is a list example.

Following is an unordered list using ‘HTML’ tags:

  • One item.

  • Two items.

  • Three items.

  • Four.

And this is some more text.


Auto-numbered lists with list items prefixed with -# render as:


class SimpleList_4#

This is a list example.

Following is an auto-numbered list:

  1. One item.

  2. Two items.

  3. Three items.

  4. Four.

And this is some more text.


Numbered lists with list items prefixed with Arabic numerals 1. 2. … render as:


class SimpleList_5#

This is a list example.

Following is a numbered list:

  1. One item.

  2. Two items.

  3. Three items.

  4. Four.

And this is some more text.


Note

Numbered lists support for the moment only Arabic numerals.

Nested lists are supported in all combinations, as long as they are valid doxygen markup. Below are a couple of examples of different nested lists documentation and their corresponding breathe output.

Documentation looking like this:

/**
 *      \file nested_list_1.h
 *      Example of nested lists in documentation.
 */

/**
 *  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
 *         1. key down event
 *         2. key up event
 *
 *  More text here.
 */
class NestedLists_1
{
};

renders as:


class NestedLists_1#

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.


Documentation looking like this:

/**
 *      \file nested_list_2.h
 *      Example of nested list in documentation.
 */

/**
 * Text before the list
 * - list item 1
 *   - sub item 1
 *     - sub sub item 1
 *     - sub sub item 2
 *     .
 *     The dot above ends the sub sub item list.
 *
 *     More text for the first sub item
 *   .
 *   The dot above ends the first sub item.
 *
 *   More text for the first list item
 *   - sub item 2
 *   - sub item 3
 * - list item 2
 * .
 * More text in the same paragraph.
 *
 * More text in a new paragraph.
 */
class NestedLists_2
{
};

renders as:


class NestedLists_2#

Text before the list.

  • list item 1

    • sub item 1

      • sub sub item 1

      • sub sub item 2

      The dot above ends the sub sub item list.

      More text for the first sub item

    The dot above ends the first sub item.

    More text for the first list item

    • sub item 2

    • sub item 3

  • list item 2

More text in the same paragraph.

More text in a new paragraph.


Documentation looking like this:

/**
 *      \file nested_list_3.h
 *      Example of nested lists in documentation.
 */

/*!
 *  A list of events:
 *  <ul>
 *  <li> mouse events
 *     <ol>
 *     <li>mouse move event
 *     <li>mouse click event<br>
 *         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.
 */
 class NestedLists_3
{
};

renders as:


class NestedLists_3#

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.


Documentation looking like this:

/**
 *      \file nested_list_4.h
 *      Example of nested lists in documentation.
 */

/**
 *  A list of events:
 *    1. mouse events
 *        -# mouse move event
 *            1. swipe event
 *            2. circle event
 *            3. wave event
 *        -# mouse click event\n
 *            More info about the click event.
 *        -# mouse double click event
 *    2. keyboard events
 *        -# key down event
 *        -# key up event
 *    3. touch events
 *        -# pinch event
 *        -# swipe event
 *  More text here.
 */
class NestedLists_4
{
};

renders as:


class NestedLists_4#

A list of events:

  1. mouse events

    1. mouse move event

      1. swipe event

      2. circle event

      3. wave event

    2. mouse click event

      More info about the click event.

    3. mouse double click event

  2. keyboard events

    1. key down event

    2. key up event

  3. touch events

    1. pinch event

    2. swipe event More text here.


Documentation looking like this:

/**
 *      \file nested_list_4.h
 *      Example of nested lists in documentation.
 */

/**
 *  A deeply nested list of events:
 *    1. mouse events
 *        -# mouse move event
 *            1. swipe event
 *              -# swipe left
 *              -# swipe right
 *            2. circle event
 *            3. wave event
 *        -# mouse click event\n
 *            More info about the click event.
 *        -# mouse double click event
 *    2. keyboard events
 *        -# key down event
 *        -# key up event
 *    3. touch events
 *        -# pinch event
 *        -# swipe event
 *  More text here.
 */
class NestedLists_5
{
};

renders as:


class NestedLists_5#

A deeply nested list of events:

  1. mouse events

    1. mouse move event

      1. swipe event

        1. swipe left

        2. swipe right

      2. circle event

      3. wave event

    2. mouse click event

      More info about the click event.

    3. mouse double click event

  2. keyboard events

    1. key down event

    2. key up event

  3. touch events

    1. pinch event

    2. swipe event More text here.