summaryrefslogtreecommitdiffstats
path: root/generic/tkMenubutton.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-22 12:43:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-22 12:43:28 (GMT)
commitdfb0c81cd0a5d7f83c551496fdce521a68f12ffe (patch)
tree3d74c78e6c256fc20997d7340ff7f8e07f4306bb /generic/tkMenubutton.c
parent418047d43e5fde9bc3489580cc881324f5f3da7d (diff)
downloadtk-dfb0c81cd0a5d7f83c551496fdce521a68f12ffe.zip
tk-dfb0c81cd0a5d7f83c551496fdce521a68f12ffe.tar.gz
tk-dfb0c81cd0a5d7f83c551496fdce521a68f12ffe.tar.bz2
Don't use TCL_AUTO_LENGTH in Tk any more, just use TCL_INDEX_NONE consistantly everywhere: It's actually the same.
Diffstat (limited to 'generic/tkMenubutton.c')
-rw-r--r--generic/tkMenubutton.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index 085f5e7..4b7a492 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, TCL_AUTO_LENGTH,
+ DEF_MENUBUTTON_ACTIVE_BG_COLOR, TCL_INDEX_NONE,
offsetof(TkMenuButton, activeBorder), 0,
(ClientData) DEF_MENUBUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_MENUBUTTON_ACTIVE_FG_COLOR, TCL_AUTO_LENGTH,
+ DEF_MENUBUTTON_ACTIVE_FG_COLOR, TCL_INDEX_NONE,
offsetof(TkMenuButton, activeFg),
0, DEF_MENUBUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_MENUBUTTON_ANCHOR, TCL_AUTO_LENGTH,
+ DEF_MENUBUTTON_ANCHOR, TCL_INDEX_NONE,
offsetof(TkMenuButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_MENUBUTTON_BG_COLOR, TCL_AUTO_LENGTH, offsetof(TkMenuButton, normalBorder),
+ DEF_MENUBUTTON_BG_COLOR, TCL_INDEX_NONE, offsetof(TkMenuButton, normalBorder),
0, DEF_MENUBUTTON_BG_MONO, 0},
- {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
+ {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0,
(ClientData) "-borderwidth", 0},
- {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
+ {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0,
(ClientData) "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_MENUBUTTON_BITMAP, TCL_AUTO_LENGTH, offsetof(TkMenuButton, bitmap),
+ DEF_MENUBUTTON_BITMAP, TCL_INDEX_NONE, offsetof(TkMenuButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_MENUBUTTON_BORDER_WIDTH, TCL_AUTO_LENGTH,
+ DEF_MENUBUTTON_BORDER_WIDTH, TCL_INDEX_NONE,
offsetof(TkMenuButton, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_MENUBUTTON_CURSOR, TCL_AUTO_LENGTH, offsetof(TkMenuButton, cursor),
+ DEF_MENUBUTTON_CURSOR, TCL_INDEX_NONE, offsetof(TkMenuButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction",
- DEF_MENUBUTTON_DIRECTION, TCL_AUTO_LENGTH, offsetof(TkMenuButton, direction),
+ DEF_MENUBUTTON_DIRECTION, TCL_INDEX_NONE, offsetof(TkMenuButton, direction),
0, directionStrings, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_MENUBUTTON_DISABLED_FG_COLOR,
- TCL_AUTO_LENGTH, offsetof(TkMenuButton, disabledFg), TK_OPTION_NULL_OK,
+ TCL_INDEX_NONE, offsetof(TkMenuButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_MENUBUTTON_DISABLED_FG_MONO, 0},
- {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, NULL, 0, TCL_AUTO_LENGTH, 0,
+ {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, NULL, 0, TCL_INDEX_NONE, 0,
(ClientData) "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_MENUBUTTON_FONT, TCL_AUTO_LENGTH, offsetof(TkMenuButton, tkfont), 0, 0, 0},
+ DEF_MENUBUTTON_FONT, TCL_INDEX_NONE, offsetof(TkMenuButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_MENUBUTTON_FG, TCL_AUTO_LENGTH, offsetof(TkMenuButton, normalFg), 0, 0, 0},
+ DEF_MENUBUTTON_FG, TCL_INDEX_NONE, offsetof(TkMenuButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_MENUBUTTON_HEIGHT, TCL_AUTO_LENGTH, offsetof(TkMenuButton, heightString),
+ DEF_MENUBUTTON_HEIGHT, TCL_INDEX_NONE, offsetof(TkMenuButton, heightString),
0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR,
- TCL_AUTO_LENGTH, offsetof(TkMenuButton, highlightBgColorPtr), 0, 0, 0},
+ TCL_INDEX_NONE, offsetof(TkMenuButton, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_MENUBUTTON_HIGHLIGHT, TCL_AUTO_LENGTH,
+ DEF_MENUBUTTON_HIGHLIGHT, TCL_INDEX_NONE,
offsetof(TkMenuButton, highlightColorPtr), 0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_MENUBUTTON_HIGHLIGHT_WIDTH,
- TCL_AUTO_LENGTH, offsetof(TkMenuButton, highlightWidth), 0, 0, 0},
+ TCL_INDEX_NONE, offsetof(TkMenuButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_MENUBUTTON_IMAGE, TCL_AUTO_LENGTH, offsetof(TkMenuButton, imageString),
+ DEF_MENUBUTTON_IMAGE, TCL_INDEX_NONE, offsetof(TkMenuButton, imageString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_MENUBUTTON_INDICATOR, TCL_AUTO_LENGTH, offsetof(TkMenuButton, indicatorOn),
+ DEF_MENUBUTTON_INDICATOR, TCL_INDEX_NONE, offsetof(TkMenuButton, indicatorOn),
0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_MENUBUTTON_JUSTIFY, TCL_AUTO_LENGTH, offsetof(TkMenuButton, justify), 0, 0, 0},
+ DEF_MENUBUTTON_JUSTIFY, TCL_INDEX_NONE, offsetof(TkMenuButton, justify), 0, 0, 0},
{TK_OPTION_STRING, "-menu", "menu", "Menu",
- DEF_MENUBUTTON_MENU, TCL_AUTO_LENGTH, offsetof(TkMenuButton, menuName),
+ DEF_MENUBUTTON_MENU, TCL_INDEX_NONE, offsetof(TkMenuButton, menuName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- DEF_MENUBUTTON_PADX, TCL_AUTO_LENGTH, offsetof(TkMenuButton, padX),
+ DEF_MENUBUTTON_PADX, TCL_INDEX_NONE, offsetof(TkMenuButton, padX),
0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- DEF_MENUBUTTON_PADY, TCL_AUTO_LENGTH, offsetof(TkMenuButton, padY),
+ DEF_MENUBUTTON_PADY, TCL_INDEX_NONE, offsetof(TkMenuButton, padY),
0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MENUBUTTON_RELIEF, TCL_AUTO_LENGTH, offsetof(TkMenuButton, relief),
+ DEF_MENUBUTTON_RELIEF, TCL_INDEX_NONE, offsetof(TkMenuButton, relief),
0, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, TCL_AUTO_LENGTH, offsetof(TkMenuButton, compound), 0,
+ DEF_BUTTON_COMPOUND, TCL_INDEX_NONE, offsetof(TkMenuButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_MENUBUTTON_STATE, TCL_AUTO_LENGTH, offsetof(TkMenuButton, state),
+ DEF_MENUBUTTON_STATE, TCL_INDEX_NONE, offsetof(TkMenuButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_MENUBUTTON_TAKE_FOCUS, TCL_AUTO_LENGTH,
+ DEF_MENUBUTTON_TAKE_FOCUS, TCL_INDEX_NONE,
offsetof(TkMenuButton, takeFocus), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_MENUBUTTON_TEXT, TCL_AUTO_LENGTH, offsetof(TkMenuButton, text), 0, 0, 0},
+ DEF_MENUBUTTON_TEXT, TCL_INDEX_NONE, offsetof(TkMenuButton, text), 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_MENUBUTTON_TEXT_VARIABLE, TCL_AUTO_LENGTH,
+ DEF_MENUBUTTON_TEXT_VARIABLE, TCL_INDEX_NONE,
offsetof(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_MENUBUTTON_UNDERLINE, TCL_AUTO_LENGTH, offsetof(TkMenuButton, underline),
+ DEF_MENUBUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuButton, underline),
0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_MENUBUTTON_WIDTH, TCL_AUTO_LENGTH, offsetof(TkMenuButton, widthString),
+ DEF_MENUBUTTON_WIDTH, TCL_INDEX_NONE, offsetof(TkMenuButton, widthString),
0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- DEF_MENUBUTTON_WRAP_LENGTH, TCL_AUTO_LENGTH, offsetof(TkMenuButton, wrapLength),
+ DEF_MENUBUTTON_WRAP_LENGTH, TCL_INDEX_NONE, offsetof(TkMenuButton, wrapLength),
0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};