OSDN Git Service

DrawLineNumberでしていることは同じなのでコントローラーに書くことにした
[fooeditengine/FooEditEngine.git] / Windows / FooEditEngine / FooTextBox.cs
index a6baa0d..c0e7a0e 100644 (file)
@@ -158,7 +158,7 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.View.MarkerPatternSet;
+                return this.Document.MarkerPatternSet;
             }
         }
 
@@ -227,12 +227,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.View.DrawLineNumber;
+                return this.Document.DrawLineNumber;
             }
             set
             {
-                this.View.DrawLineNumber = value;
-                this.JumpCaret(this.CaretPostion.row,this.CaretPostion.col);
+                this.Document.DrawLineNumber = value;
             }
         }
         
@@ -244,11 +243,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return !this.View.HideRuler;
+                return !this.Document.HideRuler;
             }
             set
             {
-                this.View.HideRuler = !value;
+                this.Document.HideRuler = !value;
                 this.JumpCaret(this.CaretPostion.row, this.CaretPostion.col);
             }
         }
@@ -264,11 +263,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.View.LineBreak;
+                return this.Document.LineBreak;
             }
             set
             {
-                this.View.LineBreak = value;
+                this.Document.LineBreak = value;
             }
         }
 
@@ -283,11 +282,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.View.LineBreakCharCount;
+                return this.Document.LineBreakCharCount;
             }
             set
             {
-                this.View.LineBreakCharCount = value;
+                this.Document.LineBreakCharCount = value;
             }
         }
 
@@ -299,11 +298,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.View.UrlMark;
+                return this.Document.UrlMark;
             }
             set
             {
-                this.View.UrlMark = value;
+                this.Document.UrlMark = value;
             }
         }
 
@@ -313,9 +312,9 @@ namespace FooEditEngine.Windows
         [DefaultValue(4)]
         public int TabStops
         {
-            get { return this.View.TabStops; }
+            get { return this.Document.TabStops; }
             set {
-                this.View.TabStops = value;
+                this.Document.TabStops = value;
                 this.View.AdjustCaretAndSrc();
                 this.TabStopChange(this, null);
             }
@@ -329,11 +328,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.render.ShowFullSpace;
+                return this.Document.ShowFullSpace;
             }
             set
             {
-                this.render.ShowFullSpace = value;
+                this.Document.ShowFullSpace = value;
             }
         }
 
@@ -345,11 +344,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.render.ShowHalfSpace;
+                return this.Document.ShowHalfSpace;
             }
             set
             {
-                this.render.ShowHalfSpace = value;
+                this.Document.ShowHalfSpace = value;
             }
         }
 
@@ -361,11 +360,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.render.ShowTab;
+                return this.Document.ShowTab;
             }
             set
             {
-                this.render.ShowTab = value;
+                this.Document.ShowTab = value;
             }
         }
 
@@ -377,11 +376,11 @@ namespace FooEditEngine.Windows
         {
             get
             {
-                return this.render.ShowLineBreak;
+                return this.Document.ShowLineBreak;
             }
             set
             {
-                this.render.ShowLineBreak = value;
+                this.Document.ShowLineBreak = value;
             }
         }
 
@@ -404,7 +403,7 @@ namespace FooEditEngine.Windows
         [BrowsableAttribute(false)]
         public TextPoint CaretPostion
         {
-            get { return this.View.CaretPostion; }
+            get { return this.Document.CaretPostion; }
         }
 
         /// <summary>
@@ -1297,14 +1296,14 @@ namespace FooEditEngine.Windows
                     if (e.Control)
                         this.Controller.JumpToHead(e.Shift);
                     else
-                        this.Controller.JumpToLineHead(this.View.CaretPostion.row, e.Shift);
+                        this.Controller.JumpToLineHead(this.Document.CaretPostion.row, e.Shift);
                     this.Refresh();
                     break;
                 case Keys.End:
                     if (e.Control)
                         this.Controller.JumpToEnd(e.Shift);
                     else
-                        this.Controller.JumpToLineEnd(this.View.CaretPostion.row, e.Shift);
+                        this.Controller.JumpToLineEnd(this.Document.CaretPostion.row, e.Shift);
                     this.Refresh();
                     break;
                 case Keys.Tab:
@@ -1478,13 +1477,13 @@ namespace FooEditEngine.Windows
 
         void Timer_Tick(object sender,EventArgs e)
         {
-            if (this.View.CaretPostion.row >= this.View.LayoutLines.Count || DesignMode)
+            if (this.Document.CaretPostion.row >= this.View.LayoutLines.Count || DesignMode)
                 return;
 
-            ITextLayout layout = this.View.LayoutLines.GetLayout(this.View.CaretPostion.row);
+            ITextLayout layout = this.View.LayoutLines.GetLayout(this.Document.CaretPostion.row);
 
             Size redrawSize = new Size();
-            redrawSize.Width = layout.GetWidthFromIndex(this.View.CaretPostion.col);
+            redrawSize.Width = layout.GetWidthFromIndex(this.Document.CaretPostion.col);
             if (redrawSize.Width == 0.0)
                 redrawSize.Width = this.View.CaretWidthOnInsertMode;
             redrawSize.Height = layout.Height;