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;
14 using Windows.UI.Xaml.Shapes;
16 namespace FooEditEngine
18 class DummyRender : IEditorRender,IDisposable
20 public bool RightToLeft
26 public Rectangle TextArea
32 public double LineNemberWidth
37 public double FoldingWidth
44 get { return new Size(); }
47 public int TabWidthChar
53 public bool ShowFullSpace
59 public bool ShowHalfSpace
71 public bool ShowLineBreak
77 public event ChangedRenderResourceEventHandler ChangedRenderResource;
79 public event EventHandler ChangedRightToLeft;
81 public void DrawCachedBitmap(Rectangle rect)
83 throw new NotImplementedException();
86 public void DrawLine(Point from, Point to)
88 throw new NotImplementedException();
91 public void CacheContent()
93 throw new NotImplementedException();
96 public bool IsVaildCache()
98 throw new NotImplementedException();
101 public void DrawString(string str, double x, double y, StringAlignment align, Size layoutRect,StringColorType type)
103 throw new NotImplementedException();
106 public void FillRectangle(Rectangle rect, FillRectType type)
108 throw new NotImplementedException();
111 public void DrawFoldingMark(bool expand, double x, double y)
113 throw new NotImplementedException();
116 public void FillBackground(Rectangle rect)
118 throw new NotImplementedException();
121 public void DrawOneLine(LineToIndexTable lti, int row, double x, double y, IEnumerable<Selection> SelectRanges)
123 throw new NotImplementedException();
126 public List<LineToIndexTableData> BreakLine(Document doc,LineToIndexTable layoutLineCollection, int startIndex, int endIndex, double wrapwidth)
128 throw new NotImplementedException();
131 public ITextLayout CreateLaytout(string str, SyntaxInfo[] syntaxCollection, IEnumerable<Marker> MarkerRanges)
133 return new DummyTextLayout();
136 public void DrawGripper(Point p, double radius)
138 throw new NotImplementedException();
141 public void BeginClipRect(Rectangle rect)
145 public void EndClipRect()
149 public void Dispose()
154 public double FontSize
159 public void SetImeConvationInfo(Windows.UI.Text.Core.CoreTextFormatUpdatingEventArgs arg)
163 public void DrawContent(EditView view, bool isEnabled, Rectangle updateRect)
167 public bool Resize(Windows.UI.Xaml.Shapes.Rectangle rectangle, double width, double height)
173 class DummyTextLayout : ITextLayout
193 get { return false; }
196 public int GetIndexFromColPostion(double x)
201 public double GetWidthFromIndex(int index)
206 public double GetColPostionFromIndex(int index)
211 public int AlignIndexToNearestCluster(int index, AlignDirection flow)
213 if(flow == AlignDirection.Back)
214 return Math.Max(index - 1,0);
215 if (flow == AlignDirection.Forward)
217 throw new ArgumentOutOfRangeException("flowの値がおかしい");
220 public void Dispose()
222 this.Disposed = true;