class
DockManager::DockContainer
Contains information about a single dock area.
Each container can be a parent to two other containers or may contain a tab group, which results in a container hierarchy. Two children can be split vertically or horizontally at an user-defined point.
Public
Constructors
DockContainer
DockContainer
Methods
~DockContainer
SetArea
Determines the position and size of the container, relative to the parent dock manager.
SetDPIScale
Sets the DPI scale of the underlying GUI widget, and if container is not a leaf recursively sets it on all child containers as well.
MakeLeaf
Transforms the container from non-leaf (parent to other containers) to leaf (parent to tab group).
This involves creating a tab group to which you can dock editor windows to.
- parentWindow
- Editor window of the parent dock manager.
MakeLeaf
Transforms the container from non-leaf (parent to other containers) to leaf (parent to tab group).
Unlike the other overload this one accepts a previously created tab group.
- guiWidgetSO
- Parent SceneObject of the GUIWidget used by the provided tab group.
- existingTabGroup
- An existing widget container that may be used for docking widgets.
SplitContainer
Splits a leaf container containing a tab group (or may be empty in the case of root with no elements) into a container parent to two other containers.
- horizontal
- Whether the split is horizontal (true) or vertical (false).
- newChildIsFirst
- Determines to which child should the tab group from this object be moved to. If the new child is first, then bottom or right (for horizontal and vertical respectively) will receive the current tab group, and opposite if it's not first.
- splitPosition
- Determines at what position(in percent) should this container be split. User can modify this later via a dock slider.
MakeSplit
Splits a leaf container containing a tab group (or may be empty in the case of root with no elements) into a container parent to two other containers.
Unlike new containers aren't created automatically but you must provide existing ones. If this container is non-leaf its tab group will be destroyed.
- first
- Container to insert into the first child slot (left if vertical split, top if horizontal split).
- second
- Container to insert into the second child slot (right if vertical split, bottom if horizontal split).
- horizontal
- Whether the split is horizontal (true) or vertical (false).
- splitPosition
- Determines at what position(in percent) should this container be split. User can modify this later via a dock slider.
AddLeft
Adds a new window to the left side of the container.
If the container is leaf it will be split into two containers vertically.
AddRight
Adds a new window to the right side of the container.
If the container is leaf it will be split into two containers vertically.
AddTop
Adds a new window to the top side of the container.
If the container is leaf it will be split into two containers horizontally.
AddBottom
Adds a new window to the bottom side of the container.
If the container is leaf it will be split into two containers horizontally.
AddWindow
Adds an existing window to this leaf container.
AddWindow
Attempts to find a window with the specified name, opens it and adds it to this leaf container.
Find
Attempts to find an existing leaf dock container with the specified tab group.
Returns null if one cannot be found.
FindAtPosition
Searches for a container at the specified position.
Call this at this top-most container in order to search them all.
- position
- Position is relative to the container area.
Returns: Null if it fails, else the found DockContainer at position.
GetContentBounds
Returns the bounds of the container that are to be considered dockable and interactable.
Fields
IsLeaf
Children
Parent
Manager
WindowTabGroup
GUIWidgetSceneObject
GUIWidget
Slider
Area
SplitPosition
IsHorizontal
Private
Methods
UpdateChildAreas
Updates sizes and positions of all child containers.
Normally called when parent area changes.
DoOnSliderDragged
Triggered whenever the user drags the GUI slider belonging to this container.
DoOnWindowRemoved
Triggered whenever the user closes or undocks a window belonging to this container.
DoOnMaximizeClicked
Triggered when the maximize button in the container's title bar is clicked.