From e4145254c3614839f8c87900445b785d9e9ee7dd Mon Sep 17 00:00:00 2001 From: Jonathan Hunt Date: Fri, 3 Jul 2015 09:11:16 +1000 Subject: Feature [feature-requests:#1109]. SCN_AUTOCCOMPLETED sent after text insertion. From Jonathan Hunt. --- doc/ScintillaDoc.html | 120 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 112 insertions(+), 8 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index ed0429efc..9cf880d0e 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -4325,8 +4325,10 @@ struct Sci_TextToFind {

When the user makes a selection from the list the container is sent a SCN_AUTOCSELECTION 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 - SCI_AUTOCCANCEL.

+ the selected text and the container is sent a SCN_AUTOCCOMPLETED notification message unless the autocompletion list has been cancelled, for example by the container sending + SCI_AUTOCCANCEL.

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.

@@ -4555,10 +4557,10 @@ struct Sci_TextToFind {

o The SCI_AUTOCSETCHOOSESINGLE message has no effect.
- o When the user makes a selection you are sent a SCN_USERLISTSELECTION notification message rather than SCN_AUTOCSELECTION.

+ href="#Notifications">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 { SCN_AUTOCCHARDELETED
SCN_FOCUSIN
SCN_FOCUSOUT
+ SCN_AUTOCCOMPLETED

The following SCI_* messages are associated with these notifications:

@@ -7359,11 +7367,24 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next The position the list was displayed at. + + ch + + If a fillup character was the method of selection, the used + character, otherwise 0. + + + listCompletionMethod + + A value indicating the way in which the completion + occurred. See the table below. +
- - + + See the SCN_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 The text of the selection. + + ch + + If a fillup character was the method of selection, the used + character, otherwise 0. + + + listCompletionMethod + + A value indicating the way in which the completion + occurred. See the table below. + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolValueMeaning
SC_AC_FILLUP0x01A fillup character triggered the completion. The character used is + in ch.
SC_AC_DOUBLECLICK0x02A double-click triggered the completion. ch is 0.
SC_AC_TAB0x04The tab key or SCI_TAB triggered the completion. ch is 0.
SC_AC_NEWLINE0x08A new line or SCI_NEWLINE triggered the completion. ch is 0.
SC_AC_COMMAND0x10The + + SCI_AUTOCSELECT message + triggered the completion. ch is 0.
@@ -7490,6 +7587,13 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next 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.

+

Images

Two formats are supported for images used in margin markers and autocompletion lists, RGBA and XPM.

-- cgit v1.2.3