addToolBarButton(button {Object})
Attaches a button to the interface, based on the criteria passed. Returns a button object.
Takes:
button {Object}: A JSON object that contains:
display: {String}
Words or style to put on the button (CSS note: all buttons get a .btnIconLarge CSS style by default)
helptext: (Optional) {String}
If passed, button displays help text when hovered over
type: {String}
Which area to place in the interface – options are plugin, global.
category: (Optional) {String}
If placing a button in the global type area, it will be placed in the upper-menu. The upper menu is divided into categories, and the choices are :
mode: If you’re button action is to change the editing environment (e.g. Auto-Recognizer), then this will place the button in the mode-environment changing area and give the returned object makeActive and unActive methods
data: If you’re plugin/button only deals with intputting or outputting data, then pass this category
misc: If you’re plugin/button doesn’t fit into any of the above, passmisc
If no category is given, button is placed in misc
Returns:
Button {Object} that contains:
elem: {jQuery Object}
Represents HTML element that can have events attached
makeActive: {Function}
If you’re button is a mode-category button, then you have access to this function, which will highlight your button and de-highlight all other mode buttons.
unActive: {Function}
De-selects the button HTML and resets the environment back to the TILE default.