From 6bc5a01aa43fee87d0ba9d81483a0174f8eaa40f Mon Sep 17 00:00:00 2001 From: test Date: Mon, 4 Jan 2021 14:40:21 +0900 Subject: [PATCH] =?utf8?q?=E3=81=84=E3=81=8F=E3=81=A4=E3=81=8B=E3=81=AE?= =?utf8?q?=E8=AD=A6=E5=91=8A=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Core/Controller.cs | 16 ++++++++++++++++ Core/ITextRender.cs | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/Core/Controller.cs b/Core/Controller.cs index d9655ec..d468870 100644 --- a/Core/Controller.cs +++ b/Core/Controller.cs @@ -20,11 +20,26 @@ using System.Drawing; namespace FooEditEngine { + /// + /// 移動量の単位を表す + /// public enum MoveFlow { + /// + /// 文字 + /// Character, + /// + /// 単語単位 + /// Word, + /// + /// 行単位 + /// Line, + /// + /// パラグラフ単位 + /// Paragraph } internal enum ScrollDirection @@ -1024,6 +1039,7 @@ namespace FooEditEngine /// /// キャレットを行方向に移動させる /// + /// 計算の起点となるテキストポイント /// プラス方向に移動するなら真 /// パラグラフ単位で移動するするなら真 /// このメソッドを呼び出した後でScrollToCaretメソッドとSelectWithMoveCaretメソッドを呼び出す必要があります diff --git a/Core/ITextRender.cs b/Core/ITextRender.cs index 12d3a4d..06613d1 100644 --- a/Core/ITextRender.cs +++ b/Core/ITextRender.cs @@ -105,42 +105,78 @@ namespace FooEditEngine return this; } #if WINFORM + /// + /// 変換演算子 + /// + /// public static implicit operator Point(System.Drawing.Point p) { return new Point(p.X, p.Y); } + /// + /// 変換演算子 + /// + /// public static implicit operator System.Drawing.Point(Point p) { return new System.Drawing.Point((int)p.X, (int)p.Y); } + /// + /// 変換演算子 + /// + /// public static implicit operator SharpDX.Mathematics.Interop.RawVector2(Point p) { return new SharpDX.Mathematics.Interop.RawVector2((float)p.X, (float)p.Y); } #endif #if WPF + /// + /// 変換演算子 + /// + /// public static implicit operator Point(System.Windows.Point p) { return new Point(p.X, p.Y); } + /// + /// 変換演算子 + /// + /// public static implicit operator System.Windows.Point(Point p) { return new System.Windows.Point(p.X, p.Y); } + /// + /// 変換演算子 + /// + /// public static implicit operator SharpDX.Mathematics.Interop.RawVector2(Point p) { return new SharpDX.Mathematics.Interop.RawVector2((float)p.X, (float)p.Y); } #endif #if METRO || WINDOWS_UWP + /// + /// 変換演算子 + /// + /// public static implicit operator Point(Windows.Foundation.Point p) { return new Point(p.X, p.Y); } + /// + /// 変換演算子 + /// + /// public static implicit operator Windows.Foundation.Point(Point p) { return new Windows.Foundation.Point(p.X, p.Y); } + /// + /// 変換演算子 + /// + /// public static implicit operator SharpDX.Mathematics.Interop.RawVector2(Point p) { return new SharpDX.Mathematics.Interop.RawVector2((float)p.X, (float)p.Y); -- 2.11.0