Dockable panel control.
| 65 | /// </summary> |
| 66 | /// <seealso cref="FlaxEngine.GUI.ContainerControl" /> |
| 67 | public class DockPanel : ContainerControl |
| 68 | { |
| 69 | /// <summary> |
| 70 | /// The default dock tabs header height. |
| 71 | /// </summary> |
| 72 | public const float DefaultHeaderHeight = 20; |
| 73 | |
| 74 | /// <summary> |
| 75 | /// The default tabs header text left margin. |
| 76 | /// </summary> |
| 77 | public const float DefaultLeftTextMargin = 4; |
| 78 | |
| 79 | /// <summary> |
| 80 | /// The default tabs header text right margin. |
| 81 | /// </summary> |
| 82 | public const float DefaultRightTextMargin = 8; |
| 83 | |
| 84 | /// <summary> |
| 85 | /// The default tabs header buttons size. |
| 86 | /// </summary> |
| 87 | public const float DefaultButtonsSize = 15; |
| 88 | |
| 89 | /// <summary> |
| 90 | /// The default tabs header buttons margin. |
| 91 | /// </summary> |
| 92 | public const float DefaultButtonsMargin = 2; |
| 93 | |
| 94 | /// <summary> |
| 95 | /// The default splitters value. |
| 96 | /// </summary> |
| 97 | public const float DefaultSplitterValue = 0.25f; |
| 98 | |
| 99 | private readonly DockPanel _parentPanel; |
| 100 | private readonly List<DockPanel> _childPanels = new List<DockPanel>(); |
| 101 | private readonly List<DockWindow> _tabs = new List<DockWindow>(); |
| 102 | private DockWindow _selectedTab; |
| 103 | private DockPanelProxy _tabsProxy; |
| 104 | |
| 105 | /// <summary> |
| 106 | /// Returns true if this panel is a master panel. |
| 107 | /// </summary> |
| 108 | public virtual bool IsMaster => false; |
| 109 | |
| 110 | /// <summary> |
| 111 | /// Returns true if this panel is a floating window panel. |
| 112 | /// </summary> |
| 113 | public virtual bool IsFloating => false; |
| 114 | |
| 115 | /// <summary> |
| 116 | /// Gets docking area bounds (tabs rectangle) in a screen space. |
| 117 | /// </summary> |
| 118 | public Rectangle DockAreaBounds |
| 119 | { |
| 120 | get |
| 121 | { |
| 122 | var parentWin = Root; |
| 123 | if (parentWin == null) |
| 124 | throw new InvalidOperationException("Missing parent window."); |
nothing calls this directly
no test coverage detected