Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4033 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
5 changed files with 72 additions and 37 deletions
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Collections.ObjectModel; |
||||
using System.Collections.Specialized; |
||||
|
||||
using ICSharpCode.SharpDevelop.Bookmarks; |
||||
|
||||
namespace ICSharpCode.AvalonEdit.AddIn |
||||
{ |
||||
/// <summary>
|
||||
/// Stores the entries in the icon bar margin. Multiple icon bar margins
|
||||
/// can use the same manager if split view is used.
|
||||
/// </summary>
|
||||
public class IconBarManager : IBookmarkMargin |
||||
{ |
||||
ObservableCollection<IBookmark> bookmarks = new ObservableCollection<IBookmark>(); |
||||
|
||||
public IconBarManager() |
||||
{ |
||||
bookmarks.CollectionChanged += bookmarks_CollectionChanged; |
||||
} |
||||
|
||||
public IList<IBookmark> Bookmarks { |
||||
get { return bookmarks; } |
||||
} |
||||
|
||||
void bookmarks_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) |
||||
{ |
||||
Redraw(); |
||||
} |
||||
|
||||
public void Redraw() |
||||
{ |
||||
if (RedrawRequested != null) |
||||
RedrawRequested(this, EventArgs.Empty); |
||||
} |
||||
|
||||
public event EventHandler RedrawRequested; |
||||
} |
||||
} |
Loading…
Reference in new issue