wxMac right click emulation
Stefan Csomor
csomor at advancedconcepts.ch
Mon Oct 16 22:08:40 PDT 2006
Hi
I figured out why my left mouse button drag was being called a
right mouse button drag by wxWidgets. I was pressing Control while
dragging, which turns out to be a key combination that emulates right
clicking on mouse button starved Macs -- it worked fine in Windows and
Linux. Is it possible to distinguish between left and right
click/dragging while holding Control down using wxMac?
The current behavior breaks the ideal of code working the same
everywhere, and is very confusing to non-native Mac developers.
Perhaps, to keep old code working, the function signature could
be changed from
bool wxMouseEvent::LeftIsDown();
to
bool wxMouseEvent::LeftIsDown(bool dont_emulate = false);
Then, emulation is still around, but people who really want to
know what is going on can get the straight dope.
try control-dragging eg in the finder. You will get a context menu
immediately, ie a right-click behaviour, this is native platform
behaviour. The add-drag gesture that is done using Ctrl-Drag on MSW on
Mac is done as Option-Drag. This is eg correctly encapsulated in the
wxDropSource implementation.
What does control-drag mean in your application ?
Best,
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20061017/167ef46e/attachment.htm
More information about the wx-users
mailing list