Manages the states of Lens Studio panels.
import CoreService from 'LensStudio:CoreService';import * as serialization from 'LensStudio:Serialization';export class DockManager extends CoreService { static descriptor() { return { id: 'Snap.Test.DockManager', name: 'DockManager', description: 'DockManager', interfaces: CoreService.descriptor().interfaces, dependencies: [Editor.Dock.IDockManager] }; } constructor(pluginSystem) { super(pluginSystem); this.guards = []; } start() { const layoutStr = 'dock:\n' +d: false\n' + ' main:\n' + ' items:\n' + ' - items:\n'; // Simply test that reader and writer can be created and used without throwing let reader = serialization.Yaml.createReader(layoutStr); const writer = serialization.Yaml.createWriter(); const dockManager = this.pluginSystem.findInterface(Editor.Dock.IDockManager); dockManager.write(writer); const writtenContent = writer.getString(); reader = serialization.Yaml.createReader(writtenContent); } stop() { }} Copy
import CoreService from 'LensStudio:CoreService';import * as serialization from 'LensStudio:Serialization';export class DockManager extends CoreService { static descriptor() { return { id: 'Snap.Test.DockManager', name: 'DockManager', description: 'DockManager', interfaces: CoreService.descriptor().interfaces, dependencies: [Editor.Dock.IDockManager] }; } constructor(pluginSystem) { super(pluginSystem); this.guards = []; } start() { const layoutStr = 'dock:\n' +d: false\n' + ' main:\n' + ' items:\n' + ' - items:\n'; // Simply test that reader and writer can be created and used without throwing let reader = serialization.Yaml.createReader(layoutStr); const writer = serialization.Yaml.createWriter(); const dockManager = this.pluginSystem.findInterface(Editor.Dock.IDockManager); dockManager.write(writer); const writtenContent = writer.getString(); reader = serialization.Yaml.createReader(writtenContent); } stop() { }}
Protected
Snap Hidden
Static
Readonly
Returns the name of this object's type.
Returns true if the object is of the specified type.
Returns true if this object refers to the same instance as the given object.
Beta
Reads the current state of the DockManager.
Writes to the Dock Manager.
Manages the states of Lens Studio panels.
Example