UNPKG

dockview

Version:

Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support

288 lines (287 loc) 7.29 kB
export class SplitviewApi { constructor(component) { this.component = component; } get minimumSize() { return this.component.minimumSize; } get maximumSize() { return this.component.maximumSize; } get height() { return this.component.height; } get width() { return this.component.width; } get length() { return this.component.length; } get onDidLayoutChange() { return this.component.onDidLayoutChange; } get orientation() { return this.component.orientation; } updateOptions(options) { this.component.updateOptions(options); } removePanel(panel, sizing) { this.component.removePanel(panel, sizing); } setVisible(panel, isVisible) { this.component.setVisible(panel, isVisible); } getPanels() { return this.component.getPanels(); } focus() { this.component.focus(); } getPanel(id) { return this.component.getPanel(id); } setActive(panel) { this.component.setActive(panel); } layout(width, height) { return this.component.layout(width, height); } addPanel(options) { this.component.addPanel(options); } resizeToFit() { this.component.resizeToFit(); } movePanel(from, to) { this.component.movePanel(from, to); } fromJSON(data, deferComponentLayout) { this.component.fromJSON(data, deferComponentLayout); } toJSON() { return this.component.toJSON(); } } export class PaneviewApi { constructor(component) { this.component = component; } get width() { return this.component.width; } get height() { return this.component.height; } get minimumSize() { return this.component.minimumSize; } get maximumSize() { return this.component.maximumSize; } get onDidLayoutChange() { return this.component.onDidLayoutChange; } getPanels() { return this.component.getPanels(); } removePanel(panel) { this.component.removePanel(panel); } getPanel(id) { return this.component.getPanel(id); } movePanel(from, to) { this.component.movePanel(from, to); } focus() { this.component.focus(); } layout(width, height) { this.component.layout(width, height); } addPanel(options) { return this.component.addPanel(options); } resizeToFit() { this.component.resizeToFit(); } fromJSON(data, deferComponentLayout) { this.component.fromJSON(data, deferComponentLayout); } toJSON() { return this.component.toJSON(); } } export class GridviewApi { constructor(component) { this.component = component; } get width() { return this.component.width; } get height() { return this.component.height; } get minimumHeight() { return this.component.minimumHeight; } get maximumHeight() { return this.component.maximumHeight; } get minimumWidth() { return this.component.minimumWidth; } get maximumWidth() { return this.component.maximumWidth; } get onGridEvent() { return this.component.onGridEvent; } get onDidLayoutChange() { return this.component.onDidLayoutChange; } get panels() { return this.component.groups; } get orientation() { return this.component.orientation; } set orientation(value) { this.component.updateOptions({ orientation: value }); } focus() { this.component.focus(); } layout(width, height, force = false) { this.component.layout(width, height, force); } addPanel(options) { this.component.addPanel(options); } removePanel(panel, sizing) { this.component.removePanel(panel, sizing); } movePanel(panel, options) { this.component.movePanel(panel, options); } resizeToFit() { this.component.resizeToFit(); } getPanel(id) { return this.component.getPanel(id); } toggleVisibility(panel) { this.component.toggleVisibility(panel); } setVisible(panel, visible) { this.component.setVisible(panel, visible); } setActive(panel) { this.component.setActive(panel); } fromJSON(data, deferComponentLayout) { return this.component.fromJSON(data, deferComponentLayout); } toJSON() { return this.component.toJSON(); } } export class DockviewApi { constructor(component) { this.component = component; } get width() { return this.component.width; } get height() { return this.component.height; } get minimumHeight() { return this.component.minimumHeight; } get maximumHeight() { return this.component.maximumHeight; } get minimumWidth() { return this.component.minimumWidth; } get maximumWidth() { return this.component.maximumWidth; } get size() { return this.component.size; } get totalPanels() { return this.component.totalPanels; } get onGridEvent() { return this.component.onGridEvent; } get onDidLayoutChange() { return this.component.onDidLayoutChange; } get panels() { return this.component.panels; } get groups() { return this.component.groups; } get activePanel() { return this.component.activePanel; } get activeGroup() { return this.component.activeGroup; } getTabHeight() { return this.component.tabHeight; } setTabHeight(height) { this.component.tabHeight = height; } focus() { this.component.focus(); } getPanel(id) { return this.component.getGroupPanel(id); } setActivePanel(panel) { this.component.setActivePanel(panel); } layout(width, height, force = false) { this.component.layout(width, height, force); } addPanel(options) { return this.component.addPanel(options); } removePanel(panel) { this.component.removePanel(panel); } addEmptyGroup(options) { this.component.addEmptyGroup(options); } moveToNext(options) { this.component.moveToNext(options); } moveToPrevious(options) { this.component.moveToPrevious(options); } closeAllGroups() { return this.component.closeAllGroups(); } removeGroup(group) { this.component.removeGroup(group); } resizeToFit() { return this.component.resizeToFit(); } getGroup(id) { return this.component.getPanel(id); } fromJSON(data) { this.component.fromJSON(data); } toJSON() { return this.component.toJSON(); } }