summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkMenubutton.c14
-rw-r--r--generic/tkMenubutton.h15
2 files changed, 27 insertions, 2 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},
diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h
index 979f23d..a4a8a05 100644
--- a/generic/tkMenubutton.h
+++ b/generic/tkMenubutton.h
@@ -9,7 +9,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.h,v 1.6 2000/11/22 01:49:38 ericm Exp $
+ * RCS: @(#) $Id: tkMenubutton.h,v 1.7 2001/05/21 14:07:33 tmh Exp $
*/
#ifndef _TKMENUBUTTON
@@ -25,6 +25,15 @@
#endif
/*
+ * Legal values for the "compound" field of TkButton records.
+ */
+
+enum compound {
+ COMPOUND_BOTTOM, COMPOUND_CENTER, COMPOUND_LEFT, COMPOUND_NONE,
+ COMPOUND_RIGHT, COMPOUND_TOP
+};
+
+/*
* Legal values for the "orient" field of TkMenubutton records.
*/
@@ -162,6 +171,10 @@ typedef struct {
* Miscellaneous information:
*/
+ int compound; /* Value of -compound option; specifies whether
+ * the button should show both an image and
+ * text, and, if so, how. */
+
enum direction direction; /* Direction for where to pop the menu.
* Valid directions are "above", "below",
* "left", "right", and "flush". "flush"