Skip to content

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 ​

PropertyTypeDescription
closeAllViews(groupId?) => voidCloses all closable unpinned tabs in groupId (defaults to the active group).
closeOtherViews(groupId, keepViewId) => voidCloses all closable unpinned tabs in groupId except keepViewId.
closeSavedViews(groupId?) => voidCloses all closable tabs in groupId (defaults to the active group) that are not marked dirty.
closeView(viewId) => voidCloses a view tab (respecting onBeforeCloseView guards if configured).
closeViewsToRight(groupId, pivotViewId) => voidCloses all closable unpinned tabs positioned to the right of pivotViewId in groupId.
dockViewToGroup(viewId, targetGroupId, zone) => voidMoves and docks viewId into targetGroupId at the specified directional zone.
exportLayoutJson() => stringSerializes the current layout state into a versioned JSON snapshot string.
floatGroup(groupId?, rect?) => voidDetaches all tabs of a docked groupId (defaults to the active group) together into a multi-tab Zero-Unmount floating window.
floatView(viewId, rect?) => voidDetaches a single view tab into a Zero-Unmount floating window at optional rect coordinates.
getLayoutState() => RedDokiaLayoutStateReturns a read-only snapshot of the current RedDokiaLayoutState.
getLocale() => RedDokiaLocaleReturns the currently active UI locale code.
getPopoutViewIds() => string[]Returns all view IDs currently hosted inside open native pop-out windows.
getTheme() => RedDokiaThemeIdReturns the currently active workbench theme ID ('dark', 'light', or a custom theme ID).
importLayoutJson(json) => booleanRestores the workbench layout from a serialized JSON snapshot string; returns true if valid and applied.
moveViewToEdgeSlot(viewId, slot) => voidMoves 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?) => voidOpens an existing registered view or spawns a dynamic view in the target group (activates it if already open).
popoutGroup(groupId?, rect?) => voidDetaches an entire group's tabs (defaults to the active group) into a multi-tab native OS browser pop-out window.
popoutView(viewId, rect?) => voidDetaches a view into a native OS browser pop-out window via window.open.
redockFloatingGroup(floatingGroupId, targetGroupId?) => voidRe-docks all views of a floating window back into targetGroupId or an appropriate grid group.
redockFloatingView(viewId, targetGroupId?) => voidRe-docks a single view from a floating window back into the main grid.
redockPopoutGroup(popoutIdOrViewId, targetGroupId?) => voidRe-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?) => voidRe-docks a single view from a native pop-out window back into the main workbench grid.
registerView<TParams>(schema, options?) => voidDynamically registers a new RedDokiaViewSchema at runtime and optionally opens it immediately.
resetLayout() => voidResets the workbench layout back to layout and clears persisted snapshot overrides.
setEdgeBarLabelsVisible(visible) => voidShows or hides tool window name labels on the peripheral EdgeBar icon rails.
setGroupOptions(groupId, options) => voidUpdates per-group chromeless header visibility (showHeader) or drop/close lock (locked) flags.
setLayout(layout) => voidSwitches the active workbench layout to the given declarative layout schema.
setLocale(locale) => voidChanges the active UI locale ('en', 'ko', or 'ja') at runtime.
setTheme(themeId) => voidSwitches the active workbench theme ('dark', 'light', or any custom theme ID registered in themes).
splitGroup(groupId, direction, newViewId?) => voidSplits 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) => voidStarts 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) => voidToggles the collapsed/expanded state of a docked group.
toggleEdgeBar(edge) => voidToggles collapse/expand of the specified peripheral edge bar ('left', 'right', or 'bottom').
toggleEdgeSlot(slot) => voidToggles visibility of the tool panel bound to the specified peripheral RedDokiaEdgeSlot.
toggleLockGroup(groupId?) => voidToggles the drop/close lock flag on groupId (defaults to the active group).
toggleMaximizeGroup(groupId?) => voidToggles Zen Mode maximization on groupId (defaults to the currently active group).
togglePinView(viewId) => voidToggles the pinned state of a tab within its host group.
updateView(viewId, patch) => voidPatches mutable runtime metadata (title, badge, dirty, params, constraints, etc.) of a view.