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.
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.
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/>.
12 using System.Collections.Generic;
15 using Windows.UI.Xaml.Shapes;
18 namespace FooEditEngine
20 class DummyRender : IEditorRender,IDisposable
25 public bool RightToLeft
31 public Rectangle TextArea
37 public double LineNemberWidth
42 public double FoldingWidth
49 get { return new Size(); }
52 public int TabWidthChar
58 public bool ShowFullSpace
64 public bool ShowHalfSpace
76 public bool ShowLineBreak
82 #pragma warning disable 0067
84 public event ChangedRenderResourceEventHandler ChangedRenderResource;
85 public event EventHandler ChangedRightToLeft;
86 #pragma warning restore 0067
88 public void DrawCachedBitmap(Rectangle rect)
90 throw new NotImplementedException();
93 public void DrawLine(Point from, Point to)
95 throw new NotImplementedException();
98 public void CacheContent()
100 throw new NotImplementedException();
103 public bool IsVaildCache()
105 throw new NotImplementedException();
108 public void DrawString(string str, double x, double y, StringAlignment align, Size layoutRect,StringColorType type)
110 throw new NotImplementedException();
113 public void FillRectangle(Rectangle rect, FillRectType type)
115 throw new NotImplementedException();
118 public void DrawFoldingMark(bool expand, double x, double y)
120 throw new NotImplementedException();
123 public void FillBackground(Rectangle rect)
125 throw new NotImplementedException();
128 public void DrawOneLine(Document doc, LineToIndexTable lti, int row, double x, double y)
130 throw new NotImplementedException();
133 public List<LineToIndexTableData> BreakLine(Document doc,LineToIndexTable layoutLineCollection, int startIndex, int endIndex, double wrapwidth)
135 throw new NotImplementedException();
138 public ITextLayout CreateLaytout(string str, SyntaxInfo[] syntaxCollection, IEnumerable<Marker> MarkerRanges, IEnumerable<Selection> SelectRanges)
140 return new DummyTextLayout();
143 public void DrawGripper(Point p, double radius)
145 throw new NotImplementedException();
148 public void BeginClipRect(Rectangle rect)
152 public void EndClipRect()
156 public void Dispose()
161 public double FontSize
166 public void SetImeConvationInfo(Windows.UI.Text.Core.CoreTextFormatUpdatingEventArgs arg)
170 public void DrawContent(EditView view, bool isEnabled, Rectangle updateRect)
174 public bool Resize(Windows.UI.Xaml.Shapes.Rectangle rectangle, double width, double height)
180 class DummyTextLayout : ITextLayout
200 get { return false; }
203 public int GetIndexFromColPostion(double x)
208 public double GetWidthFromIndex(int index)
213 public double GetColPostionFromIndex(int index)
218 public int AlignIndexToNearestCluster(int index, AlignDirection flow)
220 if(flow == AlignDirection.Back)
221 return Math.Max(index - 1,0);
222 if (flow == AlignDirection.Forward)
224 throw new ArgumentOutOfRangeException("flowの値がおかしい");
227 public void Dispose()
229 this.Disposed = true;