OSDN Git Service

MVVM対応に備えてシンボル系列のプロパティもDocumentに移行した
[fooeditengine/FooEditEngine.git] / WPF / UnitTest / DummyRender.cs
1 /*
2  * Copyright (C) 2013 FooProject
3  * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
5
6  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 
7  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8
9 You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
10  */
11 using System;
12 using System.Collections.Generic;
13 using System.Linq;
14 using System.Text;
15 using System.Threading.Tasks;
16 using FooEditEngine;
17
18 namespace UnitTest
19 {
20     class DummyRender : IEditorRender
21     {
22         public bool RightToLeft
23         {
24             get;
25             set;
26         }
27
28         public Rectangle TextArea
29         {
30             get;
31             set;
32         }
33
34         public double LineNemberWidth
35         {
36             get { return 0; }
37         }
38
39         public double FoldingWidth
40         {
41             get { return 0; }
42         }
43
44         public Size emSize
45         {
46             get { return new Size(); }
47         }
48
49         public int TabWidthChar
50         {
51             get;
52             set;
53         }
54
55         public bool ShowFullSpace
56         {
57             get;
58             set;
59         }
60
61         public bool ShowHalfSpace
62         {
63             get;
64             set;
65         }
66
67         public bool ShowTab
68         {
69             get;
70             set;
71         }
72
73         public bool ShowLineBreak
74         {
75             get;
76             set;
77         }
78
79         public event ChangedRenderResourceEventHandler ChangedRenderResource;
80
81         public event EventHandler ChangedRightToLeft;
82
83         public void DrawCachedBitmap(Rectangle rect)
84         {
85             throw new NotImplementedException();
86         }
87
88         public void DrawLine(Point from, Point to)
89         {
90             throw new NotImplementedException();
91         }
92
93         public void CacheContent()
94         {
95             throw new NotImplementedException();
96         }
97
98         public bool IsVaildCache()
99         {
100             throw new NotImplementedException();
101         }
102
103         public void DrawString(string str, double x, double y, StringAlignment align, Size layoutRect,StringColorType type)
104         {
105             throw new NotImplementedException();
106         }
107
108         public void FillRectangle(Rectangle rect, FillRectType type)
109         {
110             throw new NotImplementedException();
111         }
112
113         public void DrawFoldingMark(bool expand, double x, double y)
114         {
115             throw new NotImplementedException();
116         }
117
118         public void FillBackground(Rectangle rect)
119         {
120             throw new NotImplementedException();
121         }
122
123         public void DrawOneLine(LineToIndexTable lti, int row, double x, double y, IEnumerable<Selection> SelectRanges)
124         {
125             throw new NotImplementedException();
126         }
127
128         public List<LineToIndexTableData> BreakLine(Document doc,LineToIndexTable layoutLineCollection, int startIndex, int endIndex, double wrapwidth)
129         {
130             throw new NotImplementedException();
131         }
132
133         public ITextLayout CreateLaytout(string str, SyntaxInfo[] syntaxCollection, IEnumerable<Marker> MarkerRanges)
134         {
135             return new DummyTextLayout();
136         }
137
138         public void DrawGripper(Point p, double radius)
139         {
140             throw new NotImplementedException();
141         }
142     }
143     class DummyTextLayout : ITextLayout
144     {
145         public double Width
146         {
147             get { return 0; }
148         }
149
150         public double Height
151         {
152             get { return 0; }
153         }
154
155         public bool Disposed
156         {
157             get;
158             private set;
159         }
160
161         public bool Invaild
162         {
163             get { return false; }
164         }
165
166         public int GetIndexFromColPostion(double x)
167         {
168             throw new NotImplementedException();
169         }
170
171         public double GetWidthFromIndex(int index)
172         {
173             throw new NotImplementedException();
174         }
175
176         public double GetColPostionFromIndex(int index)
177         {
178             throw new NotImplementedException();
179         }
180
181         public int AlignIndexToNearestCluster(int index, AlignDirection flow)
182         {
183             throw new NotImplementedException();
184         }
185
186         public void Dispose()
187         {
188             this.Disposed = true;
189         }
190     }
191 }