Unfortunately there's no similar tool for FB source code yet. That's why the fb-doc project gets started. It supports the auto-generation of documentation from FB source using well developed, existing standard tool chains like GTK-Doc or Doxygen.
How it works:
fb-doc is the source code of a command line tool and has to be compiled first. The executable is usually started in the source code folder of a FB project. There it creates two new folders ../doc and ../doc/c_src (if not present) and it scans the FB files (*.bas and *.bi). In the c_src folder a set of pseudo C code files is created similar to the FB source files (.bas gets .c, .bi gets .h). This pseudo C code contains all the documentation relevant stuctures. These are snippets like empty UNIONs, TYPEs and SUBs/FUNCTIONs. Also all FB comments are exported to the pseudo code, unless the comments are marked as private with a '~' character (like '~ or /'~ ... '/). Then the pseudo C code can be used to auto-generate the documentation using standard tools.
Of course, this implements that the documentation is in C syntax. Ie
- DECLARE FUNCTION abc (BYVAL xyz AS INTEGER) AS SHORT
- short abc (int xyz);
Example
This documentation for GooData (developer snapshot) is generated with fb-doc and GTK-Doc. Ie the subsection GooAxis is generated by the following FB code
Code: Select all
'/**
'* goo_axis_new:
'* @Parent: the parent item, or %NULL. If a parent is specified, it will assume
'* ownership of the item, and the item will automatically be freed when it is
'* removed from the parent. Otherwise call g_object_unref() to free it.
'* @Back: the background box to connect the axis to (a #GooCanvasRect, #GooCanvasImage,
'* #GooCanvasGroup, ...). Note: to set the axis position and size, the properties
'* #GooCanvasItemSimple:x, #GooCanvasItemSimple:y, #GooCanvasItemSimple:width and
'* #GooCanvasItemSimple:height will be red (and therefore must be set in the
'* background box item).
'* @Text: the label text for the axis
'* @Modus: the position and type (like %GOO_AXIS_SOUTH or %GOO_GRIDAXIS_SOUTH, ...)
'* @...: optional pairs of property names and values, and a terminating %NULL.
'*
'* Creates a new axis item.
'*
'* Returns: (transfer full): a new axis item.
'**/
FUNCTION goo_axis_new CDECL( _
BYVAL Parent AS GooCanvasItem PTR, _
BYVAL Back AS GooCanvasItem PTR, _
BYVAL Text AS gchar PTR, _
BYVAL Modus AS GooAxisType, _
...) AS GooAxis PTR
' ...
The project is in an early stage. There're no comments in the code yet, and the FB keywords have to be in upper-case letters (can be auto-transformed by FBeauty). But hopefully it's good enough for first user tests.
Find the latest version on this download page