diff options
author | ericm <ericm> | 2000-05-13 00:39:06 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-05-13 00:39:06 (GMT) |
commit | bfa082e9202bf219a84a4bb0d997d6cf1f834516 (patch) | |
tree | b61f779971a9663ee07b65009e60aa206dd22e32 /generic/tkButton.h | |
parent | 32c00bd4e54bd4254300852356a6fff59d388d45 (diff) | |
download | tk-bfa082e9202bf219a84a4bb0d997d6cf1f834516.zip tk-bfa082e9202bf219a84a4bb0d997d6cf1f834516.tar.gz tk-bfa082e9202bf219a84a4bb0d997d6cf1f834516.tar.bz2 |
* unix/tkUnixButton.c (TkpDisplayButton, TkpComputeButtonGeometry):
* mac/tkMacButton.c (TkpDisplayButton, TkpComputeButtonGeometry):
* win/tkWinButton.c (TkpDisplayButton, TkpComputeButtonGeometry):
Added code for drawing compound buttons.
* tests/button.test: Added configuration tests for -repeatdelay,
-repeatinterval, -compound.
* library/button.tcl: Added support for -repeatedelay,
-repeatinterval options.
* generic/tkOldConfig.c: Changed handling of link relief so that
proper error messages are used.
* generic/tkButton.h: Added -compound, -repeatdelay,
-repeatinterval options.
* generic/tkButton.c: Added event watchers for enter/leave events,
for link relief support.
* generic/tk3d.c: Changed handling of link relief so that proper
error messages are used.
* generic/tk.h: Changed values of
TK_OPTION_LINK_OK/TK_CONFIG_LINK_OK for link relief support.
Diffstat (limited to 'generic/tkButton.h')
-rw-r--r-- | generic/tkButton.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/generic/tkButton.h b/generic/tkButton.h index ae24bae..cb774f9 100644 --- a/generic/tkButton.h +++ b/generic/tkButton.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: tkButton.h,v 1.5 1999/04/16 01:51:11 stanton Exp $ + * RCS: @(#) $Id: tkButton.h,v 1.6 2000/05/13 00:39:07 ericm Exp $ */ #ifndef _TKBUTTON @@ -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 "state" field of TkButton records. */ @@ -226,6 +235,15 @@ typedef struct { * to execute when button is invoked. If * widget is label or has no command, this * is NULL. */ + int compound; /* Value of -compound option; specifies whether + * the button should show both an image and + * text, and, if so, how. */ + int repeatDelay; /* Value of -repeatdelay option; specifies + * the number of ms after which the button will + * start to auto-repeat its command. */ + int repeatInterval; /* Value of -repeatinterval option; specifies + * the number of ms between auto-repeat + * invocataions of the button command. */ int flags; /* Various flags; see below for * definitions. */ } TkButton; @@ -255,13 +273,15 @@ typedef struct { * BUTTON_DELETED: Non-zero needs that this button has been * deleted, or is in the process of being * deleted. + * MOUSE_IN_BUTTON: Non-zero means that the mouse is currently + * over the button. */ -#define REDRAW_PENDING 1 -#define SELECTED 2 -#define GOT_FOCUS 4 -#define BUTTON_DELETED 0x8 - +#define REDRAW_PENDING (1 << 0) +#define SELECTED (1 << 1) +#define GOT_FOCUS (1 << 2) +#define BUTTON_DELETED (1 << 3) +#define MOUSE_IN_BUTTON (1 << 4) /* * Declaration of variables shared between the files in the button module. */ |