Extends
Constructor
new ve.ui.Tool(toolGroup, [config])abstract
#
Hierarchy
Children
UserInterface tool.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
toolGroup |
OO.ui.ToolGroup | ||
config |
Object |
optional |
Configuration options |
- Source:
UserInterface tool.
Properties
commandNamestatic
#
Command to execute when tool is selected.
Properties:
Type | Description |
---|---|
string
|
null
|
- Source:
Command to execute when tool is selected.
deactivateOnSelectstatic
#
Deactivate tool after it's been selected.
Use this for tools which don't display as active when relevant content is selected, such as insertion-only tools.
Properties:
Type | Description |
---|---|
boolean |
- Source:
Deactivate tool after it's been selected.
fallbackIconstatic
#
Icon to use when this tool is shown in a non-toolbar context
Properties:
Type | Description |
---|---|
string
|
null
|
- Source:
Icon to use when this tool is shown in a non-toolbar context
makesEmbeddableContextItemstatic
#
If this tool is used to create a ve.ui.ToolContextItem, should that item be embeddable
Properties:
Type | Description |
---|---|
boolean |
- Source:
If this tool is used to create a ve.ui.ToolContextItem, should that item be embeddable
Methods
getCommand() → {ve.ui.Command|null
|undefined
}
#
null
|undefined
}
#
Get the command for this tool.
- Source:
Returns:
Undefined means command not found, null means no command set
- Type
-
ve.ui.Command
|
null
|undefined
Get the command for this tool.
onSelect()
#
- Source:
onUpdateState(fragment, direction)
#
Handle the toolbar state being updated.
Parameters:
Name | Type | Description |
---|---|---|
fragment |
ve.dm.SurfaceFragment
|
null
|
Surface fragment |
direction |
Object
|
null
|
Context direction with 'inline' & 'block' properties |
- Source:
Handle the toolbar state being updated.
getCommand(surface) → {ve.ui.Command|null
|undefined
}static
#
null
|undefined
}static
#
Get the command for this tool in a given surface context
Parameters:
Name | Type | Description |
---|---|---|
surface |
ve.ui.Surface |
- Source:
Returns:
Undefined means command not found, null means no command set
- Type
-
ve.ui.Command
|
null
|undefined
Get the command for this tool in a given surface context
getCommandName() → {string|null
}static
#
null
}static
#
Get the symbolic command name for this tool.
- Source:
Returns:
- Type
-
string
|
null
Get the symbolic command name for this tool.