public FramelessEntry(SearchEntry parent) : base() { this.parent = parent; HasFrame = false; parent.StyleSet += OnParentStyleSet; WidthChars = 1; GtkWorkarounds.SetTransparentBgHint(this, true); }
protected override void Initialize (IPadWindow window) { window.Title = GettextCatalog.GetString ("Errors"); DockItemToolbar toolbar = window.GetToolbar (DockPositionType.Top); errorBtn = new ToggleButton { Name = "toggleErrors" }; errorBtn.Active = ShowErrors; errorBtn.Image = new Gtk.Image (Stock.Error, Gtk.IconSize.Menu); errorBtn.Image.Show (); errorBtn.Toggled += new EventHandler (FilterChanged); errorBtn.TooltipText = GettextCatalog.GetString ("Show Errors"); UpdateErrorsNum(); toolbar.Add (errorBtn); warnBtn = new ToggleButton { Name = "toggleWarnings" }; warnBtn.Active = ShowWarnings; warnBtn.Image = new Gtk.Image (Stock.Warning, Gtk.IconSize.Menu); warnBtn.Image.Show (); warnBtn.Toggled += new EventHandler (FilterChanged); warnBtn.TooltipText = GettextCatalog.GetString ("Show Warnings"); UpdateWarningsNum(); toolbar.Add (warnBtn); msgBtn = new ToggleButton { Name = "toggleMessages" }; msgBtn.Active = ShowMessages; msgBtn.Image = new Gtk.Image (Stock.Information, Gtk.IconSize.Menu); msgBtn.Image.Show (); msgBtn.Toggled += new EventHandler (FilterChanged); msgBtn.TooltipText = GettextCatalog.GetString ("Show Messages"); UpdateMessagesNum(); toolbar.Add (msgBtn); toolbar.Add (new SeparatorToolItem ()); logBtn = new ToggleButton { Name = "toggleBuildOutput" }; logBtn.Label = GettextCatalog.GetString ("Build Output"); logBtn.Image = ImageService.GetImage ("md-message-log", Gtk.IconSize.Menu); logBtn.Image.Show (); logBtn.TooltipText = GettextCatalog.GetString ("Show build output"); logBtn.Toggled += HandleLogBtnToggled; toolbar.Add (logBtn); //Dummy widget to take all space between "Build Output" button and SearchEntry toolbar.Add (new HBox (), true); searchEntry = new SearchEntry (); searchEntry.Entry.Changed += searchPatternChanged; searchEntry.WidthRequest = 200; searchEntry.Visible = true; toolbar.Add (searchEntry); toolbar.ShowAll (); UpdatePadIcon (); }
public LogWidget (VersionControlDocumentInfo info) { this.Build (); this.info = info; if (info.Document != null) this.preselectFile = info.Item.Path; var separator = new HeaderBox (); separator.SetMargins (1, 0, 0, 0); separator.HeightRequest = 4; separator.ShowAll (); hpaned1 = hpaned1.ReplaceWithWidget (new HPanedThin (), true); vpaned1 = vpaned1.ReplaceWithWidget (new VPanedThin () { HandleWidget = separator }, true); revertButton = new DocumentToolButton ("vc-revert-command", GettextCatalog.GetString ("Revert changes from this revision")); revertButton.GetNativeWidget<Gtk.Widget> ().Sensitive = false; revertButton.Clicked += new EventHandler (RevertRevisionClicked); revertToButton = new DocumentToolButton ("vc-revert-command", GettextCatalog.GetString ("Revert to this revision")); revertToButton.GetNativeWidget<Gtk.Widget> ().Sensitive = false; revertToButton.Clicked += new EventHandler (RevertToRevisionClicked); refreshButton = new DocumentToolButton (Gtk.Stock.Refresh, GettextCatalog.GetString ("Refresh")); refreshButton.Clicked += new EventHandler (RefreshClicked); searchEntry = new SearchEntry (); searchEntry.WidthRequest = 200; searchEntry.ForceFilterButtonVisible = true; searchEntry.EmptyMessage = GettextCatalog.GetString ("Search"); searchEntry.Changed += HandleSearchEntryFilterChanged; searchEntry.Ready = true; searchEntry.Show (); messageRenderer.Ellipsize = Pango.EllipsizeMode.End; TreeViewColumn colRevMessage = new TreeViewColumn (); colRevMessage.Title = GettextCatalog.GetString ("Message"); var graphRenderer = new RevisionGraphCellRenderer (); colRevMessage.PackStart (graphRenderer, false); colRevMessage.SetCellDataFunc (graphRenderer, GraphFunc); colRevMessage.PackStart (messageRenderer, true); colRevMessage.SetCellDataFunc (messageRenderer, MessageFunc); colRevMessage.Sizing = TreeViewColumnSizing.Autosize; treeviewLog.AppendColumn (colRevMessage); colRevMessage.MinWidth = 350; colRevMessage.Resizable = true; TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer); colRevDate.SetCellDataFunc (textRenderer, DateFunc); colRevDate.Resizable = true; treeviewLog.AppendColumn (colRevDate); TreeViewColumn colRevAuthor = new TreeViewColumn (); colRevAuthor.Title = GettextCatalog.GetString ("Author"); colRevAuthor.PackStart (pixRenderer, false); colRevAuthor.PackStart (textRenderer, true); colRevAuthor.SetCellDataFunc (textRenderer, AuthorFunc); colRevAuthor.SetCellDataFunc (pixRenderer, AuthorIconFunc); colRevAuthor.Resizable = true; treeviewLog.AppendColumn (colRevAuthor); TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer); colRevNum.SetCellDataFunc (textRenderer, RevisionFunc); colRevNum.Resizable = true; treeviewLog.AppendColumn (colRevNum); treeviewLog.Model = logstore; treeviewLog.Selection.Changed += TreeSelectionChanged; treeviewFiles = new FileTreeView (); treeviewFiles.DiffLineActivated += HandleTreeviewFilesDiffLineActivated; scrolledwindowFiles.Child = treeviewFiles; scrolledwindowFiles.ShowAll (); changedpathstore = new TreeStore (typeof(Xwt.Drawing.Image), typeof (string), // icon/file name typeof(Xwt.Drawing.Image), typeof (string), // icon/operation typeof (string), // path typeof (string), // revision path (invisible) typeof (string []) // diff ); TreeViewColumn colChangedFile = new TreeViewColumn (); var crp = new CellRendererImage (); var crt = new CellRendererText (); colChangedFile.Title = GettextCatalog.GetString ("File"); colChangedFile.PackStart (crp, false); colChangedFile.PackStart (crt, true); colChangedFile.AddAttribute (crp, "image", 2); colChangedFile.AddAttribute (crt, "text", 3); treeviewFiles.AppendColumn (colChangedFile); TreeViewColumn colOperation = new TreeViewColumn (); colOperation.Title = GettextCatalog.GetString ("Operation"); colOperation.PackStart (crp, false); colOperation.PackStart (crt, true); colOperation.AddAttribute (crp, "image", 0); colOperation.AddAttribute (crt, "text", 1); treeviewFiles.AppendColumn (colOperation); TreeViewColumn colChangedPath = new TreeViewColumn (); colChangedPath.Title = GettextCatalog.GetString ("Path"); diffRenderer.DrawLeft = true; colChangedPath.PackStart (diffRenderer, true); colChangedPath.SetCellDataFunc (diffRenderer, SetDiffCellData); treeviewFiles.AppendColumn (colChangedPath); treeviewFiles.Model = changedpathstore; treeviewFiles.TestExpandRow += HandleTreeviewFilesTestExpandRow; treeviewFiles.Events |= Gdk.EventMask.PointerMotionMask; textviewDetails.WrapMode = Gtk.WrapMode.Word; labelAuthor.Text = ""; labelDate.Text = ""; labelRevision.Text = ""; vbox2.Remove (scrolledwindow1); HeaderBox tb = new HeaderBox (); tb.Show (); tb.SetMargins (1, 0, 0, 0); tb.ShowTopShadow = true; tb.ShadowSize = 4; tb.SetPadding (8, 8, 8, 8); tb.UseChildBackgroundColor = true; tb.Add (scrolledwindow1); vbox2.PackStart (tb, true, true, 0); }
public AssemblyBrowserWidget () { this.Build (); buttonBack = new Gtk.Button (ImageService.GetImage ("md-breadcrumb-prev", Gtk.IconSize.Menu)); buttonBack.Clicked += OnNavigateBackwardActionActivated; buttonForeward = new Gtk.Button (ImageService.GetImage ("md-breadcrumb-next", Gtk.IconSize.Menu)); buttonForeward.Clicked += OnNavigateForwardActionActivated; comboboxVisibilty = ComboBox.NewText (); comboboxVisibilty.InsertText (0, GettextCatalog.GetString ("Only public members")); comboboxVisibilty.InsertText (1, GettextCatalog.GetString ("All members")); comboboxVisibilty.Active = 0; comboboxVisibilty.Changed += delegate { TreeView.PublicApiOnly = comboboxVisibilty.Active == 0; FillInspectLabel (); }; searchentry1 = new MonoDevelop.Components.SearchEntry (); searchentry1.Ready = true; searchentry1.HasFrame = true; searchentry1.WidthRequest = 200; searchentry1.Visible = true; searchentry1.EmptyMessage = GettextCatalog.GetString ("Search for types or members"); searchentry1.InnerEntry.Changed += SearchEntryhandleChanged; CheckMenuItem checkMenuItem = this.searchentry1.AddFilterOption (0, GettextCatalog.GetString ("Types")); checkMenuItem.Active = true; checkMenuItem.Toggled += delegate { if (checkMenuItem.Active) { searchMode = AssemblyBrowserWidget.SearchMode.Type; CreateColumns (); StartSearch (); } }; CheckMenuItem checkMenuItem1 = this.searchentry1.AddFilterOption (1, GettextCatalog.GetString ("Members")); checkMenuItem1.Toggled += delegate { if (checkMenuItem1.Active) { searchMode = AssemblyBrowserWidget.SearchMode.Member; CreateColumns (); StartSearch (); } }; languageCombobox = Gtk.ComboBox.NewText (); //languageCombobox.AppendText (GettextCatalog.GetString ("Summary")); languageCombobox.AppendText (GettextCatalog.GetString ("IL")); languageCombobox.AppendText (GettextCatalog.GetString ("C#")); languageCombobox.Active = Math.Min (1, PropertyService.Get ("AssemblyBrowser.InspectLanguage", 1)); languageCombobox.Changed += LanguageComboboxhandleChanged; loader = new CecilLoader (true); loader.IncludeInternalMembers = true; TreeView = new AssemblyBrowserTreeView (new NodeBuilder[] { new ErrorNodeBuilder (), new ProjectNodeBuilder (this), new AssemblyNodeBuilder (this), new ModuleReferenceNodeBuilder (), new AssemblyReferenceNodeBuilder (this), //new AssemblyReferenceFolderNodeBuilder (this), new AssemblyResourceFolderNodeBuilder (), new ResourceNodeBuilder (), new NamespaceBuilder (this), new DomTypeNodeBuilder (this), new DomMethodNodeBuilder (this), new DomFieldNodeBuilder (this), new DomEventNodeBuilder (this), new DomPropertyNodeBuilder (this), new BaseTypeFolderNodeBuilder (this), new BaseTypeNodeBuilder (this) }, new TreePadOption [0]); TreeView.Tree.Selection.Mode = Gtk.SelectionMode.Single; TreeView.Tree.CursorChanged += HandleCursorChanged; TreeView.ShadowType = ShadowType.None; TreeView.BorderWidth = 1; TreeView.ShowBorderLine = false; TreeView.Zoom = 1.0; treeViewPlaceholder.Add (TreeView); // this.descriptionLabel.ModifyFont (Pango.FontDescription.FromString ("Sans 9")); // this.documentationLabel.ModifyFont (Pango.FontDescription.FromString ("Sans 12")); // this.documentationLabel.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255, 255, 225)); // this.documentationLabel.Wrap = true; var options = new MonoDevelop.Ide.Gui.CommonTextEditorOptions () { ShowFoldMargin = false, ShowIconMargin = false, ShowLineNumberMargin = false, HighlightCaretLine = true, }; inspectEditor = new TextEditor (new TextDocument (), options); inspectEditor.ButtonPressEvent += HandleInspectEditorButtonPressEvent; this.inspectEditor.Document.ReadOnly = true; // this.inspectEditor.Document.SyntaxMode = new Mono.TextEditor.Highlighting.MarkupSyntaxMode (); this.inspectEditor.TextViewMargin.GetLink = delegate(Mono.TextEditor.MarginMouseEventArgs arg) { var loc = inspectEditor.PointToLocation (arg.X, arg.Y); int offset = inspectEditor.LocationToOffset (loc); var referencedSegment = ReferencedSegments != null ? ReferencedSegments.FirstOrDefault (seg => seg.Segment.Contains (offset)) : null; if (referencedSegment == null) return null; if (referencedSegment.Reference is TypeDefinition) return new XmlDocIdGenerator ().GetXmlDocPath ((TypeDefinition)referencedSegment.Reference); if (referencedSegment.Reference is MethodDefinition) return new XmlDocIdGenerator ().GetXmlDocPath ((MethodDefinition)referencedSegment.Reference); if (referencedSegment.Reference is PropertyDefinition) return new XmlDocIdGenerator ().GetXmlDocPath ((PropertyDefinition)referencedSegment.Reference); if (referencedSegment.Reference is FieldDefinition) return new XmlDocIdGenerator ().GetXmlDocPath ((FieldDefinition)referencedSegment.Reference); if (referencedSegment.Reference is EventDefinition) return new XmlDocIdGenerator ().GetXmlDocPath ((EventDefinition)referencedSegment.Reference); if (referencedSegment.Reference is FieldDefinition) return new XmlDocIdGenerator ().GetXmlDocPath ((FieldDefinition)referencedSegment.Reference); if (referencedSegment.Reference is TypeReference) { return new XmlDocIdGenerator ().GetXmlDocPath ((TypeReference)referencedSegment.Reference); } return referencedSegment.Reference.ToString (); }; this.inspectEditor.LinkRequest += InspectEditorhandleLinkRequest; documentationScrolledWindow.Add (inspectEditor); this.hpaned1.ExposeEvent += HPaneExpose; hpaned1 = hpaned1.ReplaceWithWidget (new HPanedThin (), true); hpaned1.Position = 271; this.notebook1.SetTabLabel (this.documentationScrolledWindow, new Label (GettextCatalog.GetString ("Documentation"))); this.notebook1.SetTabLabel (this.searchWidget, new Label (GettextCatalog.GetString ("Search"))); notebook1.Page = 0; //this.searchWidget.Visible = false; typeListStore = new Gtk.ListStore (typeof(Xwt.Drawing.Image), // type image typeof(string), // name typeof(string), // namespace typeof(string), // assembly typeof(IMember) ); memberListStore = new Gtk.ListStore (typeof(Xwt.Drawing.Image), // member image typeof(string), // name typeof(string), // Declaring type full name typeof(string), // assembly typeof(IMember) ); CreateColumns (); // this.searchEntry.Changed += SearchEntryhandleChanged; this.searchTreeview.RowActivated += SearchTreeviewhandleRowActivated; this.notebook1.ShowTabs = false; this.ShowAll (); }
protected override void OnRemoved (Widget widget) { if (widget == filterEntry) filterEntry = null; else base.OnRemoved (widget); }
public CombinedBox () { filterEntry = new SearchEntry (); filterEntry.WidthRequest = 180; filterEntry.Ready = true; filterEntry.ForceFilterButtonVisible = true; filterEntry.Entry.CanFocus = true; filterEntry.RoundedShape = true; filterEntry.HasFrame = true; filterEntry.Parent = this; filterEntry.Show (); SearchKeyShortcut = new KeyboardShortcut ( Gdk.Key.f, Platform.IsMac? Gdk.ModifierType.MetaMask : Gdk.ModifierType.ControlMask ); }
public CombinedBox () { filterEntry = new SearchEntry (); filterEntry.WidthRequest = 180; filterEntry.Ready = true; filterEntry.ForceFilterButtonVisible = true; filterEntry.Entry.CanFocus = true; filterEntry.EmptyMessage = GettextCatalog.GetString ("Search (Control+F)"); filterEntry.RoundedShape = true; filterEntry.HasFrame = true; filterEntry.Parent = this; filterEntry.Show (); }
void HideFileMaskUI () { if (labelFileMask == null) return; properties.Set ("MonoDevelop.FindReplaceDialogs.FileMask", searchentryFileMask.Query); uint row = TableGetRowForItem (tableFindAndReplace, labelFileMask); TableRemoveRow (tableFindAndReplace, row, labelFileMask, searchentryFileMask, true); searchentryFileMask = null; labelFileMask = null; }
public AssemblyBrowserWidget () { this.Build (); comboboxVisibilty = ComboBox.NewText (); comboboxVisibilty.InsertText (0, GettextCatalog.GetString ("Only public members")); comboboxVisibilty.InsertText (1, GettextCatalog.GetString ("All members")); comboboxVisibilty.Active = Math.Min (1, Math.Max (0, PropertyService.Get ("AssemblyBrowser.MemberSelection", 0))); comboboxVisibilty.Changed += delegate { TreeView.PublicApiOnly = comboboxVisibilty.Active == 0; PropertyService.Set ("AssemblyBrowser.MemberSelection", comboboxVisibilty.Active); FillInspectLabel (); }; searchentry1 = new MonoDevelop.Components.SearchEntry (); searchentry1.Ready = true; searchentry1.HasFrame = true; searchentry1.WidthRequest = 200; searchentry1.Visible = true; UpdateSearchEntryMessage (); searchentry1.InnerEntry.Changed += SearchEntryhandleChanged; CheckMenuItem checkMenuItem = this.searchentry1.AddFilterOption (0, GettextCatalog.GetString ("Types and Members")); checkMenuItem.Active = PropertyService.Get ("AssemblyBrowser.SearchMemberState", SearchMemberState.TypesAndMembers) == SearchMemberState.TypesAndMembers; checkMenuItem.Toggled += delegate { if (checkMenuItem.Active) { searchMode = AssemblyBrowserWidget.SearchMode.TypeAndMembers; CreateColumns (); StartSearch (); } if (checkMenuItem.Active) PropertyService.Set ("AssemblyBrowser.SearchMemberState", SearchMemberState.TypesAndMembers); UpdateSearchEntryMessage (); }; CheckMenuItem checkMenuItem2 = this.searchentry1.AddFilterOption (0, GettextCatalog.GetString ("Types")); checkMenuItem2.Active = PropertyService.Get ("AssemblyBrowser.SearchMemberState", SearchMemberState.TypesAndMembers) == SearchMemberState.Types; checkMenuItem2.Toggled += delegate { if (checkMenuItem2.Active) { searchMode = AssemblyBrowserWidget.SearchMode.Type; CreateColumns (); StartSearch (); } if (checkMenuItem.Active) PropertyService.Set ("AssemblyBrowser.SearchMemberState", SearchMemberState.Types); UpdateSearchEntryMessage (); }; CheckMenuItem checkMenuItem1 = this.searchentry1.AddFilterOption (1, GettextCatalog.GetString ("Members")); checkMenuItem.Active = PropertyService.Get ("AssemblyBrowser.SearchMemberState", SearchMemberState.TypesAndMembers) == SearchMemberState.Members; checkMenuItem1.Toggled += delegate { if (checkMenuItem1.Active) { searchMode = AssemblyBrowserWidget.SearchMode.Member; CreateColumns (); StartSearch (); } if (checkMenuItem.Active) PropertyService.Set ("AssemblyBrowser.SearchMemberState", SearchMemberState.Members); UpdateSearchEntryMessage (); }; languageCombobox = Gtk.ComboBox.NewText (); languageCombobox.AppendText (GettextCatalog.GetString ("Summary")); languageCombobox.AppendText (GettextCatalog.GetString ("IL")); languageCombobox.AppendText (GettextCatalog.GetString ("C#")); languageCombobox.Active = Math.Min (2, Math.Max (0, PropertyService.Get ("AssemblyBrowser.Language", 0))); languageCombobox.Changed += LanguageComboboxhandleChanged; #pragma warning disable 618 TreeView = new AssemblyBrowserTreeView (new NodeBuilder[] { new ErrorNodeBuilder (), new ProjectNodeBuilder (this), new AssemblyNodeBuilder (this), new ModuleReferenceNodeBuilder (), new AssemblyReferenceNodeBuilder (this), //new AssemblyReferenceFolderNodeBuilder (this), new AssemblyResourceFolderNodeBuilder (), new ResourceNodeBuilder (), new NamespaceBuilder (this), new DomTypeNodeBuilder (this), new DomMethodNodeBuilder (this), new DomFieldNodeBuilder (this), new DomEventNodeBuilder (this), new DomPropertyNodeBuilder (this), new BaseTypeFolderNodeBuilder (this), new BaseTypeNodeBuilder (this) }, new TreePadOption [0]); TreeView.PublicApiOnly = comboboxVisibilty.Active == 0; TreeView.AllowsMultipleSelection = false; TreeView.SelectionChanged += HandleCursorChanged; treeViewPlaceholder.Add (TreeView); // this.descriptionLabel.ModifyFont (Pango.FontDescription.FromString ("Sans 9")); // this.documentationLabel.ModifyFont (Pango.FontDescription.FromString ("Sans 12")); // this.documentationLabel.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255, 255, 225)); // this.documentationLabel.Wrap = true; inspectEditor = TextEditorFactory.CreateNewEditor (); inspectEditor.ContextMenuPath = "/MonoDevelop/AssemblyBrowser/EditorContextMenu"; inspectEditor.Options = DefaultSourceEditorOptions.PlainEditor; //inspectEditor.ButtonPressEvent += HandleInspectEditorButtonPressEvent; this.inspectEditor.IsReadOnly = true; // this.inspectEditor.Document.SyntaxMode = new Mono.TextEditor.Highlighting.MarkupSyntaxMode (); // this.inspectEditor.LinkRequest += InspectEditorhandleLinkRequest; documentationScrolledWindow.PackStart (inspectEditor, true, true, 0); this.hpaned1.ExposeEvent += HPaneExpose; hpaned1 = hpaned1.ReplaceWithWidget (new HPanedThin (), true); hpaned1.Position = 271; this.notebook1.SetTabLabel (this.documentationScrolledWindow, new Label (GettextCatalog.GetString ("Documentation"))); this.notebook1.SetTabLabel (this.searchWidget, new Label (GettextCatalog.GetString ("Search"))); notebook1.Page = 0; //this.searchWidget.Visible = false; typeListStore = new Gtk.ListStore (typeof(Xwt.Drawing.Image), // type image typeof(string), // name typeof(string), // namespace typeof(string), // assembly typeof(IMember) ); memberListStore = new Gtk.ListStore (typeof(Xwt.Drawing.Image), // member image typeof(string), // name typeof(string), // Declaring type full name typeof(string), // assembly typeof(IMember) ); CreateColumns (); // this.searchEntry.Changed += SearchEntryhandleChanged; this.searchTreeview.RowActivated += SearchTreeviewhandleRowActivated; this.notebook1.ShowTabs = false; this.ShowAll (); }
public LogWidget (VersionControlDocumentInfo info) { this.Build (); this.info = info; if (info.Document != null) this.preselectFile = info.Document.FileName; revertButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert changes from this revision")); revertButton.IsImportant = true; // revertButton.Sensitive = false; revertButton.Clicked += new EventHandler (RevertRevisionClicked); CommandBar.Insert (revertButton, -1); revertToButton = new Gtk.ToolButton (new Gtk.Image ("vc-revert-command", Gtk.IconSize.Menu), GettextCatalog.GetString ("Revert to this revision")); revertToButton.IsImportant = true; // revertToButton.Sensitive = false; revertToButton.Clicked += new EventHandler (RevertToRevisionClicked); CommandBar.Insert (revertToButton, -1); Gtk.ToolItem item = new Gtk.ToolItem (); Gtk.HBox a = new Gtk.HBox (); item.Add (a); searchEntry = new SearchEntry (); searchEntry.WidthRequest = 200; searchEntry.ForceFilterButtonVisible = true; searchEntry.EmptyMessage = GettextCatalog.GetString ("Search"); searchEntry.Changed += HandleSearchEntryFilterChanged; searchEntry.Ready = true; searchEntry.Show (); a.PackEnd (searchEntry, false, false, 0); CommandBar.Insert (item, -1); ((Gtk.Toolbar.ToolbarChild)CommandBar[item]).Expand = true; CommandBar.ShowAll (); messageRenderer.Ellipsize = Pango.EllipsizeMode.End; TreeViewColumn colRevMessage = new TreeViewColumn (); colRevMessage.Title = GettextCatalog.GetString ("Message"); var graphRenderer = new RevisionGraphCellRenderer (); colRevMessage.PackStart (graphRenderer, false); colRevMessage.SetCellDataFunc (graphRenderer, GraphFunc); colRevMessage.PackStart (messageRenderer, true); colRevMessage.SetCellDataFunc (messageRenderer, MessageFunc); colRevMessage.Sizing = TreeViewColumnSizing.Autosize; treeviewLog.AppendColumn (colRevMessage); colRevMessage.MinWidth = 350; colRevMessage.Resizable = true; TreeViewColumn colRevDate = new TreeViewColumn (GettextCatalog.GetString ("Date"), textRenderer); colRevDate.SetCellDataFunc (textRenderer, DateFunc); colRevDate.Resizable = true; treeviewLog.AppendColumn (colRevDate); TreeViewColumn colRevAuthor = new TreeViewColumn (); colRevAuthor.Title = GettextCatalog.GetString ("Author"); colRevAuthor.PackStart (pixRenderer, false); colRevAuthor.PackStart (textRenderer, true); colRevAuthor.SetCellDataFunc (textRenderer, AuthorFunc); colRevAuthor.SetCellDataFunc (pixRenderer, AuthorIconFunc); colRevAuthor.Resizable = true; treeviewLog.AppendColumn (colRevAuthor); TreeViewColumn colRevNum = new TreeViewColumn (GettextCatalog.GetString ("Revision"), textRenderer); colRevNum.SetCellDataFunc (textRenderer, RevisionFunc); colRevNum.Resizable = true; treeviewLog.AppendColumn (colRevNum); treeviewLog.Model = logstore; treeviewLog.Selection.Changed += TreeSelectionChanged; treeviewFiles = new FileTreeView (); treeviewFiles.DiffLineActivated += HandleTreeviewFilesDiffLineActivated; scrolledwindowFiles.Child = treeviewFiles; scrolledwindowFiles.ShowAll (); changedpathstore = new TreeStore (typeof(Gdk.Pixbuf), typeof (string), // icon/file name typeof(Gdk.Pixbuf), typeof (string), // icon/operation typeof (string), // path typeof (string), // revision path (invisible) typeof (string[]) // diff ); TreeViewColumn colChangedFile = new TreeViewColumn (); var crp = new CellRendererPixbuf (); var crt = new CellRendererText (); colChangedFile.Title = GettextCatalog.GetString ("File"); colChangedFile.PackStart (crp, false); colChangedFile.PackStart (crt, true); colChangedFile.AddAttribute (crp, "pixbuf", 2); colChangedFile.AddAttribute (crt, "text", 3); treeviewFiles.AppendColumn (colChangedFile); TreeViewColumn colOperation = new TreeViewColumn (); colOperation.Title = GettextCatalog.GetString ("Operation"); colOperation.PackStart (crp, false); colOperation.PackStart (crt, true); colOperation.AddAttribute (crp, "pixbuf", 0); colOperation.AddAttribute (crt, "text", 1); treeviewFiles.AppendColumn (colOperation); TreeViewColumn colChangedPath = new TreeViewColumn (); colChangedPath.Title = GettextCatalog.GetString ("Path"); diffRenderer.DrawLeft = true; colChangedPath.PackStart (diffRenderer, true); colChangedPath.SetCellDataFunc (diffRenderer, SetDiffCellData); treeviewFiles.AppendColumn (colChangedPath); treeviewFiles.Model = changedpathstore; treeviewFiles.TestExpandRow += HandleTreeviewFilesTestExpandRow; treeviewFiles.Events |= Gdk.EventMask.PointerMotionMask; textviewDetails.WrapMode = Gtk.WrapMode.Word; labelAuthor.Text = ""; labelDate.Text = ""; labelRevision.Text = ""; }
public FramelessEntry (SearchEntry parent) : base() { this.parent = parent; HasFrame = false; parent.StyleSet += OnParentStyleSet; WidthChars = 1; GtkWorkarounds.SetTransparentBgHint (this, true); }
public MainToolbar () { WidgetFlags |= Gtk.WidgetFlags.AppPaintable; AddWidget (button); AddSpace (8); configurationCombo = new Gtk.ComboBox (); configurationCombo.Model = configurationStore; var ctx = new Gtk.CellRendererText (); configurationCombo.PackStart (ctx, true); configurationCombo.AddAttribute (ctx, "text", 0); configurationCombosBox = new HBox (false, 8); var configurationComboVBox = new VBox (); configurationComboVBox.PackStart (configurationCombo, true, false, 0); configurationCombosBox.PackStart (configurationComboVBox, false, false, 0); // bold attributes for running runtime targets / (emulators) boldAttributes.Insert (new Pango.AttrWeight (Pango.Weight.Bold)); runtimeCombo = new Gtk.ComboBox (); runtimeCombo.Model = runtimeStore; ctx = new Gtk.CellRendererText (); if (Platform.IsWindows) ctx.Ellipsize = Pango.EllipsizeMode.Middle; runtimeCombo.PackStart (ctx, true); runtimeCombo.SetCellDataFunc (ctx, RuntimeRenderCell); runtimeCombo.RowSeparatorFunc = RuntimeIsSeparator; var runtimeComboVBox = new VBox (); runtimeComboVBox.PackStart (runtimeCombo, true, false, 0); configurationCombosBox.PackStart (runtimeComboVBox, false, false, 0); AddWidget (configurationCombosBox); buttonBarBox = new Alignment (0.5f, 0.5f, 0, 0); buttonBarBox.LeftPadding = (uint) 7; buttonBarBox.Add (buttonBar); buttonBarBox.NoShowAll = true; AddWidget (buttonBarBox); AddSpace (24); statusArea = new StatusArea (); statusArea.ShowMessage (BrandingService.ApplicationName); var statusAreaAlign = new Alignment (0, 0, 1, 1); statusAreaAlign.Add (statusArea); contentBox.PackStart (statusAreaAlign, true, true, 0); AddSpace (24); statusAreaAlign.SizeAllocated += (object o, SizeAllocatedArgs args) => { Gtk.Widget toplevel = this.Toplevel; if (toplevel == null) return; int windowWidth = toplevel.Allocation.Width; int center = windowWidth / 2; int left = Math.Max (center - 300, args.Allocation.Left); int right = Math.Min (left + 600, args.Allocation.Right); uint left_padding = (uint) (left - args.Allocation.Left); uint right_padding = (uint) (args.Allocation.Right - right); if (left_padding != statusAreaAlign.LeftPadding || right_padding != statusAreaAlign.RightPadding) statusAreaAlign.SetPadding (0, 0, (uint) left_padding, (uint) right_padding); }; matchEntry = new SearchEntry (); matchEntry.ForceFilterButtonVisible = true; matchEntry.Entry.FocusOutEvent += (o, e) => { if (SearchEntryLostFocus != null) SearchEntryLostFocus (o, e); }; matchEntry.Ready = true; matchEntry.Visible = true; matchEntry.IsCheckMenu = true; matchEntry.WidthRequest = 240; if (!Platform.IsMac && !Platform.IsWindows) matchEntry.Entry.ModifyFont (Pango.FontDescription.FromString ("Sans 9")); // TODO: VV: "Segoe UI 9" matchEntry.RoundedShape = true; matchEntry.Entry.Changed += HandleSearchEntryChanged; matchEntry.Activated += HandleSearchEntryActivated; matchEntry.Entry.KeyPressEvent += HandleSearchEntryKeyPressed; SizeAllocated += (o, e) => { if (SearchEntryResized != null) SearchEntryResized (o, e); }; contentBox.PackStart (matchEntry, false, false, 0); var align = new Gtk.Alignment (0, 0, 1f, 1f); align.Show (); align.TopPadding = (uint) 5; align.LeftPadding = (uint) 9; align.RightPadding = (uint) 18; align.BottomPadding = (uint) 10; align.Add (contentBox); Add (align); SetDefaultSizes (-1, 21); configurationCombo.Changed += (o, e) => { if (ConfigurationChanged != null) ConfigurationChanged (o, e); }; runtimeCombo.Changed += (o, e) => { var ea = new HandledEventArgs (); if (RuntimeChanged != null) RuntimeChanged (o, ea); TreeIter it; if (runtimeCombo.GetActiveIter (out it)) { if (ea.Handled) { runtimeCombo.SetActiveIter (lastSelection); return; } lastSelection = it; } }; button.Clicked += HandleStartButtonClicked; IdeApp.CommandService.ActiveWidgetChanged += (sender, e) => { lastCommandTarget = new WeakReference (e.OldActiveWidget); }; this.ShowAll (); this.statusArea.statusIconBox.HideAll (); }
void InsertFilterEntry () { filterEntry = new SearchEntry (); filterEntry.Entry.SetSizeRequest (200, filterEntry.Entry.SizeRequest ().Height); filterEntry.WidthRequest = 200; filterEntry.Parent = mainBook; filterEntry.Ready = true; filterEntry.ForceFilterButtonVisible = true; filterEntry.Visible = true; filterEntry.HasFocus = true; filterEntry.Entry.CanFocus = true; filterEntry.EmptyMessage = GettextCatalog.GetString ("Search (Control+F)"); filterEntry.KeyPressEvent += HandleFilterEntryKeyPressEvent; filterEntry.Activated += HandleFilterEntryActivated; mainBook.SizeAllocated += delegate { RepositionFilter (); }; filterEntry.Changed += delegate { foreach (var p in panels) p.SetFilter (filterEntry.Query); }; RepositionFilter (); }
public FramelessEntry (SearchEntry parent) : base() { this.parent = parent; HasFrame = false; parent.StyleSet += OnParentStyleSet; WidthChars = 1; }
public Toolbox (ToolboxService toolboxService, IPadWindow container) { this.toolboxService = toolboxService; this.container = container; #region Toolbar DockItemToolbar toolbar = container.GetToolbar (PositionType.Top); filterEntry = new SearchEntry(); filterEntry.Ready = true; filterEntry.HasFrame = true; filterEntry.WidthRequest = 150; filterEntry.Changed += new EventHandler (filterTextChanged); filterEntry.Show (); toolbar.Add (filterEntry, true); catToggleButton = new ToggleButton (); catToggleButton.Image = new Image (Ide.Gui.Stock.GroupByCategory, IconSize.Menu); catToggleButton.Toggled += new EventHandler (toggleCategorisation); catToggleButton.TooltipText = GettextCatalog.GetString ("Show categories"); toolbar.Add (catToggleButton); compactModeToggleButton = new ToggleButton (); compactModeToggleButton.Image = new ImageView (ImageService.GetIcon ("md-compact-display", IconSize.Menu)); compactModeToggleButton.Toggled += new EventHandler (ToggleCompactMode); compactModeToggleButton.TooltipText = GettextCatalog.GetString ("Use compact display"); toolbar.Add (compactModeToggleButton); toolboxAddButton = new Button (new Gtk.Image (Ide.Gui.Stock.Add, IconSize.Menu)); toolbar.Add (toolboxAddButton); toolboxAddButton.TooltipText = GettextCatalog.GetString ("Add toolbox items"); toolboxAddButton.Clicked += new EventHandler (toolboxAddButton_Clicked); toolbar.ShowAll (); #endregion toolboxWidget = new ToolboxWidget (); toolboxWidget.SelectedItemChanged += delegate { selectedNode = this.toolboxWidget.SelectedItem != null ? this.toolboxWidget.SelectedItem.Tag as ItemToolboxNode : null; toolboxService.SelectItem (selectedNode); }; this.toolboxWidget.DragBegin += delegate(object sender, Gtk.DragBeginArgs e) { if (this.toolboxWidget.SelectedItem != null) { this.toolboxWidget.HideTooltipWindow (); toolboxService.DragSelectedItem (this.toolboxWidget, e.Context); } }; this.toolboxWidget.ActivateSelectedItem += delegate { toolboxService.UseSelectedItem (); }; fontChanger = new MonoDevelop.Ide.Gui.PadFontChanger (toolboxWidget, toolboxWidget.SetCustomFont, toolboxWidget.QueueResize); this.toolboxWidget.DoPopupMenu = ShowPopup; scrolledWindow = new MonoDevelop.Components.CompactScrolledWindow (); base.PackEnd (scrolledWindow, true, true, 0); base.FocusChain = new Gtk.Widget [] { scrolledWindow }; //Initialise self scrolledWindow.ShadowType = ShadowType.None; scrolledWindow.VscrollbarPolicy = PolicyType.Automatic; scrolledWindow.HscrollbarPolicy = PolicyType.Never; scrolledWindow.WidthRequest = 150; scrolledWindow.Add (this.toolboxWidget); //update view when toolbox service updated toolboxService.ToolboxContentsChanged += delegate { Refresh (); }; toolboxService.ToolboxConsumerChanged += delegate { Refresh (); }; Refresh (); //set initial state this.toolboxWidget.ShowCategories = catToggleButton.Active = true; compactModeToggleButton.Active = MonoDevelop.Core.PropertyService.Get ("ToolboxIsInCompactMode", false); this.toolboxWidget.IsListMode = !compactModeToggleButton.Active; this.ShowAll (); }
void ShowFileMaskUI () { if (labelFileMask != null) return; uint row; if (checkbuttonRecursively != null) row = TableGetRowForItem (tableFindAndReplace, checkbuttonRecursively) + 1; else row = TableGetRowForItem (tableFindAndReplace, labelScope) + 1; labelFileMask = new Label { LabelProp = GettextCatalog.GetString ("_File Mask:"), UseUnderline = true, Xalign = 0f }; labelFileMask.Show (); searchentryFileMask = new SearchEntry () { ForceFilterButtonVisible = false, IsCheckMenu = true, ActiveFilterID = 0, Visible = true, Ready = true, }; var checkMenuItem = searchentryFileMask.AddFilterOption (0, GettextCatalog.GetString ("Include binary files")); checkMenuItem.DrawAsRadio = false; checkMenuItem.Active = properties.Get ("IncludeBinaryFiles", false); checkMenuItem.Toggled += delegate { properties.Set ("IncludeBinaryFiles", checkMenuItem.Active); }; var checkMenuItem1 = searchentryFileMask.AddFilterOption (1, GettextCatalog.GetString ("Include hidden files and directories")); checkMenuItem1.DrawAsRadio = false; checkMenuItem1.Active = properties.Get ("IncludeHiddenFiles", false); checkMenuItem1.Toggled += delegate { properties.Set ("IncludeHiddenFiles", checkMenuItem1.Active); }; searchentryFileMask.Query = properties.Get ("MonoDevelop.FindReplaceDialogs.FileMask", ""); searchentryFileMask.Show (); TableAddRow (tableFindAndReplace, row, labelFileMask, searchentryFileMask); }
public SelectReferenceDialog () { Build (); combinedBox = new CombinedBox (); combinedBox.Show (); mainBook = new Notebook (); combinedBox.Add (mainBook); alignment1.Add (combinedBox); mainBook.ShowAll (); filterEntry = combinedBox.FilterEntry; boxRefs.WidthRequest = 200; refTreeStore = new ListStore (typeof (string), typeof(string), typeof(string), typeof(ProjectReference), typeof(Xwt.Drawing.Image)); ReferencesTreeView.Model = refTreeStore; TreeViewColumn col = new TreeViewColumn (); col.Title = GettextCatalog.GetString("Reference"); CellRendererImage crp = new CellRendererImage (); crp.Yalign = 0f; col.PackStart (crp, false); col.AddAttribute (crp, "image", IconColumn); CellRendererText text_render = new CellRendererText (); col.PackStart (text_render, true); col.AddAttribute (text_render, "markup", NameColumn); text_render.Ellipsize = Pango.EllipsizeMode.End; ReferencesTreeView.AppendColumn (col); // ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Type"), new CellRendererText (), "text", TypeNameColumn); // ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", LocationColumn); projectRefPanel = new ProjectReferencePanel (this); packageRefPanel = new PackageReferencePanel (this, false); allRefPanel = new PackageReferencePanel (this, true); assemblyRefPanel = new AssemblyReferencePanel (this); panels.Add (allRefPanel); panels.Add (packageRefPanel); panels.Add (projectRefPanel); panels.Add (assemblyRefPanel); //mainBook.RemovePage (mainBook.CurrentPage); HBox tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Reference, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString ("_All")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (allRefPanel, tab); tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Package, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString ("_Packages")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (packageRefPanel, tab); tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Project, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString ("Pro_jects")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (projectRefPanel, tab); tab = new HBox (false, 3); // tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu)), false, false, 0); tab.PackStart (new Label (GettextCatalog.GetString (".Net A_ssembly")), true, true, 0); tab.BorderWidth = 3; tab.ShowAll (); mainBook.AppendPage (assemblyRefPanel, tab); mainBook.Page = 0; var w = selectedHeader.Child; selectedHeader.Remove (w); HeaderBox header = new HeaderBox (1, 0, 1, 1); header.SetPadding (6, 6, 6, 6); header.GradientBackround = true; header.Add (w); selectedHeader.Add (header); RemoveReferenceButton.CanFocus = false; ReferencesTreeView.Selection.Changed += new EventHandler (OnChanged); Child.ShowAll (); OnChanged (null, null); InsertFilterEntry (); }
public MainToolbar () { executionTargetsChanged = DispatchService.GuiDispatch (new EventHandler (HandleExecutionTargetsChanged)); IdeApp.Workspace.ActiveConfigurationChanged += (sender, e) => UpdateCombos (); IdeApp.Workspace.ConfigurationsChanged += (sender, e) => UpdateCombos (); IdeApp.Workspace.SolutionLoaded += (sender, e) => UpdateCombos (); IdeApp.Workspace.SolutionUnloaded += (sender, e) => UpdateCombos (); IdeApp.ProjectOperations.CurrentSelectedSolutionChanged += HandleCurrentSelectedSolutionChanged; WidgetFlags |= Gtk.WidgetFlags.AppPaintable; AddWidget (button); AddSpace (8); configurationCombo = new Gtk.ComboBox (); configurationCombo.Model = configurationStore; var ctx = new Gtk.CellRendererText (); configurationCombo.PackStart (ctx, true); configurationCombo.AddAttribute (ctx, "text", 0); configurationCombosBox = new HBox (false, 8); var configurationComboVBox = new VBox (); configurationComboVBox.PackStart (configurationCombo, true, false, 0); configurationCombosBox.PackStart (configurationComboVBox, false, false, 0); runtimeCombo = new Gtk.ComboBox (); runtimeCombo.Model = runtimeStore; ctx = new Gtk.CellRendererText (); runtimeCombo.PackStart (ctx, true); runtimeCombo.SetCellDataFunc (ctx, RuntimeRenderCell); runtimeCombo.RowSeparatorFunc = RuntimeIsSeparator; var runtimeComboVBox = new VBox (); runtimeComboVBox.PackStart (runtimeCombo, true, false, 0); configurationCombosBox.PackStart (runtimeComboVBox, false, false, 0); AddWidget (configurationCombosBox); buttonBarBox = new Alignment (0.5f, 0.5f, 0, 0); buttonBarBox.LeftPadding = (uint) 7; buttonBarBox.Add (buttonBar); buttonBarBox.NoShowAll = true; AddWidget (buttonBarBox); AddSpace (24); statusArea = new StatusArea (); statusArea.ShowMessage (BrandingService.ApplicationName); var statusAreaAlign = new Alignment (0, 0, 1, 1); statusAreaAlign.Add (statusArea); contentBox.PackStart (statusAreaAlign, true, true, 0); AddSpace (24); statusAreaAlign.SizeAllocated += (object o, SizeAllocatedArgs args) => { Gtk.Widget toplevel = this.Toplevel; if (toplevel == null) return; int windowWidth = toplevel.Allocation.Width; int center = windowWidth / 2; int left = Math.Max (center - 300, args.Allocation.Left); int right = Math.Min (left + 600, args.Allocation.Right); uint left_padding = (uint) (left - args.Allocation.Left); uint right_padding = (uint) (args.Allocation.Right - right); if (left_padding != statusAreaAlign.LeftPadding || right_padding != statusAreaAlign.RightPadding) statusAreaAlign.SetPadding (0, 0, (uint) left_padding, (uint) right_padding); }; matchEntry = new SearchEntry (); var searchFiles = this.matchEntry.AddMenuItem (GettextCatalog.GetString ("Search Files")); searchFiles.Activated += delegate { SetSearchCategory ("files"); }; var searchTypes = this.matchEntry.AddMenuItem (GettextCatalog.GetString ("Search Types")); searchTypes.Activated += delegate { SetSearchCategory ("type"); }; var searchMembers = this.matchEntry.AddMenuItem (GettextCatalog.GetString ("Search Members")); searchMembers.Activated += delegate { SetSearchCategory ("member"); }; matchEntry.ForceFilterButtonVisible = true; matchEntry.Entry.FocusOutEvent += delegate { matchEntry.Entry.Text = ""; }; var cmd = IdeApp.CommandService.GetCommand (Commands.NavigateTo); cmd.KeyBindingChanged += delegate { UpdateSearchEntryLabel (); }; UpdateSearchEntryLabel (); matchEntry.Ready = true; matchEntry.Visible = true; matchEntry.IsCheckMenu = true; matchEntry.Entry.ModifyBase (StateType.Normal, Style.White); matchEntry.WidthRequest = 240; matchEntry.RoundedShape = true; matchEntry.Entry.Changed += HandleSearchEntryChanged; matchEntry.Activated += (sender, e) => { var pattern = SearchPopupSearchPattern.ParsePattern (matchEntry.Entry.Text); if (pattern.Pattern == null && pattern.LineNumber > 0) { popup.Destroy (); var doc = IdeApp.Workbench.ActiveDocument; if (doc != null && doc != null) { doc.Select (); doc.Editor.Caret.Location = new Mono.TextEditor.DocumentLocation (pattern.LineNumber, pattern.Column > 0 ? pattern.Column : 1); doc.Editor.CenterToCaret (); doc.Editor.Parent.StartCaretPulseAnimation (); } return; } if (popup != null) popup.OpenFile (); }; matchEntry.Entry.KeyPressEvent += (o, args) => { if (args.Event.Key == Gdk.Key.Escape) { var doc = IdeApp.Workbench.ActiveDocument; if (doc != null) { if (popup != null) popup.Destroy (); doc.Select (); } return; } if (popup != null) { args.RetVal = popup.ProcessKey (args.Event.Key, args.Event.State); } }; IdeApp.Workbench.RootWindow.WidgetEvent += delegate(object o, WidgetEventArgs args) { if (args.Event is Gdk.EventConfigure) PositionPopup (); }; BuildToolbar (); IdeApp.CommandService.RegisterCommandBar (buttonBar); AddinManager.ExtensionChanged += delegate(object sender, ExtensionEventArgs args) { if (args.PathChanged (ToolbarExtensionPath)) BuildToolbar (); }; contentBox.PackStart (matchEntry, false, false, 0); var align = new Gtk.Alignment (0, 0, 1f, 1f); align.Show (); align.TopPadding = (uint) 5; align.LeftPadding = (uint) 9; align.RightPadding = (uint) 18; align.BottomPadding = (uint) 10; align.Add (contentBox); Add (align); SetDefaultSizes (-1, 21); UpdateCombos (); button.Clicked += HandleStartButtonClicked; IdeApp.CommandService.RegisterCommandBar (this); IdeApp.CommandService.ActiveWidgetChanged += (sender, e) => { lastCommandTarget = e.OldActiveWidget; }; this.ShowAll (); this.statusArea.statusIconBox.HideAll (); }
void InsertFilterEntry () { filterEntry = new SearchEntry (); filterEntry.Entry.SetSizeRequest (200, filterEntry.Entry.SizeRequest ().Height); filterEntry.Parent = mainBook; filterEntry.Ready = true; filterEntry.ForceFilterButtonVisible = true; filterEntry.HasFocus = true; filterEntry.Entry.CanFocus = true; filterEntry.EmptyMessage = GettextCatalog.GetString ("Search (Control+F)"); filterEntry.KeyPressEvent += HandleFilterEntryKeyPressEvent; filterEntry.Activated += HandleFilterEntryActivated; this.Shown += delegate { filterEntry.Entry.Show (); filterEntry.Show (); }; //hack to make sure the notebook tab row always has space for the filter entry alignment1.SizeRequested += Alignment1SizeRequested; mainBook.SizeAllocated += delegate { RepositionFilter (); }; filterEntry.Changed += delegate { foreach (var p in panels) p.SetFilter (filterEntry.Query); }; RepositionFilter (); }