RedDokia API Reference / RedDokiaInstance
Interface: RedDokiaInstance
Active RedDokia workbench instance returned by new RedDokia(container, props). Directly exposes all RedDokiaController methods (openView, closeView, etc.) as well as .controller.
Extends
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
closeAllViews | public | (groupId?) => void | Closes all closable unpinned tabs in groupId (defaults to the active group). | RedDokiaController.closeAllViews |
closeOtherViews | public | (groupId, keepViewId) => void | Closes all closable unpinned tabs in groupId except keepViewId. | RedDokiaController.closeOtherViews |
closeSavedViews | public | (groupId?) => void | Closes all closable tabs in groupId (defaults to the active group) that are not marked dirty. | RedDokiaController.closeSavedViews |
closeView | public | (viewId) => void | Closes a view tab (respecting onBeforeCloseView guards if configured). | RedDokiaController.closeView |
closeViewsToRight | public | (groupId, pivotViewId) => void | Closes all closable unpinned tabs positioned to the right of pivotViewId in groupId. | RedDokiaController.closeViewsToRight |
controller | readonly | RedDokiaController | Imperative controller API for inspecting and mutating the workbench state. | - |
destroy | public | () => void | Tears down all event listeners, ResizeObservers, pop-out windows, and DOM nodes created by this instance. | - |
dockViewToGroup | public | (viewId, targetGroupId, zone) => void | Moves and docks viewId into targetGroupId at the specified directional zone. | RedDokiaController.dockViewToGroup |
exportLayoutJson | public | () => string | Serializes the current layout state into a versioned JSON snapshot string. | RedDokiaController.exportLayoutJson |
floatGroup | public | (groupId?, rect?) => void | Detaches all tabs of a docked groupId (defaults to the active group) together into a multi-tab Zero-Unmount floating window. | RedDokiaController.floatGroup |
floatView | public | (viewId, rect?) => void | Detaches a single view tab into a Zero-Unmount floating window at optional rect coordinates. | RedDokiaController.floatView |
getLayoutState | public | () => RedDokiaLayoutState | Returns a read-only snapshot of the current RedDokiaLayoutState. | RedDokiaController.getLayoutState |
getLocale | public | () => RedDokiaLocale | Returns the currently active UI locale code. | RedDokiaController.getLocale |
getPopoutViewIds | public | () => string[] | Returns all view IDs currently hosted inside open native pop-out windows. | RedDokiaController.getPopoutViewIds |
getTheme | public | () => RedDokiaThemeId | Returns the currently active workbench theme ID ('dark', 'light', or a custom theme ID). | RedDokiaController.getTheme |
getViewHostElement | public | (viewId) => HTMLElement | Returns the persistent HTMLElement host container for a mounted view ID, or null if not yet mounted. | - |
importLayoutJson | public | (json) => boolean | Restores the workbench layout from a serialized JSON snapshot string; returns true if valid and applied. | RedDokiaController.importLayoutJson |
moveViewToEdgeSlot | public | (viewId, slot) => void | Moves a tool window view to one of the 6 peripheral EdgeBar slots ('left-top', 'left-bottom', 'bottom-left', 'bottom-right', 'right-bottom', 'right-top'). | RedDokiaController.moveViewToEdgeSlot |
openView | public | (viewId, targetGroupOrOptions?) => void | Opens an existing registered view or spawns a dynamic view in the target group (activates it if already open). | RedDokiaController.openView |
popoutGroup | public | (groupId?, rect?) => void | Detaches an entire group's tabs (defaults to the active group) into a multi-tab native OS browser pop-out window. | RedDokiaController.popoutGroup |
popoutView | public | (viewId, rect?) => void | Detaches a view into a native OS browser pop-out window via window.open. | RedDokiaController.popoutView |
redockFloatingGroup | public | (floatingGroupId, targetGroupId?) => void | Re-docks all views of a floating window back into targetGroupId or an appropriate grid group. | RedDokiaController.redockFloatingGroup |
redockFloatingView | public | (viewId, targetGroupId?) => void | Re-docks a single view from a floating window back into the main grid. | RedDokiaController.redockFloatingView |
redockPopoutGroup | public | (popoutIdOrViewId, targetGroupId?) => void | Re-docks all views of a native pop-out window back into the main workbench grid. Accepts either a pop-out window ID or any view ID hosted inside that pop-out window. | RedDokiaController.redockPopoutGroup |
redockPopoutView | public | (viewId, targetGroupId?) => void | Re-docks a single view from a native pop-out window back into the main workbench grid. | RedDokiaController.redockPopoutView |
registerView | public | <TParams>(schema, options?) => void | Dynamically registers a new RedDokiaViewSchema at runtime and optionally opens it immediately. | RedDokiaController.registerView |
resetLayout | public | () => void | Resets the workbench layout back to layout and clears persisted snapshot overrides. | RedDokiaController.resetLayout |
rootElement | readonly | HTMLElement | Root .reddokia-root DOM element created inside the host container. | - |
setEdgeBarLabelsVisible | public | (visible) => void | Shows or hides tool window name labels on the peripheral EdgeBar icon rails. | RedDokiaController.setEdgeBarLabelsVisible |
setGroupOptions | public | (groupId, options) => void | Updates per-group chromeless header visibility (showHeader) or drop/close lock (locked) flags. | RedDokiaController.setGroupOptions |
setLayout | public | (layout) => void | Switches the active workbench layout to the given declarative layout schema. | RedDokiaController.setLayout |
setLocale | public | (locale) => void | Changes the active UI locale ('en', 'ko', or 'ja') at runtime. | RedDokiaController.setLocale |
setOptions | public | (nextProps) => void | Updates workbench props dynamically without destroying or remounting views. | - |
setTheme | public | (themeId) => void | Switches the active workbench theme ('dark', 'light', or any custom theme ID registered in themes). | RedDokiaController.setTheme |
splitGroup | public | (groupId, direction, newViewId?) => void | Splits groupId (defaults to the active group when omitted) along direction ('horizontal' = right, 'vertical' = down), moving its active tab (or newViewId) when splittable. | RedDokiaController.splitGroup |
startExternalDrag | public | (event, options) => void | Starts a PointerEvent drag-and-dock session from an external host DOM element (such as a widget palette or file list) using the native 5-zone dock overlay and hit-tester. Example chip.addEventListener('pointerdown', (e) => { controller.startExternalDrag(e, { viewId: 'widget-1', templateId: 'widget-template', title: 'Metrics Widget', params: { metric: 'fps' }, }); }); | RedDokiaController.startExternalDrag |
toggleCollapseGroup | public | (groupId) => void | Toggles the collapsed/expanded state of a docked group. | RedDokiaController.toggleCollapseGroup |
toggleEdgeBar | public | (edge) => void | Toggles collapse/expand of the specified peripheral edge bar ('left', 'right', or 'bottom'). | RedDokiaController.toggleEdgeBar |
toggleEdgeSlot | public | (slot) => void | Toggles visibility of the tool panel bound to the specified peripheral RedDokiaEdgeSlot. | RedDokiaController.toggleEdgeSlot |
toggleLockGroup | public | (groupId?) => void | Toggles the drop/close lock flag on groupId (defaults to the active group). | RedDokiaController.toggleLockGroup |
toggleMaximizeGroup | public | (groupId?) => void | Toggles Zen Mode maximization on groupId (defaults to the currently active group). | RedDokiaController.toggleMaximizeGroup |
togglePinView | public | (viewId) => void | Toggles the pinned state of a tab within its host group. | RedDokiaController.togglePinView |
updateView | public | (viewId, patch) => void | Patches mutable runtime metadata (title, badge, dirty, params, constraints, etc.) of a view. | RedDokiaController.updateView |