event:x
List of: Scheme Extensions
Subjects: Picking
Contents: Scheme Support

Action: Gets the x-coordinate from a pick-event.

Filename: scm/scmext/evnt_scm.cxx

Syntax: (event:x event)

Arg Types: event pick-event

Returns: integer

Description: This extension returns the x-coordinate of the pick-event in pixels. event specifies the event used, and it is read using (read-event) or is generated from data using (event).


event specifies the event used, and it is read using (read-event) or is generated from data using (event).

Example: ; event:x

; Create an event from data.

(define view1 (view:dl))

;; view1

; Define an event in the new view.

(define event1 (event 100 150 1 view1


(list "right" "shift")))

;; event1

; Determine the X location of the event.

(event:x event1)

;; 100

; Determine if the event specified an X location.

(event:x (read-event))

;; 334

; Location of event.

; Define an event in the new view.

(define event2 (event 100 150 1 view1


(list "right" "shift")))

;; event2

; Determine the X location of the event.

(event:x event2)

;; 100

; Determine if the event specified an X location.

(event:x (read-event))

;; 513

; Location of event.
PDF/SCM/04SC.PDF
HTM/DATA/SCM/SCM/04SC/0053.HTM