PCE version 4C hlp_bufferfirst_fragment last_fragmenteditorsmodifiedundo_buffer_sizesyntaxrequest_renumberfileOIxC hlp_fragment text_buffernextpreviousstylelabelOIxRIC hlp_header text_buffernextpreviousstylelabelOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOI xRIOI xRIOI xRIOI xRIOI xRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRInRINexamplenÅRINbuttonNmanpce://graphical->eventÍRINbuttonNmanpce://graphical ->recogniser£RINbuttonNmanpce://gestureYRINbuttonNmanpce://recogniserà RINboldnƒ$RINsectionnÓRINkeywordnÿ RINbuttonNmanpce://event->has_modifieráRINbuttonNmanpce://event<-id{ RINkeywordn" RINbuttonNmanpce://key_binding RI NbuttonNmanpce://event<-keyìRI N emphasizenÙRI N emphasizenÎRI N emphasizenÈRI NbuttonNmanpce://event->is_a” RINbuttonNmanpce://@event_tree@ RINkeywordn"RINkeywordnù RINkeywordnÑ RINsectionn—RINbuttonNmanpce://event‡ RINsectionn nNtitlenRInaI'Adefault_syntax_tableuCfilenamepathkindstatusfilterOIxN//staff/jan/src/xpce/appl-help/event_monitor.hlpdNbinaryNwritenO XPCE Event monitor tool 1. Purpose This tool in meant to determine details on XPCE's mapping of operating-system events onto xpce event-objects. 2. User Interface The tool consists of 4 windows. The top-middle window shows a dark-green field. Details on the events generated on this graphical are displayed in the other three windows. For example, to see what events are generated on a mouse-button-click, position the pointer on the dark-green area and click the desired mouse-button. The left-window locates an event-type in the event-hierarchy as defined by @event_tree. This location is used by the application programmer using the method `event->is_a'. Keyboard events are represented as (id). where key represents the <-key of the event as used by class key_binding. The bottom-middle window shows a description of the event, its identifier as obtained using `event<-id', its position and the modifier-keys detected. User applications detect the modifiers using ->has_modifier. Finally, the right-window shows a list holding the identifiers of the generated events. Clicking on a n event from this list will updte the two event-detail windows, so all events from a sequence can be examined in detail. 3. Parsing events XPCE defines several mechanisms for parsing events. These are described in detail in `Programming in XPCE/Prolog', available through the xpce home page at http://swi.psy.uva.nl/projects/xpce/ Summarising, event-parsers are represented using class recogniser. Sequences of mouse-button events (clicking, dragging, etc.) are parsed using one of the subclasses of class gesture. Such event-parsers are associated with graphical objects using `graphical ->recogniser' or by redefining `graphical->event'. The skeleton for the commonly used latter mechanism is: :- pce_begin_class(myclass, some_super_class). :- pce_global(@my_class_recogniser, .... event(Gr, Ev:event) :-> ( send_super(Gr, event. Ev) ; send(@my_class_recogniser, event, Ev) ). The order of the two sends depends on how predefined and locally defined behaviour conflicts should be resolved.rIxx