Event handler procedures take 4 arguments:
During a paint event, you need to create a wxPaintDC. This must be destroyed ( delete_instance ) before you return from the paint handler. Also, any drawing that is done should be within calls to begin_drawing() and end_drawing():
Example:
procedure onPaint( atom this, atom event_type, atom id, atom event ) atom dc dc = create( wxPaintDC, {this} ) begin_drawing(dc) -- ... do drawing here... end_drawing(dc) delete_instance(dc) end procedure
Key events under Linux should be set with an id of -1. Also, no events will be passed until the window has been clicked by the user.
Full listing of events as defined in wxeud.e:
Returns: True or false Used to determine if the wxEVT_CLOSE_WINDOW event can be vetoed.
Set up an event handler.
Example:
procedure myWindow_onClose( atom this, atom event_type, atom id, atom event ) exit_main() end procedure set_event_handler( myWindow, wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, routine_id("myWindow_onClose") )
See class documentation for valid event constants.
Called by an event handler to tell the event system that the event handler should be skipped, and the next valid handler used instead.