Code Coverage Statistics for Source File
c:\Tools\SD3\src\Libraries\ICSharpCode.TextEditor\Project\Src\Gui\TextAreaUpdate.cs
|
Sequence Point Coverage
N/A
0 of 0
|
Branch Coverage
N/A
0 of 0
|
Lines
85
|
Highlight:
Uncovered Code
Covered Code
| L | V | Source |
|---|---|---|
1 |
// <file> |
|
2 |
// <copyright see="prj:///doc/copyright.txt"/> |
|
3 |
// <license see="prj:///doc/license.txt"/> |
|
4 |
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/> |
|
5 |
// <version>$Revision: 2659 $</version> |
|
6 |
// </file> |
|
7 |
||
8 |
using System; |
|
9 |
using System.Drawing; |
|
10 |
||
11 |
namespace ICSharpCode.TextEditor |
|
12 |
{ |
|
13 |
/// <summary> |
|
14 |
/// This enum describes all implemented request types |
|
15 |
/// </summary> |
|
16 |
public enum TextAreaUpdateType { |
|
17 |
WholeTextArea, |
|
18 |
SingleLine, |
|
19 |
SinglePosition, |
|
20 |
PositionToLineEnd, |
|
21 |
PositionToEnd, |
|
22 |
LinesBetween |
|
23 |
} |
|
24 |
||
25 |
/// <summary> |
|
26 |
/// This class is used to request an update of the textarea |
|
27 |
/// </summary> |
|
28 |
public class TextAreaUpdate |
|
29 |
{ |
|
30 |
TextLocation position; |
|
31 |
TextAreaUpdateType type; |
|
32 |
||
33 |
public TextAreaUpdateType TextAreaUpdateType { |
|
34 |
get { |
|
35 |
return type; |
|
36 |
} |
|
37 |
} |
|
38 |
||
39 |
public TextLocation Position { |
|
40 |
get { |
|
41 |
return position; |
|
42 |
} |
|
43 |
} |
|
44 |
||
45 |
/// <summary> |
|
46 |
/// Creates a new instance of <see cref="TextAreaUpdate"/> |
|
47 |
/// </summary> |
|
48 |
public TextAreaUpdate(TextAreaUpdateType type) |
|
49 |
{ |
|
50 |
this.type = type; |
|
51 |
} |
|
52 |
||
53 |
/// <summary> |
|
54 |
/// Creates a new instance of <see cref="TextAreaUpdate"/> |
|
55 |
/// </summary> |
|
56 |
public TextAreaUpdate(TextAreaUpdateType type, TextLocation position) |
|
57 |
{ |
|
58 |
this.type = type; |
|
59 |
this.position = position; |
|
60 |
} |
|
61 |
||
62 |
/// <summary> |
|
63 |
/// Creates a new instance of <see cref="TextAreaUpdate"/> |
|
64 |
/// </summary> |
|
65 |
public TextAreaUpdate(TextAreaUpdateType type, int startLine, int endLine) |
|
66 |
{ |
|
67 |
this.type = type; |
|
68 |
this.position = new TextLocation(startLine, endLine); |
|
69 |
} |
|
70 |
||
71 |
/// <summary> |
|
72 |
/// Creates a new instance of <see cref="TextAreaUpdate"/> |
|
73 |
/// </summary> |
|
74 |
public TextAreaUpdate(TextAreaUpdateType type, int singleLine) |
|
75 |
{ |
|
76 |
this.type = type; |
|
77 |
this.position = new TextLocation(0, singleLine); |
|
78 |
} |
|
79 |
||
80 |
public override string ToString() |
|
81 |
{ |
|
82 |
return String.Format("[TextAreaUpdate: Type={0}, Position={1}]", type, position); |
|
83 |
} |
|
84 |
} |
|
85 |
} |