diff options
author | ericm <ericm> | 2000-05-17 21:17:19 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-05-17 21:17:19 (GMT) |
commit | 54e6352675121c47a41ffafce8b02911986cac96 (patch) | |
tree | cc806cc6c8cbd3daf45e4f418ada919e3ab812e0 /generic/tkButton.c | |
parent | 2adfe2dab62fa99750852c0a35ff3dbedb810adc (diff) | |
download | tk-54e6352675121c47a41ffafce8b02911986cac96.zip tk-54e6352675121c47a41ffafce8b02911986cac96.tar.gz tk-54e6352675121c47a41ffafce8b02911986cac96.tar.bz2 |
* doc/SetOptions.3: Added information about TK_OPTION_NULL_OK with
TK_OPTION_RELIEF.
* win/tkWinButton.c: Removed bits about TK_RELIEF_LINK.
* tests/button.test: Added tests for -overrelief; removed tests
for -relief link.
* mac/tkMacButton.c: Removed bits about TK_RELIEF_LINK.
* generic/tkOldConfig.c: Removed bits about TK_RELIEF_LINK.
* generic/tkConfig.c: Removed bits about TK_RELIEF_LINK; added
support for TK_OPTION_NULL_OK for TK_OPTION_RELIEF.
* library/button.tcl: Added binding support for -overrelief.
* generic/tk3d.c (Tk_GetRelief): Added branch for TK_RELIEF_NULL.
* generic/tkButton.c: Added -overrelief option; removed
Enter/Leave EventProc masks and handlers.
* generic/tk.h: Added TK_RELIEF_NULL definition, removed
TK_RELIEF_LINK.
* mac/tkMacDefault.h (DEF_BUTTON_OVER_RELIEF):
* win/tkWinDefault.h (DEF_BUTTON_OVER_RELIEF):
* unix/tkUnixDefault.h (DEF_BUTTON_OVER_RELIEF): Added default
value for the -overrelief option.
Diffstat (limited to 'generic/tkButton.c')
-rw-r--r-- | generic/tkButton.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index e3c9d86..8f70e3d 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -11,7 +11,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.c,v 1.6 2000/05/13 00:39:07 ericm Exp $ + * RCS: @(#) $Id: tkButton.c,v 1.7 2000/05/17 21:17:20 ericm Exp $ */ #include "tkButton.h" @@ -198,6 +198,9 @@ static Tk_OptionSpec buttonOptionSpecs[] = { TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_BUTTON_JUSTIFY, -1, Tk_Offset(TkButton, justify), 0, 0, 0}, + {TK_OPTION_RELIEF, "-overrelief", "overRelief", "OverRelief", + DEF_BUTTON_OVER_RELIEF, -1, Tk_Offset(TkButton, overRelief), + TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", DEF_BUTTON_PADX, Tk_Offset(TkButton, padXPtr), Tk_Offset(TkButton, padX), 0, 0, 0}, @@ -206,7 +209,7 @@ static Tk_OptionSpec buttonOptionSpecs[] = { Tk_Offset(TkButton, padY), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_BUTTON_RELIEF, -1, Tk_Offset(TkButton, relief), - TK_OPTION_LINK_OK, 0, 0}, + 0, 0, 0}, {TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay", DEF_BUTTON_REPEAT_DELAY, -1, Tk_Offset(TkButton, repeatDelay), 0, 0, 0}, @@ -713,7 +716,7 @@ ButtonCreate(clientData, interp, objc, objv, type) butPtr->flags = 0; Tk_CreateEventHandler(butPtr->tkwin, - ExposureMask|StructureNotifyMask|FocusChangeMask|EnterWindowMask|LeaveWindowMask, + ExposureMask|StructureNotifyMask|FocusChangeMask, ButtonEventProc, (ClientData) butPtr); if (Tk_InitOptions(interp, (char *) butPtr, optionTable, tkwin) @@ -1397,12 +1400,6 @@ ButtonEventProc(clientData, eventPtr) goto redraw; } } - } else if (eventPtr->type == EnterNotify) { - butPtr->flags |= MOUSE_IN_BUTTON; - goto redraw; - } else if (eventPtr->type == LeaveNotify) { - butPtr->flags &= ~MOUSE_IN_BUTTON; - goto redraw; } return; |