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(); // Pinta TODO: May be needed on Mac? //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.TypeHint == WindowTypeHint.Dialog); // && t.TransientFor != null); foreach (var t in toplevels) { t.Hide(); t.Show(); } } 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); } }
internal void RemoveTopLevel(DockFrameTopLevel w) { w.Unparent(); topLevels.Remove(w); QueueResize(); }
internal void RemoveTopLevel (DockFrameTopLevel w) { w.Unparent (); topLevels.Remove (w); QueueResize (); }
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 (); // Pinta TODO: May be needed on Mac? //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.TypeHint == WindowTypeHint.Dialog); // && t.TransientFor != null); foreach (var t in toplevels) { t.Hide (); t.Show (); } } 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); } }