From 89db940cd0d6f3a2da913bc0098c777c5c7c50ee Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 4 Apr 2009 23:00:39 +0000 Subject: Added AddUndoAction call for adding application actions into undo stack. --- doc/ScintillaDoc.html | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index cf869e1c0..c6f9fe46a 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -899,6 +899,7 @@ struct TextToFind { SCI_GETUNDOCOLLECTION
SCI_BEGINUNDOACTION
SCI_ENDUNDOACTION
+ SCI_ADDUNDOACTION(int token)

SCI_UNDO
@@ -946,6 +947,24 @@ 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)
+ 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 + SC_MOD_CONTAINER + flag when it is time to undo (SC_PERFORMED_UNDO) or + 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. + 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 + position in that stack as the argument to SCI_ADDUNDOACTION(line). + SCI_ADDUNDOACTION commands are not combined together + into a single undo transaction unless grouped with SCI_BEGINUNDOACTION + and SCI_ENDUNDOACTION.

+

Selection and information

Scintilla maintains a selection that stretches between two points, the anchor and the @@ -5208,10 +5227,22 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); None + + SC_MOD_CONTAINER + + 0x40000 + + This is set on for actions that the container stored into the undo stack with + SCI_ADDUNDOACTION. + + + token + + SC_MODEVENTMASKALL - 0x1fff + 0x7FFFF This is a mask for all valid flags. This is the default mask state set by SCI_SETMODEVENTMASK. -- cgit v1.2.3