On Sun, 7 Aug 2005, Dominik Vogt wrote:
On Sun, Aug 07, 2005 at 10:58:15AM +0200, Viktor Griph wrote:
I've written a menu style option to allow for scrolling of menus with a
mouse wheel.
I also fixed two obvious copy-past-programming errors.
I've extracted the fixes from the patch and committed them, but
please provide separate patches for fixes and new features if
possible.
OK, I'll try to do so in the future.
It looks like this new feature works only with the mouse. It's a
strict rule that *everything* that can be done in menus mut be
possible using the keyboard. Can you please add something to the
menuShortcuts() function that allows using keys? This also has
the side effect that I can try the new feature (which is essential
as I am not going to commit menu features that I can not test :-)).
I'll see what I can do. The thing is that the scrolling with the
mousewheel is somewhat like moving in the menu with the arrow keys,
just a different feel.
In the man page you write that
Menustyle ... Scroll
is equivalent to
Menustyle ... Scroll On
This is not good. In the MenuStyle command, omitting the argument
of an option should restore the default value, and the man page
should explicitly say so.
I'll change that then.
Could someone with cvs wrilte-access apply this patch?
I'd first like to understand what the patch does exactly. Please
elaborate on how the new feature works.
This is a menufeel patch. It allows for selecting a menu item with a mouse
wheel as follows:
When the Menustyle Scroll is not Off the use of button 4 and 5 (Mousewheel
up and down) no longer acts as clicks on the menu, but triggers menu
scrolling. Menu scrolling is done i three possible ways: On - Positive
order, menu moving; Inverted - Negative order, menu moving; Pointer
Positive order, Pointer moving.
When the menu is about to scroll it will find the next selectable item in
the direction of the scroll, and if is On or Inverted (moving menu) the
Menu window will be moved vertically so that the the new item is
vertically centered under the pointer. If the scroll argument is Pointer
the Pointer will wrap vertically to the center of the next item.
The special case where the menu would have been placed partly outside of
the screen is treated differently depending on the value of ScrollOffPage.
If ScrollOffPage is true the menu will be allowed to leave the screen. If
not the menu will stop at the edge and Pointer scroll will be used.
It still leaves a gap in how to allow for the menu scrolling with
keyboard. I'm open to suggestions.
Please stick to 79 characters per line.
Will do. How are tabs counted?
/Viktor