head	1.16;
access;
symbols
	core-8-5-9:1.14
	core-8-5-8:1.14
	macosx-cocoa-merge:1.14
	macosx-cocoa-premerge:1.14
	macosx-carbon-freeze:1.14
	core-8-5-7:1.14
	core-8-5-6:1.14
	core-8-6-b1:1.14
	core-8-6-a3:1.14
	core-8-5-5:1.14
	core-8-6-a2:1.14
	core-8-5-4:1.14
	core-8-5-3:1.14
	core-8-6-a1:1.14
	core-8-4-19:1.8.4.1
	core-8-5-branch:1.14.0.2
	core-8-5-2:1.14
	core-8-4-18:1.8.4.1
	core-8-5-1:1.14
	core-8-4-17:1.8.4.1
	core-8-5-0:1.14
	core-8-5-b3:1.13
	core-8-5-b2:1.13
	core-8-4-16:1.8.4.1
	core-8-5-b1:1.13
	core-stablilizer-merge:1.13
	core-stabilizer-branch:1.11.0.2
	core-stabilizer-merge:1.14
	core-8-4-15:1.8.4.1
	core-8-5-a6:1.11
	core-8-5-a5:1.11
	core-8-4-14:1.8.4.1
	core-8-5-a4:1.11
	core-8-4-13:1.8.4.1
	core-8-4-12:1.8.4.1
	core-8-4-11:1.8.4.1
	core-8-5-a3:1.9
	core-8-4-10:1.8.4.1
	core-8-4-9-branch:1.8.4.1.0.2
	core-8-5-a2:1.9
	core-8-4-9:1.8.4.1
	core-8-4-8:1.8.4.1
	core-8-4-7:1.8.4.1
	core-8-5-a1:1.9
	core-8-4-6:1.8.4.1
	core-8-4-5:1.8.4.1
	mistachkin-dev-branch:1.8.0.6
	core-8-4-4:1.8
	core-8-4-3:1.8
	core-8-4-branch:1.8.0.4
	core-8-4-2:1.8
	core-8-4-1:1.8
	core-8-3-5:1.5
	core-8-4-0:1.8
	macosx-8-4-merge-2002-08-31-trunk:1.8
	macosx-8-4-premerge-2002-08-31-branch:1.8
	macosx-8-4-premerge-2002-08-31-trunk:1.8
	macosx-8-4-merge-2002-08-30-branch:1.8
	macosx-8-4-merge-2002-08-30-trunk:1.8
	macosx-8-4-merge-2002-08-20-branch:1.8
	macosx-8-4-merge-2002-08-20-trunk:1.8
	core-8-4-b2:1.8
	core-8-4-b1:1.8
	macosx-premerge-6-9-02:1.8
	core-8-4-a4:1.8
	core-8-3-4:1.5
	macosx-8-4-branch:1.8.0.2
	macosx-8-4-branchpoint:1.8
	core-8-4-a3:1.7
	core-8-3-3:1.5
	dgp-privates-into-namespace:1.6.0.2
	tclpro-1-5-0:1.5
	core-8-4-win-speedup:1.5.0.14
	core-8-4-a2:1.5
	tclpro-1-4-1:1.5
	tclpro-1-4-0:1.5
	core-8-3-2:1.5
	ajuba-ajuba2-2-1-base:1.5
	ajuba-ajuba2-2-0:1.5
	core-8-4-a1:1.5
	core-8-3-1-branch:1.5.0.12
	core-8-3-1:1.5
	scriptics-sc-2-0-b5:1.5
	scriptics-sc-2-0-fixed:1.5
	scriptics-sc-2-0-b2:1.5
	scriptics-sc-2-0-b1:1.5
	core-8-3-0:1.5
	core-8-3-b2:1.5
	core-8-3-b1:1.5
	scriptics-sc-1-1:1.5
	scriptics-sc-1-1-b1:1.5
	core-8-2-3:1.5
	scriptics-sc-1-1-branch:1.5.0.10
	scriptics-sc-1-1-base:1.5
	scriptics-sc-1-0:1.5
	scriptics-sc-1-0-branch:1.5.0.8
	scriptics-sc-1-0-base:1.5
	core-8-2-2:1.5
	core-8-2-1:1.5
	scriptics-bc-1-0-b1:1.5
	core-8-2-1-branch:1.5.0.6
	scriptics-tclpro-1-3-0:1.5
	core-8-2-0:1.5
	core-8-2-b3-branch:1.5.0.4
	core-8-2-b3-base:1.5
	scriptics-tclpro-1-3-b4:1.5
	core-8-2-b2:1.5
	scriptics-tclpro-1-3-b3:1.5
	core-8-2-b1:1.5
	scriptics-tclpro-1-3-b2:1.5
	merge-to-mainline-5/21/99:1.5
	scriptics-tclpro-1-3-b2-branch:1.5.0.2
	core-8-1-1:1.5
	scriptics-tclpro-1-3-b1:1.5
	core-8-1-1-base:1.5
	core-8-1-0:1.5
	merge-to-mainline-4-29-99:1.5
	merge-to-mainline-4-23-99:1.5
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.4.0.6
	core-8-0-6-base:1.4
	core-8-0-5:1.4
	core-8-1-b3:1.1.4.4
	core-8-1-b2:1.1.4.4
	dev-8-1-stubs-branch:1.1.4.4.0.2
	dev-stubs-branch:1.4.0.4
	scriptics-tclpro-1-2:1.4
	scriptics-tclpro-1-2-b2:1.4
	core-8-1-merge-2/10/99:1.4
	core-8-0-5-branch:1.4.0.2
	core-8-0-5-base:1.4
	scriptics-tclpro-1-2-b1:1.4
	scriptics-tclpro-1-2-a1:1.4
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.4
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.4;
locks; strict;
comment	@ * @;


1.16
date	2010.04.23.08.32.56;	author nijtmans;	state Exp;
branches;
next	1.15;

1.15
date	2010.01.13.23.08.07;	author nijtmans;	state Exp;
branches;
next	1.14;

1.14
date	2007.12.13.15.24.16;	author dgp;	state Exp;
branches;
next	1.13;

1.13
date	2007.06.25.19.07.15;	author dgp;	state Exp;
branches;
next	1.12;

1.12
date	2007.06.24.16.07.35;	author dkf;	state Exp;
branches;
next	1.11;

1.11
date	2005.11.27.02.36.14;	author das;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2005.11.15.15.18.22;	author dkf;	state Exp;
branches;
next	1.9;

1.9
date	2003.11.17.23.12.44;	author hobbs;	state Exp;
branches;
next	1.8;

1.8
date	2001.10.12.13.30.31;	author tmh;	state Exp;
branches
	1.8.4.1;
next	1.7;

1.7
date	2001.05.21.14.07.33;	author tmh;	state Exp;
branches;
next	1.6;

1.6
date	2000.11.22.01.49.38;	author ericm;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	99.04.16.01.51.19;	author stanton;	state Exp;
branches
	1.5.14.1;
next	1.4;

1.4
date	98.09.14.18.23.15;	author stanton;	state Exp;
branches;
next	1.3;

1.3
date	98.08.04.12.19.40;	author escoffon;	state Exp;
branches;
next	1.2;

1.2
date	98.07.29.12.39.20;	author escoffon;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.51.48;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.17.11;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	99.01.07.02.42.50;	author lfb;	state Exp;
branches;
next	1.1.4.3;

1.1.4.3
date	99.02.13.05.38.49;	author lfb;	state Exp;
branches;
next	1.1.4.4;

1.1.4.4
date	99.02.16.06.00.41;	author lfb;	state Exp;
branches;
next	;

1.5.14.1
date	2002.04.02.21.00.55;	author hobbs;	state Exp;
branches;
next	;

1.6.2.1
date	2001.07.03.20.01.08;	author dgp;	state Exp;
branches;
next	;

1.8.4.1
date	2003.11.17.23.29.36;	author hobbs;	state Exp;
branches;
next	;

1.11.2.1
date	2007.06.25.19.12.13;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.16
log
@Formatting
typo fixes
remove not existing tkDisplayList;
Useless re-definitions of TCL_STORAGE_CLASS
@
text
@/*
 * tkMenubutton.h --
 *
 *	Declarations of types and functions used to implement the menubutton
 *	widget.
 *
 * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
 *
 * 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.15 2010/01/13 23:08:07 nijtmans Exp $
 */

#ifndef _TKMENUBUTTON
#define _TKMENUBUTTON

#ifndef _TKINT
#include "tkInt.h"
#endif

#ifndef _TKMENU
#include "tkMenu.h"
#endif

/*
 * Legal values for the "orient" field of TkMenubutton records.
 */

enum direction {
    DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH,
    DIRECTION_LEFT, DIRECTION_RIGHT
};

/*
 * Legal values for the "state" field of TkMenubutton records.
 */

enum state {
    STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
};

/*
 * A data structure of the following type is kept for each widget managed by
 * this file:
 */

typedef struct {
    Tk_Window tkwin;		/* Window that embodies the widget. NULL means
				 * that the window has been destroyed but the
				 * data structures haven't yet been cleaned
				 * up. */
    Display *display;		/* Display containing widget. Needed, among
				 * other things, so that resources can bee
				 * freed up even after tkwin has gone away. */
    Tcl_Interp *interp;		/* Interpreter associated with menubutton. */
    Tcl_Command widgetCmd;	/* Token for menubutton's widget command. */
    Tk_OptionTable optionTable;	/* Table that defines configuration options
				 * available for this widget. */
    char *menuName;		/* Name of menu associated with widget.
				 * Malloc-ed. */

    /*
     * Information about what's displayed in the menu button:
     */

    char *text;			/* Text to display in button (malloc'ed) or
				 * NULL. */
    int underline;		/* Index of character to underline. */
    char *textVarName;		/* Name of variable (malloc'ed) or NULL. If
				 * non-NULL, button displays the contents of
				 * this variable. */
    Pixmap bitmap;		/* Bitmap to display or None. If not None then
				 * text and textVar and underline are
				 * ignored. */
    char *imageString;		/* Name of image to display (malloc'ed), or
				 * NULL. If non-NULL, bitmap, text, and
				 * textVarName are ignored. */
    Tk_Image image;		/* Image to display in window, or NULL if
				 * none. */

    /*
     * Information used when displaying widget:
     */

    enum state state;		/* State of button for display purposes:
				 * normal, active, or disabled. */
    Tk_3DBorder normalBorder;	/* Structure used to draw 3-D border and
				 * background when window isn't active. NULL
				 * means no such border exists. */
    Tk_3DBorder activeBorder;	/* Structure used to draw 3-D border and
				 * background when window is active. NULL
				 * means no such border exists. */
    int borderWidth;		/* Width of border. */
    int relief;			/* 3-d effect: TK_RELIEF_RAISED, etc. */
    int highlightWidth;		/* Width in pixels of highlight to draw around
				 * widget when it has the focus. <= 0 means
				 * don't draw a highlight. */
    XColor *highlightBgColorPtr;/* Color for drawing traversal highlight area
				 * when highlight is off. */
    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
    int inset;			/* Total width of all borders, including
				 * traversal highlight and 3-D border.
				 * Indicates how much interior stuff must be
				 * offset from outside edges to leave room for
				 * borders. */
    Tk_Font tkfont;		/* Information about text font, or NULL. */
    XColor *normalFg;		/* Foreground color in normal mode. */
    XColor *activeFg;		/* Foreground color in active mode. NULL means
				 * use normalFg instead. */
    XColor *disabledFg;		/* Foreground color when disabled. NULL means
				 * use normalFg with a 50% stipple instead. */
    GC normalTextGC;		/* GC for drawing text in normal mode. */
    GC activeTextGC;		/* GC for drawing text in active mode (NULL
				 * means use normalTextGC). */
    Pixmap gray;		/* Pixmap for displaying disabled text/icon if
				 * disabledFg is NULL. */
    GC disabledGC;		/* Used to produce disabled effect for
				 * text. */
    GC stippleGC;		/* Used to produce disabled stipple effect for
				 * images when disabled. */
    int leftBearing;		/* Distance from text origin to leftmost drawn
				 * pixel (positive means to right). */
    int rightBearing;		/* Amount text sticks right from its
				 * origin. */
    char *widthString;		/* Value of -width option. Malloc'ed. */
    char *heightString;		/* Value of -height option. Malloc'ed. */
    int width, height;		/* If > 0, these specify dimensions to request
				 * for window, in characters for text and in
				 * pixels for bitmaps. In this case the actual
				 * size of the text string or bitmap is
				 * ignored in computing desired window
				 * size. */
    int wrapLength;		/* Line length (in pixels) at which to wrap
				 * onto next line. <= 0 means don't wrap
				 * except at newlines. */
    int padX, padY;		/* Extra space around text or bitmap (pixels
				 * on each side). */
    Tk_Anchor anchor;		/* Where text/bitmap should be displayed
				 * inside window region. */
    Tk_Justify justify;		/* Justification to use for multi-line
				 * text. */
    int textWidth;		/* Width needed to display text as requested,
				 * in pixels. */
    int textHeight;		/* Height needed to display text as requested,
				 * in pixels. */
    Tk_TextLayout textLayout;	/* Saved text layout information. */
    int indicatorOn;		/* Non-zero means display indicator; 0 means
				 * don't display. */
    int indicatorHeight;	/* Height of indicator in pixels. This same
				 * amount of extra space is also left on each
				 * side of the indicator. 0 if no
				 * indicator. */
    int indicatorWidth;		/* Width of indicator in pixels, including
				 * indicatorHeight in padding on each side. 0
				 * if no indicator. */

    /*
     * Miscellaneous information:
     */

    int compound;		/* Value of -compound option; specifies
				 * whether the menubutton 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" means that
    				 * the upper left corner of the menubutton is
    				 * where the menu pops up. "above" and "below"
    				 * will attempt to pop the menu compleletly
    				 * above or below the menu respectively.
    				 * "left" and "right" will pop the menu left
    				 * or right, and the active item will be next
    				 * to the button. */
    Tk_Cursor cursor;		/* Current cursor for window, or None. */
    char *takeFocus;		/* Value of -takefocus option; not used in the
				 * C code, but used by keyboard traversal
				 * scripts. Malloc'ed, but may be NULL. */
    int flags;			/* Various flags; see below for
				 * definitions. */
} TkMenuButton;

/*
 * Flag bits for buttons:
 *
 * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler has
 *				already been queued to redraw this window.
 * POSTED:			Non-zero means that the menu associated with
 *				this button has been posted (typically because
 *				of an active button press).
 * GOT_FOCUS:			Non-zero means this button currently has the
 *				input focus.
 */

#define REDRAW_PENDING		1
#define POSTED			2
#define GOT_FOCUS		4

/*
 * The following constants define the dimensions of the cascade indicator,
 * which is displayed if the "-indicatoron" option is true. The units for
 * these options are 1/10 millimeters.
 */

#define INDICATOR_WIDTH		40
#define INDICATOR_HEIGHT	17

/*
 * Declaration of procedures used in the implementation of the button widget.
 */

MODULE_SCOPE void	TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr);
MODULE_SCOPE TkMenuButton *TkpCreateMenuButton(Tk_Window tkwin);
MODULE_SCOPE void	TkpDisplayMenuButton(ClientData clientData);
MODULE_SCOPE void 	TkpDestroyMenuButton(TkMenuButton *mbPtr);
MODULE_SCOPE void	TkMenuButtonWorldChanged(ClientData instanceData);

#endif /* _TKMENUBUTTON */
@


1.15
log
@Eliminate tkpMenubuttonClass
make tkpButtonProcs CONST
fix gcc warnings: missing initializer
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.14 2007/12/13 15:24:16 dgp Exp $
a25 5
#ifdef BUILD_tk
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
#endif

a217 3
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT

@


1.14
log
@merge stable branch onto HEAD
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.11.2.1 2007/06/25 19:12:13 dgp Exp $
a213 6
 * Declaration of variables shared between the files in the button module.
 */

MODULE_SCOPE Tk_ClassProcs tkpMenubuttonClass;

/*
@


1.13
log
@restore unix line endings
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.12 2007/06/24 16:07:35 dkf Exp $
@


1.12
log
@Cleaning up whitespace, comments, declarations. No functional changes.
@
text
@d1 232
a232 232
/*
 * tkMenubutton.h --
 *
 *	Declarations of types and functions used to implement the menubutton
 *	widget.
 *
 * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
 *
 * 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.11 2005/11/27 02:36:14 das Exp $
 */

#ifndef _TKMENUBUTTON
#define _TKMENUBUTTON

#ifndef _TKINT
#include "tkInt.h"
#endif

#ifndef _TKMENU
#include "tkMenu.h"
#endif

#ifdef BUILD_tk
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
#endif

/*
 * Legal values for the "orient" field of TkMenubutton records.
 */

enum direction {
    DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH,
    DIRECTION_LEFT, DIRECTION_RIGHT
};

/*
 * Legal values for the "state" field of TkMenubutton records.
 */

enum state {
    STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
};

/*
 * A data structure of the following type is kept for each widget managed by
 * this file:
 */

typedef struct {
    Tk_Window tkwin;		/* Window that embodies the widget. NULL means
				 * that the window has been destroyed but the
				 * data structures haven't yet been cleaned
				 * up. */
    Display *display;		/* Display containing widget. Needed, among
				 * other things, so that resources can bee
				 * freed up even after tkwin has gone away. */
    Tcl_Interp *interp;		/* Interpreter associated with menubutton. */
    Tcl_Command widgetCmd;	/* Token for menubutton's widget command. */
    Tk_OptionTable optionTable;	/* Table that defines configuration options
				 * available for this widget. */
    char *menuName;		/* Name of menu associated with widget.
				 * Malloc-ed. */

    /*
     * Information about what's displayed in the menu button:
     */

    char *text;			/* Text to display in button (malloc'ed) or
				 * NULL. */
    int underline;		/* Index of character to underline. */
    char *textVarName;		/* Name of variable (malloc'ed) or NULL. If
				 * non-NULL, button displays the contents of
				 * this variable. */
    Pixmap bitmap;		/* Bitmap to display or None. If not None then
				 * text and textVar and underline are
				 * ignored. */
    char *imageString;		/* Name of image to display (malloc'ed), or
				 * NULL. If non-NULL, bitmap, text, and
				 * textVarName are ignored. */
    Tk_Image image;		/* Image to display in window, or NULL if
				 * none. */

    /*
     * Information used when displaying widget:
     */

    enum state state;		/* State of button for display purposes:
				 * normal, active, or disabled. */
    Tk_3DBorder normalBorder;	/* Structure used to draw 3-D border and
				 * background when window isn't active. NULL
				 * means no such border exists. */
    Tk_3DBorder activeBorder;	/* Structure used to draw 3-D border and
				 * background when window is active. NULL
				 * means no such border exists. */
    int borderWidth;		/* Width of border. */
    int relief;			/* 3-d effect: TK_RELIEF_RAISED, etc. */
    int highlightWidth;		/* Width in pixels of highlight to draw around
				 * widget when it has the focus. <= 0 means
				 * don't draw a highlight. */
    XColor *highlightBgColorPtr;/* Color for drawing traversal highlight area
				 * when highlight is off. */
    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
    int inset;			/* Total width of all borders, including
				 * traversal highlight and 3-D border.
				 * Indicates how much interior stuff must be
				 * offset from outside edges to leave room for
				 * borders. */
    Tk_Font tkfont;		/* Information about text font, or NULL. */
    XColor *normalFg;		/* Foreground color in normal mode. */
    XColor *activeFg;		/* Foreground color in active mode. NULL means
				 * use normalFg instead. */
    XColor *disabledFg;		/* Foreground color when disabled. NULL means
				 * use normalFg with a 50% stipple instead. */
    GC normalTextGC;		/* GC for drawing text in normal mode. */
    GC activeTextGC;		/* GC for drawing text in active mode (NULL
				 * means use normalTextGC). */
    Pixmap gray;		/* Pixmap for displaying disabled text/icon if
				 * disabledFg is NULL. */
    GC disabledGC;		/* Used to produce disabled effect for
				 * text. */
    GC stippleGC;		/* Used to produce disabled stipple effect for
				 * images when disabled. */
    int leftBearing;		/* Distance from text origin to leftmost drawn
				 * pixel (positive means to right). */
    int rightBearing;		/* Amount text sticks right from its
				 * origin. */
    char *widthString;		/* Value of -width option. Malloc'ed. */
    char *heightString;		/* Value of -height option. Malloc'ed. */
    int width, height;		/* If > 0, these specify dimensions to request
				 * for window, in characters for text and in
				 * pixels for bitmaps. In this case the actual
				 * size of the text string or bitmap is
				 * ignored in computing desired window
				 * size. */
    int wrapLength;		/* Line length (in pixels) at which to wrap
				 * onto next line. <= 0 means don't wrap
				 * except at newlines. */
    int padX, padY;		/* Extra space around text or bitmap (pixels
				 * on each side). */
    Tk_Anchor anchor;		/* Where text/bitmap should be displayed
				 * inside window region. */
    Tk_Justify justify;		/* Justification to use for multi-line
				 * text. */
    int textWidth;		/* Width needed to display text as requested,
				 * in pixels. */
    int textHeight;		/* Height needed to display text as requested,
				 * in pixels. */
    Tk_TextLayout textLayout;	/* Saved text layout information. */
    int indicatorOn;		/* Non-zero means display indicator; 0 means
				 * don't display. */
    int indicatorHeight;	/* Height of indicator in pixels. This same
				 * amount of extra space is also left on each
				 * side of the indicator. 0 if no
				 * indicator. */
    int indicatorWidth;		/* Width of indicator in pixels, including
				 * indicatorHeight in padding on each side. 0
				 * if no indicator. */

    /*
     * Miscellaneous information:
     */

    int compound;		/* Value of -compound option; specifies
				 * whether the menubutton 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" means that
    				 * the upper left corner of the menubutton is
    				 * where the menu pops up. "above" and "below"
    				 * will attempt to pop the menu compleletly
    				 * above or below the menu respectively.
    				 * "left" and "right" will pop the menu left
    				 * or right, and the active item will be next
    				 * to the button. */
    Tk_Cursor cursor;		/* Current cursor for window, or None. */
    char *takeFocus;		/* Value of -takefocus option; not used in the
				 * C code, but used by keyboard traversal
				 * scripts. Malloc'ed, but may be NULL. */
    int flags;			/* Various flags; see below for
				 * definitions. */
} TkMenuButton;

/*
 * Flag bits for buttons:
 *
 * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler has
 *				already been queued to redraw this window.
 * POSTED:			Non-zero means that the menu associated with
 *				this button has been posted (typically because
 *				of an active button press).
 * GOT_FOCUS:			Non-zero means this button currently has the
 *				input focus.
 */

#define REDRAW_PENDING		1
#define POSTED			2
#define GOT_FOCUS		4

/*
 * The following constants define the dimensions of the cascade indicator,
 * which is displayed if the "-indicatoron" option is true. The units for
 * these options are 1/10 millimeters.
 */

#define INDICATOR_WIDTH		40
#define INDICATOR_HEIGHT	17

/*
 * Declaration of variables shared between the files in the button module.
 */

MODULE_SCOPE Tk_ClassProcs tkpMenubuttonClass;

/*
 * Declaration of procedures used in the implementation of the button widget.
 */

MODULE_SCOPE void	TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr);
MODULE_SCOPE TkMenuButton *TkpCreateMenuButton(Tk_Window tkwin);
MODULE_SCOPE void	TkpDisplayMenuButton(ClientData clientData);
MODULE_SCOPE void 	TkpDestroyMenuButton(TkMenuButton *mbPtr);
MODULE_SCOPE void	TkMenuButtonWorldChanged(ClientData instanceData);

# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT

#endif /* _TKMENUBUTTON */
@


1.11
log
@	* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
	add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to
	configure (flag can't be present twice, so can't be in both CFLAGS and
	LDFLAGS during configure), don't use -prebind when deploying on 10.4,
	define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542).
	(SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete
	autoconf macros. Sync with tcl/unix/tcl.m4.

	* unix/configure.in: fix obsolete autoconf macros, sync gratuitous
	formatting/ordering differences with tcl/unix/configure.in.

	* unix/Makefile.in: add CFLAGS to wish/tktest link to make executable
	linking the same as during configure (needed to avoid loosing any linker
	relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS).
	Avoid concurrent linking of wish and compiling of tkTestInit.o during
	parallel make, fix dependencies and flags for building tkMacOSXInit.o
	(checkstubs, checkexports): dependency and Darwin fixes
	(dist): add new macosx files.

	* macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent):
	* macosx/tkMacOSXEvent.h:
	* macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent):
	* macosx/tkMacOSXCarbonEvents.c: install standard application event
	handler, add & call functions to start and stop carbon even timer that
	runs the tcl event loop periodically during a nested carbon event loop
	in the toolbox (e.g. during menutracking) to ensure tcl timers etc
	continue to fire, register app event handler for menu tracking and HI
	command carbon events, move menu event handling to new handlers for
	those carbon events, no longer register for/handle appleevent carbon
	event (now dealt with by standard application event handler), event
	debugging code dynamically acquires carbon event debugging functions to
	allow use on Tiger where they are no longer exported from HIToolbox.

	* macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText):
	* macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout):
	* macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents):
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h: abstract common code to dynamically acquire
	address of a named symbol (from a loaded dynamic library) into new
	function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol.

	* macosx/tkMacOSXMenu.c (TkpNewMenu):
	* macosx/tkMacOSXMenubutton.c (MenuButtonInitControl):
	* macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to  modern
	utf8 aware menu manager API, remove obsolete code, add error handling.

	* macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants
	if necessary to allow compilation on OSX 10.2

	* macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never
	executed.

	* xlib/xgc.c (XCreateGC): sync with core-8-4-branch change.

	* generic/tk.h: add/correct location of version numbers in macosx files.

	* generic/tkInt.h: clarify fat compile comment.

	* macosx/Wish.pbproj/default.pbxuser (new file):
	* macosx/Wish.pbproj/jingham.pbxuser:
	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Wish.xcode/default.pbxuser:
	* macosx/Wish.xcode/project.pbxproj:
	* macosx/Wish.xcodeproj/default.pbxuser (new file):
	* macosx/Wish.xcodeproj/project.pbxproj (new file): new/updated projects
	for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with
	native tktest targets and support for universal (fat) compiles.

	* macosx/Tk-Info.plist (removed):
	* macosx/Wish-Info.plist (removed):
	* macosx/buildTkConfig.tcl (removed): remove obsolete build files.

	* macosx/README: clarification/cleanup, document new Xcode projects and
	universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time).

	* unix/Makefile.in:
	* unix/aclocal.m4:
	* unix/configure.in:
	* macosx/configure.ac (new file): add support for inclusion of
	unix/configure.in by macosx/configure.ac, allows generation of a config
	headers enabled configure script in macosx (required by Xcode projects).

	* macosx/GNUmakefile: rename from Makefile to avoid overwriting by
	configure run in tk/macosx, add support for reusing configure cache,
	build target fixes.

	* generic/tk3d.h:
	* generic/tkButton.h:
	* generic/tkCanvas.c:
	* generic/tkCanvas.h:
	* generic/tkColor.h:
	* generic/tkEntry.h:
	* generic/tkFileFilter.h:
	* generic/tkFont.c:
	* generic/tkFont.h:
	* generic/tkImage.c:
	* generic/tkImgPhoto.c:
	* generic/tkInt.h:
	* generic/tkMenu.c:
	* generic/tkMenu.h:
	* generic/tkMenubutton.h:
	* generic/tkScale.h:
	* generic/tkScrollbar.h:
	* generic/tkSelect.h:
	* generic/tkStubInit.c:
	* generic/tkStubLib.c:
	* generic/tkText.h:
	* generic/tkUndo.h:
	* macosx/tkMacOSXButton.c:
	* macosx/tkMacOSXDebug.c:
	* macosx/tkMacOSXDebug.h:
	* macosx/tkMacOSXDialog.c:
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXEntry.c:
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXInt.h:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXSend.c:
	* macosx/tkMacOSXSubwindows.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:
	* unix/tkUnixButton.c:
	* unix/tkUnixMenu.c:
	* xlib/xgc.c: ensure externally visible symbols not contained in stubs
	table are declared as MODULE_SCOPE (or as static if not used outside of
	own source file), #ifdef out a few Xlib and aqua functions that are
	never called. These changes allow 'make checkstubs' to complete without
	error on Darwin with gcc 4.

	* macosx/tkMacOSXTest.c:
	* macosx/tkMacOSXPort.h:
	* win/tkWinTest.c:
	* generic/tkInt.decls: add functions needed by tktest to internal stubs
	table, correct signature of TkMacOSXHandleMenuSelect, add XSync to aqua
	Xlib stubs.

	* unix/tkUnixSend.c:
	* generic/tkText.c:
	* generic/tkTest.c: #ifdef unix only declarations.
	(TestmetricsCmd): unify win and mac implementation.
	(TestsendCmd): move to tkUnixSend.c to avoid access to global var.
	(TesttextCmd): move to tkText.c to avoid having to put all the internal
	text functions it uses into the stubs table.

	* generic/tkTextDisp.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXKeyEvent.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXXStubs.c: fix gcc 4 warnings.

	* macosx/tkMacOSXNotify.c:
	* macosx/tkMacOSXScrlbr.c: sync with core-8-4-branch.

	* generic/tkIntDecls.h:
	* generic/tkIntPlatDecls.h:
	* generic/tkIntXlibDecls.h:
	* generic/tkStubInit.c:
	* unix/configure:
	* unix/tkConfig.h.in: regen.
@
text
@d1 232
a232 227
/*
 * tkMenubutton.h --
 *
 *	Declarations of types and functions used to implement the menubutton
 *	widget.
 *
 * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
 *
 * 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.10 2005/11/15 15:18:22 dkf Exp $
 */

#ifndef _TKMENUBUTTON
#define _TKMENUBUTTON

#ifndef _TKINT
#include "tkInt.h"
#endif

#ifndef _TKMENU
#include "tkMenu.h"
#endif

#ifdef BUILD_tk
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
#endif

/*
 * Legal values for the "orient" field of TkMenubutton records.
 */

enum direction {
    DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH,
    DIRECTION_LEFT, DIRECTION_RIGHT
};

/*
 * Legal values for the "state" field of TkMenubutton records.
 */

enum state {
    STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
};

/*
 * A data structure of the following type is kept for each widget managed by
 * this file:
 */

typedef struct {
    Tk_Window tkwin;		/* Window that embodies the widget. NULL means
				 * that the window has been destroyed but the
				 * data structures haven't yet been cleaned
				 * up. */
    Display *display;		/* Display containing widget. Needed, among
				 * other things, so that resources can bee
				 * freed up even after tkwin has gone away. */
    Tcl_Interp *interp;		/* Interpreter associated with menubutton. */
    Tcl_Command widgetCmd;	/* Token for menubutton's widget command. */
    Tk_OptionTable optionTable;	/* Table that defines configuration options
				 * available for this widget. */
    char *menuName;		/* Name of menu associated with widget.
				 * Malloc-ed. */

    /*
     * Information about what's displayed in the menu button:
     */

    char *text;			/* Text to display in button (malloc'ed) or
				 * NULL. */
    int underline;		/* Index of character to underline. */
    char *textVarName;		/* Name of variable (malloc'ed) or NULL. If
				 * non-NULL, button displays the contents of
				 * this variable. */
    Pixmap bitmap;		/* Bitmap to display or None. If not None then
				 * text and textVar and underline are
				 * ignored. */
    char *imageString;		/* Name of image to display (malloc'ed), or
				 * NULL. If non-NULL, bitmap, text, and
				 * textVarName are ignored. */
    Tk_Image image;		/* Image to display in window, or NULL if
				 * none. */

    /*
     * Information used when displaying widget:
     */

    enum state state;          	/* State of button for display purposes:
				 * normal, active, or disabled. */
    Tk_3DBorder normalBorder;	/* Structure used to draw 3-D border and
				 * background when window isn't active. NULL
				 * means no such border exists. */
    Tk_3DBorder activeBorder;	/* Structure used to draw 3-D border and
				 * background when window is active. NULL
				 * means no such border exists. */
    int borderWidth;		/* Width of border. */
    int relief;			/* 3-d effect: TK_RELIEF_RAISED, etc. */
    int highlightWidth;		/* Width in pixels of highlight to draw around
				 * widget when it has the focus. <= 0 means
				 * don't draw a highlight. */
    XColor *highlightBgColorPtr;/* Color for drawing traversal highlight area
				 * when highlight is off. */
    XColor *highlightColorPtr;	/* Color for drawing traversal highlight. */
    int inset;			/* Total width of all borders, including
				 * traversal highlight and 3-D border.
				 * Indicates how much interior stuff must be
				 * offset from outside edges to leave room for
				 * borders. */
    Tk_Font tkfont;		/* Information about text font, or NULL. */
    XColor *normalFg;		/* Foreground color in normal mode. */
    XColor *activeFg;		/* Foreground color in active mode.  NULL
				 * means use normalFg instead. */
    XColor *disabledFg;		/* Foreground color when disabled. NULL means
				 * use normalFg with a 50% stipple instead. */
    GC normalTextGC;		/* GC for drawing text in normal mode. */
    GC activeTextGC;		/* GC for drawing text in active mode (NULL
				 * means use normalTextGC). */
    Pixmap gray;		/* Pixmap for displaying disabled text/icon if
				 * disabledFg is NULL. */
    GC disabledGC;		/* Used to produce disabled effect for text */
    GC stippleGC;		/* Used to produce disabled stipple effect for
				 * images when disabled. */
    int leftBearing;		/* Distance from text origin to leftmost drawn
				 * pixel (positive means to right). */
    int rightBearing;		/* Amount text sticks right from its origin */
    char *widthString;		/* Value of -width option.  Malloc'ed. */
    char *heightString;		/* Value of -height option.  Malloc'ed. */
    int width, height;		/* If > 0, these specify dimensions to request
				 * for window, in characters for text and in
				 * pixels for bitmaps. In this case the actual
				 * size of the text string or bitmap is
				 * ignored in computing desired window size */
    int wrapLength;		/* Line length (in pixels) at which to wrap
				 * onto next line. <= 0 means don't wrap
				 * except at newlines. */
    int padX, padY;		/* Extra space around text or bitmap (pixels
				 * on each side). */
    Tk_Anchor anchor;		/* Where text/bitmap should be displayed
				 * inside window region. */
    Tk_Justify justify;		/* Justification to use for multi-line text */
    int textWidth;		/* Width needed to display text as requested,
				 * in pixels. */
    int textHeight;		/* Height needed to display text as requested,
				 * in pixels. */
    Tk_TextLayout textLayout;	/* Saved text layout information. */
    int indicatorOn;		/* Non-zero means display indicator; 0 means
				 * don't display. */
    int indicatorHeight;	/* Height of indicator in pixels. This same
				 * amount of extra space is also left on each
				 * side of the indicator. 0 if no indicator */
    int indicatorWidth;		/* Width of indicator in pixels, including
				 * indicatorHeight in padding on each side. 0
				 * if no indicator. */

    /*
     * Miscellaneous information:
     */

    int compound;               /* Value of -compound option; specifies
                                 * whether the menubutton 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" means that
    				 * the upper left corner of the menubutton is
    				 * where the menu pops up. "above" and "below"
    				 * will attempt to pop the menu compleletly
    				 * above or below the menu respectively.
    				 * "left" and "right" will pop the menu left
    				 * or right, and the active item will be next
    				 * to the button. */
    Tk_Cursor cursor;		/* Current cursor for window, or None. */
    char *takeFocus;		/* Value of -takefocus option; not used in the
				 * C code, but used by keyboard traversal
				 * scripts. Malloc'ed, but may be NULL. */
    int flags;			/* Various flags; see below for definitions */
} TkMenuButton;

/*
 * Flag bits for buttons:
 *
 * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler has
 *				already been queued to redraw this window.
 * POSTED:			Non-zero means that the menu associated with
 *				this button has been posted (typically because
 *				of an active button press).
 * GOT_FOCUS:			Non-zero means this button currently has the
 *				input focus.
 */

#define REDRAW_PENDING		1
#define POSTED			2
#define GOT_FOCUS		4

/*
 * The following constants define the dimensions of the cascade indicator,
 * which is displayed if the "-indicatoron" option is true. The units for
 * these options are 1/10 millimeters.
 */

#define INDICATOR_WIDTH		40
#define INDICATOR_HEIGHT	17

/*
 * Declaration of variables shared between the files in the button module.
 */

MODULE_SCOPE Tk_ClassProcs tkpMenubuttonClass;

/*
 * Declaration of procedures used in the implementation of the button widget.
 */

MODULE_SCOPE void	TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr);
MODULE_SCOPE TkMenuButton *TkpCreateMenuButton(Tk_Window tkwin);
MODULE_SCOPE void	TkpDisplayMenuButton(ClientData clientData);
MODULE_SCOPE void 	TkpDestroyMenuButton(TkMenuButton *mbPtr);
MODULE_SCOPE void	TkMenuButtonWorldChanged(ClientData instanceData);

# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT

#endif /* _TKMENUBUTTON */
@


1.11.2.1
log
@merge updates from HEAD
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.11 2005/11/27 02:36:14 das Exp $
d91 1
a91 1
    enum state state;		/* State of button for display purposes:
d114 2
a115 2
    XColor *activeFg;		/* Foreground color in active mode. NULL means
				 * use normalFg instead. */
d123 1
a123 2
    GC disabledGC;		/* Used to produce disabled effect for
				 * text. */
d128 3
a130 4
    int rightBearing;		/* Amount text sticks right from its
				 * origin. */
    char *widthString;		/* Value of -width option. Malloc'ed. */
    char *heightString;		/* Value of -height option. Malloc'ed. */
d135 1
a135 2
				 * ignored in computing desired window
				 * size. */
d143 1
a143 2
    Tk_Justify justify;		/* Justification to use for multi-line
				 * text. */
d153 1
a153 2
				 * side of the indicator. 0 if no
				 * indicator. */
d162 4
a165 3
    int compound;		/* Value of -compound option; specifies
				 * whether the menubutton should show both an
				 * image and text, and, if so, how. */
d180 1
a180 2
    int flags;			/* Various flags; see below for
				 * definitions. */
@


1.10
log
@ANSIfy
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.9 2003/11/17 23:12:44 hobbs Exp $
d212 1
a212 1
extern Tk_ClassProcs tkpMenubuttonClass;
d218 5
a222 5
EXTERN void		TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr);
EXTERN TkMenuButton *	TkpCreateMenuButton(Tk_Window tkwin);
EXTERN void		TkpDisplayMenuButton(ClientData clientData);
EXTERN void 		TkpDestroyMenuButton(TkMenuButton *mbPtr);
EXTERN void		TkMenuButtonWorldChanged(ClientData instanceData);
@


1.9
log
@	* generic/tkMenubutton.h: fixed compound menubutton handling like
	* generic/tkMenubutton.c: *button corrections of 2003-04-25.
	* mac/tkMacMenubutton.c (TkpDisplayMenuButton):
	* unix/tkUnixMenubu.c (TkpDisplayMenuButton):
@
text
@d4 2
a5 2
 *	Declarations of types and functions used to implement
 *	the menubutton widget.
d9 2
a10 2
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.8 2001/10/12 13:30:31 tmh Exp $
d36 1
a36 1
    DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH, 
d49 2
a50 2
 * A data structure of the following type is kept for each
 * widget managed by this file:
d54 5
a58 5
    Tk_Window tkwin;		/* Window that embodies the widget.  NULL
				 * means that the window has been destroyed
				 * but the data structures haven't yet been
				 * cleaned up.*/
    Display *display;		/* Display containing widget.  Needed, among
d72 2
a73 2
    char *text;			/* Text to display in button (malloc'ed)
				 * or NULL. */
d75 6
a80 6
    char *textVarName;		/* Name of variable (malloc'ed) or NULL.
				 * If non-NULL, button displays the contents
				 * of this variable. */
    Pixmap bitmap;		/* Bitmap to display or None.  If not None
				 * then text and textVar and underline
				 * are ignored. */
d82 1
a82 1
				 * NULL.  If non-NULL, bitmap, text, and
d93 6
a98 8
    Tk_3DBorder normalBorder;	/* Structure used to draw 3-D
				 * border and background when window
				 * isn't active.  NULL means no such
				 * border exists. */
    Tk_3DBorder activeBorder;	/* Structure used to draw 3-D
				 * border and background when window
				 * is active.  NULL means no such
				 * border exists. */
d101 5
a105 6
    int highlightWidth;		/* Width in pixels of highlight to draw
				 * around widget when it has the focus.
				 * <= 0 means don't draw a highlight. */
    XColor *highlightBgColorPtr;
				/* Color for drawing traversal highlight
				 * area when highlight is off. */
d109 3
a111 3
				 * Indicates how much interior stuff must
				 * be offset from outside edges to leave
				 * room for borders. */
d116 2
a117 3
    XColor *disabledFg;		/* Foreground color when disabled.  NULL
				 * means use normalFg with a 50% stipple
				 * instead. */
d123 3
a125 3
    GC disabledGC;		/* Used to produce disabled effect for text. */
    GC stippleGC;		/* Used to produce disabled stipple effect
				 * for images when disabled. */
d128 1
a128 1
    int rightBearing;		/* Amount text sticks right from its origin. */
d133 1
a133 1
				 * pixels for bitmaps.  In this case the actual
d135 1
a135 1
				 * ignored in computing desired window size. */
d137 1
a137 1
				 * onto next line.  <= 0 means don't wrap
d143 1
a143 1
    Tk_Justify justify;		/* Justification to use for multi-line text. */
d149 1
a149 1
    int indicatorOn;		/* Non-zero means display indicator;  0 means
d151 1
a151 1
    int indicatorHeight;	/* Height of indicator in pixels.  This same
d153 1
a153 1
				 * side of the indicator. 0 if no indicator. */
d155 2
a156 2
				 * indicatorHeight in padding on each side.
				 * 0 if no indicator. */
d162 14
a175 15
    int compound;               /* Value of -compound option; specifies whether
                                 * the menubutton 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"
    				 * means that the upper left corner of the
    				 * menubutton is where the menu pops up.
    				 * "above" and "below" will attempt to pop
    				 * the menu compleletly above or below
    				 * the menu respectively.
    				 * "left" and "right" will pop the menu
    				 * left or right, and the active item
    				 * will be next to the button. */
d177 4
a180 5
    char *takeFocus;		/* Value of -takefocus option;  not used in
				 * the C code, but used by keyboard traversal
				 * scripts.  Malloc'ed, but may be NULL. */
    int flags;			/* Various flags;  see below for
				 * definitions. */
d186 7
a192 8
 * REDRAW_PENDING:		Non-zero means a DoWhenIdle handler
 *				has already been queued to redraw
 *				this window.
 * POSTED:			Non-zero means that the menu associated
 *				with this button has been posted (typically
 *				because of an active button press).
 * GOT_FOCUS:			Non-zero means this button currently
 *				has the input focus.
d201 1
a201 1
 * which is displayed if the "-indicatoron" option is true.  The units for
d215 1
a215 2
 * Declaration of procedures used in the implementation of the button
 * widget. 
d218 5
a222 9
EXTERN void		TkpComputeMenuButtonGeometry _ANSI_ARGS_((
			    TkMenuButton *mbPtr));
EXTERN TkMenuButton *	TkpCreateMenuButton _ANSI_ARGS_((Tk_Window tkwin));
EXTERN void		TkpDisplayMenuButton _ANSI_ARGS_((
			    ClientData clientData));
EXTERN void 		TkpDestroyMenuButton _ANSI_ARGS_((
			    TkMenuButton *mbPtr));
EXTERN void		TkMenuButtonWorldChanged _ANSI_ARGS_((
			    ClientData instanceData));
@


1.8
log
@implementation of TIP 63 (accepted) -compound option to menu items.
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.7 2001/05/21 14:07:33 tmh Exp $
d127 3
a129 6
    GC disabledGC;		/* Used to produce disabled effect.  If
				 * disabledFg isn't NULL, this GC is used to
				 * draw button text or icon.  Otherwise
				 * text or icon is drawn with normalGC and
				 * this GC is used to stipple background
				 * across it. */
@


1.8.4.1
log
@	* generic/tkMenubutton.h: fixed compound menubutton handling like
	* generic/tkMenubutton.c: *button corrections of 2003-04-25.
	* mac/tkMacMenubutton.c (TkpDisplayMenuButton):
	* unix/tkUnixMenubu.c (TkpDisplayMenuButton):
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.9 2003/11/17 23:12:44 hobbs Exp $
d127 6
a132 3
    GC disabledGC;		/* Used to produce disabled effect for text. */
    GC stippleGC;		/* Used to produce disabled stipple effect
				 * for images when disabled. */
@


1.7
log
@implement TIP11, -compound option for menubutton widget
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.6 2000/11/22 01:49:38 ericm Exp $
d22 4
a31 9
 * Legal values for the "compound" field of TkButton records.
 */

enum compound {
    COMPOUND_BOTTOM, COMPOUND_CENTER, COMPOUND_LEFT, COMPOUND_NONE,
        COMPOUND_RIGHT, COMPOUND_TOP
};

/*
d170 1
a170 1
                                 * the button should show both an image and
@


1.6
log
@	Overall change:  Implemented TIP 5, which exports
	TkClassProcs/TkSetClassProcs as Tk_ClassProcs/Tk_SetClassProcs,
	adding a size field to Tk_ClassProcs to allow for future
	expansion, and renaming the geometryProc to worldChangedProc,
	which is more in keeping with the actual use of the callback.

	See ChangeLog for details.
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.5 1999/04/16 01:51:19 stanton Exp $
d28 9
d173 4
@


1.6.2.1
log
@        * Merged in updates from HEAD branch.
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.7 2001/05/21 14:07:33 tmh Exp $
a27 9
 * Legal values for the "compound" field of TkButton records.
 */

enum compound {
    COMPOUND_BOTTOM, COMPOUND_CENTER, COMPOUND_LEFT, COMPOUND_NONE,
        COMPOUND_RIGHT, COMPOUND_TOP
};

/*
a163 4

    int compound;               /* Value of -compound option; specifies whether
                                 * the button should show both an image and
                                 * text, and, if so, how. */
@


1.5
log
@* Merged 8.1 branch into the main trunk
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id$
d214 1
a214 1
extern TkClassProcs tkpMenubuttonClass;
@


1.5.14.1
log
@sync with head
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.8 2001/10/12 13:30:31 tmh Exp $
a21 4
#ifndef _TKMENU
#include "tkMenu.h"
#endif

a164 4
    int compound;               /* Value of -compound option; specifies whether
                                 * the menubutton should show both an image and
                                 * text, and, if so, how. */

d214 1
a214 1
extern Tk_ClassProcs tkpMenubuttonClass;
@


1.4
log
@Replaced SCCS strings, fixed binary files
@
text
@d28 17
d59 2
d87 1
a87 1
    Tk_Uid state;		/* State of button for display purposes:
d165 1
a165 1
    Tk_Uid direction;		/* Direction for where to pop the menu.
@


1.3
log
@EXPORT is now TCL_STORAGE_CLASS
@
text
@d12 1
a12 1
 * SCCS: @@(#) tkMenubutton.h 1.3 97/04/11 11:24:15
@


1.2
log
@added support for export/import of DLL symbols. If BUILD_tk is defined,
EXPORT is mapped to DLLEXPORT, otherwise it is DLLIMPORT.
@
text
@d23 2
a24 2
# undef EXPORT
# define EXPORT DLLEXPORT
d212 2
a213 2
#undef EXPORT
#define EXPORT DLLIMPORT
@


1.1
log
@Initial revision
@
text
@d22 5
d212 3
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.4 1998/09/14 18:23:15 stanton Exp $
a21 5
#ifdef BUILD_tk
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
#endif

a205 3

# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
@


1.1.4.2
log
@Removed perky gloabal Tk_Uids causing concurrency problems.
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.1.4.1 1998/09/30 02:17:11 stanton Exp $
d68 1
a68 1
    int state;	          	/* State of button for display purposes:
@


1.1.4.3
log
@Removed Tk_Uids from Menubutton widget.
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.1.4.2 1999/01/07 02:42:50 lfb Exp $
d68 1
a68 1
    char * state;          	/* State of button for display purposes:
@


1.1.4.4
log
@Change Menubutton to use TK_OPTION interface to eliminate static data.
@
text
@d12 1
a12 1
 * RCS: @@(#) $Id: tkMenubutton.h,v 1.1.4.3 1999/02/13 05:38:49 lfb Exp $
a27 17
 * Legal values for the "orient" field of TkMenubutton records.
 */

enum direction {
    DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH, 
    DIRECTION_LEFT, DIRECTION_RIGHT
};

/*
 * Legal values for the "state" field of TkMenubutton records.
 */

enum state {
    STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
};

/*
a41 2
    Tk_OptionTable optionTable;	/* Table that defines configuration options
				 * available for this widget. */
d68 1
a68 1
    enum state state;          	/* State of button for display purposes:
d146 1
a146 1
    enum direction direction;	/* Direction for where to pop the menu.
@


