Re: Right mouse clicks
- From: Paul Davis <pbd op net>
- To: Jarek Dukat <madmaxer poczta fm>
- Cc: Gtk-List <gtk-list gnome org>
- Subject: Re: Right mouse clicks
- Date: Thu, 13 Jun 2002 09:46:28 -0400
>Question to Gtk+ developers:
>
>Why don't you supply any signals for handling right or middle mouse
>clicks on widgets? They're partially supported by Gtk+ itself, but
>adding user-defined actions to buttons different than left is a pain in
>the ass and requires lots of signal handling for every single widget. I
>think that widgets such as TreeView, TreeView's columns' headers,
>buttons and many many other should have built-in signals for that.
>
>And until that is implemented, what's the easiest suggested way to
>handle such clicks for a TreeView for example?
i don't really know why you feel this way:
gint button_release_handler (GdkEventButton *event)
{
switch (event->button) {
case 1:
printf ("button 1 (probably left) was clicked\n");
break;
case 2:
printf ("button 2 (probably middle) was clicked\n");
break;
case 3:
printf ("button 3 (probably right) was clicked\n");
break;
default:
printf ("button %d was clicked\n", event->button);
break;
}
return TRUE;
}
connect this to the relevant widget's "button_release" event and
continue from there. AFAIK, its no easier to connect "user-defined
actions" to right button clicks than it is to any other button clicks:
GTK+ doesn't provide any particular method for doing this. By
user-defined, I understand you to mean things that the user (not
programmer) wants a button click to do.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]