public DockNotebook() { pagesCol = new ReadOnlyCollection <DockNotebookTab> (pages); AddEvents((Int32)(EventMask.AllEventsMask)); tabStrip = new TabStrip(this); PackStart(tabStrip, false, false, 0); contentBox = new EventBox(); PackStart(contentBox, true, true, 0); ShowAll(); contentBox.NoShowAll = true; tabStrip.DropDownButton.Sensitive = false; tabStrip.DropDownButton.MenuCreator = delegate { Gtk.Menu menu = new Menu(); foreach (var tab in pages) { var mi = new Gtk.ImageMenuItem(""); menu.Insert(mi, -1); var label = (Gtk.AccelLabel)mi.Child; if (tab.Markup != null) { label.Markup = tab.Markup; } else { label.Text = tab.Text; } var locTab = tab; mi.Activated += delegate { CurrentTab = locTab; }; } menu.ShowAll(); return(menu); }; Gtk.Drag.DestSet(this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler(OnDragDataReceived); DragMotion += delegate { // Bring this window to the front. Otherwise, the drop may end being done in another window that overlaps this one if (!Platform.IsWindows) { var window = ((Gtk.Window)Toplevel); if (window is DockWindow) { window.Present(); } } }; allNotebooks.Add(this); }
public DockNotebook() { pagesCol = new ReadOnlyCollection <DockNotebookTab> (pages); AddEvents((Int32)(EventMask.AllEventsMask)); tabStrip = new TabStrip(this); PackStart(tabStrip, false, false, 0); contentBox = new EventBox(); contentBox.Accessible.SetShouldIgnore(true); PackStart(contentBox, true, true, 0); ShowAll(); contentBox.NoShowAll = true; tabStrip.DropDownButton.Sensitive = false; tabStrip.DropDownButton.ContextMenuRequested = delegate { ContextMenu menu = new ContextMenu(); foreach (var tab in pages) { var item = new ContextMenuItem(tab.Markup ?? tab.Text); var locTab = tab; item.Clicked += (object sender, ContextMenuItemClickedEventArgs e) => { CurrentTab = locTab; }; menu.Items.Add(item); } return(menu); }; Gtk.Drag.DestSet(this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler(OnDragDataReceived); DragMotion += delegate { // Bring this window to the front. Otherwise, the drop may end being done in another window that overlaps this one if (!Platform.IsWindows) { var window = ((Gtk.Window)Toplevel); if (window is DockWindow) { window.Present(); } } }; allNotebooks.Add(this); }
public DefaultWorkbench() { Title = "MonoDevelop"; LoggingService.LogInfo ("Creating DefaultWorkbench"); WidthRequest = normalBounds.Width; HeightRequest = normalBounds.Height; DeleteEvent += new Gtk.DeleteEventHandler (OnClosing); if (Gtk.IconTheme.Default.HasIcon ("monodevelop")) Gtk.Window.DefaultIconName = "monodevelop"; else this.IconList = new Gdk.Pixbuf[] { ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Menu), ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Button), ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Dnd), ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Dialog) }; //this.WindowPosition = Gtk.WindowPosition.None; Gtk.Drag.DestSet (this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler (onDragDataRec); IdeApp.CommandService.SetRootWindow (this); }
public DefaultWorkbench() { Title = BrandingService.ApplicationName; LoggingService.LogInfo ("Creating DefaultWorkbench"); WidthRequest = normalBounds.Width; HeightRequest = normalBounds.Height; DeleteEvent += new Gtk.DeleteEventHandler (OnClosing); SetAppIcons (); //this.WindowPosition = Gtk.WindowPosition.None; Gtk.Drag.DestSet (this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler (onDragDataRec); IdeApp.CommandService.SetRootWindow (this); }
public DockNotebook () { pagesCol = new ReadOnlyCollection<DockNotebookTab> (pages); AddEvents ((Int32)(EventMask.AllEventsMask)); tabStrip = new TabStrip (this); PackStart (tabStrip, false, false, 0); contentBox = new EventBox (); PackStart (contentBox, true, true, 0); ShowAll (); contentBox.NoShowAll = true; tabStrip.DropDownButton.Sensitive = false; tabStrip.DropDownButton.MenuCreator = delegate { Gtk.Menu menu = new Menu (); foreach (var tab in pages) { var mi = new Gtk.ImageMenuItem (""); menu.Insert (mi, -1); var label = (Gtk.AccelLabel) mi.Child; if (tab.Markup != null) label.Markup = tab.Markup; else label.Text = tab.Text; var locTab = tab; mi.Activated += delegate { CurrentTab = locTab; }; } menu.ShowAll (); return menu; }; Gtk.Drag.DestSet (this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler (OnDragDataReceived); DragMotion += delegate { // Bring this window to the front. Otherwise, the drop may end being done in another window that overlaps this one if (!Platform.IsWindows) { var window = ((Gtk.Window)Toplevel); if (window is DockWindow) window.Present (); } }; allNotebooks.Add (this); }
public DockNotebook () { pagesCol = new ReadOnlyCollection<DockNotebookTab> (pages); AddEvents ((Int32)(EventMask.AllEventsMask)); tabStrip = new TabStrip (this); PackStart (tabStrip, false, false, 0); contentBox = new EventBox (); PackStart (contentBox, true, true, 0); ShowAll (); contentBox.NoShowAll = true; tabStrip.DropDownButton.Sensitive = false; tabStrip.DropDownButton.ContextMenuRequested = delegate { ContextMenu menu = new ContextMenu (); foreach (var tab in pages) { var item = new ContextMenuItem (tab.Markup ?? tab.Text); var locTab = tab; item.Clicked += (object sender, ContextMenuItemClickedEventArgs e) => { CurrentTab = locTab; }; menu.Items.Add (item); } return menu; }; Gtk.Drag.DestSet (this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler (OnDragDataReceived); DragMotion += delegate { // Bring this window to the front. Otherwise, the drop may end being done in another window that overlaps this one if (!Platform.IsWindows) { var window = ((Gtk.Window)Toplevel); if (window is DockWindow) window.Present (); } }; allNotebooks.Add (this); }