TeX-Based Documentation Format

From WxWiki
Jump to navigation Jump to search

The current documentation uses a tex-based format that lacks good structuring. This page describes alternative tex-based documentation formats.

\begin{class}{wxButton}
\begin{description}
A button is a control that contains a text string, and is
one of the commonest elements of a GUI. It may be placed on a dialog box
or panel, or indeed almost any other window.
\end{description}

\begin{windowstyles}
\style[wxBU_LEFT][WIN32] Left-justifies the label
\style[WXBU_TOP][WIN32] Aligns the label to the top of the button                                                                                                                 
\style[WXBU_RIGHT][WIN32] Right-justifies the bitmap label
\style[WXBU_BOTTOM][WIN32] Aligns the label to the bottom of the button                                                                                                              
\style[wxBU_EXACTFIT] Creates the button as small as possible instead of making it of the standard size (which is the default behaviour)
\end{windowstyles}
\end{class}

Another TeX-based format, ConTeXT, would look like this:

\startclass{wxButton}
\startdescription
A button is a control that contains a text string, and is
one of the commonest elements of a GUI. It may be placed on a dialog box
or panel, or indeed almost any other window.
\stopdescription
\startparameters
\parameter[name=wxBU_LEFT,platform=WIN32]
\stopparameters