1

I'm using doxygen generating document html website. By using @defgroup command, I can generate module pages, they are just like manually made index.

There are at least 2 detail levels for my "manually made index" (the module page). Once a man clicking that module page, all level of index are displayed, which, I don't like. Is there any configuration item available to only show the top-level index for the module page?

The actual behavior:

enter image description here

The expected behavior: enter image description here

To reproduce

the doxygen executable version: 1.9.2 (97cb0de4dab1f9eb77325f7ee9f46dcaed8b0c69)

full code to reproduce is available here: https://gitee.com/aczz/cv-dbg/tree/master/doxygen_example

the doxyfile I use is:

PROJECT_NAME = "MyProject"
INPUT = @CMAKE_SOURCE_DIR@
EXTRACT_ALL = YES
HTML_TIMESTAMP = YES
RECURSIVE = YES
STRIP_FROM_PATH = ../

GENERATE_LEGEND        = YES

HTML_HEADER            = @CMAKE_SOURCE_DIR@/docs/header.html
HTML_FOOTER            = @CMAKE_SOURCE_DIR@/docs/footer.html
HTML_STYLESHEET        =
HTML_EXTRA_STYLESHEET  = @CMAKE_SOURCE_DIR@/docs/stylesheet.css

The c++ header file I use, with doxygen commands, is:

#ifndef HELLO_H
#define HELLO_H

/**
  @defgroup basic_types Basic Types
  @{
      @defgroup array_type Array
      @defgroup matrix_type Matrix
      @defgroup tensor_type Tensor
      @defgroup network Nerual Network Data Types
      @{
          @defgroup layer Layer
          @defgroup network Network
      @}
  @}

  @defgroup math_algorithms Math and Algorithms
  @{
    @defgroup array_op Array Operations
    @defgroup matrix_op Matrix Operations
    @{
      @defgroup decomp Matrix Decomposition
      @{
          @defgroup decomp_lu LU Decomposition
          @defgroup decomp_svd SVD Decomposition
      @}
      @defgroup solve Solve Linear Equation
    @}
    @defgroup tensor_op Tensor Operations
  @}

  @defgroup deep_nn Deep Neural Networks

*/

typedef unsigned char uchar;

#include <memory>

//! @addtogroup basic_types
//! @{

/// Matrix class
///
/// represens the image struct
///
class Mat
{
public:
    Mat(): rows_(0), cols_(0), data_(NULL){}

public:
    int rows();
    int cols();
    unsigned char* data();

private:
    int rows_;
    int cols_;
    std::shared_ptr<uchar> data_;
};

class Point
{
public:
    Point(): x(0), y(0) {}
    Point(int _x, int _y): x(_x), y(_y) {}

public:
    int x, y;
};

class Size
{
public:
    Size(): height(0), width(0) {}
    Size(int _height, int _width): height(_height), width(_width) {}

public:
    int height;
    int width;
};

//! @} basic_types

#endif // HELLO_H
albert
  • 8,285
  • 3
  • 19
  • 32
ChrisZZ
  • 1,521
  • 2
  • 17
  • 24
  • 1
    To the best of my knowledge there is no option to signal the initial level of items to open. A while ago I created https://github.com/doxygen/doxygen/pull/6695 for handling similar things in in the in page Table of Contents, but this has not been merged (yet?). maybe a similar approach can be used for other parts of the code. – albert Jun 10 '21 at 08:48
  • Just a little bit curious that OpenCV Documentation's module page show only top level on default: https://docs.opencv.org/master/modules.html – ChrisZZ Jun 10 '21 at 08:50
  • One quick hack is manually modify `modules.html`, add `toggleLevel(1);` right after `init_search();`. ref: https://sourceforge.net/p/doxygen/discussion/130994/thread/45a4ef6d/?limit=25 – ChrisZZ Jun 10 '21 at 09:24
  • I don't know what opencv did but I see here `[detail level 1234]` but this is automatically added. – albert Jun 10 '21 at 09:51

1 Answers1

0

Use HTML_INDEX_NUM_ENTRIES.
If set to 1 then all trees will be fully collapsed.

PS: This answer is for those who stumble upon this page in the future.

Jelle Bleeker
  • 131
  • 11