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:

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; onHoverit 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);

CategoryDocumentation CategoryOAT CategoryOpenSource CategoryToBeDone?