Help Contents / GUI programming / Custom Event Handlers

Custom Event Handlers
...are "short" Logo routines which are executed when a specific event is raised, i.e. a keystroke or a mouse click. 

"short" means here short in execution time relative to the number of events per second. If there are many events in one second, as it can be with mouse events, then your custom event handler shouldn't block, and at least it should stop at some time, it should terminate. 

If there are more events generated than could be processed, eventually a fatal stack overflow will occure and Logo will crash. 

For the console are the following keyboard and mouse handlers: 

OnChar	OnKeyDown	OnKeyUp	KeyboardValue OnTextMouseLeftDown	OnTextMouseRightDown OnTextMouseMiddleDown OnTextMouseLeftUp	OnTextMouseRightUp OnTextMouseMiddleUp OnTextMouseLeftDClick	OnTextMouseRightDClick OnTextMouseMiddleDClick OnTextMouseMotion 

For the main graph window are those mouse handlers: 

OnMouseLeftDown	OnMouseRightDown OnMouseMiddleDown OnMouseLeftUp	OnMouseRightUp OnMouseMiddleUp OnMouseLeftDClick	OnMouseRightDClick OnMouseMiddleDClick OnMouseMotion 

The event handlers are presented in the example eventtest.lg. 

This section contains the following sub-sections:
	OnChar
	OnKeyDown
	OnKeyUp
	KeyboardValue
	OnTextMouseLeftDown
	OnTextMouseRightDown
	OnTextMouseMiddleDown
	OnTextMouseLeftUp
	OnTextMouseRightUp
	OnTextMouseMiddleUp
	OnTextMouseLeftDClick
	OnTextMouseRightDClick
	OnTextMouseMiddleDClick
	OnTextMouseMotion
	OnMouseLeftDown
	OnMouseRightDown
	OnMouseMiddleDown
	OnMouseLeftUp
	OnMouseRightUp
	OnMouseMiddleUp
	OnMouseLeftDClick
	OnMouseRightDClick
	OnMouseMiddleDClick
	OnMouseMotion

next: Standard Dialogs
