OSDN Git Service

GripperViewがControllerに依存しているのは望ましくないので依存しないようにした
[fooeditengine/FooEditEngine.git] / Core / Controller.cs
index a0b85d3..bb5a88c 100644 (file)
@@ -824,6 +824,17 @@ namespace FooEditEngine
             return new TextPoint(row, col);
         }
 
+        Rectangle GetGripperRect(GripperPostion type, int width, int height)
+        {
+            double radius = width / 2;
+            if (type == GripperPostion.BottomRight)
+                return this.View.GetRectFromIndex(this.SelectionStart + this.SelectionLength,width,height);
+            else if (type == GripperPostion.BottomLeft)
+                return this.View.GetRectFromIndex(this.SelectionStart,width,height);
+            else
+                throw new ArgumentOutOfRangeException();
+        }
+
         /// <summary>
         /// 選択文字列のインデントを一つ増やす
         /// </summary>