Пример #1
0
        internal void AddTopLevel(DockFrameTopLevel w, int x, int y, int width, int height)
        {
            w.X = x;
            w.Y = y;

            if (UseWindowsForTopLevelFrames)
            {
                var win = new Gtk.Window(Gtk.WindowType.Toplevel);
                win.AcceptFocus     = false;
                win.SkipTaskbarHint = true;
                win.Decorated       = false;
                win.TypeHint        = Gdk.WindowTypeHint.Toolbar;
                w.ContainerWindow   = win;
                w.Size = new Size(width, height);
                win.Add(w);
                w.Show();
                var p = this.GetScreenCoordinates(new Gdk.Point(x, y));
                win.Opacity = 0.0;
                win.Move(p.X, p.Y);
                win.Resize(width, height);
                win.Show();
                Ide.DesktopService.AddChildWindow((Gtk.Window)Toplevel, win);
                win.AcceptFocus = true;
                win.Opacity     = 1.0;
            }
            else
            {
                w.Parent = this;
                w.Size   = new Size(width, height);
                Requisition r = w.SizeRequest();
                w.Allocation = new Gdk.Rectangle(Allocation.X + x, Allocation.Y + y, r.Width, r.Height);
                topLevels.Add(w);
            }
        }
Пример #2
0
        internal void AddTopLevel(DockFrameTopLevel w, int x, int y)
        {
            w.Parent = this;
            w.X      = x;
            w.Y      = y;
            Requisition r = w.SizeRequest();

            w.Allocation = new Gdk.Rectangle(Allocation.X + x, Allocation.Y + y, r.Width, r.Height);
            topLevels.Add(w);
        }
Пример #3
0
        internal void AddTopLevel(DockFrameTopLevel w, int x, int y, int width, int height)
        {
            ValidateWindowBounds(ref x, ref y, ref width, ref height);

            w.X = x;
            w.Y = y;

            if (UseWindowsForTopLevelFrames)
            {
                var win = new IdeWindow(Gtk.WindowType.Toplevel);
                win.SkipTaskbarHint = true;
                win.Decorated       = false;
                win.TypeHint        = Gdk.WindowTypeHint.Toolbar;
                w.ContainerWindow   = win;
                w.Size = new Size(width, height);
                win.Add(w);
                w.Show();
                var p = this.GetScreenCoordinates(new Gdk.Point(x, y));
                win.Opacity = 0.0;
                win.Move(p.X, p.Y);
                win.Resize(width, height);
                win.Show();
                Ide.IdeServices.DesktopService.AddChildWindow((Gtk.Window)Toplevel, win);
                win.AcceptFocus = true;
                win.Opacity     = 1.0;

                /* When we use real windows for frames, it's possible for pads to be over other
                 * windows. For some reason simply presenting or raising those dialogs doesn't
                 * seem to work, so we hide/show them in order to force them above the pad. */
                var toplevels = Gtk.Window.ListToplevels().Where(t => t.IsRealized && t.Visible && t.TypeHint == WindowTypeHint.Dialog);                   // && t.TransientFor != null);
                foreach (var t in toplevels)
                {
                    t.Hide();
                    t.Show();
                }

                MonoDevelop.Ide.IdeApp.CommandService.RegisterTopWindow(win);
            }
            else
            {
                w.Parent = this;
                w.Size   = new Size(width, height);
                Requisition r = w.SizeRequest();
                w.Allocation = new Gdk.Rectangle(Allocation.X + x, Allocation.Y + y, r.Width, r.Height);
                topLevels.Add(w);
            }
        }
Пример #4
0
		internal void RemoveTopLevel (DockFrameTopLevel w)
		{
			w.Unparent ();
			topLevels.Remove (w);
			QueueResize ();
		}
Пример #5
0
		internal void AddTopLevel (DockFrameTopLevel w, int x, int y, int width, int height)
		{
			w.X = x;
			w.Y = y;

			if (UseWindowsForTopLevelFrames) {
				var win = new IdeWindow (Gtk.WindowType.Toplevel);
				win.SkipTaskbarHint = true;
				win.Decorated = false;
				win.TypeHint = Gdk.WindowTypeHint.Toolbar;
				w.ContainerWindow = win;
				w.Size = new Size (width, height);
				win.Add (w);
				w.Show ();
				var p = this.GetScreenCoordinates (new Gdk.Point (x, y));
				win.Opacity = 0.0;
				win.Move (p.X, p.Y);
				win.Resize (width, height);
				win.Show ();
				Ide.DesktopService.AddChildWindow ((Gtk.Window)Toplevel, win);
				win.AcceptFocus = true;
				win.Opacity = 1.0;

				/* When we use real windows for frames, it's possible for pads to be over other
				 * windows. For some reason simply presenting or raising those dialogs doesn't
				 * seem to work, so we hide/show them in order to force them above the pad. */
				var toplevels = Gtk.Window.ListToplevels ().Where (t => t.IsRealized && t.Visible && t.TypeHint == WindowTypeHint.Dialog); // && t.TransientFor != null);
				foreach (var t in toplevels) {
					t.Hide ();
					t.Show ();
				}

				MonoDevelop.Ide.IdeApp.CommandService.RegisterTopWindow (win);
			} else {
				w.Parent = this;
				w.Size = new Size (width, height);
				Requisition r = w.SizeRequest ();
				w.Allocation = new Gdk.Rectangle (Allocation.X + x, Allocation.Y + y, r.Width, r.Height);
				topLevels.Add (w);
			}
		}
Пример #6
0
		internal void AddTopLevel (DockFrameTopLevel w, int x, int y)
		{
			w.Parent = this;
			w.X = x;
			w.Y = y;
			Requisition r = w.SizeRequest ();
			w.Allocation = new Gdk.Rectangle (Allocation.X + x, Allocation.Y + y, r.Width, r.Height);
			topLevels.Add (w);
		}
Пример #7
0
 internal void RemoveTopLevel(DockFrameTopLevel w)
 {
     w.Unparent();
     topLevels.Remove(w);
     QueueResize();
 }
Пример #8
0
		internal void AddTopLevel (DockFrameTopLevel w, int x, int y, int width, int height)
		{
			w.X = x;
			w.Y = y;

			if (UseWindowsForTopLevelFrames) {
				var win = new Gtk.Window (Gtk.WindowType.Toplevel);
				win.AcceptFocus = false;
				win.SkipTaskbarHint = true;
				win.Decorated = false;
				win.TypeHint = Gdk.WindowTypeHint.Toolbar;
				w.ContainerWindow = win;
				w.Size = new Size (width, height);
				win.Add (w);
				w.Show ();
				var p = this.GetScreenCoordinates (new Gdk.Point (x, y));
				win.Opacity = 0.0;
				win.Move (p.X, p.Y);
				win.Resize (width, height);
				win.Show ();
				Ide.DesktopService.AddChildWindow ((Gtk.Window)Toplevel, win);
				win.AcceptFocus = true;
				win.Opacity = 1.0;
			} else {
				w.Parent = this;
				w.Size = new Size (width, height);
				Requisition r = w.SizeRequest ();
				w.Allocation = new Gdk.Rectangle (Allocation.X + x, Allocation.Y + y, r.Width, r.Height);
				topLevels.Add (w);
			}
		}