(FILECREATED "30-Nov-84 10:11:38" {AZTEC}<TRILLIUM>BIRTHDAY84>ITEMTYPES>IDO-SENSOR-ITEMTYPES.;1 4526 changes to: (VARS IDO-SENSOR-ITEMTYPESCOMS) previous date: "26-Aug-84 16:51:50" {AZTEC}<TRILLIUM>BIRTHDAY84>IDO-SENSOR-ITEMTYPES.;1) (PRETTYCOMPRINT IDO-SENSOR-ITEMTYPESCOMS) (RPAQQ IDO-SENSOR-ITEMTYPESCOMS ((ITEMTYPES GRAPHIC.SENSITIVE.REGION ISOLATED.BUTTON.SENSOR) (P (COMPILE.INTERNAL.FNS.IF.NECESSARY)))) (READ.ITEMTYPE GRAPHIC.SENSITIVE.REGION 5) (\TYPE ITEM.TYPE NAME GRAPHIC.SENSITIVE.REGION COMMENT "A sensor which displays a graphic while being sensed" KIND SENSOR PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (POSITION) DEFAULT (100 . 100) COMMENT "An area sensitive to touch") (\TYPE PARAMETER NAME ON.PICTURE TYPE (BITMAP.NAME) DEFAULT EXAMPLE.BITMAP COMMENT "The graphic to display while being sensed") (\TYPE PARAMETER NAME REMOVE.WITH.OFF.PICTURE? TYPE ( ONEOF (YES NO)) DEFAULT NO COMMENT "Whether or not to remove (by inverting) a graphic (OFF.PICTURE) before displaying ON.PICTURE ") ( \TYPE PARAMETER NAME OFF.PICTURE TYPE (BITMAP.NAME) DEFAULT EXAMPLE.BITMAP COMMENT "The graphic to remove while being sensed") (\TYPE PARAMETER NAME ACTION.FORM TYPE (FORM) DEFAULT ( ACTION.PRINT "This action brought to you by a GRAPHIC.SENSITIVE.REGION") COMMENT "The action to be taken as the sensitive region is touched")) OTHER (FNS ((BOUNDING.BOX BOUNDING.BOX.GRAPHIC.SENSITIVE.REGION) (SENSE SENSE.GRAPHIC.SENSITIVE.REGION))) CLASSES (SENSOR)) (DEFINEQ (BOUNDING.BOX.GRAPHIC.SENSITIVE.REGION [LAMBDA (ITEM) (* edited: "26-Aug-84 15:58") (PROG ((BITMAP (GET.PARAMQ ITEM OFF.PICTURE GRAPHIC.SENSITIVE.REGION)) POS) (OR (BITMAPP BITMAP) (SETQ BITMAP (FIND.BITMAP BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (RETURN (LIST (fetch (POSITION XCOORD) of POS) (fetch (POSITION YCOORD) of POS) (fetch (BITMAP BITMAPWIDTH) of BITMAP) (fetch (BITMAP BITMAPHEIGHT) of BITMAP]) (SENSE.GRAPHIC.SENSITIVE.REGION [LAMBDA (ITEM TOUCH XCOORD YCOORD) (* edited: "26-Aug-84 15:59") (PROG ((ON.BITMAP (GET.PARAMQ ITEM ON.PICTURE GRAPHIC.SENSITIVE.REGION)) (REMOVE.FIRST (EQ (GET.PARAMQ ITEM REMOVE.WITH.OFF.PICTURE?) (QUOTE YES))) (OFF.BITMAP (GET.PARAMQ ITEM OFF.PICTURE)) POS X Y WIDTH HEIGHT) (OR (BITMAPP ON.BITMAP) (SETQ ON.BITMAP (FIND.BITMAP ON.BITMAP))) (OR (BITMAPP OFF.BITMAP) (SETQ OFF.BITMAP (FIND.BITMAP OFF.BITMAP))) (SETQ POS (GET.PARAMQ ITEM PLACEMENT)) (AND TOUCH (COND ((INSIDEP (LIST (SETQ X (fetch (POSITION XCOORD) of POS)) (SETQ Y (fetch (POSITION YCOORD) of POS)) (SETQ WIDTH (fetch (BITMAP BITMAPWIDTH) of OFF.BITMAP)) (SETQ HEIGHT (fetch (BITMAP BITMAPHEIGHT) of OFF.BITMAP))) XCOORD YCOORD) (AND REMOVE.FIRST (BITBLT OFF.BITMAP 0 0 CURRENT.DSP X Y WIDTH HEIGHT (QUOTE INPUT) (QUOTE INVERT))) (BITBLT ON.BITMAP 0 0 CURRENT.DSP X Y WIDTH HEIGHT (QUOTE INPUT) (QUOTE INVERT)) (TRILLIUM.EVAL (GET.PARAMQ ITEM ACTION.FORM)) (WAITNOBUG) (BITBLT ON.BITMAP 0 0 CURRENT.DSP X Y WIDTH HEIGHT (QUOTE INPUT) (QUOTE INVERT)) (AND REMOVE.FIRST (BITBLT OFF.BITMAP 0 0 CURRENT.DSP X Y WIDTH HEIGHT (QUOTE INPUT) (QUOTE INVERT))) T) (T NIL]) ) (READ.ITEMTYPE ISOLATED.BUTTON.SENSOR 5) (\TYPE ITEM.TYPE NAME ISOLATED.BUTTON.SENSOR COMMENT "A sensor which shows nothing but takes an action when touched. Allows other sensitive regions on top of it to fire also." KIND SENSOR PARAMETERS ((\TYPE PARAMETER NAME PLACEMENT TYPE (REGION) DEFAULT (100 100 30 30) COMMENT "An area sensitive to touch") (\TYPE PARAMETER NAME ACTION.FORM TYPE (FORM) DEFAULT ( ACTION.PRINT "This action brought to you by an ISOLATED.BUTTON.SENSOR ") COMMENT "The action to be taken as the sensitive region is touched")) OTHER (FNS ((SENSE SENSE.ISOLATED.BUTTON.SENSOR))) CLASSES (SENSOR)) (DEFINEQ (SENSE.ISOLATED.BUTTON.SENSOR [LAMBDA (ITEM TOUCH XCOORD YCOORD) (* edited: "26-Aug-84 16:00") (AND TOUCH (COND ((INSIDEP (GET.PARAMQ ITEM PLACEMENT ISOLATED.BUTTON.SENSOR) XCOORD YCOORD) (TRILLIUM.EVAL (GET.PARAMQ ITEM ACTION.FORM))) (T NIL]) ) (COMPILE.INTERNAL.FNS.IF.NECESSARY) (DECLARE: DONTCOPY (FILEMAP (NIL (1527 3518 (BOUNDING.BOX.GRAPHIC.SENSITIVE.REGION 1537 . 2092) ( SENSE.GRAPHIC.SENSITIVE.REGION 2094 . 3516)) (4154 4468 (SENSE.ISOLATED.BUTTON.SENSOR 4164 . 4466)))) ) STOP