Skip to main content

LensStudio:Ui.ToolbarConfig

Class

Configuration for toolbar appearance and behavior.

Index

Example

// ToolbarConfig describes the appearance of a toolbar button.
// Properties: caption (text), icon (Editor.Icon), settings (ToolbarSettings).
const config = new ToolbarConfig();
config.caption = 'My Tool';
config.icon = Editor.Icon.fromFile(new Editor.Path('tool-icon.svg'));

const settings = new ToolbarSettings();
settings.position = ToolbarPosition.Left;
settings.primary = true;
settings.priority = 100;
settings.showText = true;
config.settings = settings;

console.log('ToolbarConfig caption:', config.caption);
console.log('ToolbarSettings position:', settings.position);

Constructors

Constructor

new ToolbarConfig(): ToolbarConfig

Constructs a new ToolbarConfig instance for configuring a plugin's toolbar button appearance and behavior.

Returns

ToolbarConfig

Properties

caption

caption: string

Text label displayed on the toolbar.


icon

icon: Icon

Icon displayed on the toolbar.


settings

settings: ToolbarSettings

Toolbar behavior and layout settings.