doxygen 1.11.0 使用详解(七)——列表

Doxygen provides 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. Instead of the minus sign also plus (+) or asterisk (∗) can be used.

Numbered lists can also be generated by using a minus followed by a hash (#) or by using a number followed by a dot.

Lists with as indicator a checked or unchecked check box are possible when having a minus followed by optional spaces and followed by [ ] for an unchecked check box and [x] or [X] for a checked check box.

Nesting of lists is allowed and is based on indentation of the items.

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
 *        1. key down event
 *        2. key up event
 *   - checkbox list
 *        - [ ] unchecked
 *        - [x] checked
 * 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
  • checkbox list
    • unchecked
    • checked

More text here.

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

You can end a list by starting a new paragraph or by putting a dot (.) on an empty line at the same indentation level as the list you would like to end.

Here is an example that speaks for itself:

/**
 * 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.
 */

Using HTML commands

If you like you can also use HTML commands inside the documentation blocks.

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<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.
 */

Note
In this case the indentation is not important.

Using \arg or \li

For compatibility with the Qt Software’s internal documentation tool qdoc and with KDoc, doxygen has two commands that can be used to create simple unnested lists.

  • 41
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值