From bbf8cac83a0fbba3b68a17d119a559ecd521997a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 19 Apr 2009 09:38:40 +0000 Subject: Added UNDO_MAY_COALESCE flag to AddUndoAction. --- doc/ScintillaDoc.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 28385d192..0bd5dd181 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -901,7 +901,7 @@ struct TextToFind { SCI_GETUNDOCOLLECTION
SCI_BEGINUNDOACTION
SCI_ENDUNDOACTION
- SCI_ADDUNDOACTION(int token)
+ SCI_ADDUNDOACTION(int token, int flags)

SCI_UNDO
@@ -949,7 +949,7 @@ struct TextToFind { Alternatively, you can use these to mark a set of operations that you do not want to have combined with the preceding or following operations if they are undone.

-

SCI_ADDUNDOACTION(int token)
+

SCI_ADDUNDOACTION(int token, int flags)
The container can add its own actions into the undo stack by calling SCI_ADDUNDOACTION and an SCN_MODIFIED notification will be sent to the container with the @@ -958,7 +958,7 @@ struct TextToFind { redo (SC_PERFORMED_REDO) the action. The token argument supplied is returned in the token field of the notification.

For example, if the container wanted to allow undo and redo of a 'toggle bookmark' command then - it could call SCI_ADDUNDOACTION(line) each time the command is performed. + it could call SCI_ADDUNDOACTION(line, 0) each time the command is performed. Then when it receives a notification to undo or redo it toggles a bookmark on the line given by the token field. If there are different types of commands or parameters that need to be stored into the undo stack then the container should maintain a stack of its own for the document and use the current @@ -967,6 +967,11 @@ struct TextToFind { into a single undo transaction unless grouped with SCI_BEGINUNDOACTION and SCI_ENDUNDOACTION.

+

The flags argument can be UNDO_MAY_COALESCE (1) if the container action may be + coalesced along with any insertion and deletion actions into a single compound action, otherwise 0. + Coalescing treats coalescible container actions as transparent so will still only group together insertions that + look like typing or deletions that look like multiple uses of the Backspace or Delete keys. +

Selection and information

Scintilla maintains a selection that stretches between two points, the anchor and the -- cgit v1.2.3