OSDN Git Service

Documentに移動したプロパティをViewから廃止した
[fooeditengine/FooEditEngine.git] / WPF / FooEditEngine / FooTextBox.cs
index 57d2c53..a764471 100644 (file)
@@ -96,12 +96,12 @@ namespace FooEditEngine.WPF
             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);
@@ -749,7 +749,7 @@ namespace FooEditEngine.WPF
                     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;
@@ -757,7 +757,7 @@ namespace FooEditEngine.WPF
                     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;
@@ -992,8 +992,8 @@ namespace FooEditEngine.WPF
 
             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;
@@ -1056,7 +1056,7 @@ namespace FooEditEngine.WPF
             //こうしないと選択できなくなってしまう
             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();
@@ -1114,16 +1114,16 @@ namespace FooEditEngine.WPF
                         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;
@@ -1135,8 +1135,8 @@ namespace FooEditEngine.WPF
                     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;
@@ -1190,7 +1190,7 @@ namespace FooEditEngine.WPF
                     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;
@@ -1209,8 +1209,8 @@ namespace FooEditEngine.WPF
                     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);
@@ -1287,7 +1287,7 @@ namespace FooEditEngine.WPF
         {
             get
             {
-                return this.View.MarkerPatternSet;
+                return this.Document.MarkerPatternSet;
             }
         }