[wx-dev] Triple Clicks

Stefan Csomor csomor at advancedconcepts.ch
Tue Oct 23 07:38:09 PDT 2007


Hi
> JS> Vadim: thinking about your point again, right now what happens is:
> JS> - first click: LEFT_DOWN
> JS> - second click: LEFT_DBL_CLICK
> JS> - third click: LEFT_DBL_CLICK
>
>  Hmm, I thought the third one would be a simple click. I wonder if this is
> the same under all platforms.
>
> JS> What's the problem with adding a way to distinguish click #2 and #3 from 
> JS> each other with an additional getter? That shouldn't affect the 
> JS> distinction between single and double clicks at all..
>
>  I.e. you propose to still generate LEFT_DBL_CLICK event for triple click
> but have an additional method in wxMouseEvent saying if this is actually a
> triple click event? This would be backwards compatible but very illogical
> IMO: we'd generate a single click event, then a double click event and then
> a double-click-event-with-triple-click-flag set?
>
>
>  BTW, GTK+ does generate triple click events (which we currently
> artificially suppress) so whatever we do should also have a chance of
> working there (as this is the only platform supporting triple clicks
> natively AFAICS we should probably start by it).
>   
on OSX I just get the click count from a native mouse click event

cEvent.GetParameter<UInt32>( kEventParamClickCount, typeUInt32 , 
&clickCount ) ;
and then decide on that whether to make it a double or single click

clickCount > 1 ? wxEVT_LEFT_DCLICK : wxEVT_LEFT_DOWN

so when the triple click should be different, that's not a problem, but 
would this lead to backwards compat problems ? adding another event is 
not an option ?

Best,

Stefan





More information about the wx-dev mailing list