summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r--generic/tkMenu.c14
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},