Skip to main content

LensStudio:Ui.Gui

Class

Built-in interface for GUI operations in plugins.

Index

Example

// Gui is the concrete implementation of IGui.
// Access via pluginSystem.findInterface(IGui.interfaceId).
// Provides createDialog(), createWidget(), dialogs, and workspaces.
const gui = this.pluginSystem.findInterface(IGui.interfaceId) as IGui;
console.log('IGui available:', !Editor.isNull(gui));

const dialog = gui.createDialog();
dialog.windowTitle = 'Created via Gui';
dialog.resize(300, 150);
console.log('Dialog created:', !Editor.isNull(dialog));

const widget = gui.createWidget();
console.log('Widget created:', !Editor.isNull(widget));

Extends

Properties

dialogs

readonly dialogs: IDialogs

Manager for all open dialogs.

Inherited from

IGui.dialogs


interfaceId

static interfaceId: InterfaceId

Interface identifier for IGui.

Inherited from

IGui.interfaceId

Methods

createDialog()

createDialog(): Dialog

Create a new dialog window.

Returns

Dialog

Inherited from

IGui.createDialog


createWidget()

createWidget(): Widget

Create a new widget.

Returns

Widget

Inherited from

IGui.createWidget


getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

IGui.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

IGui.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

IGui.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

IGui.isSame