Extends
Methods
destroy()
#
Destroys toolbar, removing event handlers and DOM elements.
Call this whenever you are done using a toolbar.
- Source:
detach()
#
Detach toolbar from surface and all event listeners
- Source:
getCommands() → {Array.<string>}
#
Get a list of commands available to this toolbar's surface
- Source:
Returns:
Command names
- Type
- Array.<string>
getSurface() → {ve.ui.Surface|null
}
#
null
}
#
Gets the surface which the toolbar controls.
Returns null if the toolbar hasn't been set up yet.
- Source:
Returns:
Surface being controlled
- Type
-
ve.ui.Surface
|
null
getToolAccelerator()
#
- Source:
getTriggers(name) → {Array.<ve.ui.Trigger>|undefined
}
#
undefined
}
#
Get triggers for a specified name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Trigger name |
- Source:
Returns:
Triggers
- Type
-
Array.<ve.ui.Trigger>
|
undefined
isToolAvailable()
#
- Source:
onContextChange()
#
Handle context changes on the surface.
- Source:
Fires:
onInspectorOrDialogOpeningOrClosing(win, openingOrClosing, data)
#
Handle windows opening or closing in the dialogs' or inspectors' window manager.
Parameters:
Name | Type | Description |
---|---|---|
win |
OO.ui.Window | |
openingOrClosing |
jQuery.Promise | |
data |
Object |
- Source:
setNarrow()
#
- Source:
setup(groups, [surface])
#
Setup toolbar
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
groups |
Object | List of tool group configurations |
|
surface |
ve.ui.Surface |
optional |
Surface to attach to |
- Source:
Fires:
updateToolState()
#
Update the state of the tools
- Source:
Fires:
Events
resize()
#
- Source:
surfaceChange(oldSurface, newSurface)
#
Parameters:
Name | Type | Description |
---|---|---|
oldSurface |
ve.ui.Surface
|
null
|
Old surface being controlled |
newSurface |
ve.ui.Surface
|
null
|
New surface being controlled |
- Source:
updateState(fragment, direction, activeDialogs)
#
Parameters:
Name | Type | Description |
---|---|---|
fragment |
ve.dm.SurfaceFragment
|
null
|
Surface fragment. Null if no surface is active. |
direction |
Object
|
null
|
Context direction with 'inline' & 'block' properties if a surface exists. Null if no surface is active. |
activeDialogs |
Array.<string> | List of names of currently open dialogs. |
- Source: