Chapter 6 Handling Input
All GUI applications must respond to input in some way. This chapter shows how you can respond to user input from the mouse, keyboard, and joystick.
Mouse Input
Broadly speaking, there are two categories of mouse input. Basic mouse events are sent using wxMouseEvent
and are passed uninterpreted to your handler function. Commands associated with controls, on the other hand, are often the result of interpreting a mouse (or other) event as a particular command.
For example, when you add EVT_BUTTON
to an event table, you are intercepting a wxCommandEvent
that was generated by the wxButton
. Internally, the button is intercepting EVT_LEFT_DOWN
and generating the command event as a result. (Of course, on most platforms, ...
Get Cross-Platform GUI Programming with wxWidgets now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.