> > To clarify, Murray, isn't this part of the api reserved for > drag-and-drop events.
Yes, I suppose so, but I don't know. The GTK+ people might know more. I hadn't thought of drags that aren't for drops. > The original poster didn't really specify d-n-d > behavior, and I'm mostly just curious for my own sake. I've implemented > a click-and-drag type of functionality to provide a graphics type of > drawing. Something I consider fundamentally different than d-n-d. > > The only thing I'm really basing this on is the fact that signals like > signal_drag_motion have docs that read to the effect of "on the drop > site." I've always assumed that *could* implement a drawing type of > functionality with this part of the api, but I've also always assumed > that I *shouldn't*, i.e., it'd be a kludge. > > Relevant doc link: > http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Widget.html#eaaa48aa4afa89087f43a19029bd43bd > > Although this particular question pretty much boils down to did he mean > drag-and-drop or the "i want a line to appear when i click a button and > move the mouse" type of behavior. I'm mostly interested in the latter, > but I'm always on the look out for better ways to solve a problem. > > Thanks, > Paul > > Murray Cumming wrote: > >>>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 >>[EMAIL PROTECTED] >>www.murrayc.com >>www.openismus.com >> >>_______________________________________________ >>gtkmm-list mailing list >>[email protected] >>http://mail.gnome.org/mailman/listinfo/gtkmm-list >> >> >> > _______________________________________________ > gtkmm-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gtkmm-list > Murray Cumming [EMAIL PROTECTED] www.murrayc.com www.openismus.com _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
