src/swipl-devel/packages/xpce/man/refmanual/md/handler.md

class handler {#class-handler}

A handler object is a reusable object that defines how a graphical object should respond when it is sent an event object. A handler maps an event <-id onto an action realised .by a code object.

By default, handlers traps events anywhere on an object. Using the <-region, the handler can be active for a subregion of the object.

Bugs:

Handlers only handle single events and have no elegant way to represent status information. The are retained for backward compatibility reasons. New code should first look at the class gesture or class key_binding.

@see @event_tree @see class gesture @see class region @see topic Event types @see class popup @see object->recogniser

Instance variables {#class-handler-instvars}

Send methods {#class-handler-send}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.