public static void RemoveTab(this EditorWindow wnd)
        {
            var parent   = new R_EditorWindow(wnd);
            var dockArea = new R_DockArea(parent.Parent);

            dockArea.RemoveTab(wnd);
        }
Exemple #2
0
 /// <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
    }
Exemple #4
0
                /// <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);
        }