this.View = new EditView(this.Document, this.Render, new Padding(5, 5, 5, 5));
this.View.SrcChanged += View_SrcChanged;
this.View.InsertMode = this.InsertMode;
- this.View.DrawLineNumber = this.DrawLineNumber;
+ this.Document.DrawLineNumber = this.DrawLineNumber;
this.View.HideCaret = !this.DrawCaret;
this.View.HideLineMarker = !this.DrawCaretLine;
- this.View.HideRuler = !this.DrawRuler;
- this.View.UrlMark = this.MarkURL;
- this.View.TabStops = this.TabChars;
+ this.Document.HideRuler = !this.DrawRuler;
+ this.Document.UrlMark = this.MarkURL;
+ this.Document.TabStops = this.TabChars;
this._Controller = new Controller(this.Document, this.View);
this._Controller.SelectionChanged += new EventHandler(Controller_SelectionChanged);
if (this.IsPressedModifierKey(modiferKeys, ModifierKeys.Control))
this._Controller.JumpToHead(this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));
else
- this._Controller.JumpToLineHead(this.View.CaretPostion.row, this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));
+ this._Controller.JumpToLineHead(this.Document.CaretPostion.row, this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));
this.Refresh();
movedCaret = true;
break;
if (this.IsPressedModifierKey(modiferKeys, ModifierKeys.Control))
this._Controller.JumpToEnd(this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));
else
- this._Controller.JumpToLineEnd(this.View.CaretPostion.row, this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));
+ this._Controller.JumpToLineEnd(this.Document.CaretPostion.row, this.IsPressedModifierKey(modiferKeys, ModifierKeys.Shift));
this.Refresh();
movedCaret = true;
break;
bool updateAll = this.View.LayoutLines.HilightAll() || this.View.LayoutLines.GenerateFolding();
- ITextLayout layout = this.View.LayoutLines.GetLayout(this.View.CaretPostion.row);
- double width = layout.GetWidthFromIndex(this.View.CaretPostion.col);
+ ITextLayout layout = this.View.LayoutLines.GetLayout(this.Document.CaretPostion.row);
+ double width = layout.GetWidthFromIndex(this.Document.CaretPostion.col);
if (width == 0.0)
width = this.View.CaretWidthOnInsertMode;
double height = layout.Height;
//こうしないと選択できなくなってしまう
this.nowCaretMove = true;
SetValue(SelectionProperty, new TextRange(this._Controller.SelectionStart, this._Controller.SelectionLength));
- SetValue(CaretPostionProperty, this.View.CaretPostion);
+ SetValue(CaretPostionProperty, this.Document.CaretPostion);
this.nowCaretMove = false;
if(this.textStore.IsLocked() == false)
this.textStore.NotifySelectionChanged();
this.JumpCaret(this.CaretPostion.row, this.CaretPostion.col);
break;
case "LineBreakMethod":
- this.View.LineBreak = this.LineBreakMethod;
+ this.Document.LineBreak = this.LineBreakMethod;
break;
case "LineBreakCharCount":
- this.View.LineBreakCharCount = this.LineBreakCharCount;
+ this.Document.LineBreakCharCount = this.LineBreakCharCount;
break;
case "InsertMode":
this.View.InsertMode = this.InsertMode;
break;
case "TabChars":
- this.View.TabStops = this.TabChars;
+ this.Document.TabStops = this.TabChars;
break;
case "RectSelectMode":
this._Controller.RectSelection = this.RectSelectMode;
this.View.HideLineMarker = !this.DrawCaretLine;
break;
case "DrawLineNumber":
- this.View.DrawLineNumber = this.DrawLineNumber;
- this._Controller.JumpCaret(this.View.CaretPostion.row, this.View.CaretPostion.col);
+ this.Document.DrawLineNumber = this.DrawLineNumber;
+ this._Controller.JumpCaret(this.Document.CaretPostion.row, this.Document.CaretPostion.col);
break;
case "FontFamily":
this.Render.FontFamily = this.FontFamily;
this.Render.LineMarker = D2DRender.ToColor4(this.LineMarker);
break;
case "MarkURL":
- this.View.UrlMark = this.MarkURL;
+ this.Document.UrlMark = this.MarkURL;
break;
case "ShowFullSpace":
this.Render.ShowFullSpace = this.ShowFullSpace;
this.horizontalScrollBar.FlowDirection = this.FlowDirection;
break;
case "DrawRuler":
- this.View.HideRuler = !this.DrawRuler;
- this._Controller.JumpCaret(this.View.CaretPostion.row, this.View.CaretPostion.col);
+ this.Document.HideRuler = !this.DrawRuler;
+ this._Controller.JumpCaret(this.Document.CaretPostion.row, this.Document.CaretPostion.col);
break;
case "UpdateArea":
this.Render.UpdateArea = D2DRender.ToColor4(this.UpdateArea);
{
get
{
- return this.View.MarkerPatternSet;
+ return this.Document.MarkerPatternSet;
}
}