{
internal const float LineMarkerThickness = 2;
long tickCount;
- bool _CaretBlink, _HideRuler = true;
+ bool _CaretBlink;
internal const int LineNumberLength = 6;
const int UpdateAreaPaddingWidth = 2;
const int UpdateAreaWidth = 4;
if (foldingData != null)
{
- if ((!this.LayoutLines.FoldingCollection.IsHasParent(foldingData) ||
- !this.LayoutLines.FoldingCollection.IsParentHidden(foldingData))
- && foldingData.IsFirstLine(this.LayoutLines, i))
- render.DrawFoldingMark(foldingData.Expand, this.PageBound.X + this.GetRealtiveX(AreaType.FoldingArea), pos.Y);
if (this.LayoutLines.FoldingCollection.IsHidden(lineIndex))
continue;
+ if (foldingData.IsFirstLine(this.LayoutLines, i))
+ render.DrawFoldingMark(foldingData.Expand, this.PageBound.X + this.GetRealtiveX(AreaType.FoldingArea), pos.Y);
}
if (this.Document.DrawLineNumber)
DrawUpdateArea(i, pos.Y);
- pos.Y += this.LayoutLines.GetLayout(i).Height;
+ pos.Y += layout.Height;
//pos.Y += this.render.emSize.Height;
}
if (pos.Y > endposy)
break;
- var selectRange = from s in this.Selections.Get(lineIndex, lineLength)
- let n = Util.ConvertAbsIndexToRelIndex(s, lineIndex, lineLength)
- select n;
+ FoldingItem foldingData = this.LayoutLines.FoldingCollection.Get(lineIndex, lineLength);
- this.render.DrawOneLine(this.LayoutLines, i, pos.X, pos.Y, selectRange);
+ if (foldingData != null)
+ {
+ if (this.LayoutLines.FoldingCollection.IsHidden(lineIndex))
+ continue;
+ }
+
+ this.render.DrawOneLine(this.Document, this.LayoutLines, i, pos.X, pos.Y);
- pos.Y += this.LayoutLines.GetLayout(i).Height;
+ pos.Y += layout.Height;
//pos.Y += this.render.emSize.Height;
}
IEditorRender render = (IEditorRender)base.render;
int row = this.Document.CaretPostion.row;
- double lineHeight = this.LayoutLines.GetLayout(row).Height;
- double charWidth = this.LayoutLines.GetLayout(row).GetWidthFromIndex(this.Document.CaretPostion.col);
+ ITextLayout layout = this.LayoutLines.GetLayout(row);
+ double lineHeight = layout.Height;
+ double charWidth = layout.GetWidthFromIndex(this.Document.CaretPostion.col);
if (this.InsertMode || charWidth == 0)
{
if (this.LayoutLines.Count == 0)
return tp;
+ //表示領域から探索を始めるのでパディングの分だけ引く
p.Y -= this.render.TextArea.Y;
int lineHeadIndex, lineLength;
- if(p.Y >= this.render.TextArea.TopLeft.Y)
+ if(p.Y >= 0)
{
double y = 0;
tp.row = this.LayoutLines.Count - 1;
}
y += height;
}
- }else
- {
- double y = this.render.TextArea.TopLeft.Y;
+ }else{
+ double y = 0;
tp.row = 0;
for (int i = this.Src.Row; i >= 0; i--)
{
}
}
- this.Document.CaretPostion = new TextPoint(row, col);
+ //イベント呼び出しの再入防止のため
+ this.Document.SetCaretPostionWithoutEvent(new TextPoint(row, col));
}
/// <summary>