OSDN Git Service

InsertAtSelectionHandlerでo_startIndexとo_endIndexを指定できるようにした
authorkonekoneko <test2214@hotmail.co.jp>
Sat, 28 Jun 2014 11:51:40 +0000 (20:51 +0900)
committerkonekoneko <test2214@hotmail.co.jp>
Sat, 28 Jun 2014 11:51:40 +0000 (20:51 +0900)
Common/DotNetTextStore/TextStoreBase.cs
Metro/FooEditEngine/FooTextBox.cs
WPF/FooEditEngine/FooTextBox.cs

index 951ff3a..90e8c6d 100644 (file)
@@ -115,7 +115,7 @@ namespace DotNetTextStore
         public delegate string GetStringHandler(int start, int length);\r
         public event GetStringHandler GetString;\r
 \r
-        public delegate void InsertAtSelectionHandler(string i_value);\r
+        public delegate void InsertAtSelectionHandler(string i_value,ref int o_startIndex,ref int o_endIndex);\r
         public event InsertAtSelectionHandler InsertAtSelection;\r
 \r
         public delegate void GetScreenExtentHandler(\r
@@ -1140,15 +1140,14 @@ namespace DotNetTextStore
                     DebugOut.Print("start: {0}, end: {1}, text: {2}", start, end, new string(i_text));\r
 #endif\r
 \r
-                    InsertAtSelection(new string(i_text));\r
-\r
                     o_startIndex = start;\r
                     o_endIndex = start + i_length;\r
 \r
+                    InsertAtSelection(new string(i_text), ref o_startIndex, ref o_endIndex);\r
+\r
                     o_textChange.start = start;\r
                     o_textChange.oldEnd = end;\r
-                    o_textChange.newEnd = start + i_length;\r
-\r
+                    o_textChange.newEnd = o_endIndex;\r
                     // InsertAtSelection() 内でカーソル位置を更新しているため、ここでは不要。\r
                     // 改行した時に位置が狂う。\r
                     // SetSelectionIndex(start, start + i_length);\r
index 1445fea..d919e7f 100644 (file)
@@ -749,7 +749,7 @@ namespace FooEditEngine.Metro
             this.Refresh();\r
         }\r
 \r
-        void _textStore_InsertAtSelection(string i_value)\r
+        void _textStore_InsertAtSelection(string i_value,ref int o_stratIndex,ref int o_endIndex)\r
         {\r
             TextStoreHelper.InsertTextAtSelection(this._Controller, i_value);\r
             this.Refresh();\r
index 25e71c6..fd937f1 100644 (file)
@@ -635,7 +635,7 @@ namespace FooEditEngine.WPF
             this.Refresh();\r
         }\r
 \r
-        void _textStore_InsertAtSelection(string i_value)\r
+        void _textStore_InsertAtSelection(string i_value, ref int o_startIndex, ref int o_endIndex)\r
         {\r
             TextStoreHelper.InsertTextAtSelection(this._Controller, i_value);\r
             this.Refresh();\r