OSDN Git Service

GripperViewをGripperに解明し、Documentに移動した
[fooeditengine/FooEditEngine.git] / Core / EditView.cs
index 4761c68..1a4ad02 100644 (file)
@@ -58,7 +58,6 @@ namespace FooEditEngine
             this.CaretLocation = new Point(this.render.TextArea.X, this.render.TextArea.Y);
             this.LayoutLines.FoldingCollection.StatusChanged += FoldingCollection_StatusChanged;
             this.IsFocused = false;
-            this.SelectGrippers = new GripperRectangle(new GripperView(this.render), new GripperView(this.render));
             this.Document.HideRulerChanged += (s, e) => {
                 CalculateClipRect();
                 CalculateLineCountOnScreen();
@@ -75,15 +74,6 @@ namespace FooEditEngine
         }
 
         /// <summary>
-        /// 選択範囲にあるグリッパーのリスト
-        /// </summary>
-        public GripperRectangle SelectGrippers
-        {
-            private set;
-            get;
-        }
-
-        /// <summary>
         /// ラインマーカーを描くなら偽。そうでなければ真
         /// </summary>
         public bool HideLineMarker
@@ -290,8 +280,8 @@ namespace FooEditEngine
 
             this.DrawCaret();
 
-            this.SelectGrippers.BottomLeft.Draw();
-            this.SelectGrippers.BottomRight.Draw();
+            this.Document.SelectGrippers.BottomLeft.Draw(this.render);
+            this.Document.SelectGrippers.BottomRight.Draw(this.render);
         }
 
         void DrawUpdateArea(int row,double ypos)
@@ -534,12 +524,12 @@ namespace FooEditEngine
             return p;
         }
 
-        public GripperView HitGripperFromPoint(Point p)
+        public Gripper HitGripperFromPoint(Point p)
         {
-            if (this.SelectGrippers.BottomLeft.IsHit(p))
-                return this.SelectGrippers.BottomLeft;
-            if (this.SelectGrippers.BottomRight.IsHit(p))
-                return this.SelectGrippers.BottomRight;
+            if (this.Document.SelectGrippers.BottomLeft.IsHit(p))
+                return this.Document.SelectGrippers.BottomLeft;
+            if (this.Document.SelectGrippers.BottomRight.IsHit(p))
+                return this.Document.SelectGrippers.BottomRight;
             return null;
         }