previous up next     contents index
Next: wxSnip::OnEvent Up: wxSnip: wxObject Previous: wxSnip::Next

wxSnip::OnChar

  void OnChar (wxDC *dc, float x, float y, float mediax, float mediay, wxKeyEvent& event)

Handles the keyboard event event. Override this method in your own snip class if it can handle events.

The drawing context is provided, as well as the snip's position in buffer coordinates, and the buffer's coordinates with respect to the event coordinates. Thus, to get event.x in snip coordinates, the snip must subtract both x and mediax from event.x.

The eventObject member of event will be set to the top-level view (usually a wxCanvas object) which received the event.



PLT