summaryrefslogtreecommitdiffstats
path: root/generic/tkText.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-18 10:14:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-18 10:14:22 (GMT)
commit88aa509e1f20951b7f699b7be941555f9d76774a (patch)
tree1b602e46696ff3a3517e3e6e2d8b15cc9ac04142 /generic/tkText.h
parent2e3f76240fde9905dedd8b0c6dc0d0fc79261654 (diff)
parent71add2ec624828af9c1c040760616e297a3f3290 (diff)
downloadtk-88aa509e1f20951b7f699b7be941555f9d76774a.zip
tk-88aa509e1f20951b7f699b7be941555f9d76774a.tar.gz
tk-88aa509e1f20951b7f699b7be941555f9d76774a.tar.bz2
Implement TIP #613: New INDEX_NULL_OK flag for Tcl_GetIndexFromObj*()
Diffstat (limited to 'generic/tkText.h')
-rw-r--r--generic/tkText.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/generic/tkText.h b/generic/tkText.h
index faa6014..230a6ff 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -282,10 +282,12 @@ struct TkTextDispChunk {
*/
typedef enum {
- TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_NONE, TEXT_WRAPMODE_WORD,
- TEXT_WRAPMODE_NULL
+ TEXT_WRAPMODE_NULL = -1,
+ TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_NONE, TEXT_WRAPMODE_WORD
} TkWrapMode;
+MODULE_SCOPE const char *const tkTextWrapStrings[];
+
typedef struct TkTextTag {
const char *name; /* Name of this tag. This field is actually a
* pointer to the key from the entry in
@@ -335,7 +337,7 @@ typedef struct TkTextTag {
char *justifyString; /* -justify option string (malloc-ed). NULL
* means option not specified. */
Tk_Justify justify; /* How to justify text: TK_JUSTIFY_LEFT,
- * TK_JUSTIFY_RIGHT, or TK_JUSTIFY_CENTER.
+ * TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER, or TK_JUSTIFY_NULL.
* Only valid if justifyString is non-NULL. */
char *lMargin1String; /* -lmargin1 option string (malloc-ed). NULL
* means option not specified. */
@@ -393,8 +395,8 @@ typedef struct TkTextTag {
struct TkTextTabArray *tabArrayPtr;
/* Info about tabs for tag (malloc-ed) or
* NULL. Corresponds to tabString. */
- int tabStyle; /* One of TABULAR or WORDPROCESSOR or NONE (if
- * not specified). */
+ int tabStyle; /* One of TK_TEXT_TABSTYLE_TABULAR or TK_TEXT_TABSTYLE_WORDPROCESSOR
+ * or TK_TEXT_TABSTYLE_NULL (if not specified). */
char *underlineString; /* -underline option string (malloc-ed). NULL
* means option not specified. */
int underline; /* Non-zero means draw underline underneath
@@ -466,15 +468,17 @@ typedef enum {LEFT, RIGHT, CENTER, NUMERIC} TkTextTabAlign;
/*
* The following are the supported styles of tabbing, used for the -tabstyle
- * option of the text widget. The last element is only used for tag options.
+ * option of the text widget. The first element is only used for tag options.
*/
typedef enum {
+ TK_TEXT_TABSTYLE_NULL = -1,
TK_TEXT_TABSTYLE_TABULAR,
- TK_TEXT_TABSTYLE_WORDPROCESSOR,
- TK_TEXT_TABSTYLE_NONE
+ TK_TEXT_TABSTYLE_WORDPROCESSOR
} TkTextTabStyle;
+MODULE_SCOPE const char *const tkTextTabStyleStrings[];
+
typedef struct TkTextTab {
int location; /* Offset in pixels of this tab stop from the
* left margin (lmargin2) of the text. */
@@ -695,7 +699,7 @@ typedef struct TkText {
/* Information about tab stops (malloc'ed).
* NULL means perform default tabbing
* behavior. */
- int tabStyle; /* One of TABULAR or WORDPROCESSOR. */
+ int tabStyle; /* One of TK_TEXT_TABSTYLE_TABULAR or TK_TEXT_TABSTYLE_WORDPROCESSOR. */
/*
* Additional information used for displaying: