PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/eventN referenceC hash_tablerefersizeOIxNbothI!sNV.event.positionCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOIxNV.event.positionRICdateOIx*NNpositionnCstringOIxThis slot is initially @nil. It is filled when the event position is computed through <-position or <-area_position. Subsequent calls to one of these methods will update the `point <-x' and `point <-y' values and return the same point object.CchainsizeOIxIeNM.event.G.positionENM.event.G.area_positionXnnsNM.event.G.click_displacementCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.event.G.click_displacementRIOIx0XNclick_displacementnOI xNumber of pixels the pointer has moved since the last down event. See also <-click_time, ->is_up, <-multiclick and class click_gesture.nnnnnsNM.event.G.inside_sub_windowOI xNM.event.G.inside_sub_windowRIOI x,RoNinside_sub_windownOI xThis method may be used to relate an event to an XPCE window. Normally `event<-window' refers to the window in which the event occurred. If a window has the event focus however, `event<-window' returns the window that has the focus rather than the window where the pointer is. get(Event, inside_sub_window, Frame) will return the XPCE frame in which the event occurred. get(Event, inside_sub_window, Frame, Window) will return the window in which the event occurred, where Frame is the return value of the previous call. This call returns the actual window (*not* the window_decorator object) if the event occurred in a normal window. If the event occurred in a decoration (scroll_bar object, window-label) the window_decorator is returned. This method is used by the Prolog defined class drag_and_drop_gesture to locate the target for the drop operation which may be in another window. See $PCEHOME/prolog/lib/pce_drag_and_drop.pl.nnnnnsNM.event.G.masterOI xNM.event.G.masterRIOIx,Q^NmasternOIx_The `master' of an event is the `master' of its <-receiver. See `visual <-master' for details.nnnnnsNV.event.receiverOIxNV.event.receiverRIOIx0aNreceivernOIxObject the graphical is currently posted to by `event ->post'. Note that this graphical is not necessarily the object that initialy received the event. See also <-window.OIxIeNV.event.windowENM.event.S.postXnnsN V.event.idOIxN V.event.idRIOIx9NidnOIxIdentifier for the event. This is either a name occurring in the event-type hierarchy @event_tree or an integer. The latter is used for ASCII-type events and represents the ASCII value. See also <-key. Whether or not an event is of specified type is normally tested using ->is_a. Other useful classifications are realised using ->is_up, ->is_down, ->is_drag, ->has_modifier, <-click_time and <-click_displacement. One event requires special treatment. This is the event related to `wheel-mice', mice normally having two buttons and a scroll-wheel. Rotations of the scroll-wheel are mapped to an event object with <-id: wheel. Conform the Microsoft windows conventions, this event is has a `rotation' attribute, associate using `->attribute'. The rotation has the value 120 if the wheel is rotated from the user and -120 when rotated towards the user. In the X11 version, wheel-events are normally mapped to the virtual mouse-buttons 4 and 5. If the class-variable event.x11_wheel_mouse = @on (default in the X11 version), the low-level event handling will map the button 4 and button 5 events to `wheel' events. The wheel event is handled by class window, class editor, class list_browser and class scroll_bar.OIxIENM.event.S.is_aXnnsNM.event.S.has_modifierOIxNM.event.S.has_modifierRIOIx*YN has_modifiernOIxSucceeds if the event satisfies the condition of the argument modifier object. A modifier may be created by conversion from a name consisting of the letters 's' (shift), 'c' (control) and 'm' (meta). The empty name demands all modifier keys to be up. See `modifier <-convert' for details. The following tests whether the shift key of the current event is depressed (and the control- and meta-keys are *not* depressed). send(@event, has_modifier, s).OIxIeN$$class/modifier$M.modifier.G.convertEN$class/modifier$C.modifierXnnnnsNM.event.G.distanceOIxNM.event.G.distanceRIOIx,NdistancenOIxSRounded integer distance between events. Both events must be in the same <-window.nnnnnsNM.event.G.multiclickOIxNM.event.G.multiclickRIOI x,}EN multiclicknOI!xDetect multiclick. It yields one of the names single, double or triple. Multiclick detection is based on the time interval between this button-down event and the previous and the distance between these events. Clicking is normally handled using a click_gesture object. NOTE: When there are both recognisers for single- and double-click, *both* will be executed on a double click!OI"xIEN$$class/click_gesture$C.click_gestureXnnOI#xA click is regarded as the `next step' in a multiclick sequence if it the down event is within 400 milliseconds of previous down event and within 4 pixels displaced.OI$x8These methods should read the corresponding X-resources.sNM.event.S.is_downOI%xNM.event.S.is_downRIOI&x*CNis_downnOI'xSSucceeds if the event describes a button-down of any of the existing mouse-buttons.OI(xIENM.event.S.is_upXnnnnsNM.event.G.area_positionOI)xNM.event.G.area_positionRIOI*x7#N area_positionnOI+xReturns the location of the event relative to the `area <-x' and `area <-y' of the argument graphical. Note that both <-position and <-area_position reuse the point object in the slot -position.OI,xIeNV.event.positionENM.event.G.positionXnnOI-x5The default graphical is the <-receiver of the event.nsN M.event.G.xOI.xN M.event.G.xRIOI/x,QNxnnnOI0xIENM.event.G.positionXnnnsNM.event.G.positionOI1xNM.event.G.positionRIOI2x.gNpositionnOI3xAPosition of the event relative to the given object. The argument may be any graphical object, frame object or the display provided it is displayed on the same display object as where the event occurred. For device objects (and windows), the returned position is relative to the origin (`device <-offset') of the device. For other graphicals it is relative to the `area <-x' and `area <-y' of the graphical's area. For a display object it is relative to the top-left corner of the display. See also <-area_position. The returned value is also stored in the -position slot.OI4xIeNV.event.positioneNM.event.G.area_positionEN$class/point$M.point.G.convertXnnnnsNC.eventCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOI5xNC.eventRIOI6x0NeventnOI7xpAn event is PCE's notion of representing some activity from the user. Such an activity may be the user pressing a key on the keyboard, a button of the mouse, changing the mouse's location, etc. Events are typed and their types are organised in a hierarchy. See Class event_tree. Note that event-types have no relation to PCE data-types as described by class type. Events are trapped from the X-window environment by class window. This class deals internally with low-level events such as repaint requests. All events that may be of interest to the user are transformed into PCE event objects, which are then dispatched by a graphical device object. There are several ways to program event handling. The most common way is to use gesture objects. A gesture object parses one or a sequence of events into meaningful actions such as click, move, resize, connect, etc. Gestures may be attached to graphical objects using `graphical ->recogniser'. When using user-defined classes, events may be parsed by redefining the `graphical ->event' method. Gestures are normally used to realise the event-parsing in the redefined method.OI8xI eN $objects$18eN$class/gesture$C.gestureeN$class/recogniser$C.recognisereN$class/event_tree$C.event_treeeN $topics$124eN $class/dialog_item$C.dialog_itemeN$class/window$C.windoweN$class/device$C.deviceEN#$class/object$M.object.S.recogniserXnnOI9xThe single inheritance hierarchy for event type specification is not very satisfactory. A multiple inheritance hierarchy would be better. A common problem arrising is that you may wish to have all left-button events, regardless of whether it is an up, down or drag or all button-down events, regardless of the exact button. ASCII events are defined very ungracefully. Be aware that consistency with class editor will probably be implemented some day, changing --for example-- type `3' into `\C-c'.sN M.event.G.yOI:xN M.event.G.yRIOI;x,QNynnnOIx,Q NbuttonnOI?xReturns the name of the button to which the event is associated. The predefined button-names are left, middle and right. Fails with a warning if the event was not associated to a button.nnnnnsNM.event.S.initialiseOI@xNM.event.S.initialiseRIOIAx9N initialisenOIBxCreate an event from the specified parameters. Events are seldomly generated explicitly by the application code. All optional arguments default to their value of the last processed event. See also `graphical ->generate_event'.OICxIEN-$class/graphical$M.graphical.S.generate_eventXnnnnsNM.event.G.click_timeOIDxNM.event.G.click_timeRIOIEx0XN click_timenOIFxReturns the time in milliseconds of this event object since the last `down' event. See also <-click_displacement, <-multiclick, ->is_up and class click_gesture.nnnnnsNM.event.G.convertOIGxNM.event.G.convertRIOIHx,QNconvertnOIIxConverts the constant @default into the var object @event. This conversion function allow us to omit specifying the event if this is the current event.nnnnnsNM.event.S.is_upOIJxNM.event.S.is_upRIOIKx*vwNis_upnOILx[Succeeds if the event represents a release of one of the mouse-buttons. See also ->is_down.OIMxIENM.event.S.is_downXnnnnsNR.event.x11_wheel_mouseCman_class_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsO INxNR.event.x11_wheel_mouseRIOIOx9Nx11_wheel_mousenOIPx4Deal with scroll-mice in X11. Such mice normally report the wheel as Z-axis motion events. As very few applications know about this, the X-server normally maps these to the pointer-buttons 4 and 5. If this class-variable is set to @on, button-4 and button-5 events are mapped onto events with <-id: wheel.nnnsNV.event.windowOIQxNV.event.windowRIOIRx*rtNwindownOISxFWindow from which the event was generated. See also `window ->event'.OITxIeN V.event.yeN V.event.xENV.event.receiverXnnsN V.event.xOIUxN V.event.xRIOIVx0:NxnOIWxX-coordinate of the event relative to <-window. Note that this position is *not* in the window's coordinate system, but relative to the top-left corner of the X-widget realising the window.OIXxIeNV.event.windowEN V.event.yXnnsN V.event.timeOIYxN V.event.timeRIOIZx*qNtimenOI[xzTimestamp of the event in milliseconds since this PCE process was initialised. Used infrequently. See also <-multiclick.nnnsNV.event.buttonsOI\xNV.event.buttonsRIOI]x0NbuttonsnOI^x4Bitmask containing various status information on the event. It is not advised to rely on the contents of the bitmask as this might change in the future. The status of the modifier keys is normally tested using ->has_modifier. The type of click (single, double, triple) is requested using <-multiclick and the button for button-related events using <-button. Current definition of the mask-values control-key 0x1 shift-key 0x2 meta-key 0x4 left-button 0x8 middle-button 0x10 right-button 0x20 single-click 0x40 double-click 0x80 triple-click 0xC0nnnsNM.event.S.is_aOI_xNM.event.S.is_aRIOI`x0Nis_anOIaxXSucceed if the event matches the specifier. The event-specifiers are organised in a hierarchy, represented by @event_tree. This method succeeds if <-id is at or below the specified node in @event_hierarchy. This test is the common way to test the identity of events. It is used by handler objects. Note that class gesture provides a more advanced mechanism to deal with mouse events. ASCII events (<-id is an integer) are organised as follows: ascii control 0..31|127 printable 32..126 meta 128..255 The demo tool `Events' displays @event-hierarchy.OIbxIeN V.event.ideN $objects$12eN$class/event_tree$C.event_treeEN#$class/object$M.object.S.recogniserXnnnnsN M.event.G.keyOIcxN M.event.G.keyRIOIdx.hNkeynOIexKey(-binding) description of event. If the event is not a keyboard event, this is the same as <-id. Otherwise it is a symbolic description of the depressed key. The key-description is described with `key_binding ->function'.nnnnnsN V.event.yOIfxN V.event.yRIOIgx*sNynOIhxFY-coordinate of the event relative to <-window. See <-x for details.OIixIeNV.event.windowEN V.event.xXnnsNM.event.G.displayOIjxNM.event.G.displayRIOIkx*sNdisplaynOIlxDisplay object on which the event occurred. When using only a single display, this will be @display. Computed using `window <-display' on the associated <-window.nnnnnsNM.event.S.postOImxNM.event.S.postRIOInx?\2NpostnOIoxThis method is the central function for delivering events to graphical objects. This method takes care of automatically grabbing the event-focus on mouse-down events. See also class gesture. It may also be used to forward events to other graphicals. It performs the following steps: # Bind @event to the receiving event object # Bind <-receiver to the argument graphical # If the recogniser is @default, invoke `graphical ->event' to the argument graphical. Otherwise invoke `recogniser ->event' on the argument recogniser. The latter mechanism is used when a `window ->event' posts an event to its focus and `window <-focus_recogniser' is not @nil. # If the event, nor the receiver of the event is freed and the event is accepted and * The <-window has no `window <-focus' and * The event is a ->is_down event and * graphical is displayed on `event <-window' invoke `window ->focus: graphical, @nil, @default, <-button'OIpxIeNV.event.receivereN$objects$O.eventeN-$class/graphical$M.graphical.S.generate_eventeN$class/window$M.window.S.eventeN$class/device$M.device.S.eventEN$class/window$M.window.S.focusXnnnnsNM.event.S.is_dragOIqxNM.event.S.is_dragRIOIrx.(yNis_dragnOIsxtTest if event is a button-drag event. A drag event is a `loc_move' event with one of the pointer-buttons depressed.nnnnnsNM.event.S.insideOItxNM.event.S.insideRIOIux?NinsidenOIvxSucceeds if event is in the event-sensitive area of the argument graphical (see `graphical ->in_event_area'). If the argument is a window it checks whether the event is in the client area of the window.OIwxIeN$class/area$M.area.S.inEN,$class/graphical$M.graphical.S.in_event_areaXnnOIxx(The default graphical is the <-receiver.nsNM.event.G.nameOIyxNM.event.G.nameRIOIzx* NnamenOI{x0Synonym for <-id. Backwards compatibility only.nnnnnXaCnumber O I|xx