From f38c02c44304e40b1a406c8ce21173a0568a99a0 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 29 Sep 2013 08:25:23 +1000 Subject: Improved information about notifications, particularly on GTK+. --- doc/ScintillaDoc.html | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index f408dafad..d2be3b3e1 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -82,7 +82,7 @@

Scintilla Documentation

-

Last edited 26 September 2013 NH

+

Last edited 29 September 2013 NH

There is an overview of the internal design of Scintilla.
@@ -6438,13 +6438,16 @@ implemented and thus which methods may be called.

Notifications

Notifications are sent (fired) from the Scintilla control to its container when an event has - occurred that may interest the container. Notifications are sent using the - WM_NOTIFY message on Windows and the "notify" signal on GTK+. - On Cocoa, a delegate implementing the ScintillaNotificationProtocol + occurred that may interest the container.

+

Notifications are sent using the + WM_NOTIFY message on Windows.

+

On GTK+, the "sci-notify" signal is sent and the signal handler should have the signature + handler(GtkWidget *, gint, gpointer notification, gpointer userData).

+

On Cocoa, a delegate implementing the ScintillaNotificationProtocol may be set to receive notifications or the ScintillaView class may be subclassed and the notification: method overridden. Overriding notification: allows the - subclass to control whether default handling is performed. - The container is + subclass to control whether default handling is performed.

+

The container is passed a SCNotification structure containing information about the event.

 struct NotifyHeader {   // This matches the Win32 NMHDR structure
@@ -6530,11 +6533,13 @@ struct SCNotification {
     
 
     

The following additional notifications are sent using the WM_COMMAND message on - Windows and the "Command" signal on GTK+. - On Cocoa, a delegate implementing the - ScintillaNotificationProtocol with a command:idFrom: method may be set. + Windows. This emulates the Windows Edit control. Only the lower 16 bits of the control's ID is passed in these notifications.

+

On GTK+, the "command" signal is sent and the signal handler should have the signature + handler(GtkWidget *, gint wParam, gpointer lParam, gpointer userData).

+

On Cocoa, a delegate implementing the + ScintillaNotificationProtocol with a command:idFrom: method may be set.

SCEN_CHANGE
SCEN_SETFOCUS
SCEN_KILLFOCUS
@@ -6977,7 +6982,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber);

SCEN_CHANGE
SCEN_CHANGE (768) is fired when the text (not the style) of the document changes. This notification is sent using the WM_COMMAND message on Windows and the - "Command" signal on GTK+ as this is the behaviour of the standard Edit control + "command" signal on GTK+ as this is the behaviour of the standard Edit control (SCEN_CHANGE has the same value as the Windows Edit control EN_CHANGE). No other information is sent. If you need more detailed information use SCN_MODIFIED. You can filter the @@ -7006,7 +7011,7 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); SCEN_KILLFOCUS
SCEN_SETFOCUS (512) is fired when Scintilla receives focus and SCEN_KILLFOCUS (256) when it loses focus. These notifications are sent using the - WM_COMMAND message on Windows and the "Command" signal on GTK+ as this is the + WM_COMMAND message on Windows and the "command" signal on GTK+ as this is the behaviour of the standard Edit control. Unfortunately, these codes do not match the Windows Edit notification codes EN_SETFOCUS (256) and EN_KILLFOCUS (512). It is now too late to change the Scintilla codes as clients depend on the current values.

-- cgit v1.2.3