<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://www.tcl.tk/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Sun May 19 05:06:09 GMT 2013 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='360'>
<header><title>Modernize X11 Menus</title><author address="mailto:patthoyts@users.sourceforge.net">Pat Thoyts</author><status type='project' state='final' tclversion="8.6" vote='after'>$Revision: 1.5 $</status><history></history><created day='24' month='dec' year='2009' /><keyword>Tk X11 menu</keyword></header>
<abstract>This TIP proposes to modernize the functionality of the Tk menus on X11 to bring Tk up to date with reference to other toolkits on this platform.</abstract>
<body><section title="Rationale">
<para>Motif is dead and buried but Tk menus are still aping the Motif feel for <emph style="bold">menu</emph> handling on X11. Specifically all cascade menu items must be actively clicked to open the submenu. Other current toolkits work more like the Windows menus where once one of the menubar items has been clicked to activate its dropdown then subsequent mouse motion is sufficient to open any cascade menu on the menubar or from any of its dropdown menus.</para>
<para>Tk provides magic handling for any menubar item whose name ends in <emph style="bold">.help</emph>. Specifically such a menu gets pinned to the extreme right of the menubar. This is sufficiently unusual that users often miss the help menu completely if they are used to Windows or GNOME applications. This is a hangover from 1990 and needs to go.</para>
</section>
<section title="Specification">
<para>The menu bindings will be modified to provide a concept of an activated menubar. Once any of the menubar cascade entries has been activated then the current active item will follow the mouse motion and explicit clicks will not be required to activate cascade entries. A small delay will be included when posting a cascade entry except when posting from the menubar. The activation is cancelled on hitting escape, selecting a menu entry or clicking outside the menu.</para>
<para>If the new &apos;focus-follows-mouse&apos; style behaviour is undesirable it can be disabled using the Tk options database. The Menu option <emph style="bold">clickToFocus</emph> may be set true to restore the original menu behaviour. This can be set using the Tk <emph style="bold">option</emph> command, the X resource database, or by calling <emph style="bold">tk::classic::restore menu</emph>.</para>
<para>The special handling of <emph style="bold">.help</emph> menu entries in the menubar will be removed unless restored using the resource option <emph style="bold">*Menu.useMotifHelp</emph>. This can be set using the Tk <emph style="bold">option</emph> command, the X resource database or by calling the <emph style="bold">tk::classic::restore</emph> command which will set the option along with some others.</para>
</section>
<section title="Reference Implementation">
<para>Patches posted as Tk patch item #2920409 [<url ref="https://sourceforge.net/support/tracker.php?aid=2920409"/>].</para>
</section>
<section title="Copyright">
<para>This document has been placed in the public domain.</para>
</section>
</body></TIP>
