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 System.Threading.Tasks;
20 class DummyRender : IEditorRender
22 public bool RightToLeft
28 public Rectangle TextArea
34 public double LineNemberWidth
39 public double FoldingWidth
46 get { return new Size(); }
49 public int TabWidthChar
55 public bool ShowFullSpace
61 public bool ShowHalfSpace
73 public bool ShowLineBreak
79 public event ChangedRenderResourceEventHandler ChangedRenderResource;
81 public event EventHandler ChangedRightToLeft;
83 public void DrawCachedBitmap(Rectangle rect)
85 throw new NotImplementedException();
88 public void DrawLine(Point from, Point to)
90 throw new NotImplementedException();
93 public void CacheContent()
95 throw new NotImplementedException();
98 public bool IsVaildCache()
100 throw new NotImplementedException();
103 public void DrawString(string str, double x, double y, StringAlignment align, Size layoutRect,StringColorType type)
105 throw new NotImplementedException();
108 public void FillRectangle(Rectangle rect, FillRectType type)
110 throw new NotImplementedException();
113 public void DrawFoldingMark(bool expand, double x, double y)
115 throw new NotImplementedException();
118 public void FillBackground(Rectangle rect)
120 throw new NotImplementedException();
123 public void DrawOneLine(Document doc, LineToIndexTable lti, int row, double x, double y)
125 throw new NotImplementedException();
128 public void DrawGripper(Point p, double radius)
130 throw new NotImplementedException();
133 public void BeginClipRect(Rectangle rect)
137 public void EndClipRect()
141 public ITextLayout CreateLaytout(string str, SyntaxInfo[] syntaxCollection, IEnumerable<Marker> MarkerRanges, IEnumerable<Selection> Selections, double WrapWidth)
143 return new DummyTextLayout();
146 class DummyTextLayout : ITextLayout
166 get { return false; }
169 public int GetIndexFromColPostion(double x)
174 public double GetWidthFromIndex(int index)
179 public double GetColPostionFromIndex(int index)
184 public int AlignIndexToNearestCluster(int index, AlignDirection flow)
186 if(flow == AlignDirection.Back)
187 return Math.Max(index - 1,0);
188 if (flow == AlignDirection.Forward)
190 throw new ArgumentOutOfRangeException("flowの値がおかしい");
193 public void Dispose()
195 this.Disposed = true;
198 public int GetIndexFromPostion(double x, double y)
203 public Point GetPostionFromIndex(int index)
205 return new Point(0,0);