It is often useful to write brief documentation right in the source code. The tool "zudocu" extracts this and produces HTML. Example#= The Label class is used for simple text widgets.# this line doesn't show up. #: example #% ZWT.Button hello = NEW("hello!") #% hello.setStyle(NEW().setColor(NEW("red")) CLASS Label EXTENDS Widget #= Create a new Label with the text |text|. #> text: Any valid string. NIL is equal to an empty string. PROC NEW(string text) ... #= Set the text in the Label to |text|. #- If the Label is visible it is updated immediately. #> text: Any valid string. NIL is equal to an empty string. #> Returns THIS for chaining. FUNC setText(string text) Label ... #= Set the main style to |style|. #- Any previous style is dropped. #> style: When NIL the style is cleared. #> Returns THIS for chaining. FUNC setStyle(Style style) Label ... Produces an HTML page like this: CLASS Label @directorysummary
members (alphabetically)
Special Comments
FormattingA wiki-like syntax is used for formatting.simple list: # - list item one # continued # - list item two # below the list shows up as:
below the list Marking argument names and links to other classes and methods: # argument |text| is used just like in @Widget. An URL can be entered in between three @: # See @http://www.zimbu.org/documentation@this page@ for more information. To be continued.... |
Documentation >