[gnome-love] GTK+, horizontal scrolling and mice with two wheels
- From: Thomas Broyer <tbroyer ltgt net>
- To: gnome-love gnome org
- Subject: [gnome-love] GTK+, horizontal scrolling and mice with two wheels
- Date: Mon, 28 May 2001 23:40:04 +0200
Hi there,
I just compiled GTK+-1.3.5 (and it looks great!) and there still is
something that I miss: support for the second wheel of my mouse (buttons 6
and 7) -- merely to perform horizontal scrolling -- and in general support
for horizontal scrolling using a mouse wheel.
Two-wheels mice:
================
If I don't miss some configuration tip, where should I look at to implement
this?
I guess it's inside gdk/x11/gdkevents-x11.c (it doesn't seem there are
GDK_SCROLL events with nanox and linux-fb, and I'm totally ignorant in
Windows programming) in the gdk_event_translate() function, ButtonPress
case in the switch (xevent->type) but is this sufficient? (I looked at
gtk/gtkscrolledwindow.c and it seems horizontal scrolls
Horizontal scrolling:
=====================
I suggest that GDK_SCROLL events when the pointer is over a GtkScrollbar
are independent of the wheel used (GDK_SCROLL_UP and GDK_SCROLL_LEFT are
equivalent and scroll up for a GtkVScrollbar and left for GtkHScrollbar,
GDK_SCROLL_DOWN and GDK_SCROLL_RIGHT to scroll down or right depending
whether the scrollbar is vertical or horizontal) so that users of
single-wheel mice can still scroll horizontally with their mouse wheel
while over an horizontal scrollbar.
For users of single-wheel mice, GtkScrolledWindow's (are there other
widgets using scrollbars -- without using a scrolled window -- ?) should
allow horizontal scrolling when the wheel is rolled up or down with a
modifier key (which one should we choose? or should this be configurable?
if so, how -- i.e. where should I look at?)
Or maybe this should take place in GDK, generating GDK_SCROLL_LEFT /
GDK_SCROLL_RIGHT events when receiving 4th and 5th buttons events with a
modifier key pressed?
Tom.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]