summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkMessage.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index b720835..213f92d 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -39,7 +39,7 @@ typedef struct {
*/
char *string; /* String displayed in message. */
- int numChars; /* Number of characters in string, not
+ Tcl_Size numChars; /* Number of characters in string, not
* including terminating NULL. */
char *textVarName; /* Name of variable (malloc'ed) or NULL.
* If non-NULL, message displays the contents
@@ -86,6 +86,11 @@ typedef struct {
* scripts. Malloc'ed, but may be NULL. */
int flags; /* Various flags; see below for
* definitions. */
+ Tcl_Obj *borderWidthObj; /* Width of border. */
+ Tcl_Obj *highlightWidthObj; /* Width in pixels of highlight to draw
+ * around widget when it has the focus. <= 0 means don't draw a highlight. */
+ Tcl_Obj *widthObj; /* User-requested width, in pixels. 0 means
+ * compute width using aspect ratio. */
} Message;
/*
@@ -120,7 +125,7 @@ static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL,
0, TCL_INDEX_NONE, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_MESSAGE_BORDER_WIDTH, TCL_INDEX_NONE,
+ DEF_MESSAGE_BORDER_WIDTH, offsetof(Message, borderWidthObj),
offsetof(Message, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
DEF_MESSAGE_CURSOR, TCL_INDEX_NONE, offsetof(Message, cursor),
@@ -138,7 +143,7 @@ static const Tk_OptionSpec optionSpecs[] = {
DEF_MESSAGE_HIGHLIGHT, TCL_INDEX_NONE, offsetof(Message, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_MESSAGE_HIGHLIGHT_WIDTH, TCL_INDEX_NONE,
+ "HighlightThickness", DEF_MESSAGE_HIGHLIGHT_WIDTH, offsetof(Message, highlightWidthObj),
offsetof(Message, highlightWidth), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
DEF_MESSAGE_JUSTIFY, TCL_INDEX_NONE, offsetof(Message, justify), TK_OPTION_ENUM_VAR, 0, 0},
@@ -159,7 +164,7 @@ static const Tk_OptionSpec optionSpecs[] = {
DEF_MESSAGE_TEXT_VARIABLE, TCL_INDEX_NONE, offsetof(Message, textVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_MESSAGE_WIDTH, TCL_INDEX_NONE, offsetof(Message, width), 0, 0 ,0},
+ DEF_MESSAGE_WIDTH, offsetof(Message, widthObj), offsetof(Message, width), 0, 0 ,0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};