Index | OAT homepage | OpenLink Software

# OATDOCtoolbar

- OATDOCtoolbar
- _ _ toolbar.js
- _ _ _ _ Objects
- _ _ _ _ _ _ OAT.Toolbar(div, options)
- _ _ _ _ Methods
- _ _ _ _ _ _ OAT.Toolbar.addIcon(twoStates, imagePath, tooltip, callback)
- _ _ _ _ _ _ OAT.Toolbar.addSeparator()
- _ _ _ _ _ _ OAT.Toolbar.removeIcon(icon)
- _ _ _ _ _ _ OAT.Toolbar.removeSeparator(separator)
- _ _ _ _ CSS classes
- _ _ _ _ _ _ OAT.Toolbar.toolbar
- _ _ _ _ _ _ OAT.Toolbar.toolbar_icon
- _ _ _ _ _ _ OAT.Toolbar.toolbar
- _ _ _ _ _ _ OAT.Toolbar.toolbar_separator
- _ _ _ _ Example

## toolbar.js

Basic Toolbar control.

### Objects

#### OAT.Toolbar(div, options)

Creates a `Toolbar` . Its main `div` is accessible as `toolbar.div` . You can use the following `options` :

- `labels` - use labels (default `false` )

### Methods

#### OAT.Toolbar.addIcon(twoStates, imagePath, tooltip, callback)

Adds a new icon to Toolbar. If `twoStates` is `true` , then this icon will have two states (otherwise 1). This icon will have image located at `imagePath` ; `onHover` it will display `tooltip` ; and clicking it will execute `callback` (with state #, `0` or `1` , as an argument).

#### OAT.Toolbar.addSeparator()

Adds a separator.

#### OAT.Toolbar.removeIcon(icon)

Remove `icon` .

#### OAT.Toolbar.removeSeparator(separator)

Remove `separator` .

### CSS classes

#### OAT.Toolbar.toolbar

ToBeDone

#### OAT.Toolbar.toolbar_icon

ToBeDone

#### OAT.Toolbar.toolbar icon_down

ToBeDone

#### OAT.Toolbar.toolbar_separator

ToBeDone

### Example

    var callback = function(state) { alert(state); }
    var t = new OAT.Toolbar();
    t.addIcon(true, "", "some tooltip", callback);
    document.body.appendChild(t.div);

Copyright (C) 2005-2008 OpenLink Software