summaryrefslogtreecommitdiffstats
path: root/generic/tkMenubutton.c
diff options
context:
space:
mode:
authortmh <tmh>2001-05-21 14:07:32 (GMT)
committertmh <tmh>2001-05-21 14:07:32 (GMT)
commit29e6415ec425f744f1595e852af0c922a09258bb (patch)
tree20838e3aece8170aafef73f9007c1064480550df /generic/tkMenubutton.c
parent234f863650b0b7804c98c2994e07e9ef354b0e92 (diff)
downloadtk-29e6415ec425f744f1595e852af0c922a09258bb.zip
tk-29e6415ec425f744f1595e852af0c922a09258bb.tar.gz
tk-29e6415ec425f744f1595e852af0c922a09258bb.tar.bz2
implement TIP11, -compound option for menubutton widget
Diffstat (limited to 'generic/tkMenubutton.c')
-rw-r--r--generic/tkMenubutton.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index bfe43d3..a685f9d 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenubutton.c,v 1.5 2000/11/22 01:49:38 ericm Exp $
+ * RCS: @(#) $Id: tkMenubutton.c,v 1.6 2001/05/21 14:07:33 tmh Exp $
*/
#include "tkMenubutton.h"
@@ -37,6 +37,15 @@ static char *stateStrings[] = {
};
/*
+ * The following table defines the legal values for the -compound option.
+ * It is used with the "enum compound" declaration in tkButton.h
+ */
+
+static char *compoundStrings[] = {
+ "bottom", "center", "left", "none", "right", "top", (char *) NULL
+};
+
+/*
* Information used for parsing configuration specs:
*/
@@ -113,6 +122,9 @@ static Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
DEF_MENUBUTTON_RELIEF, -1, Tk_Offset(TkMenuButton, relief),
0, 0, 0},
+ {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
+ DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkMenuButton, compound), 0,
+ (ClientData) compoundStrings, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
DEF_MENUBUTTON_STATE, -1, Tk_Offset(TkMenuButton, state),
0, (ClientData) stateStrings, 0},