Browse Source

add some missing documentation

pull/23/head
Siegfried Pammer 14 years ago
parent
commit
042795f004
  1. 3
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/ISearchStrategy.cs
  2. 33
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs

3
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/ISearchStrategy.cs

@ -36,6 +36,9 @@ namespace ICSharpCode.AvalonEdit.Search
/// </summary> /// </summary>
public interface ISearchResult : ISegment public interface ISearchResult : ISegment
{ {
/// <summary>
/// Replaces parts of the replacement string with parts from the match. (e.g. $1)
/// </summary>
string ReplaceWith(string replacement); string ReplaceWith(string replacement);
} }

33
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs

@ -21,6 +21,9 @@ using ICSharpCode.AvalonEdit.Rendering;
namespace ICSharpCode.AvalonEdit.Search namespace ICSharpCode.AvalonEdit.Search
{ {
/// <summary>
/// Provides search functionality for AvalonEdit. It is displayed in the top-right corner of the TextArea.
/// </summary>
public class SearchPanel : Control public class SearchPanel : Control
{ {
TextArea textArea; TextArea textArea;
@ -30,46 +33,76 @@ namespace ICSharpCode.AvalonEdit.Search
TextBox searchTextBox; TextBox searchTextBox;
SearchPanelAdorner adorner; SearchPanelAdorner adorner;
/// <summary>
/// Dependency property for <see cref="UseRegex"/>.
/// </summary>
public static readonly DependencyProperty UseRegexProperty = public static readonly DependencyProperty UseRegexProperty =
DependencyProperty.Register("UseRegex", typeof(bool), typeof(SearchPanel), DependencyProperty.Register("UseRegex", typeof(bool), typeof(SearchPanel),
new FrameworkPropertyMetadata(false, SearchPatternChangedCallback)); new FrameworkPropertyMetadata(false, SearchPatternChangedCallback));
/// <summary>
/// Gets/sets whether the search pattern should be interpreted as regular expression.
/// </summary>
public bool UseRegex { public bool UseRegex {
get { return (bool)GetValue(UseRegexProperty); } get { return (bool)GetValue(UseRegexProperty); }
set { SetValue(UseRegexProperty, value); } set { SetValue(UseRegexProperty, value); }
} }
/// <summary>
/// Dependency property for <see cref="MatchCase"/>.
/// </summary>
public static readonly DependencyProperty MatchCaseProperty = public static readonly DependencyProperty MatchCaseProperty =
DependencyProperty.Register("MatchCase", typeof(bool), typeof(SearchPanel), DependencyProperty.Register("MatchCase", typeof(bool), typeof(SearchPanel),
new FrameworkPropertyMetadata(false, SearchPatternChangedCallback)); new FrameworkPropertyMetadata(false, SearchPatternChangedCallback));
/// <summary>
/// Gets/sets whether the search pattern should be interpreted case-sensitive.
/// </summary>
public bool MatchCase { public bool MatchCase {
get { return (bool)GetValue(MatchCaseProperty); } get { return (bool)GetValue(MatchCaseProperty); }
set { SetValue(MatchCaseProperty, value); } set { SetValue(MatchCaseProperty, value); }
} }
/// <summary>
/// Dependency property for <see cref="WholeWords"/>.
/// </summary>
public static readonly DependencyProperty WholeWordsProperty = public static readonly DependencyProperty WholeWordsProperty =
DependencyProperty.Register("WholeWords", typeof(bool), typeof(SearchPanel), DependencyProperty.Register("WholeWords", typeof(bool), typeof(SearchPanel),
new FrameworkPropertyMetadata(false, SearchPatternChangedCallback)); new FrameworkPropertyMetadata(false, SearchPatternChangedCallback));
/// <summary>
/// Gets/sets whether the search pattern should only match whole words.
/// </summary>
public bool WholeWords { public bool WholeWords {
get { return (bool)GetValue(WholeWordsProperty); } get { return (bool)GetValue(WholeWordsProperty); }
set { SetValue(WholeWordsProperty, value); } set { SetValue(WholeWordsProperty, value); }
} }
/// <summary>
/// Dependency property for <see cref="SearchPattern"/>.
/// </summary>
public static readonly DependencyProperty SearchPatternProperty = public static readonly DependencyProperty SearchPatternProperty =
DependencyProperty.Register("SearchPattern", typeof(string), typeof(SearchPanel), DependencyProperty.Register("SearchPattern", typeof(string), typeof(SearchPanel),
new FrameworkPropertyMetadata("", SearchPatternChangedCallback)); new FrameworkPropertyMetadata("", SearchPatternChangedCallback));
/// <summary>
/// Gets/sets the search pattern.
/// </summary>
public string SearchPattern { public string SearchPattern {
get { return (string)GetValue(SearchPatternProperty); } get { return (string)GetValue(SearchPatternProperty); }
set { SetValue(SearchPatternProperty, value); } set { SetValue(SearchPatternProperty, value); }
} }
/// <summary>
/// Dependency property for <see cref="MarkerBrush"/>.
/// </summary>
public static readonly DependencyProperty MarkerBrushProperty = public static readonly DependencyProperty MarkerBrushProperty =
DependencyProperty.Register("MarkerBrush", typeof(Brush), typeof(SearchPanel), DependencyProperty.Register("MarkerBrush", typeof(Brush), typeof(SearchPanel),
new FrameworkPropertyMetadata(Brushes.LightGreen, MarkerBrushChangedCallback)); new FrameworkPropertyMetadata(Brushes.LightGreen, MarkerBrushChangedCallback));
/// <summary>
/// Gets/sets the Brush used for marking search results in the TextView.
/// </summary>
public Brush MarkerBrush { public Brush MarkerBrush {
get { return (Brush)GetValue(MarkerBrushProperty); } get { return (Brush)GetValue(MarkerBrushProperty); }
set { SetValue(MarkerBrushProperty, value); } set { SetValue(MarkerBrushProperty, value); }

Loading…
Cancel
Save