Class DockWindow
Dockable window UI control.
Inheritance
Implements
Namespace: FlaxEditor.GUI.Docking
Assembly: FlaxEngine.CSharp.dll
Syntax
public class DockWindow : Panel, IComparable, IDrawable
Constructors
DockWindow(MasterDockPanel, Boolean, ScrollBars)
Initializes a new instance of the DockWindow class.
Declaration
public DockWindow(MasterDockPanel masterPanel, bool hideOnClose, ScrollBars scrollBars)
Parameters
MasterDockPanel
masterPanel
The master docking panel. |
System.Boolean
hideOnClose
True if hide window on closing, otherwise it will be destroyed. |
ScrollBars
scrollBars
The scroll bars. |
Fields
_dockedTo
_masterPanel
InputActions
The input actions collection to processed during user input.
Declaration
public InputActionsContainer InputActions
Field Value
InputActionsContainer
|
Properties
DefaultSize
Gets the default window size (in UI units, unscaled by DPI which is handled by windowing system).
Declaration
public virtual Float2 DefaultSize { get; }
Property Value
Float2
|
HideOnClose
Gets or sets a value indicating whether hide window on close.
Declaration
public bool HideOnClose { get; protected set; }
Property Value
System.Boolean
|
Icon
Gets or sets the window icon
Declaration
public SpriteHandle Icon { get; set; }
Property Value
SpriteHandle
|
IsDocked
Gets a value indicating whether this window is docked.
Declaration
public bool IsDocked { get; }
Property Value
System.Boolean
|
IsHidden
Gets a value indicating whether this window is hidden from the user (eg. not shown or hidden on closed).
Declaration
public bool IsHidden { get; }
Property Value
System.Boolean
|
IsSelected
Gets a value indicating whether this window is selected.
Declaration
public bool IsSelected { get; }
Property Value
System.Boolean
|
MasterPanel
Gets the master panel.
Declaration
public MasterDockPanel MasterPanel { get; }
Property Value
MasterDockPanel
|
ParentDockPanel
Gets the parent dock panel.
Declaration
public DockPanel ParentDockPanel { get; }
Property Value
DockPanel
|
SerializationTypename
Gets the serialization typename.
Declaration
public virtual string SerializationTypename { get; }
Property Value
System.String
|
Title
Gets or sets the window title.
Declaration
public string Title { get; set; }
Property Value
System.String
|
TitleSize
UseLayoutData
Gets a value indicating whether window uses custom layout data.
Declaration
public virtual bool UseLayoutData { get; }
Property Value
System.Boolean
|
Methods
BringToFront()
Brings the window to the front of the Z order.
Declaration
public void BringToFront()
Close(ClosingReason)
Closes the window.
Declaration
public bool Close(ClosingReason reason)
Parameters
ClosingReason
reason
Window closing reason. |
Returns
System.Boolean
True if action has been cancelled (due to window internal logic). |
Focus()
FocusOrShow()
Focuses or shows the window.
Declaration
public void FocusOrShow()
FocusOrShow(DockState)
Focuses or shows the window.
Declaration
public void FocusOrShow(DockState state)
Parameters
FlaxEditor.GUI.Docking.DockState
state
The state. |
Hide()
Hides the window.
Declaration
public void Hide()
LayoutDeserializeSplitter(XmlElement, String, SplitPanel)
Deserializes splitter panel value from the saved layout.
Declaration
protected void LayoutDeserializeSplitter(XmlElement node, string name, SplitPanel splitter)
Parameters
System.Xml.XmlElement
node
The Xml document node. |
System.String
name
The Xml attribute name to use for value. |
FlaxEngine.GUI.SplitPanel
splitter
The splitter panel. |
LayoutSerializeSplitter(XmlWriter, String, SplitPanel)
Serializes splitter panel value into the saved layout.
Declaration
protected void LayoutSerializeSplitter(XmlWriter writer, string name, SplitPanel splitter)
Parameters
System.Xml.XmlWriter
writer
The Xml writer. |
System.String
name
The Xml attribute name to use for value. |
FlaxEngine.GUI.SplitPanel
splitter
The splitter panel. |
OnClose()
Called when window is closed.
Declaration
protected virtual void OnClose()
OnClosing(ClosingReason)
Called when window is closing. Operation can be cancelled.
Declaration
protected virtual bool OnClosing(ClosingReason reason)
Parameters
ClosingReason
reason
The reason. |
Returns
System.Boolean
True if cancel, otherwise false to allow. |
OnDestroy()
Method called when managed instance should be destroyed
Declaration
public override void OnDestroy()
Overrides
OnKeyDown(KeyboardKeys)
When key goes down
Declaration
public override bool OnKeyDown(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key value |
Returns
System.Boolean
True if event has been handled, otherwise false |
Overrides
OnLayoutDeserialize()
Called when during windows layout deserialization if window has no layout data to load. Can be used to restore default UI layout.
Declaration
public virtual void OnLayoutDeserialize()
OnLayoutDeserialize(XmlElement)
Called when during windows layout deserialization. Each window can use it to load custom interface data (eg. splitter position).
Declaration
public virtual void OnLayoutDeserialize(XmlElement node)
Parameters
System.Xml.XmlElement
node
The Xml document node. |
OnLayoutSerialize(XmlWriter)
Called when during windows layout serialization. Each window can use it to store custom interface data (eg. splitter position).
Declaration
public virtual void OnLayoutSerialize(XmlWriter writer)
Parameters
System.Xml.XmlWriter
writer
The Xml writer. |
OnShow()
Called when window shows.
Declaration
protected virtual void OnShow()
OnShowContextMenu(ContextMenu)
Called when dock panel wants to show the context menu for this window. Can be used to inject custom buttons and items to the context menu (on top).
Declaration
public virtual void OnShowContextMenu(ContextMenu menu)
Parameters
FlaxEditor.GUI.ContextMenu.ContextMenu
menu
The menu. |
OnUnlink()
Called when window is unlinked from the master panel.
Declaration
protected virtual void OnUnlink()
PerformLayoutBeforeChildren()
Perform layout for that container control before performing it for child controls.
Declaration
protected override void PerformLayoutBeforeChildren()
Overrides
SelectTab(Boolean)
Selects this tab page.
Declaration
public void SelectTab(bool autoFocus = true)
Parameters
System.Boolean
autoFocus
True if focus tab after selection change. |
Show(DockState, DockPanel, Boolean, Nullable<Single>)
Shows the window.
Declaration
public void Show(DockState state, DockPanel toDock = null, bool autoSelect = true, Nullable<float> splitterValue = null)
Parameters
FlaxEditor.GUI.Docking.DockState
state
Initial window state. |
DockPanel
toDock
Panel to dock to it. |
System.Boolean
autoSelect
Only used if |
System.Nullable<System.Single>
splitterValue
Only used if |
Show(DockState, DockWindow)
Shows the window.
Declaration
public void Show(DockState state, DockWindow toDock)
Parameters
FlaxEditor.GUI.Docking.DockState
state
Initial window state. |
DockWindow
toDock
Window to dock to it. |
ShowFloating()
Shows the window in a floating state.
Declaration
public void ShowFloating()
ShowFloating(Float2, Float2, WindowStartPosition)
Shows the window in a floating state.
Declaration
public void ShowFloating(Float2 location, Float2 size, WindowStartPosition position)
Parameters
Float2
location
Window location. |
Float2
size
Window size, set Zero to use default. |
WindowStartPosition
position
Window location. |
ShowFloating(Float2, WindowStartPosition)
Shows the window in a floating state.
Declaration
public void ShowFloating(Float2 size, WindowStartPosition position)
Parameters
Float2
size
Window size, set Zero to use default. |
WindowStartPosition
position
Window location. |
ShowFloating(WindowStartPosition)
Shows the window in a floating state.
Declaration
public void ShowFloating(WindowStartPosition position)
Parameters
WindowStartPosition
position
Window location. |
Undock()
Undocks this window.
Declaration
protected virtual void Undock()