EditorDock beta
Interface of @v12-engine/editor
export interface EditorDockThe editor's dock: its panels opened from the rails, pinned into the layout or shown over the scene, moved, tabbed and floated by the one who uses it, and by code. The editor's own are in EDITOR_PANELS (hierarchy, place, terrain, markers, inspector, look, map, data, content, problems, history, cinematic), around scene
Members
add
add(panel: EditorPanelDef): () => void;A panel of its own, or one in the place of the editor's of that id: gives back what takes it away
all
all(): readonly EditorPanelDef[];Every panel there is, open or not: the editor's own, the game's, and those added
close
close(id: string): void;Closes a panel: it leaves the layout, or is put away from over the scene
float
float(id: string): void;Has a panel float on its own, over everything
focus
focus(id: string): void;Brings a panel to the front, if it is behind another's tab
layout
layout(): unknown;The whole layout as plain data (KeptLayout), to keep or hand over; and putting one in place
layouts
readonly layouts: {
list(): {
id: string;
name: string;
own: boolean;
}[];
use(id: string): void;
save(name: string): void;
remove(id: string): void;
};The layouts by name: the editor's own (LAYOUT_PRESETS), the game's, and those the one who uses it kept
move
move(id: string, side: DockSide, before?: string): void;Puts a panel's icon on a rail (it opens on that side from then on), before the icon of another panel there (before), or last: the rails' order is kept with the layout
open
open(id: string, options?: {
over?: boolean;
}): void;Opens a panel (or brings it to the front, open already): the way it opens, or as said (over)
panel
panel(id: string): EditorPanel | undefined;The handle of a panel that is open (EditorPanel): what it shows, its title and its badge. None while it is closed
panels
panels(): string[];The panels open now, by id: in the layout, floating, or over the scene
pin
pin(id: string, pinned: boolean): void;Pins a panel into the layout, or has it open over the scene: now too, when it is open
pinned
pinned(id: string): boolean;Whether a panel opens docked into the layout (pinned) or over the scene
remove
remove(id: string): void;Takes a panel away for good, one of the editor's own too: its icon goes with it
reset
reset(): void;Back to the layout the editor starts with (EditorOptions.layout, the scene alone without)
setLayout
setLayout(layout: unknown): void;Puts a layout in place as layout gave it; a layout that cannot be read is replaced by the starting preset
sideOf
sideOf(id: string): DockSide;The rail a panel's icon is on
sideOpen
sideOpen(side: DockSide): boolean;Whether a side has a panel of its rail open: in the layout, behind another's tab, or over the scene
stateOf
stateOf(id: string): DockPanelState;Where a panel is now
toggle
toggle(id: string): void;What a click on its icon does: opens it, brings it to the front, or closes it
toggleSide
toggleSide(side: DockSide): void;What the bar's buttons for a side do: its panels put away, or back (those put away last, or the first of its rail)