1 // Scintilla source code edit control
2 /** @file ScintillaStructures.h
3 ** Structures used to communicate with Scintilla.
4 ** The same structures are defined for C in Scintilla.h.
5 ** Uses definitions from ScintillaTypes.h.
7 // Copyright 2021 by Neil Hodgson <neilh@scintilla.org>
8 // The License.txt file describes the conditions under which this software may be distributed.
10 #ifndef SCINTILLASTRUCTURES_H
11 #define SCINTILLASTRUCTURES_H
15 using PositionCR
= long;
17 struct CharacterRange
{
22 struct CharacterRangeFull
{
32 struct TextRangeFull
{
33 CharacterRangeFull chrg
;
39 const char *lpstrText
;
40 CharacterRange chrgText
;
43 struct TextToFindFull
{
44 CharacterRangeFull chrg
;
45 const char *lpstrText
;
46 CharacterRangeFull chrgText
;
49 using SurfaceID
= void *;
58 /* This structure is used in printing. Not needed by most client code. */
60 struct RangeToFormat
{
68 struct RangeToFormatFull
{
73 CharacterRangeFull chrg
;
77 /* Compatible with Windows NMHDR.
78 * hwndFrom is really an environment specific window handle or pointer
79 * but most clients of Scintilla.h do not have this type visible. */
85 enum class Message
; // Declare in case ScintillaMessages.h not included
87 struct NotificationData
{
90 /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */
91 /* SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, */
92 /* SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, */
93 /* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */
94 /* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */
97 /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */
98 /* SCN_USERLISTSELECTION */
100 /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */
101 /* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */
103 ModificationFlags modificationType
; /* SCN_MODIFIED */
105 /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */
107 Position length
; /* SCN_MODIFIED */
108 Position linesAdded
; /* SCN_MODIFIED */
109 Message message
; /* SCN_MACRORECORD */
110 uptr_t wParam
; /* SCN_MACRORECORD */
111 sptr_t lParam
; /* SCN_MACRORECORD */
112 Position line
; /* SCN_MODIFIED */
113 FoldLevel foldLevelNow
; /* SCN_MODIFIED */
114 FoldLevel foldLevelPrev
; /* SCN_MODIFIED */
115 int margin
; /* SCN_MARGINCLICK */
116 int listType
; /* SCN_USERLISTSELECTION */
117 int x
; /* SCN_DWELLSTART, SCN_DWELLEND */
118 int y
; /* SCN_DWELLSTART, SCN_DWELLEND */
119 int token
; /* SCN_MODIFIED with SC_MOD_CONTAINER */
120 Position annotationLinesAdded
; /* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */
121 Update updated
; /* SCN_UPDATEUI */
122 CompletionMethods listCompletionMethod
;
123 /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */
124 CharacterSource characterSource
; /* SCN_CHARADDED */