Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen and long class names

Tags:

c++

doxygen

I have a nice C++ project, where template programming is used extensively, but that is really not the point. The point is that some of my class names (with all the template parameters) get quite long. I use Doxygen for documentation.

This wouldn't normally be an issue but recently I noticed that the class list is unreadable because the long class names make it too wide to fit on a screen.

Is there a way to make Doxygen break names of classes in the class list to more lines? Is there perhaps a way to hide specializations of a template class from class list while retaining the general template class? Is there a better solution?

I managed to find a silly work-around by hiding the classes in a namespace and then immediately importing this namespace to the global namespace, so that the names of those classes would not appear on the list, unless the namespace is clicked or detail level is increased. The obvious downside is that the classes now do not appear on the list (some of those are fairly important and I'd like them to be there).

I could also remove the following style:

.directory td.entry {
    white-space: nowrap;
}

This can be done by saving this:

.directory td.entry {
    white-space: normal;
}

as modify.css and specifying it under HTML_EXTRA_STYLESHEET. There are more word wrap tags however (e.g. flex-wrap), so additional editing might be required.

like image 765
the swine Avatar asked Oct 19 '22 08:10

the swine


1 Answers

Finally, I went with modifying the css. I ended up using:

.directory td.entry {
    white-space: normal;
    /*width: 50%;*/ /* does not work, makes "Related Pages" look bad */
    min-width: 512px; /* better, unless you have a 640x480 screen */
}

I saved this as doxygen_modify.css and specified path to it in HTML_EXTRA_STYLESHEET (note that if named doxygen.css, it will not be renamed automatically and instead it will be replaced by the main style sheet - and hence you will not see any changes).

like image 188
the swine Avatar answered Oct 30 '22 21:10

the swine