From e4145254c3614839f8c87900445b785d9e9ee7dd Mon Sep 17 00:00:00 2001
From: Jonathan Hunt When the user makes a selection from the list the container is sent a notification message. On return from the notification Scintilla will insert
- the selected text unless the autocompletion list has been cancelled, for example by the container sending
- . notification message unless the autocompletion list has been cancelled, for example by the container sending
+ .
To make use of autocompletion you must monitor each character added to the document. See
SciTEBase::CharAdded() in SciTEBase.cxx for an example of autocompletion.
o The message has no
effect.
- o When the user makes a selection you are sent a SCN_USERLISTSELECTION notification message rather than .
SCN_AUTOCSELECTION.BEWARE: if you have set fillup characters or stop characters, these will still be active
with the user list, and may result in items being selected or the user list cancelled due to
@@ -6649,7 +6651,9 @@ struct SCNotification {
/* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */
/* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */
- int ch; /* SCN_CHARADDED, SCN_KEY */
+ int ch;
+ /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, */
+ /* SCN_USERLISTSELECTION */
int modifiers;
/* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */
/* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */
@@ -6673,6 +6677,9 @@ struct SCNotification {
int token; /* SCN_MODIFIED with SC_MOD_CONTAINER */
int annotationLinesAdded; /* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */
int updated; /* SCN_UPDATEUI */
+ int listCompletionMethod;
+ /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */
+
};
@@ -6707,6 +6714,7 @@ struct SCNotification {
+
The following SCI_* messages are associated with these notifications:
chlistCompletionMethodSCN_AUTOCCOMPLETED notification
+ for the possible values for listCompletionMethod.
SCN_URIDROPPED
Only on the GTK+ version. Indicates that the user has dragged a URI such as a file name or Web
address onto Scintilla. The container could interpret this as a request to open the file. The
@@ -7474,6 +7495,82 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
chlistCompletionMethod| Symbol | + +Value | + +Meaning | + +
|---|---|---|
SC_AC_FILLUP |
+
+ 0x01 | + +A fillup character triggered the completion. The character used is + in ch. | + +
SC_AC_DOUBLECLICK |
+
+ 0x02 | + +A double-click triggered the completion. ch is 0. | + +
SC_AC_TAB |
+
+ 0x04 | + +The tab key or SCI_TAB triggered the completion. ch is 0. | + +
SC_AC_NEWLINE |
+
+ 0x08 | + +A new line or SCI_NEWLINE triggered the completion. ch is 0. | + +
SC_AC_COMMAND |
+
+ 0x10 | + +The
+
+ message
+ triggered the completion. ch is 0. |
+
+
SCN_FOCUSIN (2028) is fired when Scintilla receives focus and
SCN_FOCUSOUT (2029) when it loses focus.
+ SCN_AUTOCCOMPLETED
+ This notification is generated after an autocompletion has inserted its
+ text. The fields are identical to the
+
+ SCN_AUTOCSELECTION
+ notification.
Two formats are supported for images used in margin markers and autocompletion lists, RGBA and XPM.
-- cgit v1.2.3