Preparing search index...

    Interface for file and message dialogs.

        // IDialogs provides file and folder selection dialogs via gui.dialogs.
    const gui = this.pluginSystem.findInterface(IGui.interfaceId) as IGui;
    if (Editor.isNull(gui)) {
    console.log('IGui not available');
    return;
    }
    const dialogs: IDialogs = gui.dialogs;

    // Open a file selection dialog
    const params = {} as Dialogs.Params;
    params.caption = 'Select an Image';
    params.filter = 'Images (*.png *.jpg *.jpeg)';
    params.options = Dialogs.Options.Usual;

    const defaultPath = new Editor.Path('');
    const filePath = dialogs.selectFileToOpen(params, defaultPath);
    console.log('Selected file:', filePath.toString());

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

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

      Parameters

      • type: string

      Returns boolean

    • Open a file selection dialog allowing multiple selections and return an array of selected file paths.

      Parameters

      Returns Path[]

    • Open a file selection dialog and return the selected file path.

      Parameters

      Returns Path

    • Open a file save dialog and return the selected file path.

      Parameters

      Returns Path

    • Returns selected path, or an empty path if the dialog was cancelled.

      Parameters

      Returns Path

    • Open a folder selection dialog for saving and return the selected folder path.

      Parameters

      Returns Path