Reference to the DOM nodes that contains the toolbar.
Specifies if events are handled. Default is true.
Holds the event names and associated listeners in an array. The array contains the event name followed by the respective listener for each registered listener.
Specifies if events can be fired. Default is true.
Optional source for events. Default is null.
Specifies if
Boolean indicating if the default mode should be the last selected switch mode or the first inserted switch mode. Default is true, that is the last selected switch mode is the default mode. The default mode is the mode to be selected after a reset of the toolbar. If this is false, then the default mode is the first inserted mode item regardless of what was last selected. Otherwise, the selected item after a reset is the previously selected item.
Adds and returns a new SELECT element using the given title as the default element. The selection is reset to this element after each change.
String that specifies the title of the default element.
Optional
style: stringOptional style classname. Default is mxToolbarCombo.
Adds the given function as an image with the specified title and icon and returns the new image node.
Optional string that is used as the tooltip.
Optional URL of the image to be used. If no URL is given, then a button is created.
Function to execute on a mouse click.
Optional URL of the pressed image. Default is a gray background.
Optional style classname. Default is mxToolbarItem.
Optional factory method for popup menu, eg. (menu, evt, cell)=> { menu.addItem('Hello, World!'); }
Binds the specified function to the given event name. If no event name is given, then the listener is registered for all events.
The parameters of the listener are the sender and an EventObject.
Adds a new item to the toolbar. The selection is typically reset after the item has been consumed, for example by adding a new vertex to the graph. The reset is not carried out if the item is double clicked.
The function argument uses the following signature: funct(evt, cell) where evt is the native mouse event and cell is the cell under the mouse.
Adds and returns a new OPTION element inside the given SELECT element. If the given value is a function then it is stored in the option's funct field.
SELECT element that will contain the new entry.
String that specifies the title of the option.
Specifies the value associated with this option.
Adds a new selectable item to the toolbar. Only one switch mode item may be selected at a time. The currently selected item is the default item after a reset of the toolbar.
Dispatches the given event to the listeners which are registered for the event. The sender argument is optional. The current execution scope ("this") is used for the listener invocation (see Utils#bind).
Example:
fireEvent(new mxEventObject("eventName", key1, val1, .., keyN, valN))
EventObject that represents the event.
Optional sender to be passed to the listener. Default value is
the return value of
Creates a toolbar inside a given DOM node. The toolbar may contain icons, buttons and combo boxes.
InternalEvent.SELECT
Fires when an item was selected in the toolbar. The EventObject InternalEvent.function property contains the function that was selected in selectMode.