Skip to main content

LensStudio:PanelPlugin.PanelDescriptor

Class

Descriptor subclass specific to panel plugins, used to register a panel with the editor plugin system.

Index

Example

// PanelDescriptor extends BaseDescriptor and configures panel layout.
const root = new Widget(parent);
const layout = new BoxLayout();
layout.setDirection(Direction.TopToBottom);
layout.spacing = 4;
root.layout = layout;

const title = new Label(root);
title.text = 'PanelDescriptor';
title.fontRole = FontRole.TitleBold;
layout.addWidget(title);

const desc = new Label(root);
desc.text = 'Base descriptor for PanelPlugin. Fields: defaultDockState (DockState), defaultSize (Size), minimumSize (Size), isUnique (boolean), menuActionHierarchy (string[]), toolbarConfig (ToolbarConfig).';
desc.wordWrap = true;
layout.addWidget(desc);

const note = new Label(root);
note.text = 'This panel has isUnique=false — multiple instances can coexist.';
note.fontRole = FontRole.Small;
layout.addWidget(note);

Extends

Extended by

Properties

defaultDockState

defaultDockState: DockState

Initial dock state of the panel when first opened.


defaultSize

defaultSize: Size

Default size of the panel when first created.


dependencies

dependencies: InterfaceId[]

Array of interface IDs that this plugin requires to function.

Inherited from

BaseDescriptor.dependencies


description

description: string

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

Inherited from

BaseDescriptor.description


id

id: string

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

Inherited from

BaseDescriptor.id


intendedPlatforms

intendedPlatforms: TargetPlatform[]

Array of target platforms (Snapchat, Spectacles) where this plugin is intended to run.

Inherited from

BaseDescriptor.intendedPlatforms


interfaces

interfaces: InterfaceId[]

Array of interface IDs that this plugin provides or implements.

Inherited from

BaseDescriptor.interfaces


isUnique

isUnique: boolean

Whether only one instance of this panel can exist at a time.


menuActionHierarchy: string[]

Menu path segments used to place this panel in the application menu.


minimumSize

minimumSize: Size

Minimum allowed size of the panel.


name

name: string

Display name of the plugin.

Inherited from

BaseDescriptor.name


toolbarConfig?

optional toolbarConfig?: ToolbarConfig

Optional toolbar configuration to display in the panel.

Methods

getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

BaseDescriptor.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

BaseDescriptor.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

BaseDescriptor.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

BaseDescriptor.isSame