From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Binding a command to the down-event of a toolbar button Date: Thu, 30 Mar 2006 17:39:23 -0500 Message-ID: References: <87slp5lrx2.fsf-monnier+emacs@gnu.org> <7dbe73ed0603300156k46cae26dhe01f5ddf3309a3a3@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143758414 3029 80.91.229.2 (30 Mar 2006 22:40:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Mar 2006 22:40:14 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 31 00:40:10 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FP5o8-0007Xm-4T for ged-emacs-devel@m.gmane.org; Fri, 31 Mar 2006 00:40:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FP5o7-0001p7-JH for ged-emacs-devel@m.gmane.org; Thu, 30 Mar 2006 17:39:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FP5nv-0001p2-OF for emacs-devel@gnu.org; Thu, 30 Mar 2006 17:39:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FP5nr-0001lS-Ba for emacs-devel@gnu.org; Thu, 30 Mar 2006 17:39:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FP5nr-0001lP-6E for emacs-devel@gnu.org; Thu, 30 Mar 2006 17:39:43 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FP5q6-0005fn-C7; Thu, 30 Mar 2006 17:42:02 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id EF86A2CF5DA; Thu, 30 Mar 2006 17:39:40 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 629FA445C; Thu, 30 Mar 2006 17:39:24 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 06A717152F; Thu, 30 Mar 2006 17:39:23 -0500 (EST) Original-To: "Mathias Dahl" In-Reply-To: <7dbe73ed0603300156k46cae26dhe01f5ddf3309a3a3@mail.gmail.com> (Mathias Dahl's message of "Thu, 30 Mar 2006 11:56:50 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52236 Archived-At: >> I'm trying to add tool-bar buttons for "fast forward" and "rewind" in my >> MPC.el package, and the way I expected it would work is that down-mouse-1 >> on those buttons would start the ffwd/rewind and the up event would >> stop it. >> >> Is such behavior normal in tool bars in other user interfaces? >> If not, I think we should not do it. I use Emacs's tool-bar as a "control bar", so its behavior doesn't need to be related to what people are usually accumstomed for tool-bars. See http://www.iro.umontreal.ca/~monnier/elisp/mpc.png for a snapshot. > I have never seen such a functionality in a *tool-bar*. But buttons > like these are common in "media players" of all kinds, where the > buttons are often part of some "cool" or "groovy" GUI. I would not > expect a tool-bar button to do that, but that's just me. I don't think my media player is being partiocularly "cool" or "groovy", but I think it makes sense to provide stop/play/ffwd/rewind buttons on the toolbar. Right now my ffwd and rewind buttons are toggles that start/stop the action. This toggle behavior is not bad (and sometimes useful) but I'd like to be able to also offer the press-and-hold behavior which may be more convenient in other situations. The other alternative is to not use the toolbar and create one by hand out of a normal Emacs window displaying a buffer with no header-line and no mode-line and whose content will be just a bunch of images (icons), ... But that's a lot of work and is likely to never work nearly as well. I think my request for down-events on the tool-bar is related to some other people's requests to be able to bind different actions for mouse-1, mouse-2, mouse-3. Stefan