Does wx support touch-screen events?

Yuri Borsky borsky at sbor.ru
Thu Jul 5 02:42:26 PDT 2007



David Goldsmith <David.L.Goldsmith at noaa.gov> ÐÉÛÅÔ ×
ÓÏÏÂÝÅÎÉÉ:468C9488.9030303 at noaa.gov...
> I see there is implied support for 'em for PDA & Win CE apps, but
> otherwise?  And how are such events handled - through custom event
> classes?  (I didn't see any wx-provided classes for 'em in the help doc,
> or any explicit treatment of this for that matter.)  Or are touch-screen
> events "aliased" to be seen as mouse events and thus handled through
> those classes/macros/handlers?  Just curious,

Touch-screen events are reported to application as mouse click or drag
events and will be processed by application as such, no special setup is
required.

However if you expect that your app will be used in touch-screen environment
there are some things to avoid
to make this experience pleasant to user:

some touch-screens (drivers) will only show mouse pointer when you press the
screen. The rest of the time mouse pointer will be outside the screen area.
So if you use mouse pointer location to say, position dialog around it -
don't.

Also expect "jumpy" motion events: instead  usual of more smooth motion
where pointer only moves few pixels at a time you will get few events
separated by half a screen or more.

even if touch-screen driver provides some ways to generate left and
right -button clicks the best way is not to expect it. So you should design
your GUI to only rely on single (left) button clicks. This may be tricky as
established way to get pop-up menu is via right button click. Possible
solution is to show such menu when button is not clicked but stays pressed
for some time.

That said, to application touch screen is just a mouse and no special
proramming is required.



>
> DG
> --
> ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>








More information about the wx-users mailing list