你如何在 Doxygen 中定义主页层次结构?

Ele*_*ski 2 doxygen

在这个 Doxygen 生成的帮助页面http://api.fluffyunderware.com/curvy/index.html 上,有一个主页的分层文档索引和一个目录。如何在我自己的文档中复制此功能?

这是提到的页面的屏幕截图:

在此处输入图片说明

sif*_*man 6

在链接中的示例网页上,有两个主要窗格:左侧是自动生成的分层索引(Doxygen 称之为“树视图”),右侧是手动生成的目录。这些是使用不同的方法生产的。

指数

要创建自动生成的分层索引,请编辑您的 Doxyfile,并确保显示以下标签,如下所示:

GENERATE_TREEVIEW      = YES
Run Code Online (Sandbox Code Playgroud)

GENERATE_TREEVIEW标签的默认值为NO

这将导致索引出现在左窗格中。

目录

右窗格中的目录可以手动生成,如下所示。

在 Markdown 中使用嵌套的缩进项目符号列表手动创建多级层次结构,并使用@ref(或\ref)命令标签创建超链接。

这是我自己项目的 doxygen 文档的摘录。我将此页面放在名为“pages.dox”的文档中,并INPUT在 Doxyfile 中的标记中添加了对“pages.dox”的引用。

/*! @page users_guide STFishFinder API User's Guide

@par Table of Contents

- @ref users_guide
    - @ref black_box
    - @ref api_overview
    - @ref stfishfinder_api
    - @ref wrappers
        - @ref ios_fishfinder_api
        - The Fish Finder API for Android   <!-- @ref android_fishfinder_api -->
        - The Fish Finder API for CLI       <!-- @ref windows_fishfinder_api -->
        - The Fish Finder API for Linux     <!-- @ref linux_fishfinder_api -->
        - @ref porting
    - @ref how_to
        - @ref how_to_connect
        - Flow of Information Overview      <!-- @ref flow_of_info -->
        - Advanced Gain Settings            <!-- @ref gain_how_to -->
        - How To Use the Depth Alarms       <!-- @ref depth_alarms_how_to -->
        - @ref simulator_how_to
        - Updating the Black Box Firmware   <!-- @ref firmware_update -->
        - @ref best_practices

*/
Run Code Online (Sandbox Code Playgroud)


上面摘录的页面由 Doxygen 渲染,如下面的屏幕截图所示:

在此处输入图片说明

请注意,我的目录中的某些条目不是链接(例如“The Fish Finder API for Android”)。这是因为我的 API 文档还没有完成,所以我为尚未编写的页面创建了“占位符”。我@ref使用 HTML 样式的注释标签注释掉了这些链接。

也可以看看

  • Doxygen@ref命令的在线文档位于此链接
  • Doxygen降价支持的文档 位于此链接