Fix bug #395
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / SearchForVirtualItemEventArgs.cs
1 //
2 // SearchForVirtualItemEventArgs.cs
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 // 
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 // 
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 //
23 // Copyright (c) 2006 Novell, Inc.
24 //
25 // Authors:
26 //      Jonathan Pobst (monkey@jpobst.com)
27 //
28
29 using System.Drawing;
30
31 namespace System.Windows.Forms
32 {
33         public class SearchForVirtualItemEventArgs : EventArgs
34         {
35                 private SearchDirectionHint direction;
36                 private bool include_sub_items_in_search;
37                 private int index;
38                 private bool is_prefix_search;
39                 private bool is_text_search;
40                 private int start_index;
41                 private Point starting_point;
42                 private string text;
43
44                 #region Public Constructors
45                 public SearchForVirtualItemEventArgs (bool isTextSearch, bool isPrefixSearch,
46                         bool includeSubItemsInSearch, string text, Point startingPoint, 
47                         SearchDirectionHint direction, int startIndex) : base ()
48                 {
49                         this.is_text_search = isTextSearch;
50                         this.is_prefix_search = isPrefixSearch;
51                         this.include_sub_items_in_search = includeSubItemsInSearch;
52                         this.text = text;
53                         this.starting_point = startingPoint;
54                         this.direction = direction;
55                         this.start_index = startIndex;
56                         this.index = -1;
57                 }
58                 #endregion      // Public Constructors
59
60                 #region Public Instance Properties
61                 public SearchDirectionHint Direction {
62                         get { return this.direction; }
63                 }
64
65                 public bool IncludeSubItemsInSearch {
66                         get { return this.include_sub_items_in_search; }
67                 }
68                 
69                 public int Index {
70                         get { return this.index; }
71                         set { this.index = value; }
72                 }
73                 
74                 public bool IsPrefixSearch {
75                         get { return this.is_prefix_search; }
76                 }
77                 
78                 public bool IsTextSearch {
79                         get { return this.is_text_search; }
80                 }
81                 
82                 public int StartIndex {
83                         get { return this.start_index; }
84                 }
85                 
86                 public Point StartingPoint {
87                         get { return this.starting_point; }
88                 }
89                 
90                 public string Text {
91                         get { return this.text; }
92                 }
93                         
94                 #endregion      // Public Instance Properties
95         }
96 }