Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AnyToolbarItem

Hierarchy

  • RegisteredToolbarItem
  • Partial<ExecutableToolbarItem>
  • Partial<RenderedToolbarItem>
  • Partial<SelfRenderingToolbarItem>
  • Partial<ConditionalToolbarItem>
  • Partial<MenuToolbarItem>
  • Pick<InlineToolbarItemMetadata, "priority">
  • Partial<MenuToolbarItemMetadata>
    • AnyToolbarItem

Index

Properties

command?: string

The command to execute when the item is selected.

group?: string

Optional group for the item. Default navigation. navigation group will be inlined, while all the others will appear in the ... dropdown. A group in format submenu_group_1/submenu 1/.../submenu_group_n/ submenu n/item_group means that the item will be located in a submenu(s) of the ... dropdown. The submenu's title is named by the submenu section name, e.g. group/<submenu name>/subgroup.

icon?: string | (() => string)

Optional icon for the item.

id: string

The unique ID of the toolbar item.

menuPath?: MenuPath

A menu path with which this item is associated. If accompanied by a command, this data will be passed to the MenuCommandExecutor. If no command is present, this menu will be opened.

onDidChange?: Event<void>

When defined, the container tool-bar will be updated if this event is fired.

Note: currently, each item of the container toolbar will be re-rendered if any of the items have changed.

order?: string

Optional ordering string for placing the item within its group

priority?: number

Priority among the items. Can be negative. The smaller the number the left-most the item will be placed in the toolbar. It is 0 by default.

text?: string

Optional text of the item.

Strings in the format `$(iconIdentifier~animationType) will be treated as icon references. If the iconIdentifier begins with fa-, Font Awesome icons will be used; otherwise it will be treated as Codicon name.

You can find Codicon classnames here: https://microsoft.github.io/vscode-codicons/dist/codicon.html You can find Font Awesome classnames here: http://fontawesome.io/icons/ The type of animation can be either spin or pulse.

tooltip?: string

Optional tooltip for the item.

when?: string

Methods

  • isVisible(widget?: Widget): boolean
  • render(widget?: Widget): ReactNode