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 DockPanel class.
Declaration
public DockPanel(DockPanel parentPanel)
Parameters
DockPanel
parentPanel
The parent panel. |
Fields
DefaultButtonsMargin
The default tabs header buttons margin.
Declaration
public const float DefaultButtonsMargin = 2F
Field Value
System.Single
|
DefaultButtonsSize
The default tabs header buttons size.
Declaration
public const float DefaultButtonsSize = 15F
Field Value
System.Single
|
DefaultHeaderHeight
The default dock tabs header height.
Declaration
public const float DefaultHeaderHeight = 20F
Field Value
System.Single
|
DefaultLeftTextMargin
The default tabs header text left margin.
Declaration
public const float DefaultLeftTextMargin = 4F
Field Value
System.Single
|
DefaultRightTextMargin
The default tabs header text right margin.
Declaration
public const float DefaultRightTextMargin = 8F
Field Value
System.Single
|
DefaultSplitterValue
The default splitters value.
Declaration
public const float DefaultSplitterValue = 0.25F
Field Value
System.Single
|
Properties
ChildPanels
Gets the child panels.
Declaration
public List<DockPanel> ChildPanels { get; }
Property Value
System.Collections.Generic.List<DockPanel>
|
ChildPanelsCount
Gets the child panels count.
Declaration
public int ChildPanelsCount { get; }
Property Value
System.Int32
|
DockAreaBounds
Gets docking area bounds (tabs rectangle) in a screen space.
Declaration
public Rectangle DockAreaBounds { get; }
Property Value
Rectangle
|
FirstTab
IsFloating
Returns true if this panel is a floating window panel.
Declaration
public virtual bool IsFloating { get; }
Property Value
System.Boolean
|
IsMaster
Returns true if this panel is a master panel.
Declaration
public virtual bool IsMaster { get; }
Property Value
System.Boolean
|
LastTab
ParentDockPanel
Gets the parent panel.
Declaration
public DockPanel ParentDockPanel { get; }
Property Value
DockPanel
|
SelectedTab
SelectedTabIndex
Gets or sets the index of the selected tab.
Declaration
public int SelectedTabIndex { get; set; }
Property Value
System.Int32
|
Tabs
Gets the tabs.
Declaration
public List<DockWindow> Tabs { get; }
Property Value
System.Collections.Generic.List<DockWindow>
|
TabsCount
Gets amount of the tabs in a dock panel.
Declaration
public int TabsCount { get; }
Property Value
System.Int32
|
TabsProxy
Gets the tabs header proxy.
Declaration
public DockPanelProxy TabsProxy { get; }
Property Value
DockPanelProxy
|
Methods
AddTab(DockWindow, Boolean)
Adds the tab.
Declaration
protected virtual void AddTab(DockWindow window, bool autoSelect = true)
Parameters
DockWindow
window
The window to insert as a tab. |
System.Boolean
autoSelect
True if auto-select newly added tab. |
CloseAll(ClosingReason)
Closes all the windows.
Declaration
public bool CloseAll(ClosingReason reason)
Parameters
ClosingReason
reason
Window closing reason. |
Returns
System.Boolean
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
DockWindow
tab
The tab. |
Returns
System.Boolean
|
CreateChildPanel(DockState, Single)
Create child dock panel
Declaration
public DockPanel CreateChildPanel(DockState state, float splitterValue)
Parameters
FlaxEditor.GUI.Docking.DockState
state
Dock panel state |
System.Single
splitterValue
Initial splitter value |
Returns
DockPanel
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
FlaxEditor.GUI.Docking.DockState
state
The state. |
DockWindow
window
The window. |
System.Boolean
autoSelect
Whether or not to automatically select the window after docking it. |
System.Nullable<System.Single>
splitterValue
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.Int32
tabIndex
The index of the tab page. |
Returns
DockWindow
The tab. |
GetTabIndex(DockWindow)
Gets tab at the given index.
Declaration
public int GetTabIndex(DockWindow tab)
Parameters
DockWindow
tab
The tab page. |
Returns
System.Int32
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
DockPanel
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
DockWindow
tab
The tab page to select. |
System.Boolean
autoFocus
True if focus tab after selection change. |
SelectTab(Int32)
Selects the tab page.
Declaration
public void SelectTab(int tabIndex)
Parameters
System.Int32
tabIndex
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.Single
splitterValue
Splitter value |
Returns
FlaxEditor.GUI.Docking.DockState
Dock State |
UndockWindow(DockWindow)
Undocks the window.
Declaration
protected virtual void UndockWindow(DockWindow window)
Parameters
DockWindow
window
The window. |