summaryrefslogtreecommitdiffstats
path: root/generic/tkText.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-10-22 21:41:20 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-10-22 21:41:20 (GMT)
commit69946bf0eb9ab14912c18295b25eec8c49a37d01 (patch)
treee0eacce20b7c7c1df64b6eace5c26333a64cabb0 /generic/tkText.h
parentda76bd4e71a3e8d17bd2b649d285e19a41f834b3 (diff)
downloadtk-69946bf0eb9ab14912c18295b25eec8c49a37d01.zip
tk-69946bf0eb9ab14912c18295b25eec8c49a37d01.tar.gz
tk-69946bf0eb9ab14912c18295b25eec8c49a37d01.tar.bz2
Apply (slight cleaner, tested) version of [Patch 1469210].
Diffstat (limited to 'generic/tkText.h')
-rw-r--r--generic/tkText.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/generic/tkText.h b/generic/tkText.h
index 521d99c..117a717 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.h,v 1.34 2007/12/13 15:24:17 dgp Exp $
+ * RCS: @(#) $Id: tkText.h,v 1.34.2.1 2009/10/22 21:41:20 dkf Exp $
*/
#ifndef _TKTEXT
@@ -506,6 +506,19 @@ typedef enum {
} TkTextEditMode;
/*
+ * Enumeration defining the ways in which a text widget may be modified (for
+ * undo/redo handling).
+ */
+
+typedef enum {
+ TK_TEXT_DIRTY_NORMAL, /* Normal behavior. */
+ TK_TEXT_DIRTY_UNDO, /* Reverting a compound action. */
+ TK_TEXT_DIRTY_REDO, /* Reapplying a compound action. */
+ TK_TEXT_DIRTY_FIXED /* Forced to be dirty; can't be undone/redone
+ * by normal activity. */
+} TkTextDirtyMode;
+
+/*
* The following enum is used to define a type for the -state option of the
* Text widget.
*/
@@ -555,10 +568,10 @@ typedef struct TkSharedText {
* longer valid. */
/*
- * Information related to the undo/redo functonality
+ * Information related to the undo/redo functionality.
*/
- TkUndoRedoStack *undoStack; /* The undo/redo stack. */
+ TkUndoRedoStack *undoStack; /* The undo/redo stack. */
int undo; /* Non-zero means the undo/redo behaviour is
* enabled. */
int maxUndo; /* The maximum depth of the undo stack
@@ -566,14 +579,12 @@ typedef struct TkSharedText {
* statements. */
int autoSeparators; /* Non-zero means the separators will be
* inserted automatically. */
- int modifiedSet; /* Flag indicating that the 'dirtyness' of
- * the text widget has been explicitly set. */
int isDirty; /* Flag indicating the 'dirtyness' of the
* text widget. If the flag is not zero,
* unsaved modifications have been applied to
* the text widget. */
- int isDirtyIncrement; /* Amount with which the isDirty flag is
- * incremented every edit action. */
+ TkTextDirtyMode dirtyMode; /* The nature of the dirtyness characterized
+ * by the isDirty flag. */
TkTextEditMode lastEditMode;/* Keeps track of what the last edit mode
* was. */
@@ -1156,3 +1167,11 @@ MODULE_SCOPE void TkTextWinFreeClient(Tcl_HashEntry *hPtr,
# define TCL_STORAGE_CLASS DLLIMPORT
#endif /* _TKTEXT */
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 78
+ * End:
+ */