miniSql

创建
zgc123@gmail.com authored at 11/19/2023 1:40:15 AM
6136600
Tree
0 Parent(s)
Summary: 1 changed files with 50 additions and 0 deletions.
Added +50 -0
Added +50 -0
diff --git a/minisqlquery-master/src/MiniSqlQuery.Core/INavigatableDocument.cs b/minisqlquery-master/src/MiniSqlQuery.Core/INavigatableDocument.cs
new file mode 100644
index 0000000..d5cb377
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery.Core/INavigatableDocument.cs
@@ -0,0 +1,50 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+
+#endregion
+
+
+namespace MiniSqlQuery.Core
+{
+    /// <summary>
+    /// 	An interface for a "document" that can be navigated with a cursor, e.g. position at line 1, column 4 etc.
+    /// </summary>
+    public interface INavigatableDocument : ISupportCursorOffset
+    {
+        /// <summary>
+        /// 	Gets the current column the cursor is in.
+        /// </summary>
+        /// <value>The cursor column.</value>
+        int CursorColumn { get; }
+
+        /// <summary>
+        /// 	Gets the current line the cursor is on.
+        /// </summary>
+        /// <value>The cursor line.</value>
+        int CursorLine { get; }
+
+        /// <summary>
+        /// 	Gets the the total number of lines in the editor.
+        /// </summary>
+        /// <value>The total lines.</value>
+        int TotalLines { get; }
+
+        /// <summary>
+        /// 	Sets the cursor by <paramref name = "line" /> and <paramref name = "column" />.
+        /// </summary>
+        /// <param name = "line">The line number.</param>
+        /// <param name = "column">The column number.</param>
+        /// <returns>The set cursor by location.</returns>
+        bool SetCursorByLocation(int line, int column);
+
+        /// <summary>
+        /// 	Sets the cursor position by offset.
+        /// </summary>
+        /// <param name = "offset">The offset for the cursor.</param>
+        /// <returns>The set cursor by offset.</returns>
+        bool SetCursorByOffset(int offset);
+    }
+}
\ No newline at end of file