July 2005
Intermediate to advanced
744 pages
16h 57m
English
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.
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, ...
Read now
Unlock full access