using System.ComponentModel; using System.Windows.Documents; using System.Windows.Media; namespace JetBrains.Omea.Plugins { /// /// An entry in the plugins list, tracks the enabled state and contains basic info about the plugin. /// Queries the plugin for its info in a deferred fashion. /// internal abstract class OmeaPluginsPageListEntry : INotifyPropertyChanged { #region Data /// /// The initial value of the Enabled state, before we edit the item. /// protected bool _bIsEnabledInitially; #endregion #region Attributes /// /// Gets the item description to display when the item is selected. /// public abstract FlowDocument Description { get; } /// /// Gets the item icon. /// public abstract ImageSource Icon { get; } /// /// Gets or sets the current enabled state. /// public bool IsEnabled { get; set; } /// /// The initial value of the Enabled state, before we edit the item. /// public bool IsEnabledInitially { get { return _bIsEnabledInitially; } } /// /// Gets whether this is a primary plugin (True), or not (False), or that is not applicable, eg on a non-plugin (Null). /// public abstract bool? IsPrimary { get; } /// /// Gets whether the checkbox should be available for the item. /// public abstract bool SupportsIsEnabled { get; } /// /// Gets the item title. /// public abstract string Title { get; } #endregion #region Implementation protected void FirePropertyChanged(string name) { PropertyChanged(this, new PropertyChangedEventArgs(name)); } #endregion #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged = delegate { }; #endregion } }