summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-11 13:03:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-11 13:03:30 (GMT)
commitf734823e12648903b16fe8b38bb9ee48454ad6a4 (patch)
tree610a619c6f3cba3910a5070cd03883f9bef99649 /generic
parent4965fa07310bf1b153dcb200719fc1c4aaded61c (diff)
downloadtk-f734823e12648903b16fe8b38bb9ee48454ad6a4.zip
tk-f734823e12648903b16fe8b38bb9ee48454ad6a4.tar.gz
tk-f734823e12648903b16fe8b38bb9ee48454ad6a4.tar.bz2
Eliminate More C++-related warnings, when compiling against Tcl 9.0 headers.
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h10
-rw-r--r--generic/tkBusy.c2
-rw-r--r--generic/tkButton.c260
-rw-r--r--generic/tkEntry.c202
-rw-r--r--generic/tkFrame.c78
-rw-r--r--generic/tkListbox.c72
-rw-r--r--generic/tkMenu.c108
-rw-r--r--generic/tkMenubutton.c66
-rw-r--r--generic/tkMessage.c38
-rw-r--r--generic/tkPanedWindow.c46
-rw-r--r--generic/tkPlace.c12
-rw-r--r--generic/tkScale.c68
-rw-r--r--generic/tkSquare.c22
-rw-r--r--generic/tkTest.c92
-rw-r--r--generic/tkText.c86
-rw-r--r--generic/tkTextImage.c10
-rw-r--r--generic/tkTextTag.c52
-rw-r--r--generic/tkTextWind.c12
-rw-r--r--generic/ttk/ttkButton.c56
-rw-r--r--generic/ttk/ttkEntry.c50
-rw-r--r--generic/ttk/ttkFrame.c18
-rw-r--r--generic/ttk/ttkInit.c6
-rw-r--r--generic/ttk/ttkNotebook.c20
-rw-r--r--generic/ttk/ttkPanedwindow.c8
-rw-r--r--generic/ttk/ttkProgress.c24
-rw-r--r--generic/ttk/ttkScale.c14
-rw-r--r--generic/ttk/ttkScrollbar.c2
-rw-r--r--generic/ttk/ttkSquare.c14
-rw-r--r--generic/ttk/ttkTreeview.c66
-rw-r--r--generic/ttk/ttkWidget.h6
30 files changed, 760 insertions, 760 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 09fab52..26a63c9 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -196,16 +196,16 @@ typedef struct Tk_OptionSpec {
* holds the value of this option, specified
* as an offset in bytes from the start of the
* record. Use the offsetof macro to generate
- * values for this. -1 means don't store the
- * Tcl_Obj in the record. */
+ * values for this. TCL_AUTO_LENGTH means don't
+ * store the Tcl_Obj in the record. */
size_t internalOffset; /* Where in record to store the internal
* representation of the value of this option,
* such as an int or XColor *. This field is
* specified as an offset in bytes from the
* start of the record. Use the offsetof
- * macro to generate values for it. -1 means
- * don't store the internal representation in
- * the record. */
+ * macro to generate values for it.
+ * TCL_AUTO_LENGTH means don't store the
+ * internal representation in the record. */
#else
int objOffset;
int internalOffset;
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index d1f2696..ae11374 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -23,7 +23,7 @@
static const Tk_OptionSpec busyOptionSpecs[] = {
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUSY_CURSOR, -1, offsetof(Busy, cursor),
+ DEF_BUSY_CURSOR, TCL_AUTO_LENGTH, offsetof(Busy, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
diff --git a/generic/tkButton.c b/generic/tkButton.c
index b9049a7..e98f54c 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -70,60 +70,60 @@ char tkDefLabelPady[TCL_INTEGER_SPACE] = DEF_LABCHKRAD_PADY;
static const Tk_OptionSpec labelOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_BUTTON_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
+ DEF_BUTTON_ACTIVE_FG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, TCL_AUTO_LENGTH, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, TCL_AUTO_LENGTH, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, TCL_AUTO_LENGTH, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
+ DEF_BUTTON_CURSOR, TCL_AUTO_LENGTH, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ TCL_AUTO_LENGTH, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, TCL_AUTO_LENGTH, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_BUTTON_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
+ DEF_BUTTON_FG, TCL_AUTO_LENGTH, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, offsetof(TkButton, highlightBorder), 0,
+ TCL_AUTO_LENGTH, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefLabelHighlightWidth,
offsetof(TkButton, highlightWidthPtr),
offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, TCL_AUTO_LENGTH, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
tkDefLabelPadx, offsetof(TkButton, padXPtr),
offsetof(TkButton, padX), 0, 0, 0},
@@ -131,22 +131,22 @@ static const Tk_OptionSpec labelOptionSpecs[] = {
tkDefLabelPady, offsetof(TkButton, padYPtr),
offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABCHKRAD_RELIEF, -1, offsetof(TkButton, relief), 0, 0, 0},
+ DEF_LABCHKRAD_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, relief), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
+ DEF_BUTTON_STATE, TCL_AUTO_LENGTH, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_LABEL_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
+ DEF_LABEL_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, TCL_AUTO_LENGTH, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
offsetof(TkButton, wrapLength), 0, 0, 0},
@@ -155,68 +155,68 @@ static const Tk_OptionSpec labelOptionSpecs[] = {
static const Tk_OptionSpec buttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_BUTTON_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
+ DEF_BUTTON_ACTIVE_FG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, TCL_AUTO_LENGTH, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, TCL_AUTO_LENGTH, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), -1,
+ DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, TCL_AUTO_LENGTH, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
+ DEF_BUTTON_CURSOR, TCL_AUTO_LENGTH, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-default", "default", "Default",
- DEF_BUTTON_DEFAULT, -1, offsetof(TkButton, defaultState),
+ DEF_BUTTON_DEFAULT, TCL_AUTO_LENGTH, offsetof(TkButton, defaultState),
0, defaultStrings, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ TCL_AUTO_LENGTH, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, TCL_AUTO_LENGTH, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_BUTTON_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
+ DEF_BUTTON_FG, TCL_AUTO_LENGTH, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, offsetof(TkButton, highlightBorder), 0,
+ TCL_AUTO_LENGTH, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefButtonHighlightWidth,
offsetof(TkButton, highlightWidthPtr),
offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, TCL_AUTO_LENGTH, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-overrelief", "overRelief", "OverRelief",
- DEF_BUTTON_OVER_RELIEF, -1, offsetof(TkButton, overRelief),
+ DEF_BUTTON_OVER_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, overRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
tkDefButtonPadx, offsetof(TkButton, padXPtr),
@@ -225,104 +225,104 @@ static const Tk_OptionSpec buttonOptionSpecs[] = {
tkDefButtonPady, offsetof(TkButton, padYPtr),
offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_BUTTON_RELIEF, -1, offsetof(TkButton, relief),
+ DEF_BUTTON_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, relief),
0, 0, 0},
{TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_BUTTON_REPEAT_DELAY, -1, offsetof(TkButton, repeatDelay),
+ DEF_BUTTON_REPEAT_DELAY, TCL_AUTO_LENGTH, offsetof(TkButton, repeatDelay),
0, 0, 0},
{TK_OPTION_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- DEF_BUTTON_REPEAT_INTERVAL, -1, offsetof(TkButton, repeatInterval),
+ DEF_BUTTON_REPEAT_INTERVAL, TCL_AUTO_LENGTH, offsetof(TkButton, repeatInterval),
0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
+ DEF_BUTTON_STATE, TCL_AUTO_LENGTH, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
+ DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, TCL_AUTO_LENGTH, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
offsetof(TkButton, wrapLength), 0, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
static const Tk_OptionSpec checkbuttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_CHKRAD_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
+ DEF_CHKRAD_ACTIVE_FG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, TCL_AUTO_LENGTH, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, TCL_AUTO_LENGTH, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), -1,
+ DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, TCL_AUTO_LENGTH, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
+ DEF_BUTTON_CURSOR, TCL_AUTO_LENGTH, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ TCL_AUTO_LENGTH, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, TCL_AUTO_LENGTH, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_CHKRAD_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
+ DEF_CHKRAD_FG, TCL_AUTO_LENGTH, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, offsetof(TkButton, highlightBorder), 0,
+ TCL_AUTO_LENGTH, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefButtonHighlightWidth,
offsetof(TkButton, highlightWidthPtr),
offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_BUTTON_INDICATOR, -1, offsetof(TkButton, indicatorOn), 0, 0, 0},
+ DEF_BUTTON_INDICATOR, TCL_AUTO_LENGTH, offsetof(TkButton, indicatorOn), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, TCL_AUTO_LENGTH, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-offrelief", "offRelief", "OffRelief",
- DEF_BUTTON_RELIEF, -1, offsetof(TkButton, offRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, offRelief), 0, 0, 0},
{TK_OPTION_STRING, "-offvalue", "offValue", "Value",
- DEF_BUTTON_OFF_VALUE, offsetof(TkButton, offValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_OFF_VALUE, offsetof(TkButton, offValuePtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_STRING, "-onvalue", "onValue", "Value",
- DEF_BUTTON_ON_VALUE, offsetof(TkButton, onValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_ON_VALUE, offsetof(TkButton, onValuePtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_RELIEF, "-overrelief", "overRelief", "OverRelief",
- DEF_BUTTON_OVER_RELIEF, -1, offsetof(TkButton, overRelief),
+ DEF_BUTTON_OVER_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, overRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
tkDefLabelPadx, offsetof(TkButton, padXPtr),
@@ -331,108 +331,108 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = {
tkDefLabelPady, offsetof(TkButton, padYPtr),
offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABCHKRAD_RELIEF, -1, offsetof(TkButton, relief), 0, 0, 0},
+ DEF_LABCHKRAD_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background",
- DEF_BUTTON_SELECT_COLOR, -1, offsetof(TkButton, selectBorder),
+ DEF_BUTTON_SELECT_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, selectBorder),
TK_OPTION_NULL_OK, DEF_BUTTON_SELECT_MONO, 0},
{TK_OPTION_STRING, "-selectimage", "selectImage", "SelectImage",
- DEF_BUTTON_SELECT_IMAGE, offsetof(TkButton, selectImagePtr), -1,
+ DEF_BUTTON_SELECT_IMAGE, offsetof(TkButton, selectImagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
+ DEF_BUTTON_STATE, TCL_AUTO_LENGTH, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
+ DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristateimage", "tristateImage", "TristateImage",
- DEF_BUTTON_IMAGE, offsetof(TkButton, tristateImagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, tristateImagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue",
- DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, TCL_AUTO_LENGTH, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- DEF_CHECKBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), -1,
+ DEF_CHECKBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
offsetof(TkButton, wrapLength), 0, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
static const Tk_OptionSpec radiobuttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_CHKRAD_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
+ DEF_CHKRAD_ACTIVE_FG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, TCL_AUTO_LENGTH, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, TCL_AUTO_LENGTH, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), -1,
+ DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, TCL_AUTO_LENGTH, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
+ DEF_BUTTON_CURSOR, TCL_AUTO_LENGTH, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ TCL_AUTO_LENGTH, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, TCL_AUTO_LENGTH, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_CHKRAD_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
+ DEF_CHKRAD_FG, TCL_AUTO_LENGTH, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, offsetof(TkButton, highlightBorder), 0,
+ TCL_AUTO_LENGTH, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefButtonHighlightWidth,
offsetof(TkButton, highlightWidthPtr),
offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_BUTTON_INDICATOR, -1, offsetof(TkButton, indicatorOn),
+ DEF_BUTTON_INDICATOR, TCL_AUTO_LENGTH, offsetof(TkButton, indicatorOn),
0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, TCL_AUTO_LENGTH, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-offrelief", "offRelief", "OffRelief",
- DEF_BUTTON_RELIEF, -1, offsetof(TkButton, offRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, offRelief), 0, 0, 0},
{TK_OPTION_RELIEF, "-overrelief", "overRelief", "OverRelief",
- DEF_BUTTON_OVER_RELIEF, -1, offsetof(TkButton, overRelief),
+ DEF_BUTTON_OVER_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, overRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
tkDefLabelPadx, offsetof(TkButton, padXPtr),
@@ -441,42 +441,42 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = {
tkDefLabelPady, offsetof(TkButton, padYPtr),
offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABCHKRAD_RELIEF, -1, offsetof(TkButton, relief), 0, 0, 0},
+ DEF_LABCHKRAD_RELIEF, TCL_AUTO_LENGTH, offsetof(TkButton, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background",
- DEF_BUTTON_SELECT_COLOR, -1, offsetof(TkButton, selectBorder),
+ DEF_BUTTON_SELECT_COLOR, TCL_AUTO_LENGTH, offsetof(TkButton, selectBorder),
TK_OPTION_NULL_OK, DEF_BUTTON_SELECT_MONO, 0},
{TK_OPTION_STRING, "-selectimage", "selectImage", "SelectImage",
- DEF_BUTTON_SELECT_IMAGE, offsetof(TkButton, selectImagePtr), -1,
+ DEF_BUTTON_SELECT_IMAGE, offsetof(TkButton, selectImagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
+ DEF_BUTTON_STATE, TCL_AUTO_LENGTH, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
+ DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristateimage", "tristateImage", "TristateImage",
- DEF_BUTTON_IMAGE, offsetof(TkButton, tristateImagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, tristateImagePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue",
- DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, TCL_AUTO_LENGTH, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-value", "value", "Value",
- DEF_BUTTON_VALUE, offsetof(TkButton, onValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_VALUE, offsetof(TkButton, onValuePtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- DEF_RADIOBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), -1,
+ DEF_RADIOBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), TCL_AUTO_LENGTH,
0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
offsetof(TkButton, wrapLength), 0, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
/*
@@ -1127,7 +1127,7 @@ ConfigureButton(
if (butPtr->selVarNamePtr == NULL) {
butPtr->selVarNamePtr = Tcl_NewStringObj(
- Tk_Name(butPtr->tkwin), -1);
+ Tk_Name(butPtr->tkwin), TCL_AUTO_LENGTH);
Tcl_IncrRefCount(butPtr->selVarNamePtr);
}
namePtr = butPtr->selVarNamePtr;
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 86799d9..e203811 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -63,108 +63,108 @@ enum validateType {
static const Tk_OptionSpec entryOptSpec[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_ENTRY_BG_COLOR, -1, offsetof(Entry, normalBorder),
+ DEF_ENTRY_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Entry, normalBorder),
0, DEF_ENTRY_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_ENTRY_BORDER_WIDTH, -1, offsetof(Entry, borderWidth), 0, 0, 0},
+ DEF_ENTRY_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Entry, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_ENTRY_CURSOR, -1, offsetof(Entry, cursor),
+ DEF_ENTRY_CURSOR, TCL_AUTO_LENGTH, offsetof(Entry, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BORDER, "-disabledbackground", "disabledBackground",
- "DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, -1,
+ "DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, disabledBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_DISABLED_BG_MONO, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
- "DisabledForeground", DEF_ENTRY_DISABLED_FG, -1,
+ "DisabledForeground", DEF_ENTRY_DISABLED_FG, TCL_AUTO_LENGTH,
offsetof(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
- "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, -1,
+ "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, TCL_AUTO_LENGTH,
offsetof(Entry, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_ENTRY_FONT, -1, offsetof(Entry, tkfont), 0, 0, 0},
+ DEF_ENTRY_FONT, TCL_AUTO_LENGTH, offsetof(Entry, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_ENTRY_FG, -1, offsetof(Entry, fgColorPtr), 0, 0, 0},
+ DEF_ENTRY_FG, TCL_AUTO_LENGTH, offsetof(Entry, fgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG,
- -1, offsetof(Entry, highlightBgColorPtr), 0, 0, 0},
+ TCL_AUTO_LENGTH, offsetof(Entry, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_ENTRY_HIGHLIGHT, -1, offsetof(Entry, highlightColorPtr), 0, 0, 0},
+ DEF_ENTRY_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(Entry, highlightColorPtr), 0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, -1,
+ "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH,
offsetof(Entry, highlightWidth), 0, 0, 0},
{TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground",
- DEF_ENTRY_INSERT_BG, -1, offsetof(Entry, insertBorder), 0, 0, 0},
+ DEF_ENTRY_INSERT_BG, TCL_AUTO_LENGTH, offsetof(Entry, insertBorder), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth",
- "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, -1,
+ "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, insertBorderWidth), 0,
(ClientData) DEF_ENTRY_INSERT_BD_MONO, 0},
{TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime",
- DEF_ENTRY_INSERT_OFF_TIME, -1, offsetof(Entry, insertOffTime),
+ DEF_ENTRY_INSERT_OFF_TIME, TCL_AUTO_LENGTH, offsetof(Entry, insertOffTime),
0, 0, 0},
{TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime",
- DEF_ENTRY_INSERT_ON_TIME, -1, offsetof(Entry, insertOnTime), 0, 0, 0},
+ DEF_ENTRY_INSERT_ON_TIME, TCL_AUTO_LENGTH, offsetof(Entry, insertOnTime), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth",
- DEF_ENTRY_INSERT_WIDTH, -1, offsetof(Entry, insertWidth), 0, 0, 0},
+ DEF_ENTRY_INSERT_WIDTH, TCL_AUTO_LENGTH, offsetof(Entry, insertWidth), 0, 0, 0},
{TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand",
- DEF_ENTRY_INVALIDCMD, -1, offsetof(Entry, invalidCmd),
+ DEF_ENTRY_INVALIDCMD, TCL_AUTO_LENGTH, offsetof(Entry, invalidCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-invcmd", NULL, NULL,
- NULL, 0, -1, 0, "-invalidcommand", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-invalidcommand", 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_ENTRY_JUSTIFY, -1, offsetof(Entry, justify), 0, 0, 0},
+ DEF_ENTRY_JUSTIFY, TCL_AUTO_LENGTH, offsetof(Entry, justify), 0, 0, 0},
{TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder",
- DEF_ENTRY_PLACEHOLDER, -1, offsetof(Entry, placeholderString),
+ DEF_ENTRY_PLACEHOLDER, TCL_AUTO_LENGTH, offsetof(Entry, placeholderString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground",
- "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, -1,
+ "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, TCL_AUTO_LENGTH,
offsetof(Entry, placeholderColorPtr), 0, 0, 0},
{TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground",
- "ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, -1,
+ "ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, readonlyBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_READONLY_BG_MONO, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_ENTRY_RELIEF, -1, offsetof(Entry, relief), 0, 0, 0},
+ DEF_ENTRY_RELIEF, TCL_AUTO_LENGTH, offsetof(Entry, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_ENTRY_SELECT_COLOR, -1, offsetof(Entry, selBorder),
+ DEF_ENTRY_SELECT_COLOR, TCL_AUTO_LENGTH, offsetof(Entry, selBorder),
0, DEF_ENTRY_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
- "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, -1,
+ "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, selBorderWidth),
0, DEF_ENTRY_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_ENTRY_SELECT_FG_COLOR, -1, offsetof(Entry, selFgColorPtr),
+ DEF_ENTRY_SELECT_FG_COLOR, TCL_AUTO_LENGTH, offsetof(Entry, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0},
{TK_OPTION_STRING, "-show", "show", "Show",
- DEF_ENTRY_SHOW, -1, offsetof(Entry, showChar),
+ DEF_ENTRY_SHOW, TCL_AUTO_LENGTH, offsetof(Entry, showChar),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_ENTRY_STATE, -1, offsetof(Entry, state),
+ DEF_ENTRY_STATE, TCL_AUTO_LENGTH, offsetof(Entry, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_ENTRY_TAKE_FOCUS, -1, offsetof(Entry, takeFocus),
+ DEF_ENTRY_TAKE_FOCUS, TCL_AUTO_LENGTH, offsetof(Entry, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_ENTRY_TEXT_VARIABLE, -1, offsetof(Entry, textVarName),
+ DEF_ENTRY_TEXT_VARIABLE, TCL_AUTO_LENGTH, offsetof(Entry, textVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate",
- DEF_ENTRY_VALIDATE, -1, offsetof(Entry, validate),
+ DEF_ENTRY_VALIDATE, TCL_AUTO_LENGTH, offsetof(Entry, validate),
0, validateStrings, 0},
{TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand",
- NULL, -1, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-vcmd", NULL, NULL,
- NULL, 0, -1, 0, "-validatecommand", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-validatecommand", 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_ENTRY_WIDTH, -1, offsetof(Entry, prefWidth), 0, 0, 0},
+ DEF_ENTRY_WIDTH, TCL_AUTO_LENGTH, offsetof(Entry, prefWidth), 0, 0, 0},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_ENTRY_SCROLL_COMMAND, -1, offsetof(Entry, scrollCmd),
+ DEF_ENTRY_SCROLL_COMMAND, TCL_AUTO_LENGTH, offsetof(Entry, scrollCmd),
TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
/*
@@ -186,141 +186,141 @@ static const Tk_OptionSpec entryOptSpec[] = {
static const Tk_OptionSpec sbOptSpec[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Background",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(Spinbox, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Spinbox, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_ENTRY_BG_COLOR, -1, offsetof(Entry, normalBorder),
+ DEF_ENTRY_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Entry, normalBorder),
0, DEF_ENTRY_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_ENTRY_BORDER_WIDTH, -1, offsetof(Entry, borderWidth), 0, 0, 0},
+ DEF_ENTRY_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Entry, borderWidth), 0, 0, 0},
{TK_OPTION_BORDER, "-buttonbackground", "buttonBackground", "Background",
- DEF_BUTTON_BG_COLOR, -1, offsetof(Spinbox, buttonBorder),
+ DEF_BUTTON_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Spinbox, buttonBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_CURSOR, "-buttoncursor", "buttonCursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, offsetof(Spinbox, bCursor),
+ DEF_BUTTON_CURSOR, TCL_AUTO_LENGTH, offsetof(Spinbox, bCursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-buttondownrelief", "buttonDownRelief", "Relief",
- DEF_BUTTON_RELIEF, -1, offsetof(Spinbox, bdRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, TCL_AUTO_LENGTH, offsetof(Spinbox, bdRelief), 0, 0, 0},
{TK_OPTION_RELIEF, "-buttonuprelief", "buttonUpRelief", "Relief",
- DEF_BUTTON_RELIEF, -1, offsetof(Spinbox, buRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, TCL_AUTO_LENGTH, offsetof(Spinbox, buRelief), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_SPINBOX_CMD, -1, offsetof(Spinbox, command),
+ DEF_SPINBOX_CMD, TCL_AUTO_LENGTH, offsetof(Spinbox, command),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_ENTRY_CURSOR, -1, offsetof(Entry, cursor),
+ DEF_ENTRY_CURSOR, TCL_AUTO_LENGTH, offsetof(Entry, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BORDER, "-disabledbackground", "disabledBackground",
- "DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, -1,
+ "DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, disabledBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_DISABLED_BG_MONO, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
- "DisabledForeground", DEF_ENTRY_DISABLED_FG, -1,
+ "DisabledForeground", DEF_ENTRY_DISABLED_FG, TCL_AUTO_LENGTH,
offsetof(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
- "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, -1,
+ "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, TCL_AUTO_LENGTH,
offsetof(Entry, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_ENTRY_FONT, -1, offsetof(Entry, tkfont), 0, 0, 0},
+ DEF_ENTRY_FONT, TCL_AUTO_LENGTH, offsetof(Entry, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_ENTRY_FG, -1, offsetof(Entry, fgColorPtr), 0, 0, 0},
+ DEF_ENTRY_FG, TCL_AUTO_LENGTH, offsetof(Entry, fgColorPtr), 0, 0, 0},
{TK_OPTION_STRING, "-format", "format", "Format",
- DEF_SPINBOX_FORMAT, -1, offsetof(Spinbox, reqFormat),
+ DEF_SPINBOX_FORMAT, TCL_AUTO_LENGTH, offsetof(Spinbox, reqFormat),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-from", "from", "From",
- DEF_SPINBOX_FROM, -1, offsetof(Spinbox, fromValue), 0, 0, 0},
+ DEF_SPINBOX_FROM, TCL_AUTO_LENGTH, offsetof(Spinbox, fromValue), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG,
- -1, offsetof(Entry, highlightBgColorPtr), 0, 0, 0},
+ TCL_AUTO_LENGTH, offsetof(Entry, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_ENTRY_HIGHLIGHT, -1, offsetof(Entry, highlightColorPtr), 0, 0, 0},
+ DEF_ENTRY_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(Entry, highlightColorPtr), 0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, -1,
+ "HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH,
offsetof(Entry, highlightWidth), 0, 0, 0},
{TK_OPTION_DOUBLE, "-increment", "increment", "Increment",
- DEF_SPINBOX_INCREMENT, -1, offsetof(Spinbox, increment), 0, 0, 0},
+ DEF_SPINBOX_INCREMENT, TCL_AUTO_LENGTH, offsetof(Spinbox, increment), 0, 0, 0},
{TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground",
- DEF_ENTRY_INSERT_BG, -1, offsetof(Entry, insertBorder), 0, 0, 0},
+ DEF_ENTRY_INSERT_BG, TCL_AUTO_LENGTH, offsetof(Entry, insertBorder), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth",
- "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, -1,
+ "BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, insertBorderWidth), 0,
(ClientData) DEF_ENTRY_INSERT_BD_MONO, 0},
{TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime",
- DEF_ENTRY_INSERT_OFF_TIME, -1, offsetof(Entry, insertOffTime),
+ DEF_ENTRY_INSERT_OFF_TIME, TCL_AUTO_LENGTH, offsetof(Entry, insertOffTime),
0, 0, 0},
{TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime",
- DEF_ENTRY_INSERT_ON_TIME, -1, offsetof(Entry, insertOnTime), 0, 0, 0},
+ DEF_ENTRY_INSERT_ON_TIME, TCL_AUTO_LENGTH, offsetof(Entry, insertOnTime), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth",
- DEF_ENTRY_INSERT_WIDTH, -1, offsetof(Entry, insertWidth), 0, 0, 0},
+ DEF_ENTRY_INSERT_WIDTH, TCL_AUTO_LENGTH, offsetof(Entry, insertWidth), 0, 0, 0},
{TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand",
- DEF_ENTRY_INVALIDCMD, -1, offsetof(Entry, invalidCmd),
+ DEF_ENTRY_INVALIDCMD, TCL_AUTO_LENGTH, offsetof(Entry, invalidCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-invcmd", NULL, NULL,
- NULL, 0, -1, 0, "-invalidcommand", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-invalidcommand", 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_ENTRY_JUSTIFY, -1, offsetof(Entry, justify), 0, 0, 0},
+ DEF_ENTRY_JUSTIFY, TCL_AUTO_LENGTH, offsetof(Entry, justify), 0, 0, 0},
{TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder",
- DEF_ENTRY_PLACEHOLDER, -1, offsetof(Entry, placeholderString),
+ DEF_ENTRY_PLACEHOLDER, TCL_AUTO_LENGTH, offsetof(Entry, placeholderString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground",
- "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, -1,
+ "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, TCL_AUTO_LENGTH,
offsetof(Entry, placeholderColorPtr), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_ENTRY_RELIEF, -1, offsetof(Entry, relief), 0, 0, 0},
+ DEF_ENTRY_RELIEF, TCL_AUTO_LENGTH, offsetof(Entry, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground",
- "ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, -1,
+ "ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, readonlyBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_READONLY_BG_MONO, 0},
{TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_SPINBOX_REPEAT_DELAY, -1, offsetof(Spinbox, repeatDelay),
+ DEF_SPINBOX_REPEAT_DELAY, TCL_AUTO_LENGTH, offsetof(Spinbox, repeatDelay),
0, 0, 0},
{TK_OPTION_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- DEF_SPINBOX_REPEAT_INTERVAL, -1, offsetof(Spinbox, repeatInterval),
+ DEF_SPINBOX_REPEAT_INTERVAL, TCL_AUTO_LENGTH, offsetof(Spinbox, repeatInterval),
0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_ENTRY_SELECT_COLOR, -1, offsetof(Entry, selBorder),
+ DEF_ENTRY_SELECT_COLOR, TCL_AUTO_LENGTH, offsetof(Entry, selBorder),
0, DEF_ENTRY_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
- "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, -1,
+ "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, TCL_AUTO_LENGTH,
offsetof(Entry, selBorderWidth),
0, DEF_ENTRY_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_ENTRY_SELECT_FG_COLOR, -1, offsetof(Entry, selFgColorPtr),
+ DEF_ENTRY_SELECT_FG_COLOR, TCL_AUTO_LENGTH, offsetof(Entry, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_ENTRY_STATE, -1, offsetof(Entry, state),
+ DEF_ENTRY_STATE, TCL_AUTO_LENGTH, offsetof(Entry, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_ENTRY_TAKE_FOCUS, -1, offsetof(Entry, takeFocus),
+ DEF_ENTRY_TAKE_FOCUS, TCL_AUTO_LENGTH, offsetof(Entry, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_ENTRY_TEXT_VARIABLE, -1, offsetof(Entry, textVarName),
+ DEF_ENTRY_TEXT_VARIABLE, TCL_AUTO_LENGTH, offsetof(Entry, textVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To",
- DEF_SPINBOX_TO, -1, offsetof(Spinbox, toValue), 0, 0, 0},
+ DEF_SPINBOX_TO, TCL_AUTO_LENGTH, offsetof(Spinbox, toValue), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate",
- DEF_ENTRY_VALIDATE, -1, offsetof(Entry, validate),
+ DEF_ENTRY_VALIDATE, TCL_AUTO_LENGTH, offsetof(Entry, validate),
0, validateStrings, 0},
{TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand",
- NULL, -1, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-values", "values", "Values",
- DEF_SPINBOX_VALUES, -1, offsetof(Spinbox, valueStr),
+ DEF_SPINBOX_VALUES, TCL_AUTO_LENGTH, offsetof(Spinbox, valueStr),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-vcmd", NULL, NULL,
- NULL, 0, -1, 0, "-validatecommand", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-validatecommand", 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_ENTRY_WIDTH, -1, offsetof(Entry, prefWidth), 0, 0, 0},
+ DEF_ENTRY_WIDTH, TCL_AUTO_LENGTH, offsetof(Entry, prefWidth), 0, 0, 0},
{TK_OPTION_BOOLEAN, "-wrap", "wrap", "Wrap",
- DEF_SPINBOX_WRAP, -1, offsetof(Spinbox, wrap), 0, 0, 0},
+ DEF_SPINBOX_WRAP, TCL_AUTO_LENGTH, offsetof(Spinbox, wrap), 0, 0, 0},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_ENTRY_SCROLL_COMMAND, -1, offsetof(Entry, scrollCmd),
+ DEF_ENTRY_SCROLL_COMMAND, TCL_AUTO_LENGTH, offsetof(Entry, scrollCmd),
TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
/*
@@ -709,7 +709,7 @@ EntryWidgetObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, NULL);
goto error;
}
- Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->string, -1));
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->string, TCL_AUTO_LENGTH));
break;
case COMMAND_ICURSOR:
@@ -1260,7 +1260,7 @@ ConfigureEntry(
Tcl_Obj *newObjPtr;
int nelems;
- newObjPtr = Tcl_NewStringObj(sbPtr->valueStr, -1);
+ newObjPtr = Tcl_NewStringObj(sbPtr->valueStr, TCL_AUTO_LENGTH);
if (Tcl_ListObjLength(interp, newObjPtr, &nelems)
!= TCL_OK) {
valuesChanged = -1;
@@ -2174,7 +2174,7 @@ InsertChars(
*/
oldChars = entryPtr->numChars;
- entryPtr->numChars = Tcl_NumUtfChars(newStr, -1);
+ entryPtr->numChars = Tcl_NumUtfChars(newStr, TCL_AUTO_LENGTH);
charsAdded = entryPtr->numChars - oldChars;
entryPtr->numBytes += byteCount;
@@ -3092,12 +3092,12 @@ EntryUpdateScrollbar(
Tcl_PrintDouble(NULL, first, firstStr);
Tcl_PrintDouble(NULL, last, lastStr);
Tcl_DStringInit(&buf);
- Tcl_DStringAppend(&buf, entryPtr->scrollCmd, -1);
- Tcl_DStringAppend(&buf, " ", -1);
- Tcl_DStringAppend(&buf, firstStr, -1);
- Tcl_DStringAppend(&buf, " ", -1);
- Tcl_DStringAppend(&buf, lastStr, -1);
- code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0);
+ Tcl_DStringAppend(&buf, entryPtr->scrollCmd, TCL_AUTO_LENGTH);
+ Tcl_DStringAppend(&buf, " ", TCL_AUTO_LENGTH);
+ Tcl_DStringAppend(&buf, firstStr, TCL_AUTO_LENGTH);
+ Tcl_DStringAppend(&buf, " ", TCL_AUTO_LENGTH);
+ Tcl_DStringAppend(&buf, lastStr, TCL_AUTO_LENGTH);
+ code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), TCL_AUTO_LENGTH, 0);
Tcl_DStringFree(&buf);
if (code != TCL_OK) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
@@ -3318,7 +3318,7 @@ EntryValidate(
Tcl_Interp *interp = entryPtr->interp;
int code, isOK;
- code = Tcl_EvalEx(interp, cmd, -1, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT);
+ code = Tcl_EvalEx(interp, cmd, TCL_AUTO_LENGTH, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT);
/*
* We accept TCL_OK and TCL_RETURN as valid return codes from the command
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 8c5ab4c..81f1f2c 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -184,32 +184,32 @@ static const char *const labelAnchorStrings[] = {
static const Tk_OptionSpec commonOptSpec[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_FRAME_BG_COLOR, -1, offsetof(Frame, border),
+ DEF_FRAME_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Frame, border),
TK_OPTION_NULL_OK, DEF_FRAME_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_STRING, "-colormap", "colormap", "Colormap",
- DEF_FRAME_COLORMAP, -1, offsetof(Frame, colormapName),
+ DEF_FRAME_COLORMAP, TCL_AUTO_LENGTH, offsetof(Frame, colormapName),
TK_OPTION_NULL_OK, 0, 0},
/*
* Having -container is useless in a labelframe since a container has
* no border. It should be deprecated.
*/
{TK_OPTION_BOOLEAN, "-container", "container", "Container",
- DEF_FRAME_CONTAINER, -1, offsetof(Frame, isContainer), 0, 0, 0},
+ DEF_FRAME_CONTAINER, TCL_AUTO_LENGTH, offsetof(Frame, isContainer), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_FRAME_CURSOR, -1, offsetof(Frame, cursor),
+ DEF_FRAME_CURSOR, TCL_AUTO_LENGTH, offsetof(Frame, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-height", "height", "Height",
- DEF_FRAME_HEIGHT, -1, offsetof(Frame, height), 0, 0, 0},
+ DEF_FRAME_HEIGHT, TCL_AUTO_LENGTH, offsetof(Frame, height), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
- "HighlightBackground", DEF_FRAME_HIGHLIGHT_BG, -1,
+ "HighlightBackground", DEF_FRAME_HIGHLIGHT_BG, TCL_AUTO_LENGTH,
offsetof(Frame, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_FRAME_HIGHLIGHT, -1, offsetof(Frame, highlightColorPtr),
+ DEF_FRAME_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(Frame, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, -1,
+ "HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH,
offsetof(Frame, highlightWidth), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
DEF_FRAME_PADX, offsetof(Frame, padXPtr),
@@ -218,60 +218,60 @@ static const Tk_OptionSpec commonOptSpec[] = {
DEF_FRAME_PADY, offsetof(Frame, padYPtr),
offsetof(Frame, padY), 0, 0, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_FRAME_TAKE_FOCUS, -1, offsetof(Frame, takeFocus),
+ DEF_FRAME_TAKE_FOCUS, TCL_AUTO_LENGTH, offsetof(Frame, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-visual", "visual", "Visual",
- DEF_FRAME_VISUAL, -1, offsetof(Frame, visualName),
+ DEF_FRAME_VISUAL, TCL_AUTO_LENGTH, offsetof(Frame, visualName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_FRAME_WIDTH, -1, offsetof(Frame, width), 0, 0, 0},
+ DEF_FRAME_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, width), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
static const Tk_OptionSpec frameOptSpec[] = {
{TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage",
- DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), -1,
+ DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bgimg", NULL, NULL,
- NULL, 0, -1, 0, "-backgroundimage", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-backgroundimage", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_FRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth), 0, 0, 0},
+ DEF_FRAME_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-class", "class", "Class",
- DEF_FRAME_CLASS, -1, offsetof(Frame, className), 0, 0, 0},
+ DEF_FRAME_CLASS, TCL_AUTO_LENGTH, offsetof(Frame, className), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_FRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0},
+ DEF_FRAME_RELIEF, TCL_AUTO_LENGTH, offsetof(Frame, relief), 0, 0, 0},
{TK_OPTION_BOOLEAN, "-tile", "tile", "Tile",
- DEF_FRAME_BG_TILE, -1, offsetof(Frame, tile), 0, 0, 0},
+ DEF_FRAME_BG_TILE, TCL_AUTO_LENGTH, offsetof(Frame, tile), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, 0, 0, commonOptSpec, 0}
};
static const Tk_OptionSpec toplevelOptSpec[] = {
{TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage",
- DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), -1,
+ DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bgimg", NULL, NULL,
- NULL, 0, -1, 0, "-backgroundimage", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-backgroundimage", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_FRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth), 0, 0, 0},
+ DEF_FRAME_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-class", "class", "Class",
- DEF_TOPLEVEL_CLASS, -1, offsetof(Frame, className), 0, 0, 0},
+ DEF_TOPLEVEL_CLASS, TCL_AUTO_LENGTH, offsetof(Frame, className), 0, 0, 0},
{TK_OPTION_STRING, "-menu", "menu", "Menu",
- DEF_TOPLEVEL_MENU, -1, offsetof(Frame, menuName),
+ DEF_TOPLEVEL_MENU, TCL_AUTO_LENGTH, offsetof(Frame, menuName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_FRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0},
+ DEF_FRAME_RELIEF, TCL_AUTO_LENGTH, offsetof(Frame, relief), 0, 0, 0},
{TK_OPTION_STRING, "-screen", "screen", "Screen",
- DEF_TOPLEVEL_SCREEN, -1, offsetof(Frame, screenName),
+ DEF_TOPLEVEL_SCREEN, TCL_AUTO_LENGTH, offsetof(Frame, screenName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-tile", "tile", "Tile",
- DEF_FRAME_BG_TILE, -1, offsetof(Frame, tile), 0, 0, 0},
+ DEF_FRAME_BG_TILE, TCL_AUTO_LENGTH, offsetof(Frame, tile), 0, 0, 0},
{TK_OPTION_STRING, "-use", "use", "Use",
- DEF_TOPLEVEL_USE, -1, offsetof(Frame, useThis),
+ DEF_TOPLEVEL_USE, TCL_AUTO_LENGTH, offsetof(Frame, useThis),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, 0, 0, commonOptSpec, 0}
@@ -279,27 +279,27 @@ static const Tk_OptionSpec toplevelOptSpec[] = {
static const Tk_OptionSpec labelframeOptSpec[] = {
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_LABELFRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth),
+ DEF_LABELFRAME_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, borderWidth),
0, 0, 0},
{TK_OPTION_STRING, "-class", "class", "Class",
- DEF_LABELFRAME_CLASS, -1, offsetof(Frame, className), 0, 0, 0},
+ DEF_LABELFRAME_CLASS, TCL_AUTO_LENGTH, offsetof(Frame, className), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_LABELFRAME_FONT, -1, offsetof(Labelframe, tkfont), 0, 0, 0},
+ DEF_LABELFRAME_FONT, TCL_AUTO_LENGTH, offsetof(Labelframe, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_LABELFRAME_FG, -1, offsetof(Labelframe, textColorPtr), 0, 0, 0},
+ DEF_LABELFRAME_FG, TCL_AUTO_LENGTH, offsetof(Labelframe, textColorPtr), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-labelanchor", "labelAnchor", "LabelAnchor",
- DEF_LABELFRAME_LABELANCHOR, -1, offsetof(Labelframe, labelAnchor),
+ DEF_LABELFRAME_LABELANCHOR, TCL_AUTO_LENGTH, offsetof(Labelframe, labelAnchor),
0, labelAnchorStrings, 0},
{TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget",
- NULL, -1, offsetof(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABELFRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0},
+ DEF_LABELFRAME_RELIEF, TCL_AUTO_LENGTH, offsetof(Frame, relief), 0, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_LABELFRAME_TEXT, offsetof(Labelframe, textPtr), -1,
+ DEF_LABELFRAME_TEXT, offsetof(Labelframe, textPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, 0, 0, commonOptSpec, 0}
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 22e49bf..c121acb 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -239,80 +239,80 @@ static const char *const activeStyleStrings[] = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle",
- DEF_LISTBOX_ACTIVE_STYLE, -1, offsetof(Listbox, activeStyle),
+ DEF_LISTBOX_ACTIVE_STYLE, TCL_AUTO_LENGTH, offsetof(Listbox, activeStyle),
0, activeStyleStrings, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_LISTBOX_BG_COLOR, -1, offsetof(Listbox, normalBorder),
+ DEF_LISTBOX_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Listbox, normalBorder),
0, DEF_LISTBOX_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_LISTBOX_BORDER_WIDTH, -1, offsetof(Listbox, borderWidth),
+ DEF_LISTBOX_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Listbox, borderWidth),
0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_LISTBOX_CURSOR, -1, offsetof(Listbox, cursor),
+ DEF_LISTBOX_CURSOR, TCL_AUTO_LENGTH, offsetof(Listbox, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
- "DisabledForeground", DEF_LISTBOX_DISABLED_FG, -1,
+ "DisabledForeground", DEF_LISTBOX_DISABLED_FG, TCL_AUTO_LENGTH,
offsetof(Listbox, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
- "ExportSelection", DEF_LISTBOX_EXPORT_SELECTION, -1,
+ "ExportSelection", DEF_LISTBOX_EXPORT_SELECTION, TCL_AUTO_LENGTH,
offsetof(Listbox, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_LISTBOX_FONT, -1, offsetof(Listbox, tkfont), 0, 0, 0},
+ DEF_LISTBOX_FONT, TCL_AUTO_LENGTH, offsetof(Listbox, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_LISTBOX_FG, -1, offsetof(Listbox, fgColorPtr), 0, 0, 0},
+ DEF_LISTBOX_FG, TCL_AUTO_LENGTH, offsetof(Listbox, fgColorPtr), 0, 0, 0},
{TK_OPTION_INT, "-height", "height", "Height",
- DEF_LISTBOX_HEIGHT, -1, offsetof(Listbox, height), 0, 0, 0},
+ DEF_LISTBOX_HEIGHT, TCL_AUTO_LENGTH, offsetof(Listbox, height), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
- "HighlightBackground", DEF_LISTBOX_HIGHLIGHT_BG, -1,
+ "HighlightBackground", DEF_LISTBOX_HIGHLIGHT_BG, TCL_AUTO_LENGTH,
offsetof(Listbox, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_LISTBOX_HIGHLIGHT, -1, offsetof(Listbox, highlightColorPtr),
+ DEF_LISTBOX_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(Listbox, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_LISTBOX_HIGHLIGHT_WIDTH, -1,
+ "HighlightThickness", DEF_LISTBOX_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH,
offsetof(Listbox, highlightWidth), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_LISTBOX_JUSTIFY, -1, offsetof(Listbox, justify), 0, 0, 0},
+ DEF_LISTBOX_JUSTIFY, TCL_AUTO_LENGTH, offsetof(Listbox, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LISTBOX_RELIEF, -1, offsetof(Listbox, relief), 0, 0, 0},
+ DEF_LISTBOX_RELIEF, TCL_AUTO_LENGTH, offsetof(Listbox, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_LISTBOX_SELECT_COLOR, -1, offsetof(Listbox, selBorder),
+ DEF_LISTBOX_SELECT_COLOR, TCL_AUTO_LENGTH, offsetof(Listbox, selBorder),
0, DEF_LISTBOX_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
- "BorderWidth", DEF_LISTBOX_SELECT_BD, -1,
+ "BorderWidth", DEF_LISTBOX_SELECT_BD, TCL_AUTO_LENGTH,
offsetof(Listbox, selBorderWidth), 0, 0, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_LISTBOX_SELECT_FG_COLOR, -1, offsetof(Listbox, selFgColorPtr),
+ DEF_LISTBOX_SELECT_FG_COLOR, TCL_AUTO_LENGTH, offsetof(Listbox, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_LISTBOX_SELECT_FG_MONO, 0},
{TK_OPTION_STRING, "-selectmode", "selectMode", "SelectMode",
- DEF_LISTBOX_SELECT_MODE, -1, offsetof(Listbox, selectMode),
+ DEF_LISTBOX_SELECT_MODE, TCL_AUTO_LENGTH, offsetof(Listbox, selectMode),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-setgrid", "setGrid", "SetGrid",
- DEF_LISTBOX_SET_GRID, -1, offsetof(Listbox, setGrid), 0, 0, 0},
+ DEF_LISTBOX_SET_GRID, TCL_AUTO_LENGTH, offsetof(Listbox, setGrid), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_LISTBOX_STATE, -1, offsetof(Listbox, state),
+ DEF_LISTBOX_STATE, TCL_AUTO_LENGTH, offsetof(Listbox, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_LISTBOX_TAKE_FOCUS, -1, offsetof(Listbox, takeFocus),
+ DEF_LISTBOX_TAKE_FOCUS, TCL_AUTO_LENGTH, offsetof(Listbox, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_LISTBOX_WIDTH, -1, offsetof(Listbox, width), 0, 0, 0},
+ DEF_LISTBOX_WIDTH, TCL_AUTO_LENGTH, offsetof(Listbox, width), 0, 0, 0},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_LISTBOX_SCROLL_COMMAND, -1, offsetof(Listbox, xScrollCmd),
+ DEF_LISTBOX_SCROLL_COMMAND, TCL_AUTO_LENGTH, offsetof(Listbox, xScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
- DEF_LISTBOX_SCROLL_COMMAND, -1, offsetof(Listbox, yScrollCmd),
+ DEF_LISTBOX_SCROLL_COMMAND, TCL_AUTO_LENGTH, offsetof(Listbox, yScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-listvariable", "listVariable", "Variable",
- DEF_LISTBOX_LIST_VARIABLE, -1, offsetof(Listbox, listVarName),
+ DEF_LISTBOX_LIST_VARIABLE, TCL_AUTO_LENGTH, offsetof(Listbox, listVarName),
TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
/*
@@ -322,25 +322,25 @@ static const Tk_OptionSpec optionSpecs[] = {
static const Tk_OptionSpec itemAttrOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- NULL, -1, offsetof(ItemAttr, border),
+ NULL, TCL_AUTO_LENGTH, offsetof(ItemAttr, border),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
DEF_LISTBOX_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- NULL, -1, offsetof(ItemAttr, fgColor),
+ NULL, TCL_AUTO_LENGTH, offsetof(ItemAttr, fgColor),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- NULL, -1, offsetof(ItemAttr, selBorder),
+ NULL, TCL_AUTO_LENGTH, offsetof(ItemAttr, selBorder),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
DEF_LISTBOX_SELECT_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- NULL, -1, offsetof(ItemAttr, selFgColor),
+ NULL, TCL_AUTO_LENGTH, offsetof(ItemAttr, selFgColor),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
DEF_LISTBOX_SELECT_FG_MONO, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
/*
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 25c4632..7ffa066 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -118,117 +118,117 @@ static const char *const compoundStrings[] = {
static const Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", NULL, NULL,
- DEF_MENU_ENTRY_ACTIVE_BG, offsetof(TkMenuEntry, activeBorderPtr), -1,
+ DEF_MENU_ENTRY_ACTIVE_BG, offsetof(TkMenuEntry, activeBorderPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_COLOR, "-activeforeground", NULL, NULL,
DEF_MENU_ENTRY_ACTIVE_FG,
- offsetof(TkMenuEntry, activeFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, activeFgPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-accelerator", NULL, NULL,
DEF_MENU_ENTRY_ACCELERATOR,
- offsetof(TkMenuEntry, accelPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, accelPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
- offsetof(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, borderPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BITMAP, "-bitmap", NULL, NULL,
DEF_MENU_ENTRY_BITMAP,
- offsetof(TkMenuEntry, bitmapPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, bitmapPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BOOLEAN, "-columnbreak", NULL, NULL,
DEF_MENU_ENTRY_COLUMN_BREAK,
- -1, offsetof(TkMenuEntry, columnBreak), 0, NULL, 0},
+ TCL_AUTO_LENGTH, offsetof(TkMenuEntry, columnBreak), 0, NULL, 0},
{TK_OPTION_STRING, "-command", NULL, NULL,
DEF_MENU_ENTRY_COMMAND,
- offsetof(TkMenuEntry, commandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, commandPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_MENU_ENTRY_COMPOUND, -1, offsetof(TkMenuEntry, compound), 0,
+ DEF_MENU_ENTRY_COMPOUND, TCL_AUTO_LENGTH, offsetof(TkMenuEntry, compound), 0,
(ClientData) compoundStrings, 0},
{TK_OPTION_FONT, "-font", NULL, NULL,
DEF_MENU_ENTRY_FONT,
- offsetof(TkMenuEntry, fontPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, fontPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_COLOR, "-foreground", NULL, NULL,
DEF_MENU_ENTRY_FG,
- offsetof(TkMenuEntry, fgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, fgPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BOOLEAN, "-hidemargin", NULL, NULL,
DEF_MENU_ENTRY_HIDE_MARGIN,
- -1, offsetof(TkMenuEntry, hideMargin), 0, NULL, 0},
+ TCL_AUTO_LENGTH, offsetof(TkMenuEntry, hideMargin), 0, NULL, 0},
{TK_OPTION_STRING, "-image", NULL, NULL,
DEF_MENU_ENTRY_IMAGE,
- offsetof(TkMenuEntry, imagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, imagePtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-label", NULL, NULL,
DEF_MENU_ENTRY_LABEL,
- offsetof(TkMenuEntry, labelPtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, labelPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING_TABLE, "-state", NULL, NULL,
DEF_MENU_ENTRY_STATE,
- -1, offsetof(TkMenuEntry, state), 0,
+ TCL_AUTO_LENGTH, offsetof(TkMenuEntry, state), 0,
(ClientData) menuStateStrings, 0},
{TK_OPTION_INT, "-underline", NULL, NULL,
- DEF_MENU_ENTRY_UNDERLINE, -1, offsetof(TkMenuEntry, underline), 0, NULL, 0},
+ DEF_MENU_ENTRY_UNDERLINE, TCL_AUTO_LENGTH, offsetof(TkMenuEntry, underline), 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
static const Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
- offsetof(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, borderPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
static const Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
- -1, offsetof(TkMenuEntry, indicatorOn), 0, NULL, 0},
+ TCL_AUTO_LENGTH, offsetof(TkMenuEntry, indicatorOn), 0, NULL, 0},
{TK_OPTION_STRING, "-offvalue", NULL, NULL,
DEF_MENU_ENTRY_OFF_VALUE,
- offsetof(TkMenuEntry, offValuePtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, offValuePtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING, "-onvalue", NULL, NULL,
DEF_MENU_ENTRY_ON_VALUE,
- offsetof(TkMenuEntry, onValuePtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, onValuePtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_COLOR, "-selectcolor", NULL, NULL,
DEF_MENU_ENTRY_SELECT,
- offsetof(TkMenuEntry, indicatorFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, indicatorFgPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-selectimage", NULL, NULL,
DEF_MENU_ENTRY_SELECT_IMAGE,
- offsetof(TkMenuEntry, selectImagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, selectImagePtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-variable", NULL, NULL,
DEF_MENU_ENTRY_CHECK_VARIABLE,
- offsetof(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, namePtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL,
- NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0}
+ NULL, 0, TCL_AUTO_LENGTH, 0, tkBasicMenuEntryConfigSpecs, 0}
};
static const Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
- -1, offsetof(TkMenuEntry, indicatorOn), 0, NULL, 0},
+ TCL_AUTO_LENGTH, offsetof(TkMenuEntry, indicatorOn), 0, NULL, 0},
{TK_OPTION_COLOR, "-selectcolor", NULL, NULL,
DEF_MENU_ENTRY_SELECT,
- offsetof(TkMenuEntry, indicatorFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, indicatorFgPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-selectimage", NULL, NULL,
DEF_MENU_ENTRY_SELECT_IMAGE,
- offsetof(TkMenuEntry, selectImagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, selectImagePtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-value", NULL, NULL,
DEF_MENU_ENTRY_VALUE,
- offsetof(TkMenuEntry, onValuePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, onValuePtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-variable", NULL, NULL,
DEF_MENU_ENTRY_RADIO_VARIABLE,
- offsetof(TkMenuEntry, namePtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, namePtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL,
- NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0}
+ NULL, 0, TCL_AUTO_LENGTH, 0, tkBasicMenuEntryConfigSpecs, 0}
};
static const Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
{TK_OPTION_STRING, "-menu", NULL, NULL,
DEF_MENU_ENTRY_MENU,
- offsetof(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, namePtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL,
- NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0}
+ NULL, 0, TCL_AUTO_LENGTH, 0, tkBasicMenuEntryConfigSpecs, 0}
};
static const Tk_OptionSpec tkTearoffEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
- offsetof(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, borderPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING_TABLE, "-state", NULL, NULL,
- DEF_MENU_ENTRY_STATE, -1, offsetof(TkMenuEntry, state), 0,
+ DEF_MENU_ENTRY_STATE, TCL_AUTO_LENGTH, offsetof(TkMenuEntry, state), 0,
(ClientData) menuStateStrings, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
@@ -250,62 +250,62 @@ static const char *const menuTypeStrings[] = {
static const Tk_OptionSpec tkMenuConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground",
"Foreground", DEF_MENU_ACTIVE_BG_COLOR,
- offsetof(TkMenu, activeBorderPtr), -1, 0,
+ offsetof(TkMenu, activeBorderPtr), TCL_AUTO_LENGTH, 0,
(ClientData) DEF_MENU_ACTIVE_BG_MONO, 0},
{TK_OPTION_PIXELS, "-activeborderwidth", "activeBorderWidth",
"BorderWidth", DEF_MENU_ACTIVE_BORDER_WIDTH,
- offsetof(TkMenu, activeBorderWidthPtr), -1, 0, NULL, 0},
+ offsetof(TkMenu, activeBorderWidthPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground",
"Background", DEF_MENU_ACTIVE_FG_COLOR,
- offsetof(TkMenu, activeFgPtr), -1, 0,
+ offsetof(TkMenu, activeFgPtr), TCL_AUTO_LENGTH, 0,
(ClientData) DEF_MENU_ACTIVE_FG_MONO, 0},
{TK_OPTION_RELIEF, "-activerelief", "activeRelief", "Relief",
DEF_MENU_ACTIVE_RELIEF, offsetof(TkMenu, activeReliefPtr),
- -1, 0, NULL, 0},
+ TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_MENU_BG_COLOR, offsetof(TkMenu, borderPtr), -1, 0,
+ DEF_MENU_BG_COLOR, offsetof(TkMenu, borderPtr), TCL_AUTO_LENGTH, 0,
(ClientData) DEF_MENU_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
DEF_MENU_BORDER_WIDTH,
- offsetof(TkMenu, borderWidthPtr), -1, 0, NULL, 0},
+ offsetof(TkMenu, borderWidthPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
DEF_MENU_CURSOR,
- offsetof(TkMenu, cursorPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, cursorPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_MENU_DISABLED_FG_COLOR,
- offsetof(TkMenu, disabledFgPtr), -1, TK_OPTION_NULL_OK,
+ offsetof(TkMenu, disabledFgPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK,
(ClientData) DEF_MENU_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", NULL, NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_MENU_FONT, offsetof(TkMenu, fontPtr), -1, 0, NULL, 0},
+ DEF_MENU_FONT, offsetof(TkMenu, fontPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_MENU_FG, offsetof(TkMenu, fgPtr), -1, 0, NULL, 0},
+ DEF_MENU_FG, offsetof(TkMenu, fgPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING, "-postcommand", "postCommand", "Command",
DEF_MENU_POST_COMMAND,
- offsetof(TkMenu, postCommandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, postCommandPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MENU_RELIEF, offsetof(TkMenu, reliefPtr), -1, 0, NULL, 0},
+ DEF_MENU_RELIEF, offsetof(TkMenu, reliefPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_COLOR, "-selectcolor", "selectColor", "Background",
- DEF_MENU_SELECT_COLOR, offsetof(TkMenu, indicatorFgPtr), -1, 0,
+ DEF_MENU_SELECT_COLOR, offsetof(TkMenu, indicatorFgPtr), TCL_AUTO_LENGTH, 0,
(ClientData) DEF_MENU_SELECT_MONO, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
DEF_MENU_TAKE_FOCUS,
- offsetof(TkMenu, takeFocusPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, takeFocusPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BOOLEAN, "-tearoff", "tearOff", "TearOff",
- DEF_MENU_TEAROFF, -1, offsetof(TkMenu, tearoff), 0, NULL, 0},
+ DEF_MENU_TEAROFF, TCL_AUTO_LENGTH, offsetof(TkMenu, tearoff), 0, NULL, 0},
{TK_OPTION_STRING, "-tearoffcommand", "tearOffCommand",
"TearOffCommand", DEF_MENU_TEAROFF_CMD,
- offsetof(TkMenu, tearoffCommandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, tearoffCommandPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-title", "title", "Title",
- DEF_MENU_TITLE, offsetof(TkMenu, titlePtr), -1,
+ DEF_MENU_TITLE, offsetof(TkMenu, titlePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING_TABLE, "-type", "type", "Type",
- DEF_MENU_TYPE, offsetof(TkMenu, menuTypePtr), -1, TK_OPTION_NULL_OK,
+ DEF_MENU_TYPE, offsetof(TkMenu, menuTypePtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK,
(ClientData) menuTypeStrings, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index ff1ce6d..2d4b4e3 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -60,99 +60,99 @@ static const char *const compoundStrings[] = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_MENUBUTTON_ACTIVE_BG_COLOR, -1,
+ DEF_MENUBUTTON_ACTIVE_BG_COLOR, TCL_AUTO_LENGTH,
offsetof(TkMenuButton, activeBorder), 0,
(ClientData) DEF_MENUBUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_MENUBUTTON_ACTIVE_FG_COLOR, -1,
+ DEF_MENUBUTTON_ACTIVE_FG_COLOR, TCL_AUTO_LENGTH,
offsetof(TkMenuButton, activeFg),
0, DEF_MENUBUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_MENUBUTTON_ANCHOR, -1,
+ DEF_MENUBUTTON_ANCHOR, TCL_AUTO_LENGTH,
offsetof(TkMenuButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_MENUBUTTON_BG_COLOR, -1, offsetof(TkMenuButton, normalBorder),
+ DEF_MENUBUTTON_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkMenuButton, normalBorder),
0, DEF_MENUBUTTON_BG_MONO, 0},
- {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, -1, 0,
+ {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
(ClientData) "-borderwidth", 0},
- {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, -1, 0,
+ {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
(ClientData) "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_MENUBUTTON_BITMAP, -1, offsetof(TkMenuButton, bitmap),
+ DEF_MENUBUTTON_BITMAP, TCL_AUTO_LENGTH, offsetof(TkMenuButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_MENUBUTTON_BORDER_WIDTH, -1,
+ DEF_MENUBUTTON_BORDER_WIDTH, TCL_AUTO_LENGTH,
offsetof(TkMenuButton, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_MENUBUTTON_CURSOR, -1, offsetof(TkMenuButton, cursor),
+ DEF_MENUBUTTON_CURSOR, TCL_AUTO_LENGTH, offsetof(TkMenuButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction",
- DEF_MENUBUTTON_DIRECTION, -1, offsetof(TkMenuButton, direction),
+ DEF_MENUBUTTON_DIRECTION, TCL_AUTO_LENGTH, offsetof(TkMenuButton, direction),
0, directionStrings, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_MENUBUTTON_DISABLED_FG_COLOR,
- -1, offsetof(TkMenuButton, disabledFg), TK_OPTION_NULL_OK,
+ TCL_AUTO_LENGTH, offsetof(TkMenuButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_MENUBUTTON_DISABLED_FG_MONO, 0},
- {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, NULL, 0, -1, 0,
+ {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
(ClientData) "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_MENUBUTTON_FONT, -1, offsetof(TkMenuButton, tkfont), 0, 0, 0},
+ DEF_MENUBUTTON_FONT, TCL_AUTO_LENGTH, offsetof(TkMenuButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_MENUBUTTON_FG, -1, offsetof(TkMenuButton, normalFg), 0, 0, 0},
+ DEF_MENUBUTTON_FG, TCL_AUTO_LENGTH, offsetof(TkMenuButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_MENUBUTTON_HEIGHT, -1, offsetof(TkMenuButton, heightString),
+ DEF_MENUBUTTON_HEIGHT, TCL_AUTO_LENGTH, offsetof(TkMenuButton, heightString),
0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR,
- -1, offsetof(TkMenuButton, highlightBgColorPtr), 0, 0, 0},
+ TCL_AUTO_LENGTH, offsetof(TkMenuButton, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_MENUBUTTON_HIGHLIGHT, -1,
+ DEF_MENUBUTTON_HIGHLIGHT, TCL_AUTO_LENGTH,
offsetof(TkMenuButton, highlightColorPtr), 0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_MENUBUTTON_HIGHLIGHT_WIDTH,
- -1, offsetof(TkMenuButton, highlightWidth), 0, 0, 0},
+ TCL_AUTO_LENGTH, offsetof(TkMenuButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_MENUBUTTON_IMAGE, -1, offsetof(TkMenuButton, imageString),
+ DEF_MENUBUTTON_IMAGE, TCL_AUTO_LENGTH, offsetof(TkMenuButton, imageString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_MENUBUTTON_INDICATOR, -1, offsetof(TkMenuButton, indicatorOn),
+ DEF_MENUBUTTON_INDICATOR, TCL_AUTO_LENGTH, offsetof(TkMenuButton, indicatorOn),
0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_MENUBUTTON_JUSTIFY, -1, offsetof(TkMenuButton, justify), 0, 0, 0},
+ DEF_MENUBUTTON_JUSTIFY, TCL_AUTO_LENGTH, offsetof(TkMenuButton, justify), 0, 0, 0},
{TK_OPTION_STRING, "-menu", "menu", "Menu",
- DEF_MENUBUTTON_MENU, -1, offsetof(TkMenuButton, menuName),
+ DEF_MENUBUTTON_MENU, TCL_AUTO_LENGTH, offsetof(TkMenuButton, menuName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- DEF_MENUBUTTON_PADX, -1, offsetof(TkMenuButton, padX),
+ DEF_MENUBUTTON_PADX, TCL_AUTO_LENGTH, offsetof(TkMenuButton, padX),
0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- DEF_MENUBUTTON_PADY, -1, offsetof(TkMenuButton, padY),
+ DEF_MENUBUTTON_PADY, TCL_AUTO_LENGTH, offsetof(TkMenuButton, padY),
0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MENUBUTTON_RELIEF, -1, offsetof(TkMenuButton, relief),
+ DEF_MENUBUTTON_RELIEF, TCL_AUTO_LENGTH, offsetof(TkMenuButton, relief),
0, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, offsetof(TkMenuButton, compound), 0,
+ DEF_BUTTON_COMPOUND, TCL_AUTO_LENGTH, offsetof(TkMenuButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_MENUBUTTON_STATE, -1, offsetof(TkMenuButton, state),
+ DEF_MENUBUTTON_STATE, TCL_AUTO_LENGTH, offsetof(TkMenuButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_MENUBUTTON_TAKE_FOCUS, -1,
+ DEF_MENUBUTTON_TAKE_FOCUS, TCL_AUTO_LENGTH,
offsetof(TkMenuButton, takeFocus), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_MENUBUTTON_TEXT, -1, offsetof(TkMenuButton, text), 0, 0, 0},
+ DEF_MENUBUTTON_TEXT, TCL_AUTO_LENGTH, offsetof(TkMenuButton, text), 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_MENUBUTTON_TEXT_VARIABLE, -1,
+ DEF_MENUBUTTON_TEXT_VARIABLE, TCL_AUTO_LENGTH,
offsetof(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_MENUBUTTON_UNDERLINE, -1, offsetof(TkMenuButton, underline),
+ DEF_MENUBUTTON_UNDERLINE, TCL_AUTO_LENGTH, offsetof(TkMenuButton, underline),
0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_MENUBUTTON_WIDTH, -1, offsetof(TkMenuButton, widthString),
+ DEF_MENUBUTTON_WIDTH, TCL_AUTO_LENGTH, offsetof(TkMenuButton, widthString),
0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- DEF_MENUBUTTON_WRAP_LENGTH, -1, offsetof(TkMenuButton, wrapLength),
+ DEF_MENUBUTTON_WRAP_LENGTH, TCL_AUTO_LENGTH, offsetof(TkMenuButton, wrapLength),
0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index b7e7ea3..0ce386d 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -109,39 +109,39 @@ typedef struct {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MESSAGE_ANCHOR,
- -1, offsetof(Message, anchor), 0, 0, 0},
+ TCL_AUTO_LENGTH, offsetof(Message, anchor), 0, 0, 0},
{TK_OPTION_INT, "-aspect", "aspect", "Aspect", DEF_MESSAGE_ASPECT,
- -1, offsetof(Message, aspect), 0, 0, 0},
+ TCL_AUTO_LENGTH, offsetof(Message, aspect), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_MESSAGE_BG_COLOR, -1, offsetof(Message, border), 0,
+ DEF_MESSAGE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Message, border), 0,
DEF_MESSAGE_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL,
- 0, -1, 0, "-borderwidth", 0},
+ 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL,
- 0, -1, 0, "-background", 0},
+ 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_MESSAGE_BORDER_WIDTH, -1,
+ DEF_MESSAGE_BORDER_WIDTH, TCL_AUTO_LENGTH,
offsetof(Message, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_MESSAGE_CURSOR, -1, offsetof(Message, cursor),
+ DEF_MESSAGE_CURSOR, TCL_AUTO_LENGTH, offsetof(Message, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL,
- 0, -1, 0, "-foreground", 0},
+ 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_MESSAGE_FONT, -1, offsetof(Message, tkfont), 0, 0, 0},
+ DEF_MESSAGE_FONT, TCL_AUTO_LENGTH, offsetof(Message, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_MESSAGE_FG, -1, offsetof(Message, fgColorPtr), 0, 0, 0},
+ DEF_MESSAGE_FG, TCL_AUTO_LENGTH, offsetof(Message, fgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
- "HighlightBackground", DEF_MESSAGE_HIGHLIGHT_BG, -1,
+ "HighlightBackground", DEF_MESSAGE_HIGHLIGHT_BG, TCL_AUTO_LENGTH,
offsetof(Message, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_MESSAGE_HIGHLIGHT, -1, offsetof(Message, highlightColorPtr),
+ DEF_MESSAGE_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(Message, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_MESSAGE_HIGHLIGHT_WIDTH, -1,
+ "HighlightThickness", DEF_MESSAGE_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH,
offsetof(Message, highlightWidth), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_MESSAGE_JUSTIFY, -1, offsetof(Message, justify), 0, 0, 0},
+ DEF_MESSAGE_JUSTIFY, TCL_AUTO_LENGTH, offsetof(Message, justify), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
DEF_MESSAGE_PADX, offsetof(Message, padXPtr),
offsetof(Message, padX), 0, 0, 0},
@@ -149,17 +149,17 @@ static const Tk_OptionSpec optionSpecs[] = {
DEF_MESSAGE_PADY, offsetof(Message, padYPtr),
offsetof(Message, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MESSAGE_RELIEF, -1, offsetof(Message, relief), 0, 0, 0},
+ DEF_MESSAGE_RELIEF, TCL_AUTO_LENGTH, offsetof(Message, relief), 0, 0, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_MESSAGE_TAKE_FOCUS, -1, offsetof(Message, takeFocus),
+ DEF_MESSAGE_TAKE_FOCUS, TCL_AUTO_LENGTH, offsetof(Message, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_MESSAGE_TEXT, -1, offsetof(Message, string), 0, 0, 0},
+ DEF_MESSAGE_TEXT, TCL_AUTO_LENGTH, offsetof(Message, string), 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_MESSAGE_TEXT_VARIABLE, -1, offsetof(Message, textVarName),
+ DEF_MESSAGE_TEXT_VARIABLE, TCL_AUTO_LENGTH, offsetof(Message, textVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_MESSAGE_WIDTH, -1, offsetof(Message, width), 0, 0 ,0},
+ DEF_MESSAGE_WIDTH, TCL_AUTO_LENGTH, offsetof(Message, width), 0, 0 ,0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 37bb699..9508a42 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -275,20 +275,20 @@ static const Tk_ObjCustomOption stickyOption = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_PANEDWINDOW_BG_COLOR, -1, offsetof(PanedWindow, background), 0,
+ DEF_PANEDWINDOW_BG_COLOR, TCL_AUTO_LENGTH, offsetof(PanedWindow, background), 0,
DEF_PANEDWINDOW_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_PANEDWINDOW_BORDERWIDTH, -1, offsetof(PanedWindow, borderWidth),
+ DEF_PANEDWINDOW_BORDERWIDTH, TCL_AUTO_LENGTH, offsetof(PanedWindow, borderWidth),
0, 0, GEOMETRY},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_PANEDWINDOW_CURSOR, -1, offsetof(PanedWindow, cursor),
+ DEF_PANEDWINDOW_CURSOR, TCL_AUTO_LENGTH, offsetof(PanedWindow, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-handlepad", "handlePad", "HandlePad",
- DEF_PANEDWINDOW_HANDLEPAD, -1, offsetof(PanedWindow, handlePad),
+ DEF_PANEDWINDOW_HANDLEPAD, TCL_AUTO_LENGTH, offsetof(PanedWindow, handlePad),
0, 0, GEOMETRY},
{TK_OPTION_PIXELS, "-handlesize", "handleSize", "HandleSize",
DEF_PANEDWINDOW_HANDLESIZE, offsetof(PanedWindow, handleSizePtr),
@@ -297,36 +297,36 @@ static const Tk_OptionSpec optionSpecs[] = {
DEF_PANEDWINDOW_HEIGHT, offsetof(PanedWindow, heightPtr),
offsetof(PanedWindow, height), TK_OPTION_NULL_OK, 0, GEOMETRY},
{TK_OPTION_BOOLEAN, "-opaqueresize", "opaqueResize", "OpaqueResize",
- DEF_PANEDWINDOW_OPAQUERESIZE, -1,
+ DEF_PANEDWINDOW_OPAQUERESIZE, TCL_AUTO_LENGTH,
offsetof(PanedWindow, resizeOpaque), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
- DEF_PANEDWINDOW_ORIENT, -1, offsetof(PanedWindow, orient),
+ DEF_PANEDWINDOW_ORIENT, TCL_AUTO_LENGTH, offsetof(PanedWindow, orient),
0, orientStrings, GEOMETRY},
{TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground",
- 0, -1, offsetof(PanedWindow, proxyBackground), TK_OPTION_NULL_OK,
+ 0, TCL_AUTO_LENGTH, offsetof(PanedWindow, proxyBackground), TK_OPTION_NULL_OK,
(ClientData) DEF_PANEDWINDOW_BG_MONO, 0},
{TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth",
DEF_PANEDWINDOW_PROXYBORDER, offsetof(PanedWindow, proxyBorderWidthPtr),
offsetof(PanedWindow, proxyBorderWidth), 0, 0, GEOMETRY},
{TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief",
- 0, -1, offsetof(PanedWindow, proxyRelief),
+ 0, TCL_AUTO_LENGTH, offsetof(PanedWindow, proxyRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_PANEDWINDOW_RELIEF, -1, offsetof(PanedWindow, relief), 0, 0, 0},
+ DEF_PANEDWINDOW_RELIEF, TCL_AUTO_LENGTH, offsetof(PanedWindow, relief), 0, 0, 0},
{TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor",
- DEF_PANEDWINDOW_SASHCURSOR, -1, offsetof(PanedWindow, sashCursor),
+ DEF_PANEDWINDOW_SASHCURSOR, TCL_AUTO_LENGTH, offsetof(PanedWindow, sashCursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-sashpad", "sashPad", "SashPad",
- DEF_PANEDWINDOW_SASHPAD, -1, offsetof(PanedWindow, sashPad),
+ DEF_PANEDWINDOW_SASHPAD, TCL_AUTO_LENGTH, offsetof(PanedWindow, sashPad),
0, 0, GEOMETRY},
{TK_OPTION_RELIEF, "-sashrelief", "sashRelief", "Relief",
- DEF_PANEDWINDOW_SASHRELIEF, -1, offsetof(PanedWindow, sashRelief),
+ DEF_PANEDWINDOW_SASHRELIEF, TCL_AUTO_LENGTH, offsetof(PanedWindow, sashRelief),
0, 0, 0},
{TK_OPTION_PIXELS, "-sashwidth", "sashWidth", "Width",
DEF_PANEDWINDOW_SASHWIDTH, offsetof(PanedWindow, sashWidthPtr),
offsetof(PanedWindow, sashWidth), 0, 0, GEOMETRY},
{TK_OPTION_BOOLEAN, "-showhandle", "showHandle", "ShowHandle",
- DEF_PANEDWINDOW_SHOWHANDLE, -1, offsetof(PanedWindow, showHandle),
+ DEF_PANEDWINDOW_SHOWHANDLE, TCL_AUTO_LENGTH, offsetof(PanedWindow, showHandle),
0, 0, GEOMETRY},
{TK_OPTION_PIXELS, "-width", "width", "Width",
DEF_PANEDWINDOW_WIDTH, offsetof(PanedWindow, widthPtr),
@@ -336,27 +336,27 @@ static const Tk_OptionSpec optionSpecs[] = {
static const Tk_OptionSpec slaveOptionSpecs[] = {
{TK_OPTION_WINDOW, "-after", NULL, NULL,
- DEF_PANEDWINDOW_PANE_AFTER, -1, offsetof(Slave, after),
+ DEF_PANEDWINDOW_PANE_AFTER, TCL_AUTO_LENGTH, offsetof(Slave, after),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_WINDOW, "-before", NULL, NULL,
- DEF_PANEDWINDOW_PANE_BEFORE, -1, offsetof(Slave, before),
+ DEF_PANEDWINDOW_PANE_BEFORE, TCL_AUTO_LENGTH, offsetof(Slave, before),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-height", NULL, NULL,
DEF_PANEDWINDOW_PANE_HEIGHT, offsetof(Slave, heightPtr),
offsetof(Slave, height), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-hide", "hide", "Hide",
- DEF_PANEDWINDOW_PANE_HIDE, -1, offsetof(Slave, hide), 0,0,GEOMETRY},
+ DEF_PANEDWINDOW_PANE_HIDE, TCL_AUTO_LENGTH, offsetof(Slave, hide), 0,0,GEOMETRY},
{TK_OPTION_PIXELS, "-minsize", NULL, NULL,
- DEF_PANEDWINDOW_PANE_MINSIZE, -1, offsetof(Slave, minSize), 0, 0, 0},
+ DEF_PANEDWINDOW_PANE_MINSIZE, TCL_AUTO_LENGTH, offsetof(Slave, minSize), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", NULL, NULL,
- DEF_PANEDWINDOW_PANE_PADX, -1, offsetof(Slave, padx), 0, 0, 0},
+ DEF_PANEDWINDOW_PANE_PADX, TCL_AUTO_LENGTH, offsetof(Slave, padx), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", NULL, NULL,
- DEF_PANEDWINDOW_PANE_PADY, -1, offsetof(Slave, pady), 0, 0, 0},
+ DEF_PANEDWINDOW_PANE_PADY, TCL_AUTO_LENGTH, offsetof(Slave, pady), 0, 0, 0},
{TK_OPTION_CUSTOM, "-sticky", NULL, NULL,
- DEF_PANEDWINDOW_PANE_STICKY, -1, offsetof(Slave, sticky), 0,
+ DEF_PANEDWINDOW_PANE_STICKY, TCL_AUTO_LENGTH, offsetof(Slave, sticky), 0,
&stickyOption, 0},
{TK_OPTION_STRING_TABLE, "-stretch", "stretch", "Stretch",
- DEF_PANEDWINDOW_PANE_STRETCH, -1, offsetof(Slave, stretch), 0,
+ DEF_PANEDWINDOW_PANE_STRETCH, TCL_AUTO_LENGTH, offsetof(Slave, stretch), 0,
(ClientData) stretchStrings, 0},
{TK_OPTION_PIXELS, "-width", NULL, NULL,
DEF_PANEDWINDOW_PANE_WIDTH, offsetof(Slave, widthPtr),
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index 00e3f7a..2e2b9dc 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -81,13 +81,13 @@ typedef struct Slave {
#define IN_MASK 1
static const Tk_OptionSpec optionSpecs[] = {
- {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", -1,
+ {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", TCL_AUTO_LENGTH,
offsetof(Slave, anchor), 0, 0, 0},
- {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", -1,
+ {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", TCL_AUTO_LENGTH,
offsetof(Slave, borderMode), 0, borderModeStrings, 0},
{TK_OPTION_PIXELS, "-height", NULL, NULL, "", offsetof(Slave, heightPtr),
offsetof(Slave, height), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_WINDOW, "-in", NULL, NULL, "", -1, offsetof(Slave, inTkwin),
+ {TK_OPTION_WINDOW, "-in", NULL, NULL, "", TCL_AUTO_LENGTH, offsetof(Slave, inTkwin),
0, 0, IN_MASK},
{TK_OPTION_DOUBLE, "-relheight", NULL, NULL, "",
offsetof(Slave, relHeightPtr), offsetof(Slave, relHeight),
@@ -95,9 +95,9 @@ static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_DOUBLE, "-relwidth", NULL, NULL, "",
offsetof(Slave, relWidthPtr), offsetof(Slave, relWidth),
TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_DOUBLE, "-relx", NULL, NULL, "0", -1,
+ {TK_OPTION_DOUBLE, "-relx", NULL, NULL, "0", TCL_AUTO_LENGTH,
offsetof(Slave, relX), 0, 0, 0},
- {TK_OPTION_DOUBLE, "-rely", NULL, NULL, "0", -1,
+ {TK_OPTION_DOUBLE, "-rely", NULL, NULL, "0", TCL_AUTO_LENGTH,
offsetof(Slave, relY), 0, 0, 0},
{TK_OPTION_PIXELS, "-width", NULL, NULL, "", offsetof(Slave, widthPtr),
offsetof(Slave, width), TK_OPTION_NULL_OK, 0, 0},
@@ -105,7 +105,7 @@ static const Tk_OptionSpec optionSpecs[] = {
offsetof(Slave, x), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-y", NULL, NULL, "0", offsetof(Slave, yPtr),
offsetof(Slave, y), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
/*
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 055e876..6261b3a 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -45,97 +45,97 @@ static const char *const stateStrings[] = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_SCALE_ACTIVE_BG_COLOR, -1, offsetof(TkScale, activeBorder),
+ DEF_SCALE_ACTIVE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkScale, activeBorder),
0, DEF_SCALE_ACTIVE_BG_MONO, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_SCALE_BG_COLOR, -1, offsetof(TkScale, bgBorder),
+ DEF_SCALE_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkScale, bgBorder),
0, DEF_SCALE_BG_MONO, 0},
{TK_OPTION_DOUBLE, "-bigincrement", "bigIncrement", "BigIncrement",
- DEF_SCALE_BIG_INCREMENT, -1, offsetof(TkScale, bigIncrement),
+ DEF_SCALE_BIG_INCREMENT, TCL_AUTO_LENGTH, offsetof(TkScale, bigIncrement),
0, 0, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_SCALE_BORDER_WIDTH, -1, offsetof(TkScale, borderWidth),
+ DEF_SCALE_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(TkScale, borderWidth),
0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_SCALE_COMMAND, -1, offsetof(TkScale, command),
+ DEF_SCALE_COMMAND, TCL_AUTO_LENGTH, offsetof(TkScale, command),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_SCALE_CURSOR, -1, offsetof(TkScale, cursor),
+ DEF_SCALE_CURSOR, TCL_AUTO_LENGTH, offsetof(TkScale, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-digits", "digits", "Digits",
- DEF_SCALE_DIGITS, -1, offsetof(TkScale, digits),
+ DEF_SCALE_DIGITS, TCL_AUTO_LENGTH, offsetof(TkScale, digits),
0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_SCALE_FONT, -1, offsetof(TkScale, tkfont), 0, 0, 0},
+ DEF_SCALE_FONT, TCL_AUTO_LENGTH, offsetof(TkScale, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_SCALE_FG_COLOR, -1, offsetof(TkScale, textColorPtr), 0,
+ DEF_SCALE_FG_COLOR, TCL_AUTO_LENGTH, offsetof(TkScale, textColorPtr), 0,
(ClientData) DEF_SCALE_FG_MONO, 0},
- {TK_OPTION_DOUBLE, "-from", "from", "From", DEF_SCALE_FROM, -1,
+ {TK_OPTION_DOUBLE, "-from", "from", "From", DEF_SCALE_FROM, TCL_AUTO_LENGTH,
offsetof(TkScale, fromValue), 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_SCALE_HIGHLIGHT_BG_COLOR,
- -1, offsetof(TkScale, highlightBorder),
+ TCL_AUTO_LENGTH, offsetof(TkScale, highlightBorder),
0, DEF_SCALE_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_SCALE_HIGHLIGHT, -1, offsetof(TkScale, highlightColorPtr),
+ DEF_SCALE_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(TkScale, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_SCALE_HIGHLIGHT_WIDTH, -1,
+ "HighlightThickness", DEF_SCALE_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH,
offsetof(TkScale, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-label", "label", "Label",
- DEF_SCALE_LABEL, -1, offsetof(TkScale, label),
+ DEF_SCALE_LABEL, TCL_AUTO_LENGTH, offsetof(TkScale, label),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-length", "length", "Length",
- DEF_SCALE_LENGTH, -1, offsetof(TkScale, length), 0, 0, 0},
+ DEF_SCALE_LENGTH, TCL_AUTO_LENGTH, offsetof(TkScale, length), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
- DEF_SCALE_ORIENT, -1, offsetof(TkScale, orient),
+ DEF_SCALE_ORIENT, TCL_AUTO_LENGTH, offsetof(TkScale, orient),
0, orientStrings, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_SCALE_RELIEF, -1, offsetof(TkScale, relief), 0, 0, 0},
+ DEF_SCALE_RELIEF, TCL_AUTO_LENGTH, offsetof(TkScale, relief), 0, 0, 0},
{TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_SCALE_REPEAT_DELAY, -1, offsetof(TkScale, repeatDelay),
+ DEF_SCALE_REPEAT_DELAY, TCL_AUTO_LENGTH, offsetof(TkScale, repeatDelay),
0, 0, 0},
{TK_OPTION_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- DEF_SCALE_REPEAT_INTERVAL, -1, offsetof(TkScale, repeatInterval),
+ DEF_SCALE_REPEAT_INTERVAL, TCL_AUTO_LENGTH, offsetof(TkScale, repeatInterval),
0, 0, 0},
{TK_OPTION_DOUBLE, "-resolution", "resolution", "Resolution",
- DEF_SCALE_RESOLUTION, -1, offsetof(TkScale, resolution),
+ DEF_SCALE_RESOLUTION, TCL_AUTO_LENGTH, offsetof(TkScale, resolution),
0, 0, 0},
{TK_OPTION_BOOLEAN, "-showvalue", "showValue", "ShowValue",
- DEF_SCALE_SHOW_VALUE, -1, offsetof(TkScale, showValue),
+ DEF_SCALE_SHOW_VALUE, TCL_AUTO_LENGTH, offsetof(TkScale, showValue),
0, 0, 0},
{TK_OPTION_PIXELS, "-sliderlength", "sliderLength", "SliderLength",
- DEF_SCALE_SLIDER_LENGTH, -1, offsetof(TkScale, sliderLength),
+ DEF_SCALE_SLIDER_LENGTH, TCL_AUTO_LENGTH, offsetof(TkScale, sliderLength),
0, 0, 0},
{TK_OPTION_RELIEF, "-sliderrelief", "sliderRelief", "SliderRelief",
- DEF_SCALE_SLIDER_RELIEF, -1, offsetof(TkScale, sliderRelief),
+ DEF_SCALE_SLIDER_RELIEF, TCL_AUTO_LENGTH, offsetof(TkScale, sliderRelief),
0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_SCALE_STATE, -1, offsetof(TkScale, state),
+ DEF_SCALE_STATE, TCL_AUTO_LENGTH, offsetof(TkScale, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_SCALE_TAKE_FOCUS, offsetof(TkScale, takeFocusPtr), -1,
+ DEF_SCALE_TAKE_FOCUS, offsetof(TkScale, takeFocusPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-tickinterval", "tickInterval", "TickInterval",
- DEF_SCALE_TICK_INTERVAL, -1, offsetof(TkScale, tickInterval),
+ DEF_SCALE_TICK_INTERVAL, TCL_AUTO_LENGTH, offsetof(TkScale, tickInterval),
0, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To",
- DEF_SCALE_TO, -1, offsetof(TkScale, toValue), 0, 0, 0},
+ DEF_SCALE_TO, TCL_AUTO_LENGTH, offsetof(TkScale, toValue), 0, 0, 0},
{TK_OPTION_COLOR, "-troughcolor", "troughColor", "Background",
- DEF_SCALE_TROUGH_COLOR, -1, offsetof(TkScale, troughColorPtr),
+ DEF_SCALE_TROUGH_COLOR, TCL_AUTO_LENGTH, offsetof(TkScale, troughColorPtr),
0, DEF_SCALE_TROUGH_MONO, 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- DEF_SCALE_VARIABLE, offsetof(TkScale, varNamePtr), -1,
+ DEF_SCALE_VARIABLE, offsetof(TkScale, varNamePtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_SCALE_WIDTH, -1, offsetof(TkScale, width), 0, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
+ DEF_SCALE_WIDTH, TCL_AUTO_LENGTH, offsetof(TkScale, width), 0, 0, 0},
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0, 0, 0}
};
/*
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index 8bfa850..b2ec521 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -66,29 +66,29 @@ typedef struct {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- "#d9d9d9", offsetof(Square, bgBorderPtr), -1, 0,
+ "#d9d9d9", offsetof(Square, bgBorderPtr), TCL_AUTO_LENGTH, 0,
"white", 0},
- {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, -1, 0,
+ {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
"-borderwidth", 0},
- {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, -1, 0,
+ {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
"-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- "2", offsetof(Square, borderWidthPtr), -1, 0, NULL, 0},
+ "2", offsetof(Square, borderWidthPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_BOOLEAN, "-dbl", "doubleBuffer", "DoubleBuffer",
- "1", offsetof(Square, doubleBufferPtr), -1, 0 , NULL, 0},
- {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, 0, -1, 0,
+ "1", offsetof(Square, doubleBufferPtr), TCL_AUTO_LENGTH, 0 , NULL, 0},
+ {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
"-foreground", 0},
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
- "#b03060", offsetof(Square, fgBorderPtr), -1, 0,
+ "#b03060", offsetof(Square, fgBorderPtr), TCL_AUTO_LENGTH, 0,
"black", 0},
{TK_OPTION_PIXELS, "-posx", "posx", "PosX", "0",
- offsetof(Square, xPtr), -1, 0, NULL, 0},
+ offsetof(Square, xPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_PIXELS, "-posy", "posy", "PosY", "0",
- offsetof(Square, yPtr), -1, 0, NULL, 0},
+ offsetof(Square, yPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- "raised", offsetof(Square, reliefPtr), -1, 0, NULL, 0},
+ "raised", offsetof(Square, reliefPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_PIXELS, "-size", "size", "Size", "20",
- offsetof(Square, sizeObjPtr), -1, 0, NULL, 0},
+ offsetof(Square, sizeObjPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
diff --git a/generic/tkTest.c b/generic/tkTest.c
index b0cff05..ace6da2 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -573,9 +573,9 @@ TestobjconfigObjCmd(
} ExtensionWidgetRecord;
static const Tk_OptionSpec baseSpecs[] = {
{TK_OPTION_STRING, "-one", "one", "One", "one",
- offsetof(ExtensionWidgetRecord, base1ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, base1ObjPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING, "-two", "two", "Two", "two",
- offsetof(ExtensionWidgetRecord, base2ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, base2ObjPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
@@ -617,50 +617,50 @@ TestobjconfigObjCmd(
};
static const Tk_OptionSpec typesSpecs[] = {
{TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1",
- offsetof(TypesRecord, booleanPtr), -1, 0, 0, 0x1},
+ offsetof(TypesRecord, booleanPtr), TCL_AUTO_LENGTH, 0, 0, 0x1},
{TK_OPTION_INT, "-integer", "integer", "Integer", "7",
- offsetof(TypesRecord, integerPtr), -1, 0, 0, 0x2},
+ offsetof(TypesRecord, integerPtr), TCL_AUTO_LENGTH, 0, 0, 0x2},
{TK_OPTION_DOUBLE, "-double", "double", "Double", "3.14159",
- offsetof(TypesRecord, doublePtr), -1, 0, 0, 0x4},
+ offsetof(TypesRecord, doublePtr), TCL_AUTO_LENGTH, 0, 0, 0x4},
{TK_OPTION_STRING, "-string", "string", "String",
- "foo", offsetof(TypesRecord, stringPtr), -1,
+ "foo", offsetof(TypesRecord, stringPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x8},
{TK_OPTION_STRING_TABLE,
"-stringtable", "StringTable", "stringTable",
- "one", offsetof(TypesRecord, stringTablePtr), -1,
+ "one", offsetof(TypesRecord, stringTablePtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, stringTable, 0x10},
{TK_OPTION_COLOR, "-color", "color", "Color",
- "red", offsetof(TypesRecord, colorPtr), -1,
+ "red", offsetof(TypesRecord, colorPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, "black", 0x20},
{TK_OPTION_FONT, "-font", "font", "Font", "Helvetica 12",
- offsetof(TypesRecord, fontPtr), -1,
+ offsetof(TypesRecord, fontPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x40},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", "gray50",
- offsetof(TypesRecord, bitmapPtr), -1,
+ offsetof(TypesRecord, bitmapPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x80},
{TK_OPTION_BORDER, "-border", "border", "Border",
- "blue", offsetof(TypesRecord, borderPtr), -1,
+ "blue", offsetof(TypesRecord, borderPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, "white", 0x100},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised",
- offsetof(TypesRecord, reliefPtr), -1,
+ offsetof(TypesRecord, reliefPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x200},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", "xterm",
- offsetof(TypesRecord, cursorPtr), -1,
+ offsetof(TypesRecord, cursorPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x400},
{TK_OPTION_JUSTIFY, "-justify", NULL, NULL, "left",
- offsetof(TypesRecord, justifyPtr), -1,
+ offsetof(TypesRecord, justifyPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x800},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", NULL,
- offsetof(TypesRecord, anchorPtr), -1,
+ offsetof(TypesRecord, anchorPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x1000},
{TK_OPTION_PIXELS, "-pixel", "pixel", "Pixel",
- "1", offsetof(TypesRecord, pixelPtr), -1,
+ "1", offsetof(TypesRecord, pixelPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, 0, 0x2000},
{TK_OPTION_CUSTOM, "-custom", NULL, NULL,
- "", offsetof(TypesRecord, customPtr), -1,
+ "", offsetof(TypesRecord, customPtr), TCL_AUTO_LENGTH,
TK_CONFIG_NULL_OK, &CustomOption, 0x4000},
{TK_OPTION_SYNONYM, "-synonym", NULL, NULL,
- NULL, 0, -1, 0, "-color", 0x8000},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-color", 0x8000},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
Tk_OptionTable optionTable;
@@ -762,15 +762,15 @@ TestobjconfigObjCmd(
ExtensionWidgetRecord *recordPtr;
static const Tk_OptionSpec extensionSpecs[] = {
{TK_OPTION_STRING, "-three", "three", "Three", "three",
- offsetof(ExtensionWidgetRecord, extension3ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, extension3ObjPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING, "-four", "four", "Four", "four",
- offsetof(ExtensionWidgetRecord, extension4ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, extension4ObjPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING, "-two", "two", "Two", "two and a half",
- offsetof(ExtensionWidgetRecord, base2ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, base2ObjPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING,
"-oneAgain", "oneAgain", "OneAgain", "one again",
- offsetof(ExtensionWidgetRecord, extension5ObjPtr), -1, 0, NULL, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0,
+ offsetof(ExtensionWidgetRecord, extension5ObjPtr), TCL_AUTO_LENGTH, 0, NULL, 0},
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
(ClientData) baseSpecs, 0}
};
Tk_Window tkwin;
@@ -892,53 +892,53 @@ TestobjconfigObjCmd(
};
static const Tk_OptionSpec internalSpecs[] = {
{TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1",
- -1, offsetof(InternalRecord, boolean), 0, 0, 0x1},
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, boolean), 0, 0, 0x1},
{TK_OPTION_INT, "-integer", "integer", "Integer", "148962237",
- -1, offsetof(InternalRecord, integer), 0, 0, 0x2},
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, integer), 0, 0, 0x2},
{TK_OPTION_DOUBLE, "-double", "double", "Double", "3.14159",
- -1, offsetof(InternalRecord, doubleValue), 0, 0, 0x4},
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, doubleValue), 0, 0, 0x4},
{TK_OPTION_STRING, "-string", "string", "String", "foo",
- -1, offsetof(InternalRecord, string),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, string),
TK_CONFIG_NULL_OK, 0, 0x8},
{TK_OPTION_STRING_TABLE,
"-stringtable", "StringTable", "stringTable", "one",
- -1, offsetof(InternalRecord, index),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, index),
TK_CONFIG_NULL_OK, internalStringTable, 0x10},
{TK_OPTION_COLOR, "-color", "color", "Color", "red",
- -1, offsetof(InternalRecord, colorPtr),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, colorPtr),
TK_CONFIG_NULL_OK, "black", 0x20},
{TK_OPTION_FONT, "-font", "font", "Font", "Helvetica 12",
- -1, offsetof(InternalRecord, tkfont),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, tkfont),
TK_CONFIG_NULL_OK, 0, 0x40},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", "gray50",
- -1, offsetof(InternalRecord, bitmap),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, bitmap),
TK_CONFIG_NULL_OK, 0, 0x80},
{TK_OPTION_BORDER, "-border", "border", "Border", "blue",
- -1, offsetof(InternalRecord, border),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, border),
TK_CONFIG_NULL_OK, "white", 0x100},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised",
- -1, offsetof(InternalRecord, relief),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, relief),
TK_CONFIG_NULL_OK, 0, 0x200},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", "xterm",
- -1, offsetof(InternalRecord, cursor),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, cursor),
TK_CONFIG_NULL_OK, 0, 0x400},
{TK_OPTION_JUSTIFY, "-justify", NULL, NULL, "left",
- -1, offsetof(InternalRecord, justify),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, justify),
TK_CONFIG_NULL_OK, 0, 0x800},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", NULL,
- -1, offsetof(InternalRecord, anchor),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, anchor),
TK_CONFIG_NULL_OK, 0, 0x1000},
{TK_OPTION_PIXELS, "-pixel", "pixel", "Pixel", "1",
- -1, offsetof(InternalRecord, pixels),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, pixels),
TK_CONFIG_NULL_OK, 0, 0x2000},
{TK_OPTION_WINDOW, "-window", "window", "Window", NULL,
- -1, offsetof(InternalRecord, tkwin),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, tkwin),
TK_CONFIG_NULL_OK, 0, 0},
{TK_OPTION_CUSTOM, "-custom", NULL, NULL, "",
- -1, offsetof(InternalRecord, custom),
+ TCL_AUTO_LENGTH, offsetof(InternalRecord, custom),
TK_CONFIG_NULL_OK, &CustomOption, 0x4000},
{TK_OPTION_SYNONYM, "-synonym", NULL, NULL,
- NULL, -1, -1, 0, "-color", 0x8000},
+ NULL, TCL_AUTO_LENGTH, TCL_AUTO_LENGTH, 0, "-color", 0x8000},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
Tk_OptionTable optionTable;
@@ -1009,15 +1009,15 @@ TestobjconfigObjCmd(
FiveRecord *recordPtr;
static const Tk_OptionSpec smallSpecs[] = {
{TK_OPTION_INT, "-one", "one", "One", "1",
- offsetof(FiveRecord, one), -1, 0, NULL, 0},
+ offsetof(FiveRecord, one), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_INT, "-two", "two", "Two", "2",
- offsetof(FiveRecord, two), -1, 0, NULL, 0},
+ offsetof(FiveRecord, two), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_INT, "-three", "three", "Three", "3",
- offsetof(FiveRecord, three), -1, 0, NULL, 0},
+ offsetof(FiveRecord, three), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_INT, "-four", "four", "Four", "4",
- offsetof(FiveRecord, four), -1, 0, NULL, 0},
+ offsetof(FiveRecord, four), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_STRING, "-five", NULL, NULL, NULL,
- offsetof(FiveRecord, five), -1, 0, NULL, 0},
+ offsetof(FiveRecord, five), TCL_AUTO_LENGTH, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
@@ -1094,7 +1094,7 @@ TestobjconfigObjCmd(
SlaveRecord *recordPtr;
static const Tk_OptionSpec slaveSpecs[] = {
{TK_OPTION_WINDOW, "-window", "window", "Window", ".bar",
- offsetof(SlaveRecord, windowPtr), -1, TK_CONFIG_NULL_OK, NULL, 0},
+ offsetof(SlaveRecord, windowPtr), TCL_AUTO_LENGTH, TK_CONFIG_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
Tk_Window tkwin = Tk_CreateWindowFromPath(interp,
diff --git a/generic/tkText.c b/generic/tkText.c
index 807ea48..6ba2c6f 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -121,90 +121,90 @@ static const Tk_ObjCustomOption lineOption = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BOOLEAN, "-autoseparators", "autoSeparators",
- "AutoSeparators", DEF_TEXT_AUTO_SEPARATORS, -1,
+ "AutoSeparators", DEF_TEXT_AUTO_SEPARATORS, TCL_AUTO_LENGTH,
offsetof(TkText, autoSeparators),
TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_TEXT_BG_COLOR, -1, offsetof(TkText, border),
+ DEF_TEXT_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkText, border),
0, DEF_TEXT_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
- NULL, 0, -1, 0, "-borderwidth",
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth",
TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
- NULL, 0, -1, 0, "-background", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0},
{TK_OPTION_BOOLEAN, "-blockcursor", "blockCursor",
- "BlockCursor", DEF_TEXT_BLOCK_CURSOR, -1,
+ "BlockCursor", DEF_TEXT_BLOCK_CURSOR, TCL_AUTO_LENGTH,
offsetof(TkText, insertCursorType), 0, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_TEXT_BORDER_WIDTH, -1, offsetof(TkText, borderWidth),
+ DEF_TEXT_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(TkText, borderWidth),
0, 0, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_TEXT_CURSOR, -1, offsetof(TkText, cursor),
+ DEF_TEXT_CURSOR, TCL_AUTO_LENGTH, offsetof(TkText, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_CUSTOM, "-endline", NULL, NULL,
- NULL, -1, offsetof(TkText, end), TK_OPTION_NULL_OK,
+ NULL, TCL_AUTO_LENGTH, offsetof(TkText, end), TK_OPTION_NULL_OK,
&lineOption, TK_TEXT_LINE_RANGE},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
- "ExportSelection", DEF_TEXT_EXPORT_SELECTION, -1,
+ "ExportSelection", DEF_TEXT_EXPORT_SELECTION, TCL_AUTO_LENGTH,
offsetof(TkText, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
- NULL, 0, -1, 0, "-foreground", 0},
+ NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_TEXT_FONT, -1, offsetof(TkText, tkfont), 0, 0,
+ DEF_TEXT_FONT, TCL_AUTO_LENGTH, offsetof(TkText, tkfont), 0, 0,
TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_TEXT_FG, -1, offsetof(TkText, fgColor), 0,
+ DEF_TEXT_FG, TCL_AUTO_LENGTH, offsetof(TkText, fgColor), 0,
0, 0},
{TK_OPTION_PIXELS, "-height", "height", "Height",
- DEF_TEXT_HEIGHT, -1, offsetof(TkText, height), 0, 0, 0},
+ DEF_TEXT_HEIGHT, TCL_AUTO_LENGTH, offsetof(TkText, height), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_TEXT_HIGHLIGHT_BG,
- -1, offsetof(TkText, highlightBgColorPtr),
+ TCL_AUTO_LENGTH, offsetof(TkText, highlightBgColorPtr),
0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_TEXT_HIGHLIGHT, -1, offsetof(TkText, highlightColorPtr),
+ DEF_TEXT_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(TkText, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
- "HighlightThickness", DEF_TEXT_HIGHLIGHT_WIDTH, -1,
+ "HighlightThickness", DEF_TEXT_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH,
offsetof(TkText, highlightWidth), 0, 0, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_BORDER, "-inactiveselectbackground","inactiveSelectBackground",
"Foreground",
DEF_TEXT_INACTIVE_SELECT_COLOR,
- -1, offsetof(TkText, inactiveSelBorder),
+ TCL_AUTO_LENGTH, offsetof(TkText, inactiveSelBorder),
TK_OPTION_NULL_OK, DEF_TEXT_SELECT_MONO, 0},
{TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground",
DEF_TEXT_INSERT_BG,
- -1, offsetof(TkText, insertBorder),
+ TCL_AUTO_LENGTH, offsetof(TkText, insertBorder),
0, 0, 0},
{TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth",
- "BorderWidth", DEF_TEXT_INSERT_BD_COLOR, -1,
+ "BorderWidth", DEF_TEXT_INSERT_BD_COLOR, TCL_AUTO_LENGTH,
offsetof(TkText, insertBorderWidth), 0,
(ClientData) DEF_TEXT_INSERT_BD_MONO, 0},
{TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime",
- DEF_TEXT_INSERT_OFF_TIME, -1, offsetof(TkText, insertOffTime),
+ DEF_TEXT_INSERT_OFF_TIME, TCL_AUTO_LENGTH, offsetof(TkText, insertOffTime),
0, 0, 0},
{TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime",
- DEF_TEXT_INSERT_ON_TIME, -1, offsetof(TkText, insertOnTime),
+ DEF_TEXT_INSERT_ON_TIME, TCL_AUTO_LENGTH, offsetof(TkText, insertOnTime),
0, 0, 0},
{TK_OPTION_STRING_TABLE,
"-insertunfocussed", "insertUnfocussed", "InsertUnfocussed",
- DEF_TEXT_INSERT_UNFOCUSSED, -1, offsetof(TkText, insertUnfocussed),
+ DEF_TEXT_INSERT_UNFOCUSSED, TCL_AUTO_LENGTH, offsetof(TkText, insertUnfocussed),
0, insertUnfocussedStrings, 0},
{TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth",
- DEF_TEXT_INSERT_WIDTH, -1, offsetof(TkText, insertWidth),
+ DEF_TEXT_INSERT_WIDTH, TCL_AUTO_LENGTH, offsetof(TkText, insertWidth),
0, 0, 0},
{TK_OPTION_INT, "-maxundo", "maxUndo", "MaxUndo",
- DEF_TEXT_MAX_UNDO, -1, offsetof(TkText, maxUndo),
+ DEF_TEXT_MAX_UNDO, TCL_AUTO_LENGTH, offsetof(TkText, maxUndo),
TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- DEF_TEXT_PADX, -1, offsetof(TkText, padX), 0, 0,
+ DEF_TEXT_PADX, TCL_AUTO_LENGTH, offsetof(TkText, padX), 0, 0,
TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- DEF_TEXT_PADY, -1, offsetof(TkText, padY), 0, 0, 0},
+ DEF_TEXT_PADY, TCL_AUTO_LENGTH, offsetof(TkText, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_TEXT_RELIEF, -1, offsetof(TkText, relief), 0, 0, 0},
+ DEF_TEXT_RELIEF, TCL_AUTO_LENGTH, offsetof(TkText, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_TEXT_SELECT_COLOR, -1, offsetof(TkText, selBorder),
+ DEF_TEXT_SELECT_COLOR, TCL_AUTO_LENGTH, offsetof(TkText, selBorder),
0, DEF_TEXT_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
"BorderWidth", DEF_TEXT_SELECT_BD_COLOR,
@@ -212,48 +212,48 @@ static const Tk_OptionSpec optionSpecs[] = {
offsetof(TkText, selBorderWidth),
TK_OPTION_NULL_OK, DEF_TEXT_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_TEXT_SELECT_FG_COLOR, -1, offsetof(TkText, selFgColorPtr),
+ DEF_TEXT_SELECT_FG_COLOR, TCL_AUTO_LENGTH, offsetof(TkText, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_TEXT_SELECT_FG_MONO, 0},
{TK_OPTION_BOOLEAN, "-setgrid", "setGrid", "SetGrid",
- DEF_TEXT_SET_GRID, -1, offsetof(TkText, setGrid), 0, 0, 0},
+ DEF_TEXT_SET_GRID, TCL_AUTO_LENGTH, offsetof(TkText, setGrid), 0, 0, 0},
{TK_OPTION_PIXELS, "-spacing1", "spacing1", "Spacing",
- DEF_TEXT_SPACING1, -1, offsetof(TkText, spacing1),
+ DEF_TEXT_SPACING1, TCL_AUTO_LENGTH, offsetof(TkText, spacing1),
0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_PIXELS, "-spacing2", "spacing2", "Spacing",
- DEF_TEXT_SPACING2, -1, offsetof(TkText, spacing2),
+ DEF_TEXT_SPACING2, TCL_AUTO_LENGTH, offsetof(TkText, spacing2),
0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_PIXELS, "-spacing3", "spacing3", "Spacing",
- DEF_TEXT_SPACING3, -1, offsetof(TkText, spacing3),
+ DEF_TEXT_SPACING3, TCL_AUTO_LENGTH, offsetof(TkText, spacing3),
0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_CUSTOM, "-startline", NULL, NULL,
- NULL, -1, offsetof(TkText, start), TK_OPTION_NULL_OK,
+ NULL, TCL_AUTO_LENGTH, offsetof(TkText, start), TK_OPTION_NULL_OK,
&lineOption, TK_TEXT_LINE_RANGE},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_TEXT_STATE, -1, offsetof(TkText, state),
+ DEF_TEXT_STATE, TCL_AUTO_LENGTH, offsetof(TkText, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-tabs", "tabs", "Tabs",
- DEF_TEXT_TABS, offsetof(TkText, tabOptionPtr), -1,
+ DEF_TEXT_TABS, offsetof(TkText, tabOptionPtr), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING_TABLE, "-tabstyle", "tabStyle", "TabStyle",
- DEF_TEXT_TABSTYLE, -1, offsetof(TkText, tabStyle),
+ DEF_TEXT_TABSTYLE, TCL_AUTO_LENGTH, offsetof(TkText, tabStyle),
0, tabStyleStrings, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_TEXT_TAKE_FOCUS, -1, offsetof(TkText, takeFocus),
+ DEF_TEXT_TAKE_FOCUS, TCL_AUTO_LENGTH, offsetof(TkText, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-undo", "undo", "Undo",
- DEF_TEXT_UNDO, -1, offsetof(TkText, undo),
+ DEF_TEXT_UNDO, TCL_AUTO_LENGTH, offsetof(TkText, undo),
TK_OPTION_DONT_SET_DEFAULT, 0 , 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_TEXT_WIDTH, -1, offsetof(TkText, width), 0, 0,
+ DEF_TEXT_WIDTH, TCL_AUTO_LENGTH, offsetof(TkText, width), 0, 0,
TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING_TABLE, "-wrap", "wrap", "Wrap",
- DEF_TEXT_WRAP, -1, offsetof(TkText, wrapMode),
+ DEF_TEXT_WRAP, TCL_AUTO_LENGTH, offsetof(TkText, wrapMode),
0, wrapStrings, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_TEXT_XSCROLL_COMMAND, -1, offsetof(TkText, xScrollCmd),
+ DEF_TEXT_XSCROLL_COMMAND, TCL_AUTO_LENGTH, offsetof(TkText, xScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
- DEF_TEXT_YSCROLL_COMMAND, -1, offsetof(TkText, yScrollCmd),
+ DEF_TEXT_YSCROLL_COMMAND, TCL_AUTO_LENGTH, offsetof(TkText, yScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0}
};
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 9cb43c4..9da8eff 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -83,17 +83,17 @@ typedef enum {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-align", NULL, NULL,
- "center", -1, offsetof(TkTextEmbImage, align),
+ "center", TCL_AUTO_LENGTH, offsetof(TkTextEmbImage, align),
0, alignStrings, 0},
{TK_OPTION_PIXELS, "-padx", NULL, NULL,
- "0", -1, offsetof(TkTextEmbImage, padX), 0, 0, 0},
+ "0", TCL_AUTO_LENGTH, offsetof(TkTextEmbImage, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", NULL, NULL,
- "0", -1, offsetof(TkTextEmbImage, padY), 0, 0, 0},
+ "0", TCL_AUTO_LENGTH, offsetof(TkTextEmbImage, padY), 0, 0, 0},
{TK_OPTION_STRING, "-image", NULL, NULL,
- NULL, -1, offsetof(TkTextEmbImage, imageString),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextEmbImage, imageString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-name", NULL, NULL,
- NULL, -1, offsetof(TkTextEmbImage, imageName),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextEmbImage, imageName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index 5d2acb0..d9cfc6b 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -40,66 +40,66 @@ static const char *const tabStyleStrings[] = {
static const Tk_OptionSpec tagOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, border), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, border), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BITMAP, "-bgstipple", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, bgStipple), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, bgStipple), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", NULL, NULL,
NULL, offsetof(TkTextTag, borderWidthPtr), offsetof(TkTextTag, borderWidth),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_STRING, "-elide", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, elideString),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, elideString),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_BITMAP, "-fgstipple", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, fgStipple), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, fgStipple), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_FONT, "-font", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, tkfont), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, tkfont), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-foreground", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, fgColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, fgColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-justify", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, justifyString), TK_OPTION_NULL_OK, 0,0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, justifyString), TK_OPTION_NULL_OK, 0,0},
{TK_OPTION_STRING, "-lmargin1", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, lMargin1String), TK_OPTION_NULL_OK,0,0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, lMargin1String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-lmargin2", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, lMargin2String), TK_OPTION_NULL_OK,0,0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, lMargin2String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_BORDER, "-lmargincolor", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, lMarginColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, lMarginColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-offset", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, offsetString), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, offsetString), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-overstrike", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, overstrikeString),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, overstrikeString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-overstrikefg", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, overstrikeColor),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, overstrikeColor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-relief", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, reliefString), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, reliefString), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-rmargin", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, rMarginString), TK_OPTION_NULL_OK, 0,0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, rMarginString), TK_OPTION_NULL_OK, 0,0},
{TK_OPTION_BORDER, "-rmargincolor", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, rMarginColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, rMarginColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, selBorder), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, selBorder), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-selectforeground", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, selFgColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, selFgColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-spacing1", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, spacing1String), TK_OPTION_NULL_OK,0,0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, spacing1String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-spacing2", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, spacing2String), TK_OPTION_NULL_OK,0,0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, spacing2String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-spacing3", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, spacing3String), TK_OPTION_NULL_OK,0,0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, spacing3String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-tabs", NULL, NULL,
- NULL, offsetof(TkTextTag, tabStringPtr), -1, TK_OPTION_NULL_OK, 0, 0},
+ NULL, offsetof(TkTextTag, tabStringPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-tabstyle", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, tabStyle),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, tabStyle),
TK_OPTION_NULL_OK, tabStyleStrings, 0},
{TK_OPTION_STRING, "-underline", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, underlineString),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, underlineString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-underlinefg", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, underlineColor),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, underlineColor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-wrap", NULL, NULL,
- NULL, -1, offsetof(TkTextTag, wrapMode),
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextTag, wrapMode),
TK_OPTION_NULL_OK, wrapStrings, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index 2df4342..364632d 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -99,18 +99,18 @@ typedef enum {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-align", NULL, NULL,
- "center", -1, offsetof(TkTextEmbWindow, align),
+ "center", TCL_AUTO_LENGTH, offsetof(TkTextEmbWindow, align),
0, alignStrings, 0},
{TK_OPTION_STRING, "-create", NULL, NULL,
- NULL, -1, offsetof(TkTextEmbWindow, create), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextEmbWindow, create), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", NULL, NULL,
- "0", -1, offsetof(TkTextEmbWindow, padX), 0, 0, 0},
+ "0", TCL_AUTO_LENGTH, offsetof(TkTextEmbWindow, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", NULL, NULL,
- "0", -1, offsetof(TkTextEmbWindow, padY), 0, 0, 0},
+ "0", TCL_AUTO_LENGTH, offsetof(TkTextEmbWindow, padY), 0, 0, 0},
{TK_OPTION_BOOLEAN, "-stretch", NULL, NULL,
- "0", -1, offsetof(TkTextEmbWindow, stretch), 0, 0, 0},
+ "0", TCL_AUTO_LENGTH, offsetof(TkTextEmbWindow, stretch), 0, 0, 0},
{TK_OPTION_WINDOW, "-window", NULL, NULL,
- NULL, -1, offsetof(TkTextEmbWindow, tkwin), TK_OPTION_NULL_OK, 0, 0},
+ NULL, TCL_AUTO_LENGTH, offsetof(TkTextEmbWindow, tkwin), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index dec802b..be4a211 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -57,45 +57,45 @@ typedef struct
static const Tk_OptionSpec BaseOptionSpecs[] =
{
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- "left", offsetof(Base,base.justifyObj), -1,
+ "left", offsetof(Base,base.justifyObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-text", "text", "Text", "",
- offsetof(Base,base.textObj), -1,
+ offsetof(Base,base.textObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", "",
- offsetof(Base,base.textVariableObj), -1,
+ offsetof(Base,base.textVariableObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-underline", "underline", "Underline",
- "-1", offsetof(Base,base.underlineObj), -1,
+ "-1", offsetof(Base,base.underlineObj), TCL_AUTO_LENGTH,
0,0,0 },
/* SB: OPTION_INT, see <<NOTE-NULLOPTIONS>> */
{TK_OPTION_STRING, "-width", "width", "Width",
- NULL, offsetof(Base,base.widthObj), -1,
+ NULL, offsetof(Base,base.widthObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
/*
* Image options
*/
{TK_OPTION_STRING, "-image", "image", "Image", NULL/*default*/,
- offsetof(Base,base.imageObj), -1,
+ offsetof(Base,base.imageObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
/*
* Compound base/image options
*/
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- NULL, offsetof(Base,base.compoundObj), -1,
+ NULL, offsetof(Base,base.compoundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,(void *)ttkCompoundStrings,
GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Pad",
- NULL, offsetof(Base,base.paddingObj), -1,
+ NULL, offsetof(Base,base.paddingObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED},
/*
* Compatibility/legacy options
*/
{TK_OPTION_STRING, "-state", "state", "State",
- "normal", offsetof(Base,base.stateObj), -1,
+ "normal", offsetof(Base,base.stateObj), TCL_AUTO_LENGTH,
0,0,STATE_CHANGED },
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
@@ -244,28 +244,28 @@ typedef struct
static const Tk_OptionSpec LabelOptionSpecs[] =
{
{TK_OPTION_BORDER, "-background", "frameColor", "FrameColor",
- NULL, offsetof(Label,label.backgroundObj), -1,
+ NULL, offsetof(Label,label.backgroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
- NULL, offsetof(Label,label.foregroundObj), -1,
+ NULL, offsetof(Label,label.foregroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_FONT, "-font", "font", "Font",
- NULL, offsetof(Label,label.fontObj), -1,
+ NULL, offsetof(Label,label.fontObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- NULL, offsetof(Label,label.borderWidthObj), -1,
+ NULL, offsetof(Label,label.borderWidthObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- NULL, offsetof(Label,label.reliefObj), -1,
+ NULL, offsetof(Label,label.reliefObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- NULL, offsetof(Label,label.anchorObj), -1,
+ NULL, offsetof(Label,label.anchorObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- NULL, offsetof(Label, label.justifyObj), -1,
+ NULL, offsetof(Label, label.justifyObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- NULL, offsetof(Label, label.wrapLengthObj), -1,
+ NULL, offsetof(Label, label.wrapLengthObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED /*SB: SIZE_CHANGED*/ },
WIDGET_TAKEFOCUS_FALSE,
@@ -327,9 +327,9 @@ typedef struct
static const Tk_OptionSpec ButtonOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command",
- "", offsetof(Button, button.commandObj), -1, 0,0,0},
+ "", offsetof(Button, button.commandObj), TCL_AUTO_LENGTH, 0,0,0},
{TK_OPTION_STRING_TABLE, "-default", "default", "Default",
- "normal", offsetof(Button, button.defaultStateObj), -1,
+ "normal", offsetof(Button, button.defaultStateObj), TCL_AUTO_LENGTH,
0, (void *)ttkDefaultStrings, DEFAULTSTATE_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
@@ -437,16 +437,16 @@ typedef struct
static const Tk_OptionSpec CheckbuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- NULL, offsetof(Checkbutton, checkbutton.variableObj), -1,
+ NULL, offsetof(Checkbutton, checkbutton.variableObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-onvalue", "onValue", "OnValue",
- "1", offsetof(Checkbutton, checkbutton.onValueObj), -1,
+ "1", offsetof(Checkbutton, checkbutton.onValueObj), TCL_AUTO_LENGTH,
0,0,0},
{TK_OPTION_STRING, "-offvalue", "offValue", "OffValue",
- "0", offsetof(Checkbutton, checkbutton.offValueObj), -1,
+ "0", offsetof(Checkbutton, checkbutton.offValueObj), TCL_AUTO_LENGTH,
0,0,0},
{TK_OPTION_STRING, "-command", "command", "Command",
- "", offsetof(Checkbutton, checkbutton.commandObj), -1,
+ "", offsetof(Checkbutton, checkbutton.commandObj), TCL_AUTO_LENGTH,
0,0,0},
WIDGET_TAKEFOCUS_TRUE,
@@ -645,13 +645,13 @@ typedef struct
static const Tk_OptionSpec RadiobuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- "::selectedButton", offsetof(Radiobutton, radiobutton.variableObj),-1,
+ "::selectedButton", offsetof(Radiobutton, radiobutton.variableObj),TCL_AUTO_LENGTH,
0,0,0},
{TK_OPTION_STRING, "-value", "Value", "Value",
- "1", offsetof(Radiobutton, radiobutton.valueObj), -1,
+ "1", offsetof(Radiobutton, radiobutton.valueObj), TCL_AUTO_LENGTH,
0,0,0},
{TK_OPTION_STRING, "-command", "command", "Command",
- "", offsetof(Radiobutton, radiobutton.commandObj), -1,
+ "", offsetof(Radiobutton, radiobutton.commandObj), TCL_AUTO_LENGTH,
0,0,0},
WIDGET_TAKEFOCUS_TRUE,
@@ -820,9 +820,9 @@ static const char *const directionStrings[] = {
static const Tk_OptionSpec MenubuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-menu", "menu", "Menu",
- "", offsetof(Menubutton, menubutton.menuObj), -1, 0,0,0},
+ "", offsetof(Menubutton, menubutton.menuObj), TCL_AUTO_LENGTH, 0,0,0},
{TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction",
- "below", offsetof(Menubutton, menubutton.directionObj), -1,
+ "below", offsetof(Menubutton, menubutton.directionObj), TCL_AUTO_LENGTH,
0,(ClientData)directionStrings,GEOMETRY_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index cb5435a..3f28445 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -156,53 +156,53 @@ typedef struct {
static const Tk_OptionSpec EntryOptionSpecs[] = {
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
- "ExportSelection", "1", -1, offsetof(Entry, entry.exportSelection),
+ "ExportSelection", "1", TCL_AUTO_LENGTH, offsetof(Entry, entry.exportSelection),
0,0,0 },
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_ENTRY_FONT, offsetof(Entry, entry.fontObj),-1,
+ DEF_ENTRY_FONT, offsetof(Entry, entry.fontObj),TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand",
- NULL, -1, offsetof(Entry, entry.invalidCmd),
+ NULL, TCL_AUTO_LENGTH, offsetof(Entry, entry.invalidCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- "left", -1, offsetof(Entry, entry.justify),
+ "left", TCL_AUTO_LENGTH, offsetof(Entry, entry.justify),
0, 0, GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder",
- NULL, offsetof(Entry, entry.placeholderObj), -1,
+ NULL, offsetof(Entry, entry.placeholderObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-show", "show", "Show",
- NULL, -1, offsetof(Entry, entry.showChar),
+ NULL, TCL_AUTO_LENGTH, offsetof(Entry, entry.showChar),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-state", "state", "State",
- "normal", offsetof(Entry, entry.stateObj), -1,
+ "normal", offsetof(Entry, entry.stateObj), TCL_AUTO_LENGTH,
0,0,STATE_CHANGED},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- NULL, offsetof(Entry, entry.textVariableObj), -1,
+ NULL, offsetof(Entry, entry.textVariableObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,TEXTVAR_CHANGED},
{TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate",
- "none", -1, offsetof(Entry, entry.validate),
+ "none", TCL_AUTO_LENGTH, offsetof(Entry, entry.validate),
0, (ClientData) validateStrings, 0},
{TK_OPTION_STRING, "-validatecommand", "validateCommand", "ValidateCommand",
- NULL, -1, offsetof(Entry, entry.validateCmd),
+ NULL, TCL_AUTO_LENGTH, offsetof(Entry, entry.validateCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_ENTRY_WIDTH, offsetof(Entry, entry.widthObj), -1,
+ DEF_ENTRY_WIDTH, offsetof(Entry, entry.widthObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- NULL, -1, offsetof(Entry, entry.xscroll.scrollCmd),
+ NULL, TCL_AUTO_LENGTH, offsetof(Entry, entry.xscroll.scrollCmd),
TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED},
/* EntryStyleData options:
*/
{TK_OPTION_COLOR, "-background", "windowColor", "WindowColor",
- NULL, offsetof(Entry, entry.styleData.backgroundObj), -1,
+ NULL, offsetof(Entry, entry.styleData.backgroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
- NULL, offsetof(Entry, entry.styleData.foregroundObj), -1,
+ NULL, offsetof(Entry, entry.styleData.foregroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground",
"PlaceholderForeground", NULL,
- offsetof(Entry, entry.styleData.placeholderForegroundObj), -1,
+ offsetof(Entry, entry.styleData.placeholderForegroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0},
WIDGET_TAKEFOCUS_TRUE,
@@ -1777,13 +1777,13 @@ typedef struct {
static const Tk_OptionSpec ComboboxOptionSpecs[] = {
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_LIST_HEIGHT, offsetof(Combobox, combobox.heightObj), -1,
+ DEF_LIST_HEIGHT, offsetof(Combobox, combobox.heightObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-postcommand", "postCommand", "PostCommand",
- "", offsetof(Combobox, combobox.postCommandObj), -1,
+ "", offsetof(Combobox, combobox.postCommandObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-values", "values", "Values",
- "", offsetof(Combobox, combobox.valuesObj), -1,
+ "", offsetof(Combobox, combobox.valuesObj), TCL_AUTO_LENGTH,
0,0,0 },
WIDGET_INHERIT_OPTIONS(EntryOptionSpecs)
};
@@ -1968,27 +1968,27 @@ typedef struct {
static const Tk_OptionSpec SpinboxOptionSpecs[] = {
{TK_OPTION_STRING, "-values", "values", "Values",
- "", offsetof(Spinbox, spinbox.valuesObj), -1,
+ "", offsetof(Spinbox, spinbox.valuesObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_DOUBLE, "-from", "from", "From",
- "0", offsetof(Spinbox,spinbox.fromObj), -1,
+ "0", offsetof(Spinbox,spinbox.fromObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_DOUBLE, "-to", "to", "To",
- "0", offsetof(Spinbox,spinbox.toObj), -1,
+ "0", offsetof(Spinbox,spinbox.toObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_DOUBLE, "-increment", "increment", "Increment",
- "1", offsetof(Spinbox,spinbox.incrementObj), -1,
+ "1", offsetof(Spinbox,spinbox.incrementObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-format", "format", "Format",
- "", offsetof(Spinbox, spinbox.formatObj), -1,
+ "", offsetof(Spinbox, spinbox.formatObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-command", "command", "Command",
- "", offsetof(Spinbox, spinbox.commandObj), -1,
+ "", offsetof(Spinbox, spinbox.commandObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_BOOLEAN, "-wrap", "wrap", "Wrap",
- "0", offsetof(Spinbox,spinbox.wrapObj), -1,
+ "0", offsetof(Spinbox,spinbox.wrapObj), TCL_AUTO_LENGTH,
0,0,0 },
WIDGET_INHERIT_OPTIONS(EntryOptionSpecs)
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index 85ef9fa..9396982 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -28,19 +28,19 @@ typedef struct {
static const Tk_OptionSpec FrameOptionSpecs[] = {
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", NULL,
- offsetof(Frame,frame.borderWidthObj), -1,
+ offsetof(Frame,frame.borderWidthObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Pad", NULL,
- offsetof(Frame,frame.paddingObj), -1,
+ offsetof(Frame,frame.paddingObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_RELIEF, "-relief", "relief", "Relief", NULL,
- offsetof(Frame,frame.reliefObj), -1,
+ offsetof(Frame,frame.reliefObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_PIXELS, "-width", "width", "Width", "0",
- offsetof(Frame,frame.widthObj), -1,
+ offsetof(Frame,frame.widthObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-height", "height", "Height", "0",
- offsetof(Frame,frame.heightObj), -1,
+ offsetof(Frame,frame.heightObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
WIDGET_TAKEFOCUS_FALSE,
@@ -252,16 +252,16 @@ typedef struct {
static const Tk_OptionSpec LabelframeOptionSpecs[] = {
{TK_OPTION_STRING, "-labelanchor", "labelAnchor", "LabelAnchor",
- "nw", offsetof(Labelframe, label.labelAnchorObj),-1,
+ "nw", offsetof(Labelframe, label.labelAnchorObj),TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-text", "text", "Text", "",
- offsetof(Labelframe,label.textObj), -1,
+ offsetof(Labelframe,label.textObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-underline", "underline", "Underline",
- "-1", offsetof(Labelframe,label.underlineObj), -1,
+ "-1", offsetof(Labelframe,label.underlineObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget", NULL,
- -1, offsetof(Labelframe,label.labelWidget),
+ TCL_AUTO_LENGTH, offsetof(Labelframe,label.labelWidget),
TK_OPTION_NULL_OK,0,LABELWIDGET_CHANGED|GEOMETRY_CHANGED },
WIDGET_INHERIT_OPTIONS(FrameOptionSpecs)
diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c
index f7f0066..b172e32 100644
--- a/generic/ttk/ttkInit.c
+++ b/generic/ttk/ttkInit.c
@@ -197,11 +197,11 @@ int TtkGetOptionValue(
const Tk_OptionSpec ttkCoreOptionSpecs[] =
{
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", NULL,
- offsetof(WidgetCore, cursorObj), -1, TK_OPTION_NULL_OK,0,0 },
+ offsetof(WidgetCore, cursorObj), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_STRING, "-style", "style", "Style", "",
- offsetof(WidgetCore,styleObj), -1, 0,0,STYLE_CHANGED},
+ offsetof(WidgetCore,styleObj), TCL_AUTO_LENGTH, 0,0,STYLE_CHANGED},
{TK_OPTION_STRING, "-class", "", "", NULL,
- offsetof(WidgetCore,classObj), -1, 0,0,READONLY_OPTION},
+ offsetof(WidgetCore,classObj), TCL_AUTO_LENGTH, 0,0,READONLY_OPTION},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 93178f4..2ad900a 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -58,26 +58,26 @@ typedef struct
static const Tk_OptionSpec TabOptionSpecs[] =
{
{TK_OPTION_STRING_TABLE, "-state", "", "",
- "normal", -1, offsetof(Tab,state),
+ "normal", TCL_AUTO_LENGTH, offsetof(Tab,state),
0,(ClientData)TabStateStrings,0 },
{TK_OPTION_STRING, "-text", "text", "Text", "",
- offsetof(Tab,textObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,textObj), TCL_AUTO_LENGTH, 0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-image", "image", "Image", NULL/*default*/,
- offsetof(Tab,imageObj), -1, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
+ offsetof(Tab,imageObj), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- NULL, offsetof(Tab,compoundObj), -1,
+ NULL, offsetof(Tab,compoundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,(void *)ttkCompoundStrings,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-underline", "underline", "Underline", "-1",
- offsetof(Tab,underlineObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,underlineObj), TCL_AUTO_LENGTH, 0,0,GEOMETRY_CHANGED },
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 }
};
static const Tk_OptionSpec PaneOptionSpecs[] =
{
{TK_OPTION_STRING, "-padding", "padding", "Padding", "0",
- offsetof(Tab,paddingObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,paddingObj), TCL_AUTO_LENGTH, 0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-sticky", "sticky", "Sticky", "nsew",
- offsetof(Tab,stickyObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,stickyObj), TCL_AUTO_LENGTH, 0,0,GEOMETRY_CHANGED },
WIDGET_INHERIT_OPTIONS(TabOptionSpecs)
};
@@ -110,13 +110,13 @@ typedef struct
static const Tk_OptionSpec NotebookOptionSpecs[] =
{
{TK_OPTION_INT, "-width", "width", "Width", "0",
- offsetof(Notebook,notebook.widthObj),-1,
+ offsetof(Notebook,notebook.widthObj),TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-height", "height", "Height", "0",
- offsetof(Notebook,notebook.heightObj),-1,
+ offsetof(Notebook,notebook.heightObj),TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Padding", NULL,
- offsetof(Notebook,notebook.paddingObj),-1,
+ offsetof(Notebook,notebook.paddingObj),TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
WIDGET_TAKEFOCUS_TRUE,
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index 105f823..c8d0b99 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -79,10 +79,10 @@ static const Tk_OptionSpec PanedOptionSpecs[] = {
offsetof(Paned,paned.orientObj), offsetof(Paned,paned.orient),
0,(ClientData)ttkOrientStrings,READONLY_OPTION|STYLE_CHANGED },
{TK_OPTION_INT, "-width", "width", "Width", "0",
- -1, offsetof(Paned,paned.width),
+ TCL_AUTO_LENGTH, offsetof(Paned,paned.width),
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-height", "height", "Height", "0",
- -1, offsetof(Paned,paned.height),
+ TCL_AUTO_LENGTH, offsetof(Paned,paned.height),
0,0,GEOMETRY_CHANGED },
WIDGET_TAKEFOCUS_FALSE,
@@ -100,8 +100,8 @@ typedef struct {
static const Tk_OptionSpec PaneOptionSpecs[] = {
{TK_OPTION_INT, "-weight", "weight", "Weight", "0",
- -1, offsetof(Pane,weight), 0,0,GEOMETRY_CHANGED },
- {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
+ TCL_AUTO_LENGTH, offsetof(Pane,weight), 0,0,GEOMETRY_CHANGED },
+ {TK_OPTION_END, 0,0,0, NULL, TCL_AUTO_LENGTH,TCL_AUTO_LENGTH, 0,0,0}
};
/* CreatePane --
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index 60b69ad..237c5cf 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -51,44 +51,44 @@ typedef struct {
static const Tk_OptionSpec ProgressbarOptionSpecs[] =
{
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- "w", offsetof(Progressbar,progress.anchorObj), -1,
+ "w", offsetof(Progressbar,progress.anchorObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEFAULT_FONT, offsetof(Progressbar,progress.fontObj), -1,
+ DEFAULT_FONT, offsetof(Progressbar,progress.fontObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
- "black", offsetof(Progressbar,progress.foregroundObj), -1,
+ "black", offsetof(Progressbar,progress.foregroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- "left", offsetof(Progressbar,progress.justifyObj), -1,
+ "left", offsetof(Progressbar,progress.justifyObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-length", "length", "Length",
- DEF_PROGRESSBAR_LENGTH, offsetof(Progressbar,progress.lengthObj), -1,
+ DEF_PROGRESSBAR_LENGTH, offsetof(Progressbar,progress.lengthObj), TCL_AUTO_LENGTH,
0, 0, GEOMETRY_CHANGED },
{TK_OPTION_DOUBLE, "-maximum", "maximum", "Maximum",
- "100", offsetof(Progressbar,progress.maximumObj), -1,
+ "100", offsetof(Progressbar,progress.maximumObj), TCL_AUTO_LENGTH,
0, 0, 0 },
{TK_OPTION_STRING_TABLE, "-mode", "mode", "ProgressMode", "determinate",
offsetof(Progressbar,progress.modeObj),
offsetof(Progressbar,progress.mode),
0, (ClientData)ProgressbarModeStrings, 0 },
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
- "horizontal", offsetof(Progressbar,progress.orientObj), -1,
+ "horizontal", offsetof(Progressbar,progress.orientObj), TCL_AUTO_LENGTH,
0, (ClientData)ttkOrientStrings, STYLE_CHANGED },
{TK_OPTION_INT, "-phase", "phase", "Phase",
- "0", offsetof(Progressbar,progress.phaseObj), -1,
+ "0", offsetof(Progressbar,progress.phaseObj), TCL_AUTO_LENGTH,
0, 0, 0 },
{TK_OPTION_STRING, "-text", "text", "Text", "",
- offsetof(Progressbar,progress.textObj), -1,
+ offsetof(Progressbar,progress.textObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_DOUBLE, "-value", "value", "Value",
- "0.0", offsetof(Progressbar,progress.valueObj), -1,
+ "0.0", offsetof(Progressbar,progress.valueObj), TCL_AUTO_LENGTH,
0, 0, 0 },
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- NULL, offsetof(Progressbar,progress.variableObj), -1,
+ NULL, offsetof(Progressbar,progress.variableObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, 0 },
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- "0", offsetof(Progressbar, progress.wrapLengthObj), -1,
+ "0", offsetof(Progressbar, progress.wrapLengthObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED},
WIDGET_TAKEFOCUS_FALSE,
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 0b0f121..ae817d8 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -53,10 +53,10 @@ typedef struct
static const Tk_OptionSpec ScaleOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
- offsetof(Scale,scale.commandObj), -1,
+ offsetof(Scale,scale.commandObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-variable", "variable", "Variable", "",
- offsetof(Scale,scale.variableObj), -1,
+ offsetof(Scale,scale.variableObj), TCL_AUTO_LENGTH,
0,0,0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal",
offsetof(Scale,scale.orientObj),
@@ -64,17 +64,17 @@ static const Tk_OptionSpec ScaleOptionSpecs[] =
(ClientData)ttkOrientStrings, STYLE_CHANGED },
{TK_OPTION_DOUBLE, "-from", "from", "From", "0",
- offsetof(Scale,scale.fromObj), -1, 0, 0, 0},
+ offsetof(Scale,scale.fromObj), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To", "1.0",
- offsetof(Scale,scale.toObj), -1, 0, 0, 0},
+ offsetof(Scale,scale.toObj), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_DOUBLE, "-value", "value", "Value", "0",
- offsetof(Scale,scale.valueObj), -1, 0, 0, 0},
+ offsetof(Scale,scale.valueObj), TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_PIXELS, "-length", "length", "Length",
- DEF_SCALE_LENGTH, offsetof(Scale,scale.lengthObj), -1, 0, 0,
+ DEF_SCALE_LENGTH, offsetof(Scale,scale.lengthObj), TCL_AUTO_LENGTH, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-state", "state", "State",
- "normal", offsetof(Scale,scale.stateObj), -1,
+ "normal", offsetof(Scale,scale.stateObj), TCL_AUTO_LENGTH,
0,0,STATE_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index 55a2bd2..00dc1ba 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -34,7 +34,7 @@ typedef struct
static const Tk_OptionSpec ScrollbarOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
- offsetof(Scrollbar,scrollbar.commandObj), -1, 0,0,0},
+ offsetof(Scrollbar,scrollbar.commandObj), TCL_AUTO_LENGTH, 0,0,0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "vertical",
offsetof(Scrollbar,scrollbar.orientObj),
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index a65591c..f2187b9 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -51,28 +51,28 @@ typedef struct
static const Tk_OptionSpec SquareOptionSpecs[] =
{
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEFAULT_BORDERWIDTH, offsetof(Square,square.borderWidthObj), -1,
+ DEFAULT_BORDERWIDTH, offsetof(Square,square.borderWidthObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
DEFAULT_BACKGROUND, offsetof(Square,square.foregroundObj),
- -1, 0, 0, 0},
+ TCL_AUTO_LENGTH, 0, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- "50", offsetof(Square,square.widthObj), -1, 0, 0,
+ "50", offsetof(Square,square.widthObj), TCL_AUTO_LENGTH, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_PIXELS, "-height", "height", "Height",
- "50", offsetof(Square,square.heightObj), -1, 0, 0,
+ "50", offsetof(Square,square.heightObj), TCL_AUTO_LENGTH, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-padding", "padding", "Pad", NULL,
- offsetof(Square,square.paddingObj), -1,
+ offsetof(Square,square.paddingObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- NULL, offsetof(Square,square.reliefObj), -1, TK_OPTION_NULL_OK, 0, 0},
+ NULL, offsetof(Square,square.reliefObj), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- NULL, offsetof(Square,square.anchorObj), -1, TK_OPTION_NULL_OK, 0, 0},
+ NULL, offsetof(Square,square.anchorObj), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, 0, 0},
WIDGET_TAKEFOCUS_TRUE,
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index bb36322..eaad1c8 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -61,22 +61,22 @@ struct TreeItemRec {
static const Tk_OptionSpec ItemOptionSpecs[] = {
{TK_OPTION_STRING, "-text", "text", "Text",
- "", offsetof(TreeItem,textObj), -1,
+ "", offsetof(TreeItem,textObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-image", "image", "Image",
- NULL, offsetof(TreeItem,imageObj), -1,
+ NULL, offsetof(TreeItem,imageObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,ITEM_OPTION_IMAGE_CHANGED },
{TK_OPTION_STRING, "-values", "values", "Values",
- NULL, offsetof(TreeItem,valuesObj), -1,
+ NULL, offsetof(TreeItem,valuesObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_BOOLEAN, "-open", "open", "Open",
- "0", offsetof(TreeItem,openObj), -1,
+ "0", offsetof(TreeItem,openObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-tags", "tags", "Tags",
- NULL, offsetof(TreeItem,tagsObj), -1,
+ NULL, offsetof(TreeItem,tagsObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,ITEM_OPTION_TAGS_CHANGED },
- {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
+ {TK_OPTION_END, 0,0,0, NULL, TCL_AUTO_LENGTH,TCL_AUTO_LENGTH, 0,0,0}
};
/* + NewItem --
@@ -189,25 +189,25 @@ typedef struct {
static const Tk_OptionSpec TagOptionSpecs[] = {
{TK_OPTION_STRING, "-text", "text", "Text",
- NULL, offsetof(DisplayItem,textObj), -1,
+ NULL, offsetof(DisplayItem,textObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_STRING, "-image", "image", "Image",
- NULL, offsetof(DisplayItem,imageObj), -1,
+ NULL, offsetof(DisplayItem,imageObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- NULL, offsetof(DisplayItem,anchorObj), -1,
+ NULL, offsetof(DisplayItem,anchorObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED}, /* <<NOTE-ANCHOR>> */
{TK_OPTION_COLOR, "-background", "windowColor", "WindowColor",
- NULL, offsetof(DisplayItem,backgroundObj), -1,
+ NULL, offsetof(DisplayItem,backgroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
- NULL, offsetof(DisplayItem,foregroundObj), -1,
+ NULL, offsetof(DisplayItem,foregroundObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_FONT, "-font", "font", "Font",
- NULL, offsetof(DisplayItem,fontObj), -1,
+ NULL, offsetof(DisplayItem,fontObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
- {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
+ {TK_OPTION_END, 0,0,0, NULL, TCL_AUTO_LENGTH,TCL_AUTO_LENGTH, 0,0,0}
};
/*------------------------------------------------------------------------
@@ -273,40 +273,40 @@ static void FreeColumn(TreeColumn *column)
static const Tk_OptionSpec ColumnOptionSpecs[] = {
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_COLWIDTH, -1, offsetof(TreeColumn,width),
+ DEF_COLWIDTH, TCL_AUTO_LENGTH, offsetof(TreeColumn,width),
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-minwidth", "minWidth", "MinWidth",
- DEF_MINWIDTH, -1, offsetof(TreeColumn,minWidth),
+ DEF_MINWIDTH, TCL_AUTO_LENGTH, offsetof(TreeColumn,minWidth),
0,0,0 },
{TK_OPTION_BOOLEAN, "-stretch", "stretch", "Stretch",
- "1", -1, offsetof(TreeColumn,stretch),
+ "1", TCL_AUTO_LENGTH, offsetof(TreeColumn,stretch),
0,0,GEOMETRY_CHANGED },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- "w", offsetof(TreeColumn,anchorObj), -1, /* <<NOTE-ANCHOR>> */
+ "w", offsetof(TreeColumn,anchorObj), TCL_AUTO_LENGTH, /* <<NOTE-ANCHOR>> */
0,0,0 },
{TK_OPTION_STRING, "-id", "id", "ID",
- NULL, offsetof(TreeColumn,idObj), -1,
+ NULL, offsetof(TreeColumn,idObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,READONLY_OPTION },
- {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
+ {TK_OPTION_END, 0,0,0, NULL, TCL_AUTO_LENGTH,TCL_AUTO_LENGTH, 0,0,0}
};
static const Tk_OptionSpec HeadingOptionSpecs[] = {
{TK_OPTION_STRING, "-text", "text", "Text",
- "", offsetof(TreeColumn,headingObj), -1,
+ "", offsetof(TreeColumn,headingObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-image", "image", "Image",
- "", offsetof(TreeColumn,headingImageObj), -1,
+ "", offsetof(TreeColumn,headingImageObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- "center", offsetof(TreeColumn,headingAnchorObj), -1,
+ "center", offsetof(TreeColumn,headingAnchorObj), TCL_AUTO_LENGTH,
0,0,0 },
{TK_OPTION_STRING, "-command", "", "",
- "", offsetof(TreeColumn,headingCommandObj), -1,
+ "", offsetof(TreeColumn,headingCommandObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_STRING, "state", "", "",
- "", offsetof(TreeColumn,headingStateObj), -1,
+ "", offsetof(TreeColumn,headingStateObj), TCL_AUTO_LENGTH,
0,0,STATE_CHANGED },
- {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
+ {TK_OPTION_END, 0,0,0, NULL, TCL_AUTO_LENGTH,TCL_AUTO_LENGTH, 0,0,0}
};
/*------------------------------------------------------------------------
@@ -437,31 +437,31 @@ static const char *const SelectModeStrings[] = { "none", "browse", "extended", N
static const Tk_OptionSpec TreeviewOptionSpecs[] = {
{TK_OPTION_STRING, "-columns", "columns", "Columns",
- "", offsetof(Treeview,tree.columnsObj), -1,
+ "", offsetof(Treeview,tree.columnsObj), TCL_AUTO_LENGTH,
0,0,COLUMNS_CHANGED | GEOMETRY_CHANGED /*| READONLY_OPTION*/ },
{TK_OPTION_STRING, "-displaycolumns","displayColumns","DisplayColumns",
- "#all", offsetof(Treeview,tree.displayColumnsObj), -1,
+ "#all", offsetof(Treeview,tree.displayColumnsObj), TCL_AUTO_LENGTH,
0,0,DCOLUMNS_CHANGED | GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-show", "show", "Show",
- DEFAULT_SHOW, offsetof(Treeview,tree.showObj), -1,
+ DEFAULT_SHOW, offsetof(Treeview,tree.showObj), TCL_AUTO_LENGTH,
0,0,SHOW_CHANGED | GEOMETRY_CHANGED },
{TK_OPTION_STRING_TABLE, "-selectmode", "selectMode", "SelectMode",
- "extended", offsetof(Treeview,tree.selectModeObj), -1,
+ "extended", offsetof(Treeview,tree.selectModeObj), TCL_AUTO_LENGTH,
0,(ClientData)SelectModeStrings,0 },
{TK_OPTION_PIXELS, "-height", "height", "Height",
- DEF_TREE_ROWS, offsetof(Treeview,tree.heightObj), -1,
+ DEF_TREE_ROWS, offsetof(Treeview,tree.heightObj), TCL_AUTO_LENGTH,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-padding", "padding", "Pad",
- NULL, offsetof(Treeview,tree.paddingObj), -1,
+ NULL, offsetof(Treeview,tree.paddingObj), TCL_AUTO_LENGTH,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- NULL, -1, offsetof(Treeview, tree.xscroll.scrollCmd),
+ NULL, TCL_AUTO_LENGTH, offsetof(Treeview, tree.xscroll.scrollCmd),
TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED},
{TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
- NULL, -1, offsetof(Treeview, tree.yscroll.scrollCmd),
+ NULL, TCL_AUTO_LENGTH, offsetof(Treeview, tree.yscroll.scrollCmd),
TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h
index 97a01f8..e6d17a1 100644
--- a/generic/ttk/ttkWidget.h
+++ b/generic/ttk/ttkWidget.h
@@ -117,17 +117,17 @@ MODULE_SCOPE int TtkWidgetConstructorObjCmd(
*/
#define WIDGET_TAKEFOCUS_TRUE \
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
- "ttk::takefocus", offsetof(WidgetCore, takeFocusPtr), -1, 0,0,0 }
+ "ttk::takefocus", offsetof(WidgetCore, takeFocusPtr), TCL_AUTO_LENGTH, 0,0,0 }
#define WIDGET_TAKEFOCUS_FALSE \
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
- "", offsetof(WidgetCore, takeFocusPtr), -1, 0,0,0 }
+ "", offsetof(WidgetCore, takeFocusPtr), TCL_AUTO_LENGTH, 0,0,0 }
/* WIDGET_INHERIT_OPTIONS(baseOptionSpecs) --
* Add this at the end of an OptionSpecs table to inherit
* the options from 'baseOptionSpecs'.
*/
#define WIDGET_INHERIT_OPTIONS(baseOptionSpecs) \
- {TK_OPTION_END, 0,0,0, NULL, -1,-1, 0, (ClientData)baseOptionSpecs, 0}
+ {TK_OPTION_END, 0,0,0, NULL, TCL_AUTO_LENGTH,TCL_AUTO_LENGTH, 0, baseOptionSpecs, 0}
/* All widgets should inherit from ttkCoreOptionSpecs[].
*/