Code Coverage Statistics for Source File

c:\Tools\SD3\src\Libraries\ICSharpCode.TextEditor\Project\Src\Document\DefaultTextEditorProperties.cs

Sequence Point Coverage
N/A
0 of 0
Branch Coverage
N/A
0 of 0
Lines
316
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="none" email=""/>
5
//     <version>$Revision: 2683 $</version>
6
// </file>
7
8
using System;
9
using System.Drawing;
10
using System.Text;
11
12
namespace ICSharpCode.TextEditor.Document
13
{
14
	public enum BracketMatchingStyle {
15
		Before,
16
		After
17
	}
18
	
19
	public class DefaultTextEditorProperties : ITextEditorProperties
20
	{
21
		int                   tabIndent             = 4;
22
		int                   indentationSize       = 4;
23
		IndentStyle           indentStyle           = IndentStyle.Smart;
24
		DocumentSelectionMode documentSelectionMode = DocumentSelectionMode.Normal;
25
		Encoding              encoding              = System.Text.Encoding.UTF8;
26
		BracketMatchingStyle  bracketMatchingStyle  = BracketMatchingStyle.After;
27
		FontContainer fontContainer;
28
		static Font DefaultFont;
29
		
30
		public DefaultTextEditorProperties()
31
		{
32
			if (DefaultFont == null) {
33
				DefaultFont = new Font("Courier New", 10);
34
			}
35
			this.fontContainer = new FontContainer(DefaultFont);
36
		}
37
		
38
		bool        allowCaretBeyondEOL = false;
39
		
40
		bool        showMatchingBracket = true;
41
		bool        showLineNumbers     = true;
42
		
43
		bool        showSpaces          = false;
44
		bool        showTabs            = false;
45
		bool        showEOLMarker       = false;
46
		
47
		bool        showInvalidLines    = false;
48
		
49
		bool        isIconBarVisible    = false;
50
		bool        enableFolding       = true;
51
		bool        showHorizontalRuler = false;
52
		bool        showVerticalRuler   = true;
53
		bool        convertTabsToSpaces = false;
54
		System.Drawing.Text.TextRenderingHint textRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
55
		bool        createBackupCopy    = false;
56
		bool        mouseWheelScrollDown = true;
57
		bool        mouseWheelTextZoom   = true;
58
		
59
		bool        hideMouseCursor      = false;
60
		bool        cutCopyWholeLine     = true;
61
		
62
		int         verticalRulerRow    = 80;
63
		LineViewerStyle  lineViewerStyle = LineViewerStyle.None;
64
		string      lineTerminator = "\r\n";
65
		bool        autoInsertCurlyBracket = true;
66
		bool        useCustomLine = false;
67
		
68
		public int TabIndent {
69
			get {
70
				return tabIndent;
71
			}
72
			set {
73
				tabIndent = value;
74
			}
75
		}
76
		
77
		public int IndentationSize {
78
			get { return indentationSize; }
79
			set { indentationSize = value; }
80
		}
81
		
82
		public IndentStyle IndentStyle {
83
			get {
84
				return indentStyle;
85
			}
86
			set {
87
				indentStyle = value;
88
			}
89
		}
90
		public DocumentSelectionMode DocumentSelectionMode {
91
			get {
92
				return documentSelectionMode;
93
			}
94
			set {
95
				documentSelectionMode = value;
96
			}
97
		}
98
		public bool AllowCaretBeyondEOL {
99
			get {
100
				return allowCaretBeyondEOL;
101
			}
102
			set {
103
				allowCaretBeyondEOL = value;
104
			}
105
		}
106
		public bool ShowMatchingBracket {
107
			get {
108
				return showMatchingBracket;
109
			}
110
			set {
111
				showMatchingBracket = value;
112
			}
113
		}
114
		public bool ShowLineNumbers {
115
			get {
116
				return showLineNumbers;
117
			}
118
			set {
119
				showLineNumbers = value;
120
			}
121
		}
122
		public bool ShowSpaces {
123
			get {
124
				return showSpaces;
125
			}
126
			set {
127
				showSpaces = value;
128
			}
129
		}
130
		public bool ShowTabs {
131
			get {
132
				return showTabs;
133
			}
134
			set {
135
				showTabs = value;
136
			}
137
		}
138
		public bool ShowEOLMarker {
139
			get {
140
				return showEOLMarker;
141
			}
142
			set {
143
				showEOLMarker = value;
144
			}
145
		}
146
		public bool ShowInvalidLines {
147
			get {
148
				return showInvalidLines;
149
			}
150
			set {
151
				showInvalidLines = value;
152
			}
153
		}
154
		public bool IsIconBarVisible {
155
			get {
156
				return isIconBarVisible;
157
			}
158
			set {
159
				isIconBarVisible = value;
160
			}
161
		}
162
		public bool EnableFolding {
163
			get {
164
				return enableFolding;
165
			}
166
			set {
167
				enableFolding = value;
168
			}
169
		}
170
		public bool ShowHorizontalRuler {
171
			get {
172
				return showHorizontalRuler;
173
			}
174
			set {
175
				showHorizontalRuler = value;
176
			}
177
		}
178
		public bool ShowVerticalRuler {
179
			get {
180
				return showVerticalRuler;
181
			}
182
			set {
183
				showVerticalRuler = value;
184
			}
185
		}
186
		public bool ConvertTabsToSpaces {
187
			get {
188
				return convertTabsToSpaces;
189
			}
190
			set {
191
				convertTabsToSpaces = value;
192
			}
193
		}
194
		public System.Drawing.Text.TextRenderingHint TextRenderingHint {
195
			get { return textRenderingHint; }
196
			set { textRenderingHint = value; }
197
		}
198
		
199
		public bool CreateBackupCopy {
200
			get {
201
				return createBackupCopy;
202
			}
203
			set {
204
				createBackupCopy = value;
205
			}
206
		}
207
		public bool MouseWheelScrollDown {
208
			get {
209
				return mouseWheelScrollDown;
210
			}
211
			set {
212
				mouseWheelScrollDown = value;
213
			}
214
		}
215
		public bool MouseWheelTextZoom {
216
			get {
217
				return mouseWheelTextZoom;
218
			}
219
			set {
220
				mouseWheelTextZoom = value;
221
			}
222
		}
223
		
224
		public bool HideMouseCursor {
225
			get {
226
				return hideMouseCursor;
227
			}
228
			set {
229
				hideMouseCursor = value;
230
			}
231
		}
232
233
		public bool CutCopyWholeLine {
234
			get {
235
				return cutCopyWholeLine;
236
			}
237
			set {
238
				cutCopyWholeLine = value;
239
			}
240
		}
241
242
		public Encoding Encoding {
243
			get {
244
				return encoding;
245
			}
246
			set {
247
				encoding = value;
248
			}
249
		}
250
		public int VerticalRulerRow {
251
			get {
252
				return verticalRulerRow;
253
			}
254
			set {
255
				verticalRulerRow = value;
256
			}
257
		}
258
		public LineViewerStyle LineViewerStyle {
259
			get {
260
				return lineViewerStyle;
261
			}
262
			set {
263
				lineViewerStyle = value;
264
			}
265
		}
266
		public string LineTerminator {
267
			get {
268
				return lineTerminator;
269
			}
270
			set {
271
				lineTerminator = value;
272
			}
273
		}
274
		public bool AutoInsertCurlyBracket {
275
			get {
276
				return autoInsertCurlyBracket;
277
			}
278
			set {
279
				autoInsertCurlyBracket = value;
280
			}
281
		}
282
		
283
		public Font Font {
284
			get {
285
				return fontContainer.DefaultFont;
286
			}
287
			set {
288
				fontContainer.DefaultFont = value;
289
			}
290
		}
291
		
292
		public FontContainer FontContainer {
293
			get {
294
				return fontContainer;
295
			}
296
		}
297
		
298
		public BracketMatchingStyle  BracketMatchingStyle {
299
			get {
300
				return bracketMatchingStyle;
301
			}
302
			set {
303
				bracketMatchingStyle = value;
304
			}
305
		}
306
		
307
		public bool UseCustomLine {
308
			get {
309
				return useCustomLine;
310
			}
311
			set {
312
				useCustomLine = value;
313
			}
314
		}
315
	}
316
}