Documentación

En general, los proyectos de gtkmm usan Doxygen, que lee comentarios de C++ con un formato específico y genera documentación HTML. Puede escribir estos comentarios de Doxygen directamente en los archivos de cabecera.

G.7.1. Reutilizar la documentación de C

Tal vez quiera reutilizar documentación que exista para la biblioteca de C que está envolviendo. Las bibliotecas GTK de C típicamente usan gtk-doc y por lo tanto tienen comentarios en el código fuente en formato de gtk-doc y alguna documentación adicional en archivos .sgml y .xml. El script «docextract_to_xml.py», de la carpeta tools/defs_gen de glibmm, puede leer estos archivos y crear un archivo .xml que gmmproc puede usar para generar comentarios de doxygen. gmmproc incluso intentará transformar la documentación para hacerla más apropiada para una API de C++.

Por ejemplo,

./docextract_to_xml.py -s ~/checkout/gnome/gtk/gtk/ > gtk_docs.xml

Because this automatic transformation is not always appropriate, you might want to provide hand-written text for a particular method. You can do this by copying the XML node for the function from your something_docs.xml file to the something_docs_override.xml file and changing the contents. Alternatively you can write your own documentation in the .hg file.

G.7.2. Estructura de construcción de la documentación

If you copied the skeleton source tree in mm-common and substituted the placeholder text, then you will already have suitable meson.build and Doxyfile.in files in the doc/reference/ directory. You probably need to modify the tag_file_modules variable in meson.build, though. With the mm-common build setup, the list of Doxygen input files is not defined in the Doxygen configuration file, but passed along from meson/ninja to the standard input of doxygen.