public static void RemoveTab(this EditorWindow wnd) { var parent = new R_EditorWindow(wnd); var dockArea = new R_DockArea(parent.Parent); dockArea.RemoveTab(wnd); }
/// <summary> /// Adds the the second window as a tab at the end of the first window tab list /// </summary> /// <param name="existingWindow"></param> /// <param name="newWindow"></param> public static void AddTab(this EditorWindow existingWindow, EditorWindow newWindow) { var parent = new R_EditorWindow(existingWindow) : var child = new R_EditorWindow(newWindow) : var dockArea = new R_DockArea(parent.Parent) : dockArea.OriginalDragSource = child.Parent: dockArea.AddTab(newWindow) : }
public static bool IsDocked(this EditorWindow wnd) { #if UNITY_2020_2_OR_NEWER return(wnd.docked); #else var parent = new R_EditorWindow(wnd); return((bool)parent.Docked); #endif }
/// <summary> /// Docks the second window to the first window at the given position /// </summary> public static void Dock(this EditorWindow wnd, EditorWindow other, DockPosition position) { var mousePosition = GetFakeMousePosition(wnd, position) : var parent = new R_EditorWindow(wnd) : var child = new R_EditorWindow(other) : var dockArea = new R_DockArea(parent.Parent) : var containerWindow = new R_ContainerWindow(dockArea.Window) : var splitView = new R_SplitView(containerWindow.RootSplitView) : var dropInfo = splitView.DragOver(other, mousePosition) : dockArea.OriginalDragSource = child.Parent: splitView.PerformDrop(other, dropInfo, mousePosition) : }
public static bool IsDocked(this EditorWindow wnd) { var parent = new R_EditorWindow(wnd); return((bool)parent.Docked); }