[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding a command to the down-event of a toolbar button

From: Stefan Monnier
Subject: Re: Binding a command to the down-event of a toolbar button
Date: Thu, 30 Mar 2006 17:39:23 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> 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,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]