From c48111fc4af622f1e45b1ebb00c7a43b811fb8b2 Mon Sep 17 00:00:00 2001 From: Steve Towner Date: Mon, 8 Apr 2019 22:15:56 -0500 Subject: [PATCH 1/2] Added missing method SCI_SETTABINDENTS. Added missing method SCI_SETBACKSPACEUNINDENTS --- src/ScintillaNET/Scintilla.cs | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/ScintillaNET/Scintilla.cs b/src/ScintillaNET/Scintilla.cs index d71b722..bb363da 100644 --- a/src/ScintillaNET/Scintilla.cs +++ b/src/ScintillaNET/Scintilla.cs @@ -3395,6 +3395,26 @@ public override ImageLayout BackgroundImageLayout } } + /// + /// Gets or sets whether backspace deletes a character, or unindents. + /// + /// Whether backspace deletes a character, (false) or unindents (true). + [DefaultValue(false)] + [Category("Indentation")] + [Description("Determines whether backspace deletes a character, or unindents.")] + public bool BackspaceUnindents + { + get + { + return (DirectMessage(NativeMethods.SCI_GETBACKSPACEUNINDENTS) != IntPtr.Zero); + } + set + { + var ptr = (value ? new IntPtr(1) : IntPtr.Zero); + DirectMessage(NativeMethods.SCI_SETBACKSPACEUNINDENTS, ptr); + } + } + /// /// Gets or sets the border type of the control. /// @@ -5023,6 +5043,26 @@ public TabDrawMode TabDrawMode } } + /// + /// Gets or sets whether tab inserts a tab character, or indents. + /// + /// Whether tab inserts a tab character (false), or indents (true). + [DefaultValue(false)] + [Category("Indentation")] + [Description("Determines whether tab inserts a tab character, or indents.")] + public bool TabIndents + { + get + { + return (DirectMessage(NativeMethods.SCI_GETTABINDENTS) != IntPtr.Zero); + } + set + { + var ptr = (value ? new IntPtr(1) : IntPtr.Zero); + DirectMessage(NativeMethods.SCI_SETTABINDENTS, ptr); + } + } + /// /// Gets or sets the width of a tab as a multiple of a space character. /// From e70b6100b9061496becc8a7b23671faaf29ebd61 Mon Sep 17 00:00:00 2001 From: Steve Towner Date: Mon, 8 Apr 2019 22:30:55 -0500 Subject: [PATCH 2/2] Added missing SCI_LINEREVERSE. --- src/ScintillaNET/Command.cs | 7 ++++++- src/ScintillaNET/NativeMethods.cs | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ScintillaNET/Command.cs b/src/ScintillaNET/Command.cs index fbb07fb..f7acf67 100644 --- a/src/ScintillaNET/Command.cs +++ b/src/ScintillaNET/Command.cs @@ -446,6 +446,11 @@ public enum Command /// LineTranspose = NativeMethods.SCI_LINETRANSPOSE, + /// + /// Reverses the current line. + /// + LineReverse = NativeMethods.SCI_LINEREVERSE, + /// /// Duplicates the current line. /// @@ -578,4 +583,4 @@ public enum Command /// SelectAll = NativeMethods.SCI_SELECTALL } -} +} \ No newline at end of file diff --git a/src/ScintillaNET/NativeMethods.cs b/src/ScintillaNET/NativeMethods.cs index 5b3df1f..6a98c9d 100644 --- a/src/ScintillaNET/NativeMethods.cs +++ b/src/ScintillaNET/NativeMethods.cs @@ -678,6 +678,7 @@ internal static class NativeMethods public const int SCI_LINEENDDISPLAY = 2347; public const int SCI_LINEENDDISPLAYEXTEND = 2348; public const int SCI_HOMEWRAP = 2349; + public const int SCI_LINEREVERSE = 2354; public const int SCI_HOMEWRAPEXTEND = 2450; public const int SCI_LINEENDWRAP = 2451; public const int SCI_LINEENDWRAPEXTEND = 2452; @@ -1891,4 +1892,4 @@ public struct SCNotification #endregion Structures } -} +} \ No newline at end of file