# toolbar(3)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

toolbar - Toggle tool bar visibility.
toolbar-open - Open the tool bar.
toolbar-close - Close the tool bar
toolbar-refresh - Update the tool bar

## SYNOPSIS

n toolbar
toolbar-open
toolbar-close
toolbar-refresh

## DESCRIPTION

The toolbar is one or more fixed buffers that typically appear at the left-hand edge of the window that contains different tools that assist in editing the buffer. The toolbar is really a container for tools and short cuts which are configured by the user depending on the tool that has been loaded. The tools themselves are buffer context sensitive, the buffer-init(3) command automatically re-configures the toolbar for the buffer at run time.

The configuration of the toolbar is stored in command variables `.toolvar.*` which are used to control the toolbar. The tools that are available in toolbar are determined from the file `toollist.emf` which is loaded when the toolbar is started. User defined toolbars may be added by redefinging the toolbar variables at runtime.

toolbar toggles the visibility of the toolbar, i.e. if the toolbar is open it is closed and vica versa. If the numeric argument n is specified then zero closes the toolbar and non-zero opens the toolbar. toolbar-open initializes and starts the toolbar if it is not already running. The toolbar is loaded and instantiated in the system. The toolbar may be subsequently closed using toolbar-close. Whilst the toolbar is running then the content of the tollbar may become out of date, the command toolbar-refresh(3) forces the toolbar to be re-evaluated and the content is updated.

## CONFIGURATION

The toolbar is configured with command variables .toolbar.*. The size information of the toolbar is defined with the following variables:-

.toolbar.width

Defines the default width of the left-hand vertical toolbar.

.toolbar.depth

Defines the default depth of the top horizontal toolbar.

The tools within the toolbar are configured with the following variables. Each variable is divided into fields, each field represents a single tool. The fields are separated with the `\CH` character. The order of the fields MUST be the same in each of the variables such that the field content matches the tool that is being defined.

.tool-flag

The .tool-flag variable describes the behaviour of the tool, this is defined as a bitmask as follows:-

`0x000001` - Update on creation

Call the tool update command when the tool is created, this is typically required when the content of the toolbar is generated.

`0x000002` - Update on redraw

Call the tool update command when a redraw operation has been performed.

`0x000004` - Buffer type changed

Call the tool update command when the buffer type has changed, a change of buffer type requires that a buffer specific tool is reconfigured.

`0x000008` - Current buffer changed

Call the tool update command when the current buffer is changed, a change of buffer buffer requires that a buffer content specific tool is reconfigured.

`0x000010` - Current buffer modified or saved

Call the tool update command when the current buffer is modified or saved.

`0x000080` - Perform update checks

On an update check the toolbar for changes in content.

`0x000100` - Lock depth and width

Lock the depth and width of the tool.

`0x000200` - Tool uses a paged window

The tool uses a paged window in the toolbar (i.e. only one tool has focus).

`0x000400` - Tool is hidden

The tool is currently hidden. When in this state the not active sub-page `0x200` will also be set.

`0x000800` - Tool paged window, not first user.

The tool is part of a paged window and is not the first tool.

`0x001000` - position in the left toolbar

The tool is present in the left toolbar, on toolbar creation the tool is automatically loaded into the toolbar.

`0x002000` - position in the top toolbar

The tool is present in the top toolbar, on toolbar creation the tool is automatically loaded into the toolbar.

`0x004000` - position in the right toolbar

The tool is present in the right toolbar, on toolbar creation the tool is automatically loaded into the toolbar.

`0x008000` - position in the bottom toolbar

The tool is present in the bottom toolbar, on toolbar creation the tool is automatically loaded into the toolbar.

`0x010000` - Include buffer type in mode-line (Prefix)

The buffer type is included in the toolbar mode line as a prefix.

`0x020000` - Include buffer name in mode-line (suffix)

The buffer name is included in the toolbar mode line as a suffix.

`0x040000` - Include buffer filename in mode-line (suffix)

The buffer file name is included in the toolbar mode line as a suffix.

`0x100000` - Restore window location after an update

The position of the hilighted line in the toolbar is restored after an update.

`0x200000` - Move position to beginning of buffer after an update

The position of the hilighted line is restored to the top of the buffer following an update.

.toolbar.tool-name

The name of the tool that is displayed to the user.

.toolbar.tool-descs

A short description of the tool which is used in the tool selection dialog.

.toolbar.tool-buffs

The name of the buffer which is used to store toolbar information. The names are usually *name* so that they are not saved.

.toolbar.tool-files

The macro file to load when the tool is loaded, if a tool is not used then the macros that define the tool are not loaded.

.toolbar.tool-cmds

The creation and update commands to run when the command is created.

## FILES

Notable toolbox macro files:-

- `toolbar.emf` - The main toolbar file.
- `toolstp.emf` - The toolbar setup menu i.e. the right click of the mouse on the toolbar mode line.
- `toollist.emf` - List off tools available in the toolbar.
- `bookmark.emf` - The bookmark tool.
- `toolstd.emf` - Basic tools (Info, Buffer list)
- `abbrlist.emf` - The buffer tools and buffer abbreviation tools.
- `itemlist.emf` - Buffer item list tool.
- `killlist.emf` - The kill list tool.

## SEE ALSO

osd(2), recenter(2).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>