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 List<LineToIndexTableData> BreakLine(Document doc,LineToIndexTable layoutLineCollection, int startIndex, int endIndex, double wrapwidth)
130 throw new NotImplementedException();
133 public void DrawGripper(Point p, double radius)
135 throw new NotImplementedException();
138 public void BeginClipRect(Rectangle rect)
142 public void EndClipRect()
146 public ITextLayout CreateLaytout(string str, SyntaxInfo[] syntaxCollection, IEnumerable<Marker> MarkerRanges, IEnumerable<Selection> Selections, double WrapWidth)
148 return new DummyTextLayout();
151 class DummyTextLayout : ITextLayout
171 get { return false; }
174 public int GetIndexFromColPostion(double x)
179 public double GetWidthFromIndex(int index)
184 public double GetColPostionFromIndex(int index)
189 public int AlignIndexToNearestCluster(int index, AlignDirection flow)
191 if(flow == AlignDirection.Back)
192 return Math.Max(index - 1,0);
193 if (flow == AlignDirection.Forward)
195 throw new ArgumentOutOfRangeException("flowの値がおかしい");
198 public void Dispose()
200 this.Disposed = true;
203 public int GetIndexFromPostion(double x, double y)
208 public Point GetPostionFromIndex(int index)
210 return new Point(0,0);