Difference between revisions of "Lazarus Documentation Editor"

From Free Pascal wiki
Jump to navigationJump to search
Line 17: Line 17:
 
=== Let us start documenting ===
 
=== Let us start documenting ===
 
<div class="floatleft"> http://lazarus-ccr.sourceforge.net/kb/images/9/90/Lazdeelements.png </div>
 
<div class="floatleft"> http://lazarus-ccr.sourceforge.net/kb/images/9/90/Lazdeelements.png </div>
Opening the node "Packages" will show the "LCL" node which contains a "Buttons" node. Selecting this last node will fill the lower treeview with elements. These elements depict Constants, Types and Classes defined in the unit. Used units are added as well as nodes.
+
Opening the node "Packages" will show the "LCL" node which contains a "Buttons" node. Selecting this last node will fill the lower treeview with elements. These elements depict Constants, Types and Classes defined in the unit. Used units are added as well as nodes.
 +
Other nodes are added for the properies of a class, the parameters for a function and so on.
  
 
Selecting a node in the lower left treeview will make the content of that node displayed on the right side of the window.
 
Selecting a node in the lower left treeview will make the content of that node displayed on the right side of the window.
  
 
When you look at http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/index-4.html you will see an overview of classes defined in the "buttons" unit. After each class you see a line of text. This text comes from the "short" editbox from lazde.
 
When you look at http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/index-4.html you will see an overview of classes defined in the "buttons" unit. After each class you see a line of text. This text comes from the "short" editbox from lazde.
 +
 +
After "short" there is a memofield where you can enter a more elaborate description of the component or the property.
 +
 +
Next are "Errors", "See also" and "Example code File". ''Who helps with Errors?'' Just above "See also" you see three buttons. These buttons enable you to add and remove links to other pages.

Revision as of 19:44, 16 May 2005

Introduction

This is work in progress.

An important part of Lazarus still missing is the documentation. To aid in the making of this documentation a tool has been developed. This page will describe the workings of this tool. To denote the Lazarus base directory in this document I use [$LazDir]. So when you read this replace this with the directory lazarus is installed in.

How to start

To keep the documentation platform independent XML is used. The current documentation can be found in [$LazDir]/docs/xml/. So far there are only skeleton files in the lcl directory. The XML files you find in this directory are auto generated and need to be adapted to be usable. So now we know where to find the files, lets look at the tool to create / adapt them.

The Lazarus Documentation Editor

"lazde" is a tool to edit the xml files, but can also be used to generate the basic files from source files and by means of an external tool to generate a HTML version of the documentation. An example of the results of the last tool can be seen here, a part of the documentation sofar. As there is no compiled version of lazde, you have to make one yourself. The sources for "lazde" can be found in [$LazDir]/doceditor/. When you run this program and you have opened [$LazDir]/docs/xml/lcl/buttons.xml you will be presented with this screen

Lazdemain.png

Let us start documenting

Opening the node "Packages" will show the "LCL" node which contains a "Buttons" node. Selecting this last node will fill the lower treeview with elements. These elements depict Constants, Types and Classes defined in the unit. Used units are added as well as nodes. Other nodes are added for the properies of a class, the parameters for a function and so on.

Selecting a node in the lower left treeview will make the content of that node displayed on the right side of the window.

When you look at http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/index-4.html you will see an overview of classes defined in the "buttons" unit. After each class you see a line of text. This text comes from the "short" editbox from lazde.

After "short" there is a memofield where you can enter a more elaborate description of the component or the property.

Next are "Errors", "See also" and "Example code File". Who helps with Errors? Just above "See also" you see three buttons. These buttons enable you to add and remove links to other pages.