Preparing search index...

    Configuration descriptor for a DialogPlugin, including menu placement and optional toolbar settings.

    // DialogPlugin Descriptor extends BaseDescriptor with dialog-specific fields:
    //
    // menuActionHierarchy: string[]
    // Menu path where the dialog action appears.
    // Example: ['Tools', 'Utilities', 'My Dialog']
    //
    // toolbarConfig (optional):
    // Configuration for a toolbar button that also opens the dialog.

    export class DialogPluginDescriptorExampleDialog extends DialogPlugin {
    connections: any[];
    static descriptor() {
    const d = new Descriptor();
    d.id = 'com.docs.DialogPluginDescriptorExample';
    d.name = 'Dialog Descriptor Example';
    d.description = 'Shows DialogPlugin Descriptor with menuActionHierarchy';
    // menuActionHierarchy controls where the action appears in the menu bar
    d.menuActionHierarchy = ['Tools', 'Utilities', 'Descriptor Example'];
    return d;
    }
    constructor(pluginSystem: Editor.PluginSystem, descriptor?: Descriptor) {
    super(pluginSystem, descriptor);
    this.connections = [];
    }
    show(parent: Widget): Dialog {
    const dialog = new Dialog(parent);
    const layout = new BoxLayout();
    layout.setDirection(Direction.TopToBottom);
    dialog.layout = layout;

    const label = new Label(dialog);
    label.text = 'Opened from: Tools > Utilities > Descriptor Example';
    layout.addWidget(label);

    const btn = new PushButton(dialog);
    btn.text = 'OK';
    this.connections.push(btn.onClick.connect(() => dialog.accept()));
    layout.addWidget(btn);

    return dialog;
    }
    deinit(): void {
    this.connections.forEach((c: any) => c?.disconnect());
    this.connections = [];
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    dependencies: InterfaceId[]

    Array of interface IDs that this plugin requires to function.

    description: string

    Human-readable description of the plugin shown in the plugin manager.

    id: string

    Unique identifier for the plugin, typically in reverse domain notation.

    interfaces: InterfaceId[]

    Array of interface IDs that this plugin provides or implements.

    menuActionHierarchy: string[]

    Menu path hierarchy defining where the dialog's action appears in the editor menu.

    name: string

    Display name of the plugin.

    toolbarConfig?: ToolbarConfig

    Configuration object specifying how the dialog's action is represented in the editor toolbar.

    Methods

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean