diff options
author | tmh <tmh> | 2001-10-12 13:30:31 (GMT) |
---|---|---|
committer | tmh <tmh> | 2001-10-12 13:30:31 (GMT) |
commit | 0831c65525995dfbf5f80d2721d4b36bbbc5f7a4 (patch) | |
tree | f0a41bc451b44d520db4074ba5b826c8c8d8b723 /generic/tkMenu.c | |
parent | 81bf48aa5effb92b297747dfcf1a6b6883f70beb (diff) | |
download | tk-0831c65525995dfbf5f80d2721d4b36bbbc5f7a4.zip tk-0831c65525995dfbf5f80d2721d4b36bbbc5f7a4.tar.gz tk-0831c65525995dfbf5f80d2721d4b36bbbc5f7a4.tar.bz2 |
implementation of TIP 63 (accepted) -compound option to menu items.
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r-- | generic/tkMenu.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 84e338d..ff50130 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenu.c,v 1.12 2001/09/14 20:35:58 andreas_kupries Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.13 2001/10/12 13:30:31 tmh Exp $ */ /* @@ -108,6 +108,15 @@ char *tkMenuStateStrings[] = {"active", "normal", "disabled", (char *) NULL}; static char *menuEntryTypeStrings[] = {"cascade", "checkbutton", "command", "radiobutton", "separator", (char *) NULL}; +/* + * The following table defines the legal values for the -compound option. + * It is used with the "enum compound" declaration in tkMenu.h + */ + +static char *compoundStrings[] = { + "bottom", "center", "left", "none", "right", "top", (char *) NULL +}; + Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-activebackground", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_ACTIVE_BG, Tk_Offset(TkMenuEntry, activeBorderPtr), -1, @@ -130,6 +139,9 @@ Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { {TK_OPTION_STRING, "-command", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_COMMAND, Tk_Offset(TkMenuEntry, commandPtr), -1, TK_OPTION_NULL_OK}, + {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", + DEF_MENU_ENTRY_COMPOUND, -1, Tk_Offset(TkMenuEntry, compound), 0, + (ClientData) compoundStrings, 0}, {TK_OPTION_FONT, "-font", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_FONT, Tk_Offset(TkMenuEntry, fontPtr), -1, TK_OPTION_NULL_OK}, |