136
CipherLab BASIC Programming Part I
4.17 TOUCH SCREEN COMMANDS
For 8500 Series, the liquid crystal display (LCD) is also a touch screen when it is
initialized by ENABLE_TOUCHSCREEN.
Signature Capture
Use the stylus to write anything directly on a specific area of the LCD, which is
defined by SET_SIGNAREA. Then, the signature can be captured by GET_IMAGE.
Touchable Items
Graphic items can be designed to simulate a key operation when being touched, e.g.
a calculator. The information of “graphic items” (buttons), including position and size,
has to be defined in advance through SET_SCREENITEMS.
Patterns of the graphic items can be designed and displayed on the LCD by
SHOW_IMAGE. Then, these items can be utilized and detected by
GET_SCREENITEM.
If the display mode for a selected item is set to ITEM_REVERSE by
SET_SCREENITEMS, the item will be displayed in a reverse color once it is touched.
On the contrary, if it is set to ITEM_NORMAL, there will be no changes happening to
the item once it is touched.
Commands for triggering the TOUCHSCREEN event: OFF TOUCHSCREEN, ON
TOUCHSCREEN GOSUB...
Below is an example of Touch Screen Test.
*** Signature Capture Area ***
' ENABLE_TOUCHSCREEN
SET_SIGNAREA(5, 5, 155, 120)
RECTANGLE(5, 5, 155, 120, 0, 1)
*********** Buttons ***********
RECTANGLE(5, 125, 75, 145, 0, 1)
RECTANGLE(85, 125, 155, 145, 0, 1)
ITEMSTR$= CHR$(5)+ CHR$(125)+CHR$(70)+CHR$(20)+CHR$(13)
ITEMSTR$= ITEMSTR$+CHR$(85)+ CHR$(125)+CHR$(70)+CHR$(20)+CHR$(13)