Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Added missing methods SCI_SETTABINDENTS & SCI_SETBACKSPACEUNINDENTS. #445

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/ScintillaNET/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ public enum Command
/// </summary>
LineTranspose = NativeMethods.SCI_LINETRANSPOSE,

/// <summary>
/// Reverses the current line.
/// </summary>
LineReverse = NativeMethods.SCI_LINEREVERSE,

/// <summary>
/// Duplicates the current line.
/// </summary>
Expand Down Expand Up @@ -578,4 +583,4 @@ public enum Command
/// </summary>
SelectAll = NativeMethods.SCI_SELECTALL
}
}
}
3 changes: 2 additions & 1 deletion src/ScintillaNET/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1891,4 +1892,4 @@ public struct SCNotification

#endregion Structures
}
}
}
40 changes: 40 additions & 0 deletions src/ScintillaNET/Scintilla.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3395,6 +3395,26 @@ public override ImageLayout BackgroundImageLayout
}
}

/// <summary>
/// Gets or sets whether backspace deletes a character, or unindents.
/// </summary>
/// <returns>Whether backspace deletes a character, (false) or unindents (true).</returns>
[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);
}
}

/// <summary>
/// Gets or sets the border type of the <see cref="Scintilla" /> control.
/// </summary>
Expand Down Expand Up @@ -5023,6 +5043,26 @@ public TabDrawMode TabDrawMode
}
}

/// <summary>
/// Gets or sets whether tab inserts a tab character, or indents.
/// </summary>
/// <returns>Whether tab inserts a tab character (false), or indents (true).</returns>
[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);
}
}

/// <summary>
/// Gets or sets the width of a tab as a multiple of a space character.
/// </summary>
Expand Down