Esempio n. 1
0
        public DockNotebook InsertLeft(SdiWorkspaceWindow window)
        {
            return(Insert(window, container => {
                var box = new HPanedThin {
                    GrabAreaSize = 6
                };
                var new_container = new DockNotebookContainer(tabControl);

                box.Pack1(container, true, true);
                box.Pack2(new_container, true, true);
                Child = box;
            }));
        }
Esempio n. 2
0
        public DockNotebookTab InsertTab(IViewContent content, int index)
        {
            // Create the new tab
            var tab = InsertTab(index);

            // Create a content window and add it to the tab
            var window = new SdiWorkspaceWindow(content, this, tab);

            tab.Content = window;

            tab.Content.Show();

            return(tab);
        }
Esempio n. 3
0
        public DockNotebook InsertRight(SdiWorkspaceWindow window)
        {
            return(Insert(window, container => {
                var box = new HPanedThin()
                {
                    GrabAreaSize = 6
                };
                var new_container = new DockNotebookContainer(tabControl);

                box.Pack1(new_container, true, true);
                box.Pack2(container, true, true);
                box.Position = Allocation.Width / 2;
                Child = box;
            }));
        }
Esempio n. 4
0
        public static DockWindow MoveToFloatingWindow(SdiWorkspaceWindow workspaceWindow, int x, int y, int width, int height)
        {
            var window   = new DockWindow();
            var notebook = window.Container.GetFirstNotebook();
            var tab      = notebook.AddTab();

            tab.Content = workspaceWindow;

            window.Title = DefaultWorkbench.GetTitle(workspaceWindow);

            workspaceWindow.SetDockNotebook(notebook, tab);

            window.Move(x, y);
            window.Resize(width, height);
            window.ShowAll();

            return(window);
        }
Esempio n. 5
0
        protected override void Run()
        {
            IdeApp.Workbench.LockActiveWindowChangeEvent();

            SdiWorkspaceWindow window = null;

            if (DockNotebook.ActiveNotebook != null)
            {
                var tab = DockNotebook.ActiveNotebook.CurrentTab;
                if (tab != null)
                {
                    window = (SdiWorkspaceWindow)tab.Content;
                }
            }
            DockNotebook.ActiveNotebook.Container.SetSingleMode();

            if (window != null)
            {
                window.SelectWindow();
            }

            IdeApp.Workbench.UnlockActiveWindowChangeEvent();
        }
Esempio n. 6
0
        DockNotebook Insert(SdiWorkspaceWindow window, Action <DockNotebookContainer> callback)
        {
            var newNotebook = new SdiDragNotebook((DefaultWorkbench)IdeApp.Workbench.RootWindow);

            newNotebook.NavigationButtonsVisible = false;
            newNotebook.InitSize();
            var newContainer = new DockNotebookContainer(newNotebook);

            newNotebook.PageRemoved += HandlePageRemoved;

            if (window != null)
            {
                var newTab = newNotebook.AddTab(window);
                window.SetDockNotebook(newNotebook, newTab);
            }
            Remove(Child);

            callback(newContainer);

            tabControl.InitSize();
            ShowAll();
            return(newNotebook);
        }
Esempio n. 7
0
		public DockNotebook InsertRight (SdiWorkspaceWindow window)
		{
			return Insert (window, container => {
				var box = new HPanedThin () { GrabAreaSize = 6 };
				var new_container = new DockNotebookContainer (tabControl);

				box.Pack1 (new_container, true, true);
				box.Pack2 (container, true, true);
				box.Position = Allocation.Width / 2;
				Child = box;
			});
		}
Esempio n. 8
0
		public DockNotebook InsertLeft (SdiWorkspaceWindow window)
		{
			return Insert (window, container => {
				var box = new HPanedThin { GrabAreaSize = 6 };
				var new_container = new DockNotebookContainer (tabControl);

				box.Pack1 (container, true, true);
				box.Pack2 (new_container, true, true);
				Child = box;
			});
		}
Esempio n. 9
0
		DockNotebook Insert (SdiWorkspaceWindow window, Action<DockNotebookContainer> callback)
		{
			var newNotebook = new DockNotebook ();

			newNotebook.NavigationButtonsVisible = false;
			newNotebook.InitSize ();
			var newContainer = new DockNotebookContainer (newNotebook);
			newNotebook.PageRemoved += HandlePageRemoved;

			if (window != null) {
				var newTab = newNotebook.AddTab (window);
				window.SetDockNotebook (newNotebook, newTab);
			}
			Remove (Child);

			callback (newContainer);

			tabControl.InitSize ();
			ShowAll ();
			return newNotebook;
		}
Esempio n. 10
0
		public static DockWindow MoveToFloatingWindow (SdiWorkspaceWindow workspaceWindow, int x, int y, int width, int height)
		{
			var window = new DockWindow ();
			var notebook = window.Container.GetFirstNotebook ();
			var tab = notebook.AddTab ();
			tab.Content = workspaceWindow;

            // jontodo
			//window.Title = DefaultWorkbench.GetTitle (workspaceWindow);

			workspaceWindow.SetDockNotebook (notebook, tab);

			window.Move (x, y);
			window.Resize (width, height);
			window.ShowAll ();

			return window;
		}
Esempio n. 11
0
		public static DockWindow MoveToFloatingWindow (SdiWorkspaceWindow workspaceWindow)
		{
			return MoveToFloatingWindow (workspaceWindow, 0, 0, 640, 480);
		}
Esempio n. 12
0
 public static DockWindow MoveToFloatingWindow(SdiWorkspaceWindow workspaceWindow)
 {
     return(MoveToFloatingWindow(workspaceWindow, 0, 0, 640, 480));
 }
Esempio n. 13
0
        public DockNotebookTab InsertTab (IViewContent content, int index)
        {
            // Create the new tab
            var tab = InsertTab (index);

            // Create a content window and add it to the tab
            var window = new SdiWorkspaceWindow (content, this, tab);
            tab.Content = window;

            tab.Content.Show ();

            return tab;
        }