示例#1
0
        public PlaceholderWindow(DockNotebookTab tab) : base(Gtk.WindowType.Toplevel)
        {
            this.frame      = tab;
            SkipTaskbarHint = true;
            Decorated       = false;
            TypeHint        = WindowTypeHint.Utility;
            titleWindow     = new DocumentTitleWindow(this, tab);
            //IdeApp.Workbench.LockActiveWindowChangeEvent ();

            titleWindow.FocusInEvent += delegate {
                if (timeout != 0)
                {
                    GLib.Source.Remove(timeout);
                    timeout = 0;
                }
            };

            titleWindow.FocusOutEvent += delegate {
                timeout = GLib.Timeout.Add(100, () => {
                    titleWindow.Close();
                    return(false);
                });
            };

            //var windowStack = IdeApp.CommandService.TopLevelWindowStack.ToArray ();
            allNotebooks = DockNotebook.AllNotebooks.ToList();
            //allNotebooks.Sort (delegate(DockNotebook x, DockNotebook y) {
            //    var ix = Array.IndexOf (windowStack, (Gtk.Window) x.Toplevel);
            //    var iy = Array.IndexOf (windowStack, (Gtk.Window) y.Toplevel);
            //    if (ix == -1) ix = int.MaxValue;
            //    if (iy == -1) iy = int.MaxValue;
            //    return ix.CompareTo (iy);
            //});
        }
示例#2
0
		public PlaceholderWindow (DockNotebookTab tab): base (Gtk.WindowType.Toplevel)
		{
			this.frame = tab;
			SkipTaskbarHint = true;
			Decorated = false;
			TypeHint = WindowTypeHint.Utility;
			titleWindow = new DocumentTitleWindow (this, tab);
            //IdeApp.Workbench.LockActiveWindowChangeEvent ();

			titleWindow.FocusInEvent += delegate {
				if (timeout != 0) {
					GLib.Source.Remove (timeout);
					timeout = 0;
				}
			};

			titleWindow.FocusOutEvent += delegate {
				timeout = GLib.Timeout.Add (100, () => {
					titleWindow.Close ();
					return false;
				});
			};

            //var windowStack = IdeApp.CommandService.TopLevelWindowStack.ToArray ();
            allNotebooks = DockNotebook.AllNotebooks.ToList ();
            //allNotebooks.Sort (delegate(DockNotebook x, DockNotebook y) {
            //    var ix = Array.IndexOf (windowStack, (Gtk.Window) x.Toplevel);
            //    var iy = Array.IndexOf (windowStack, (Gtk.Window) y.Toplevel);
            //    if (ix == -1) ix = int.MaxValue;
            //    if (iy == -1) iy = int.MaxValue;
            //    return ix.CompareTo (iy);
            //});
		}