void IPlugin.Init(object context) { solidIDE = context as ISolidIDE; mainWindow = solidIDE.GetMainWindow(); // Dock with PropertyGrid Gtk.ScrolledWindow inspectorGridScrollWindow = new Gtk.ScrolledWindow(); Gtk.Viewport inspectorGridViewport = new Gtk.Viewport(); inspectorGridScrollWindow.Add(inspectorGridViewport); inspectorGrid = new SolidV.Gtk.InspectorGrid.InspectorGrid(); inspectorGridViewport.Add(inspectorGrid); inspectorGridScrollWindow.ShowAll(); InspectorDockItem = mainWindow.DockFrame.AddItem("Inspector"); InspectorDockItem.Behavior = DockItemBehavior.Normal; InspectorDockItem.Expand = true; InspectorDockItem.DrawFrame = true; InspectorDockItem.Label = "Inspector"; InspectorDockItem.Content = inspectorGridScrollWindow; InspectorDockItem.DefaultVisible = true; InspectorDockItem.Visible = true; IServiceContainer plugins = solidIDE.GetServiceContainer(); IDesigner designer = plugins.GetService <IDesigner>(); designer.CurrentSheetChanged += HandleDesignerCurrentSheetChanged; // Menu var viewMenuItem = solidIDE.GetMenuItem <Gtk.ImageMenuItem>("View"); var InspectorMenuItem = solidIDE.GetMenuItem <Gtk.ImageMenuItem>("View", "Inspector"); InspectorMenuItem.Activated += HandleShowInspectorActivated; }
/// <summary> /// Tunes the left dock item. /// </summary> private void TuneLeftDockItem() { Gtk.VBox vbox = new Gtk.VBox(); tbLeft.Name = "LeftToolbar"; vbox.PackStart(tbLeft, true, true, 0); tbLeft.Orientation = Gtk.Orientation.Vertical; // Show only text on the buttons tbLeft.ToolbarStyle = Gtk.ToolbarStyle.Text; ScrolledWindow scroll = new ScrolledWindow(); // Attach the treeView to the scroll bar. scroll.AddWithViewport(vbox); nbLeftDock.Add(scroll);; this.propertyGrid = new SolidV.Gtk.InspectorGrid.InspectorGrid(); nbLeftDock.AppendPage(propertyGrid, new Gtk.Label("Properties")); nbLeftDock.ShowAll(); }