From 56c071e2734e3812c7c77b611637cbc2698eb7d3 Mon Sep 17 00:00:00 2001 From: Nathaniel Braun Date: Thu, 8 Jan 2026 08:22:01 +1100 Subject: Feature [feature-requests:#184]. Add option to disable drag/drop editing SCI_SETDRAGDROPENABLED. Fully implemented on Win32 but may only prevent dragging on other platforms. --- include/Scintilla.h | 2 ++ include/Scintilla.iface | 6 ++++++ include/ScintillaCall.h | 2 ++ include/ScintillaMessages.h | 2 ++ 4 files changed, 12 insertions(+) (limited to 'include') diff --git a/include/Scintilla.h b/include/Scintilla.h index f7afa4f50..b6786097e 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -1194,6 +1194,8 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_RELEASELINECHARACTERINDEX 2712 #define SCI_LINEFROMINDEXPOSITION 2713 #define SCI_INDEXPOSITIONFROMLINE 2714 +#define SCI_GETDRAGDROPENABLED 2818 +#define SCI_SETDRAGDROPENABLED 2819 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_GETLEXER 4002 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 9ba834aed..6262f7c1b 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -3258,6 +3258,12 @@ fun line LineFromIndexPosition=2713(position pos, LineCharacterIndexType lineCha # Retrieve the position measured in index units at the start of a document line. fun position IndexPositionFromLine=2714(line line, LineCharacterIndexType lineCharacterIndex) +# Get whether drag-and-drop is enabled or disabled +get bool GetDragDropEnabled=2818(,) + +# Enable or disable drag-and-drop +set void SetDragDropEnabled=2819(bool dragDropEnabled,) + # Start notifying the container of all key presses and commands. fun void StartRecord=3001(,) diff --git a/include/ScintillaCall.h b/include/ScintillaCall.h index 7a98c7e3d..2c065c03f 100644 --- a/include/ScintillaCall.h +++ b/include/ScintillaCall.h @@ -893,6 +893,8 @@ public: void ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex); Line LineFromIndexPosition(Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex); Position IndexPositionFromLine(Line line, Scintilla::LineCharacterIndexType lineCharacterIndex); + bool DragDropEnabled(); + void SetDragDropEnabled(bool dragDropEnabled); void StartRecord(); void StopRecord(); int Lexer(); diff --git a/include/ScintillaMessages.h b/include/ScintillaMessages.h index 6a33f5c6d..d327bf7c1 100644 --- a/include/ScintillaMessages.h +++ b/include/ScintillaMessages.h @@ -799,6 +799,8 @@ enum class Message { ReleaseLineCharacterIndex = 2712, LineFromIndexPosition = 2713, IndexPositionFromLine = 2714, + GetDragDropEnabled = 2818, + SetDragDropEnabled = 2819, StartRecord = 3001, StopRecord = 3002, GetLexer = 4002, -- cgit v1.2.3