Basic Toolbar control
Creates a Toolbar. Its main DIV is accessible as toolbar.div
.
Adds a new icon to Toolbar. If twoStates == true, than this icon will have two states (otherwise 1). This icon will have image located at imagePath, it will display tooltip onHover and clicking it will execute callback (with state #, 0 or 1, as an argument).
Adds a separator.
var callback = function(state) { alert(state); }
var t = new Toolbar();
t.addIcon(true, "", "some tooltip", callback);
document.body.appendChild(t.div);