RedDokia API Reference / RedDokiaController
Interface: RedDokiaController
Imperative workbench controller exposed via onReady, view render props, and customization callbacks. Provides programmatic control over views, tab states, splits, floating/pop-out windows, themes, locales, and layout snapshots.
Extended by
Properties
| Property | Type | Description |
|---|---|---|
closeAllViews | (groupId?) => void | Closes all closable unpinned tabs in groupId (defaults to the active group). |
closeOtherViews | (groupId, keepViewId) => void | Closes all closable unpinned tabs in groupId except keepViewId. |
closeSavedViews | (groupId?) => void | Closes all closable tabs in groupId (defaults to the active group) that are not marked dirty. |
closeView | (viewId) => void | Closes a view tab (respecting onBeforeCloseView guards if configured). |
closeViewsToRight | (groupId, pivotViewId) => void | Closes all closable unpinned tabs positioned to the right of pivotViewId in groupId. |
dockViewToGroup | (viewId, targetGroupId, zone) => void | Moves and docks viewId into targetGroupId at the specified directional zone. |
exportLayoutJson | () => string | Serializes the current layout state into a versioned JSON snapshot string. |
floatGroup | (groupId?, rect?) => void | Detaches all tabs of a docked groupId (defaults to the active group) together into a multi-tab Zero-Unmount floating window. |
floatView | (viewId, rect?) => void | Detaches a single view tab into a Zero-Unmount floating window at optional rect coordinates. |
getLayoutState | () => RedDokiaLayoutState | Returns a read-only snapshot of the current RedDokiaLayoutState. |
getLocale | () => RedDokiaLocale | Returns the currently active UI locale code. |
getPopoutViewIds | () => string[] | Returns all view IDs currently hosted inside open native pop-out windows. |
getTheme | () => RedDokiaThemeId | Returns the currently active workbench theme ID ('dark', 'light', or a custom theme ID). |
importLayoutJson | (json) => boolean | Restores the workbench layout from a serialized JSON snapshot string; returns true if valid and applied. |
moveViewToEdgeSlot | (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'). |
openView | (viewId, targetGroupOrOptions?) => void | Opens an existing registered view or spawns a dynamic view in the target group (activates it if already open). |
popoutGroup | (groupId?, rect?) => void | Detaches an entire group's tabs (defaults to the active group) into a multi-tab native OS browser pop-out window. |
popoutView | (viewId, rect?) => void | Detaches a view into a native OS browser pop-out window via window.open. |
redockFloatingGroup | (floatingGroupId, targetGroupId?) => void | Re-docks all views of a floating window back into targetGroupId or an appropriate grid group. |
redockFloatingView | (viewId, targetGroupId?) => void | Re-docks a single view from a floating window back into the main grid. |
redockPopoutGroup | (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. |
redockPopoutView | (viewId, targetGroupId?) => void | Re-docks a single view from a native pop-out window back into the main workbench grid. |
registerView | <TParams>(schema, options?) => void | Dynamically registers a new RedDokiaViewSchema at runtime and optionally opens it immediately. |
resetLayout | () => void | Resets the workbench layout back to layout and clears persisted snapshot overrides. |
setEdgeBarLabelsVisible | (visible) => void | Shows or hides tool window name labels on the peripheral EdgeBar icon rails. |
setGroupOptions | (groupId, options) => void | Updates per-group chromeless header visibility (showHeader) or drop/close lock (locked) flags. |
setLayout | (layout) => void | Switches the active workbench layout to the given declarative layout schema. |
setLocale | (locale) => void | Changes the active UI locale ('en', 'ko', or 'ja') at runtime. |
setTheme | (themeId) => void | Switches the active workbench theme ('dark', 'light', or any custom theme ID registered in themes). |
splitGroup | (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. |
startExternalDrag | (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' }, }); }); |
toggleCollapseGroup | (groupId) => void | Toggles the collapsed/expanded state of a docked group. |
toggleEdgeBar | (edge) => void | Toggles collapse/expand of the specified peripheral edge bar ('left', 'right', or 'bottom'). |
toggleEdgeSlot | (slot) => void | Toggles visibility of the tool panel bound to the specified peripheral RedDokiaEdgeSlot. |
toggleLockGroup | (groupId?) => void | Toggles the drop/close lock flag on groupId (defaults to the active group). |
toggleMaximizeGroup | (groupId?) => void | Toggles Zen Mode maximization on groupId (defaults to the currently active group). |
togglePinView | (viewId) => void | Toggles the pinned state of a tab within its host group. |
updateView | (viewId, patch) => void | Patches mutable runtime metadata (title, badge, dirty, params, constraints, etc.) of a view. |