TOOLBAR sections

TOOLBAR sections define the layout for a toolbar and attach commands to toolbar components. There can be as many TOOLBAR sections as desired, but remember to use the NEW ROW command to keep the lortug window from becoming too wide or tall. As with all section types TOOLBAR sections begin with BEGIN TOOLBAR and end with END TOOLBAR. The twist is that the BEGIN TOOLBAR command takes an argument. This argument controls whether the toolbar is dockable. It can be either YES or NO. For example to create a dockable toolbar use BEGIN TOOLBAR:YES.

The section can be filled with as many toolbar component definitions as desired. Lortug supports five types of toolbar components: buttons, toggle buttons, text boxes, combo boxes and separators.

The arguments to the component definition lines are:

The following example creates a toolbar with a button that runs make on a target specified in a combo box which will also run make when its contents change. The toolbar is not dockable.

BEGIN VARS target = END VARS

BEGIN TOOLBAR: NO BUTTON: makeButton, makeIcon.xpm, Make, make
{target} COMBO_BOX: targetBox, Make target, 60, target, N/A, all |
clean, false, make {target} END TOOLBAR 

Note that the above assumes that the pixmap makeIcon.xpm exists somewhere in lortug's icon path.