DockManagerclass
Constructors1
Showing 1 constructors
public DockManager(Editor.Widget parent = null)
| Parameter | Type | Description |
|---|---|---|
| parent = null | Widget | — |
No results match this filter.
Methods23
Showing 23 methods
public void AddDockFloating(Editor.DockWidget widget)
Adds a `Editor.DockWidget` as a floating window.
| Parameter | Type | Description |
|---|---|---|
| widget | DockWidget | — |
void—public void Clear()
Clear all registered dock types.
void—public Editor.DockWidget CreateDockWidget(string name, string icon, Editor.Widget widget)
Creates a native dock widget container for the given widget.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| icon | string | — |
| widget | Widget | — |
public Editor.DockWidget OpenDock(string name, Editor.DockArea area, Editor.DockWidget relativeTo = null)
Open a registered dock and move it into the given area, creating it if needed.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| area | DockArea | — |
| relativeTo = null | DockWidget | — |
public void RegisterDock(Editor.DockManager.DockInfo info)
Register a dock type and create it closed in its default area, so it's available to view menus and layout restoring without appearing in the layout.
| Parameter | Type | Description |
|---|---|---|
| info | DockInfo | — |
void—public void RegisterDockType(Editor.DockManager.DockInfo info)
Registers a dock type without creating its widget.
| Parameter | Type | Description |
|---|---|---|
| info | DockInfo | — |
void—public void RemoveDock(Editor.DockWidget widget)
Remove a dock widget from the manager.
| Parameter | Type | Description |
|---|---|---|
| widget | DockWidget | — |
void—public bool RestoreState(string state)
Restore a layout previously captured from `Editor.DockManager.State`. Returns false if the state couldn't be restored, e.g. it was saved by an incompatible version.
| Parameter | Type | Description |
|---|---|---|
| state | string | — |
bool—public Editor.DockWidget SetCentralWidget(Editor.Widget widget)
Sets a widget as the central (always present, non-closable) area. Must be called before any other dock is added. Returns the dock hosting it, which can be used as a target for relative docking.
| Parameter | Type | Description |
|---|---|---|
| widget | Widget | — |
public void SetDockState(string name, bool visible)
Toggle a registered dock's visibility by name. If the dock doesn't exist yet, it will be created from its registered `Editor.DockManager.DockInfo`.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| visible | bool | — |
void—public bool SetSplitterProportions(Editor.DockWidget dock, System.ReadOnlySpan`1<float> proportions)
| Parameter | Type | Description |
|---|---|---|
| dock | DockWidget | — |
| proportions | ReadOnlySpan<float> | — |
bool—public void UnregisterDockType(string name)
Unregister a dock type by name.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
void—No results match this filter.
Properties4
Showing 4 properties
public System.Collections.Generic.IEnumerable`1<Editor.DockManager.DockInfo> Editor.DockManager.DockTypes { get; set; }
A list of dock types that are registered.
public System.Action Editor.DockManager.OnLayoutLoaded { get; set; }
Called when the layout state is loaded, e.g. when the default layout is applied or a saved layout is restored.
Action—public System.Action`1<System.Collections.Generic.IReadOnlyCollection`1<string>> Editor.DockManager.OnStateRestoring { get; set; }
Called before a layout state is restored with the names of the open docks saved in that layout. Dynamic dock types can use this to create their dock widgets before native restoration begins.
Action<IReadOnlyCollection<string>>—public string Editor.DockManager.State { get; set; }
A string representing the entire state of the dock manager (position of all docks, etc). Setting this restores the layout and invokes `Editor.DockManager.OnLayoutLoaded`.
string—No results match this filter.