summaryrefslogtreecommitdiffstats
path: root/generic/tkText.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-02 13:41:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-02 13:41:29 (GMT)
commit811c479a19f567dae27c22d049ebf4cd0fb2f6bd (patch)
treeb7e643127fb4fd070220f28e4dc95a0a95c6c473 /generic/tkText.h
parent212e57435023aa44299d05a59e46796a94d16ec2 (diff)
parente09be91bbab4de3be2f23c5ba57fbdd242942313 (diff)
downloadtk-811c479a19f567dae27c22d049ebf4cd0fb2f6bd.zip
tk-811c479a19f567dae27c22d049ebf4cd0fb2f6bd.tar.gz
tk-811c479a19f567dae27c22d049ebf4cd0fb2f6bd.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tkText.h')
-rw-r--r--generic/tkText.h42
1 files changed, 22 insertions, 20 deletions
diff --git a/generic/tkText.h b/generic/tkText.h
index 4535823..3a24ad8 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. */
@@ -356,11 +358,10 @@ typedef struct TkTextTag {
* baseline of line. Used for superscripts and
* subscripts. Only valid if offsetString is
* non-NULL. */
- char *overstrikeString; /* -overstrike option string (malloc-ed). NULL
+ Tcl_Obj *overstrikePtr; /* -overstrike option. NULL
* means option not specified. */
- int overstrike; /* Non-zero means draw horizontal line through
- * middle of text. Only valid if
- * overstrikeString is non-NULL. */
+ int overstrike; /* > 0 means draw horizontal line through
+ * middle of text. -1 means not specified. */
XColor *overstrikeColor; /* Color for the overstrike. NULL means same
* color as foreground. */
char *rMarginString; /* -rmargin option string (malloc-ed). NULL
@@ -393,13 +394,12 @@ 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). */
- char *underlineString; /* -underline option string (malloc-ed). NULL
+ int tabStyle; /* One of TK_TEXT_TABSTYLE_TABULAR or TK_TEXT_TABSTYLE_WORDPROCESSOR
+ * or TK_TEXT_TABSTYLE_NULL (if not specified). */
+ Tcl_Obj *underlinePtr; /* -underline option. NULL
* means option not specified. */
- int underline; /* Non-zero means draw underline underneath
- * text. Only valid if underlineString is
- * non-NULL. */
+ int underline; /* > 0 means draw underline underneath
+ * text. -1 means not specified. */
XColor *underlineColor; /* Color for the underline. NULL means same
* color as foreground. */
TkWrapMode wrapMode; /* How to handle wrap-around for this tag.
@@ -407,10 +407,10 @@ typedef struct TkTextTag {
* TEXT_WRAPMODE_NONE, TEXT_WRAPMODE_WORD, or
* TEXT_WRAPMODE_NULL to use wrapmode for
* whole widget. */
- char *elideString; /* -elide option string (malloc-ed). NULL
+ Tcl_Obj *elidePtr; /* -elide option. NULL
* means option not specified. */
- int elide; /* Non-zero means that data under this tag
- * should not be displayed. */
+ int elide; /* > 0 means that data under this tag
+ * should not be displayed. -1 means not specified. */
int affectsDisplay; /* Non-zero means that this tag affects the
* way information is displayed on the screen
* (so need to redisplay if tag changes). */
@@ -466,15 +466,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 +697,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: