RSX Code Reference
    Preparing search index...

    Function toolbarItem

    • Adds a toolbar item to the main toolbar of the KeyWindow. Clicking on the toolbar item will trigger the method the attribute is attached to. The method must be static, have no parameters or return values otherwise the attribute will be ignored.

      Parameters

      • displayName: string

        Path that determines where in the menu to add the element. All path elements must be separated by /, for example "View/Toolbars/Find".

      • icon: EnumValue<StockIcon>

        Type of builtin icon to display on the toolbar entry.

      • Optionaltooltip: string

        Optional tooltip to display when the user hovers over the toolbar entry.

      • Optionalpriority: number

        Priority determines the position of the toolbar item relative to its siblings. Higher priority means it will be placed earlier.

      • Optionalseparator: boolean

        Determines should a separator be inserted just before this element.

      • OptionalonIsToggled: (keyWindow: KeyWindow) => boolean

        Optional callback to invoked when the item is toggled.

      • OptionalonIsEnabled: (keyWindow: KeyWindow) => boolean

      Returns AttributeDecorator<Attribute>