diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-03 19:50:59 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-03 19:50:59 (GMT) |
commit | 1695610f2b000063acc70451fe91fae47c911150 (patch) | |
tree | cea8865039c68954654c0375c60472fd677f3ec1 /generic/tkMenu.h | |
parent | 497b85748d56fb3aa77b7f62ea9eaf98d49f6e22 (diff) | |
download | tk-1695610f2b000063acc70451fe91fae47c911150.zip tk-1695610f2b000063acc70451fe91fae47c911150.tar.gz tk-1695610f2b000063acc70451fe91fae47c911150.tar.bz2 |
Patch 2848897: Support the system keyboard cues setting on Windows
This patch by Anton Kovalenko adds support for the Windows system-wide
UI setting that prevents accelerators being underlined unless the Alt
key is pressed.
Modified to support the system keyboard cues flag and to handle dynamic
changes to the system parameters by the user.
Diffstat (limited to 'generic/tkMenu.h')
-rw-r--r-- | generic/tkMenu.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/generic/tkMenu.h b/generic/tkMenu.h index e85c874..bc62322 100644 --- a/generic/tkMenu.h +++ b/generic/tkMenu.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: tkMenu.h,v 1.16 2009/01/14 22:48:10 nijtmans Exp $ + * RCS: @(#) $Id: tkMenu.h,v 1.17 2010/01/03 19:50:59 patthoyts Exp $ */ #ifndef _TKMENU @@ -50,6 +50,19 @@ enum compound { }; /* + * Additional menu entry drawing parameters for Windows platform. + * DRAW_MENU_ENTRY_ARROW makes TkpDrawMenuEntry draw the arrow + * itself when cascade entry is disabled. + * DRAW_MENU_ENTRY_NOUNDERLINE forbids underline when ODS_NOACCEL + * is set, thus obeying the system-wide Windows UI setting. + */ + +enum drawingParameters { + DRAW_MENU_ENTRY_ARROW = (1<<0), + DRAW_MENU_ENTRY_NOUNDERLINE = (1<<1) +}; + +/* * One of the following data structures is kept for each entry of each menu * managed by this file: */ @@ -546,7 +559,7 @@ MODULE_SCOPE void TkpDrawMenuEntry(TkMenuEntry *mePtr, Drawable d, Tk_Font tkfont, const Tk_FontMetrics *menuMetricsPtr, int x, int y, int width, int height, int strictMotif, - int drawArrow); + int drawingParameters); MODULE_SCOPE void TkpMenuInit(void); MODULE_SCOPE int TkpMenuNewEntry(TkMenuEntry *mePtr); MODULE_SCOPE int TkpNewMenu(TkMenu *menuPtr); |