Class DockPanel
Dockable panel control.
Implements
Namespace: FlaxEditor.GUI.Docking
Assembly: FlaxEngine.CSharp.dll
Syntax
public class DockPanel : ContainerControl, IComparable, IDrawable
Constructors
DockPanel(DockPanel)
Initializes a new instance of the Dock
Declaration
public DockPanel(DockPanel parentPanel)
Parameters
Dock The parent panel. |
Fields
DefaultButtonsMargin
The default tabs header buttons margin.
Declaration
public const float DefaultButtonsMargin = 2F
Field Value
System.
|
DefaultButtonsSize
The default tabs header buttons size.
Declaration
public const float DefaultButtonsSize = 15F
Field Value
System.
|
DefaultHeaderHeight
The default dock tabs header height.
Declaration
public const float DefaultHeaderHeight = 20F
Field Value
System.
|
DefaultLeftTextMargin
The default tabs header text left margin.
Declaration
public const float DefaultLeftTextMargin = 4F
Field Value
System.
|
DefaultRightTextMargin
The default tabs header text right margin.
Declaration
public const float DefaultRightTextMargin = 8F
Field Value
System.
|
DefaultSplitterValue
The default splitters value.
Declaration
public const float DefaultSplitterValue = 0.25F
Field Value
System.
|
Properties
ChildPanels
Gets the child panels.
Declaration
public List<DockPanel> ChildPanels { get; }
Property Value
System.
|
ChildPanelsCount
Gets the child panels count.
Declaration
public int ChildPanelsCount { get; }
Property Value
System.
|
DockAreaBounds
Gets docking area bounds (tabs rectangle) in a screen space.
Declaration
public Rectangle DockAreaBounds { get; }
Property Value
FirstTab
IsFloating
Returns true if this panel is a floating window panel.
Declaration
public virtual bool IsFloating { get; }
Property Value
System.
|
IsMaster
Returns true if this panel is a master panel.
Declaration
public virtual bool IsMaster { get; }
Property Value
System.
|
LastTab
ParentDockPanel
Gets the parent panel.
Declaration
public DockPanel ParentDockPanel { get; }
Property Value
SelectedTab
SelectedTabIndex
Gets or sets the index of the selected tab.
Declaration
public int SelectedTabIndex { get; set; }
Property Value
System.
|
Tabs
Gets the tabs.
Declaration
public List<DockWindow> Tabs { get; }
Property Value
System.
|
TabsCount
Gets amount of the tabs in a dock panel.
Declaration
public int TabsCount { get; }
Property Value
System.
|
TabsProxy
Gets the tabs header proxy.
Declaration
public DockPanelProxy TabsProxy { get; }
Property Value
Methods
AddTab(DockWindow, Boolean)
Adds the tab.
Declaration
protected virtual void AddTab(DockWindow window, bool autoSelect = true)
Parameters
Dock The window to insert as a tab. |
System. True if auto-select newly added tab. |
CloseAll(ClosingReason)
Closes all the windows.
Declaration
public bool CloseAll(ClosingReason reason)
Parameters
Closing Window closing reason. |
Returns
System. True if action has been cancelled (due to window internal logic). |
ContainsTab(DockWindow)
Determines whether panel contains the specified tab.
Declaration
public bool ContainsTab(DockWindow tab)
Parameters
Dock The tab. |
Returns
System.
|
CreateChildPanel(DockState, Single)
Create child dock panel
Declaration
public DockPanel CreateChildPanel(DockState state, float splitterValue)
Parameters
Flax Dock panel state |
System. Initial splitter value |
Returns
Dock Child panel |
DockWindow(DockState, DockWindow, Boolean, Nullable<Single>)
Docks the window.
Declaration
protected virtual void DockWindow(DockState state, DockWindow window, bool autoSelect = true, Nullable<float> splitterValue = null)
Parameters
Flax The state. |
Dock The window. |
System. Whether or not to automatically select the window after docking it. |
System. The splitter value to use when docking to window. |
GetTab(Int32)
Gets tab at the given index.
Declaration
public DockWindow GetTab(int tabIndex)
Parameters
System. The index of the tab page. |
Returns
Dock The tab. |
GetTabIndex(DockWindow)
Gets tab at the given index.
Declaration
public int GetTabIndex(DockWindow tab)
Parameters
Dock The tab page. |
Returns
System. The index of the given tab. |
HitTest(ref Float2)
Performs hit test over dock panel
Declaration
public DockPanel HitTest(ref Float2 position)
Parameters
Float2
position
Screen space position to test |
Returns
Dock Dock panel that has been hit or null if nothing found |
OnDestroy()
Method called when managed instance should be destroyed
Declaration
public override void OnDestroy()
Overrides
OnLastTabRemoved()
Called when last tab gets removed.
Declaration
protected virtual void OnLastTabRemoved()
OnSelectedTabChanged()
Called when selected tab gets changed.
Declaration
protected virtual void OnSelectedTabChanged()
SelectTab(DockWindow, Boolean)
Selects the tab page.
Declaration
public void SelectTab(DockWindow tab, bool autoFocus = true)
Parameters
Dock The tab page to select. |
System. True if focus tab after selection change. |
SelectTab(Int32)
Selects the tab page.
Declaration
public void SelectTab(int tabIndex)
Parameters
System. The index of the tab page to select. |
TryGetDockState(out Single)
Try get panel dock state
Declaration
public virtual DockState TryGetDockState(out float splitterValue)
Parameters
System. Splitter value |
Returns
Flax Dock State |
UndockWindow(DockWindow)
Undocks the window.
Declaration
protected virtual void UndockWindow(DockWindow window)
Parameters
Dock The window. |