public PlaceholderWindow(DockToolbarFrame frame) : base(Gtk.WindowType.Toplevel) { SkipTaskbarHint = true; Decorated = false; TransientFor = frame.TopWindow; Realize(); redgc = new Gdk.GC(GdkWindow); redgc.RgbFgColor = new Gdk.Color(255, 0, 0); }
public PlaceholderWindow (DockToolbarFrame frame): base (Gtk.WindowType.Toplevel) { SkipTaskbarHint = true; Decorated = false; TransientFor = frame.TopWindow; Realize (); redgc = new Gdk.GC (GdkWindow); redgc.RgbFgColor = new Gdk.Color (255, 0, 0); }
void CreateToolBar() { toolbarFrame = new DockToolbarFrame(); ((VBox)rootWidget).PackStart(toolbarFrame, true, true, 0); DockToolbar tb1 = new DockToolbar("MyToolbar", "The Toolbar"); tb1.ToolbarStyle = ToolbarStyle.Icons; ToolButton b = new ToolButton("gtk-quit"); b.Clicked += onButtonPressEvent; tb1.Add(b); tb1.ShowAll(); tb1.IconSize = Gtk.IconSize.SmallToolbar; toolbarFrame.AddBar(tb1); }
private void CreateComponents() { this.fullViewVBox = new VBox(false, 0); this.rootWidget = (Gtk.Container) this.fullViewVBox; this.Realize(); this.toolbar = MainWindowPartFactory.CreateMainToolbarWidget(); HBox hbox1 = new HBox(false, 0); this.fullViewVBox.PackStart((Widget)hbox1, false, false, 0U); this.toolbarFrame = new DockToolbarFrame(); this.fullViewVBox.PackStart((Widget)this.toolbarFrame, true, true, 0U); this.dock = new DockFrame(); this.dock.DefaultItemWidth = (int)byte.MaxValue; this.dock.CompactGuiLevel = 2; this.toolbarFrame.ModifyBg(StateType.Normal, new Gdk.Color(byte.MaxValue, (byte)0, (byte)0)); this.toolbarFrame.AddContent((Widget)this.dock); this.tabControl = new MonoDevelop.Components.DockNotebook.DockNotebook(); this.tabControl.NavigationButtonsVisible = false; this.tabControl.SwitchPage += new EventHandler(this.OnActiveWindowChanged); this.tabControl.PageRemoved += new EventHandler(this.OnActiveWindowChanged); this.tabControl.PageAdded += new EventHandler(this.OnActiveWindowChanged); this.tabControl.TabClosed += new EventHandler <TabEventArgs>(this.CloseClicked); this.tabControl.TabActivated += (EventHandler <TabEventArgs>)((sender, e) => this.ToggleFullViewMode()); this.tabControl.DoPopupMenu = new System.Action <MonoDevelop.Components.DockNotebook.DockNotebook, int, EventButton>(this.ShowPopup); this.tabControl.TabsReordered += new TabsReorderedHandler(this.OnTabsReordered); MonoDevelop.Components.DockNotebook.DockNotebook.ActiveNotebookChanged += (EventHandler)((param0, param1) => this.OnActiveWindowChanged((object)null, (EventArgs)null)); this.Add((Widget)this.fullViewVBox); this.fullViewVBox.ShowAll(); HBox hbox2 = new HBox(false, 0); this.bottomBar = MainWindowPartFactory.CreateMainStatus(); this.bottomBar.Show(); hbox2.PackStart(this.bottomBar, true, true, 0U); this.fullViewVBox.PackEnd((Widget)hbox2, false, false, 0U); hbox2.ShowAll(); hbox1.PackStart(this.toolbar, true, true, 0U); this.tabControl.InitSize(); int barHeight = this.tabControl.BarHeight; this.documentDockItem = this.dock.AddItem("Documents"); this.documentDockItem.Behavior = DockItemBehavior.Locked; this.documentDockItem.Expand = true; this.documentDockItem.DrawFrame = false; this.documentDockItem.Label = "Documents"; this.documentDockItem.Content = (Widget)this.tabControl; this.documentDockItem.ContentVisibleChanged += new EventHandler(this.DockTabControlVisibleChanged); this.dock.DefaultVisualStyle = new DockVisualStyle() { PadTitleLabelColor = new Gdk.Color?(Styles.PadLabelColor), PadBackgroundColor = new Gdk.Color?(Styles.PadBackground), InactivePadBackgroundColor = new Gdk.Color?(Styles.InactivePadBackground), PadTitleHeight = new int?(barHeight) }; DockVisualStyle style1 = new DockVisualStyle(); style1.PadTitleLabelColor = new Gdk.Color?(Styles.PadLabelColor); style1.PadTitleHeight = new int?(barHeight); style1.ShowPadTitleIcon = new bool?(false); style1.UppercaseTitles = new bool?(false); style1.ExpandedTabs = new bool?(true); style1.PadBackgroundColor = new Gdk.Color?(Styles.BrowserPadBackground); style1.InactivePadBackgroundColor = new Gdk.Color?(Styles.InactiveBrowserPadBackground); style1.TreeBackgroundColor = new Gdk.Color?(Styles.BrowserPadBackground); this.dock.SetDockItemStyle("ProjectPad", style1); this.dock.SetDockItemStyle("ClassPad", style1); this.dock.SetRegionStyle("Documents/Left", style1); this.dock.SetRegionStyle("Documents/Right", style1); DockVisualStyle style2 = new DockVisualStyle(); style2.SingleColumnMode = new bool?(true); this.dock.SetRegionStyle("Documents/Left;Documents/Right", style2); this.dock.SetDockItemStyle("Documents", style2); DockItem dockItem1 = this.dock.AddItem("__left"); dockItem1.DefaultLocation = "Documents/Left"; dockItem1.Behavior = DockItemBehavior.Locked; dockItem1.DefaultVisible = false; DockItem dockItem2 = this.dock.AddItem("__bottom"); dockItem2.DefaultLocation = "Documents/Bottom"; dockItem2.Behavior = DockItemBehavior.Locked; dockItem2.DefaultVisible = false; DockItem dockItem3 = this.dock.AddItem("__right"); dockItem3.DefaultLocation = "Documents/Right"; dockItem3.Behavior = DockItemBehavior.Locked; dockItem3.DefaultVisible = false; DockItem dockItem4 = this.dock.AddItem("__top"); dockItem4.DefaultLocation = "Documents/Top"; dockItem4.Behavior = DockItemBehavior.Locked; dockItem4.DefaultVisible = false; foreach (ExtensionNode extensionNode in AddinManager.GetExtensionNodes("/CocoStudio/Ide/Pads")) { this.ShowPadNode(extensionNode); } this.InitializeLayout("DefaultLayout"); this.LoadLayoutFromFile(MainWindow.configFile); }