Before using anything in this namespace, make sure to import LensStudio:Ui.
LensStudio:Ui
export class UiOverviewPanel extends PanelPlugin { connections: any[]; static descriptor() { const d = new Descriptor(); d.id = 'com.docs.UiOverviewExample'; d.name = 'Ui Overview'; d.defaultDockState = DockState.Detached; d.defaultSize = new Size(350, 250); return d; } constructor(pluginSystem: Editor.PluginSystem, descriptor?: Descriptor) { super(pluginSystem, descriptor); this.connections = []; } createWidget(parent: Widget): Widget { const root = new Widget(parent); const layout = new BoxLayout(); layout.setDirection(Direction.TopToBottom); layout.spacing = 8; root.layout = layout; const title = new Label(root); title.text = 'LensStudio:Ui Module'; title.fontRole = FontRole.LargeTitleBold; layout.addWidget(title); const info = new Label(root); info.text = 'The Ui module provides widgets for building plugin panels.'; info.wordWrap = true; layout.addWidget(info); const btn = new PushButton(root); btn.text = 'Click Me'; layout.addWidget(btn); this.connections.push( btn.onClick.connect(() => { info.text = 'Button clicked! Widgets include Label, PushButton, LineEdit, CheckBox, ComboBox, and more.'; }) ); return root; } deinit(): void { this.connections.forEach((c: any) => c?.disconnect()); this.connections = []; }} Copy
export class UiOverviewPanel extends PanelPlugin { connections: any[]; static descriptor() { const d = new Descriptor(); d.id = 'com.docs.UiOverviewExample'; d.name = 'Ui Overview'; d.defaultDockState = DockState.Detached; d.defaultSize = new Size(350, 250); return d; } constructor(pluginSystem: Editor.PluginSystem, descriptor?: Descriptor) { super(pluginSystem, descriptor); this.connections = []; } createWidget(parent: Widget): Widget { const root = new Widget(parent); const layout = new BoxLayout(); layout.setDirection(Direction.TopToBottom); layout.spacing = 8; root.layout = layout; const title = new Label(root); title.text = 'LensStudio:Ui Module'; title.fontRole = FontRole.LargeTitleBold; layout.addWidget(title); const info = new Label(root); info.text = 'The Ui module provides widgets for building plugin panels.'; info.wordWrap = true; layout.addWidget(info); const btn = new PushButton(root); btn.text = 'Click Me'; layout.addWidget(btn); this.connections.push( btn.onClick.connect(() => { info.text = 'Button clicked! Widgets include Label, PushButton, LineEdit, CheckBox, ComboBox, and more.'; }) ); return root; } deinit(): void { this.connections.forEach((c: any) => c?.disconnect()); this.connections = []; }}
Before using anything in this namespace, make sure to import
LensStudio:Ui.Example