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); } }
public ProjectTreePane(IdeWindow hostForm) { InitializeComponent(); StyleManager.AutoStyle(this); _hostForm = hostForm; // TODO: fix this ugly hack! (ProjectTree New submenu) NewFileItem.DropDown = _hostForm.menuNew.DropDown; NewFileItem.DropDownOpening += _hostForm.menuNew_DropDownOpening; NewFileItem.DropDownClosed += _hostForm.menuNew_DropDownClosed; _tip.ToolTipTitle = "Image"; _tip.ToolTipIcon = ToolTipIcon.Info; _tip.UseFading = true; ProjectTreeView.ImageList = _iconlist; _iconlist.ColorDepth = ColorDepth.Depth32Bit; }
public StartPageView(IdeWindow mainEditor) { InitializeComponent(); InitializeDocking(); Icon = Icon.FromHandle(Resources.SphereEditor.GetHicon()); _mainEditor = mainEditor; _listIcons.ImageSize = new Size(48, 48); _listIcons.ColorDepth = ColorDepth.Depth32Bit; _listIcons.Images.Add(Properties.Resources.SphereEditor); _listIconsSmall.ImageSize = new Size(16, 16); _listIconsSmall.ColorDepth = ColorDepth.Depth32Bit; _listIconsSmall.Images.Add(Properties.Resources.SphereEditor); GameFolders.LargeImageList = _listIcons; GameFolders.SmallImageList = _listIconsSmall; InitializeView(); StyleManager.AutoStyle(this); }
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); } }