Re: Which button is used on a drag?
- From: "Murray Cumming" <murrayc murrayc com>
- To: paul linuxaudiosystems com
- Cc: gtkmm-list gnome org
- Subject: Re: Which button is used on a drag?
- Date: Tue, 8 Aug 2006 16:37:20 +0200 (CEST)
> On Tue, 2006-08-08 at 08:15 -0500, Mark Tilford wrote:
>> I want to have different behaviors on right-drag and left-drag. How
>> do I find what button is being used for the drag?
>
> you have to handle button-press, motion and button-release events. in
> the button-press event preceding the motion events, check ev->button for
> the button that has been pressed.
I'd hope that you can just handle the appropriate drag action:
http://www.mcs.vuw.ac.nz/technical/software/doc/gtkmm-2.4/docs/reference/html/group__gdkmmEnums.html#g0a9506293be3b3dfe00ecdb83e764ca6
I guess that theoretically the user could remap what action he means by
left and right drag and you should allow him to do that. Also, it's
probably easier than reimplementing the drag API.
Or maybe it's just modifier keys that determine which drag action is
meant. I'm not sure.
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]