window-add-callback
long ( window-add-callback long window-id word event word function)
Sets the callback function of a given window (frame, panel, panel item etc.) for the given
event, to be the given CLIPS function. Possible events are:
- OnChar
The function is called with the canvas identifier, key code, and key event
identifier. If the event is an ASCII keypress, the code will correspond
to the ASCII code; otherwise, the programmer must refer to the constants
defined in common.h, in the wxWindows library.
- OnClose
The function is called with the window identifier. If the callback returns 1
and the function was called by the window manager, the window is
automatically deleted (possibly terminating the application). A return
value of 0 forbids automatic deletion.
- OnEvent
Called with a canvas identifier and a mouse event identifier.
- OnMenuCommand
Called with a frame identifier and menu item identifier. Test the menu item
identifier and perform an appropriate action.
- OnPaint
Called with a canvas identifier when the canvas receives a repaint event from
the window manager.
- OnSize
The function is called with the window identifier, width and height.