//##################################################################### //# //# Reach SLCD+/6/43 macro demo file, WQVGA landscape //# 04-14-2010 //# //# Ported to SLCD5 10-14-2010 //# //# 1st shown at E.S.C. 4/2010 in San Jose //# Graphics by: GUIFX, Inc. (www.guifx.com) //# //##################################################################### //--------------------------------------------------------------------- // MACRO: power_on // // NOTE: this needs to be the 1st macro in the file, as *PONMAC will be // set to 1 1 (run macro index number 1, disable copyright notice) //--------------------------------------------------------------------- // #define power_on S FFF 008 z // use a nice sized font: f24B // whole screen touch area xs 128 0 0 `Xm` `Ym` // if touched, execute touch cal macro xm 128 touch_calibrate t "Touch screen to calibrate." 20 100 w 1000 t "." w 1000 t "." w 1000 t "." w 1000 // if no touch yet, go to home page m home_page #end //--------------------------------------------------------------------- // MACRO: clear_to_bm // -- arg0 ... index of background bitmap to display //--------------------------------------------------------------------- // #define clear_to_bm S FFF 008 z o `(`Xc`-240)` `(`Yc`-136)` xbbs 255 f 16B ta LT xi `0` 0 0 #end //--------------------------------------------------------------------- // MACRO: touch_calibrate //--------------------------------------------------------------------- // #define touch_calibrate tc // when done, go to home page: m home_page #end //--------------------------------------------------------------------- // MACRO: setup_home_button (always hotspot #255) //--------------------------------------------------------------------- // #define setup_home_button xi 6 15 4 xs 255 16 5 100 46 xm 255 home_page #end //--------------------------------------------------------------------- // MACRO: setup_back_button (always hotspot #254) // -- arg0 ... name of page macro to go back to //--------------------------------------------------------------------- // #define setup_back_button xi 14 114 4 xs 254 115 5 219 46 xm 254 `0` #end //--------------------------------------------------------------------- // MACRO: setup_open_detail // -- arg0 ... name of page macro to go to //--------------------------------------------------------------------- // #define setup_open_detail xs 128 163 213 201 251 xm 128 `0` #end //--------------------------------------------------------------------- // MACRO: setup_close_detail // -- arg0 ... name of page macro to go back to //--------------------------------------------------------------------- // #define setup_close_detail xs 128 433 8 469 43 xm 128 `0` #end //--------------------------------------------------------------------- // MACRO: update_indicator_1 // -- arg0 ... #on (0-18) //--------------------------------------------------------------------- #define update_indicator_1 m update_indicator:lbl_`0`_on 37 38 50 #end //--------------------------------------------------------------------- // MACRO: update_indicator_2 // -- arg0 ... #on (0-18) //--------------------------------------------------------------------- #define update_indicator_2 m update_indicator:lbl_`0`_on 39 40 135 #end //--------------------------------------------------------------------- // MACRO: update_indicator_3 // -- arg0 ... #on (0-18) //--------------------------------------------------------------------- #define update_indicator_3 m update_indicator:lbl_`0`_on 41 42 220 #end //--------------------------------------------------------------------- // MACRO: update_indicator_4 // -- arg0 ... #on (0-18) //--------------------------------------------------------------------- #define update_indicator_4 m update_indicator:lbl_`0`_on 43 44 305 #end //--------------------------------------------------------------------- // MACRO: update_indicator_5 // -- arg0 ... #on (0-18) //--------------------------------------------------------------------- #define update_indicator_5 m update_indicator:lbl_`0`_on 45 46 390 #end //--------------------------------------------------------------------- // MACRO: update_indicator // -- arg0 ... bm index of "off" bitmap // -- arg1 ... bm index of "on" bitmap // -- arg2 ... x of TLC of bitmaps //--------------------------------------------------------------------- // #define update_indicator :lbl_0_on xi `0` `2` 73 :lbl_1_on xic `0` `2` 73 0 0 40 162 xic `1` `2` 73 0 162 40 181 :lbl_2_on xic `0` `2` 73 0 0 40 153 xic `1` `2` 73 0 153 40 181 :lbl_3_on xic `0` `2` 73 0 0 40 144 xic `1` `2` 73 0 144 40 181 :lbl_4_on xic `0` `2` 73 0 0 40 135 xic `1` `2` 73 0 135 40 181 :lbl_5_on xic `0` `2` 73 0 0 40 126 xic `1` `2` 73 0 126 40 181 :lbl_6_on xic `0` `2` 73 0 0 40 117 xic `1` `2` 73 0 117 40 181 :lbl_7_on xic `0` `2` 73 0 0 40 108 xic `1` `2` 73 0 108 40 181 :lbl_8_on xic `0` `2` 73 0 0 40 99 xic `1` `2` 73 0 99 40 181 :lbl_9_on xic `0` `2` 73 0 0 40 90 xic `1` `2` 73 0 90 40 181 :lbl_10_on xic `0` `2` 73 0 0 40 81 xic `1` `2` 73 0 81 40 181 :lbl_11_on xic `0` `2` 73 0 0 40 72 xic `1` `2` 73 0 72 40 181 :lbl_12_on xic `0` `2` 73 0 0 40 63 xic `1` `2` 73 0 63 40 181 :lbl_13_on xic `0` `2` 73 0 0 40 54 xic `1` `2` 73 0 54 40 181 :lbl_14_on xic `0` `2` 73 0 0 40 45 xic `1` `2` 73 0 45 40 181 :lbl_15_on xic `0` `2` 73 0 0 40 36 xic `1` `2` 73 0 36 40 181 :lbl_16_on xic `0` `2` 73 0 0 40 27 xic `1` `2` 73 0 27 40 181 :lbl_17_on xic `0` `2` 73 0 0 40 18 xic `1` `2` 73 0 18 40 181 :lbl_18_on xi `1` `2` 73 #end //--------------------------------------------------------------------- // MACRO: random_update_indicators //--------------------------------------------------------------------- // #define random_update_indicators m update_indicator_1 `R15:18` m update_indicator_2 `R12:15` m update_indicator_3 `R9:12` m update_indicator_4 `R12:15` m update_indicator_5 `R15:18` w 50 m update_indicator_1 `R12:18` m update_indicator_2 `R9:15` m update_indicator_3 `R6:12` m update_indicator_4 `R9:15` m update_indicator_5 `R12:18` w 50 m update_indicator_1 `R9:15` m update_indicator_2 `R6:12` m update_indicator_3 `R3:9` m update_indicator_4 `R6:12` m update_indicator_5 `R9:15` w 50 m update_indicator_1 `R12:18` m update_indicator_2 `R9:15` m update_indicator_3 `R6:12` m update_indicator_4 `R9:15` m update_indicator_5 `R12:18` w 50 :repeat #end //--------------------------------------------------------------------- // MACRO: setup_key // -- arg0 ... button index // -- arg1 ... button x // -- arg2 ... button y // -- arg3 ... button type // -- arg4 ... button text // -- arg5 ... unpressed bm index // -- arg6 ... pressed bm index //--------------------------------------------------------------------- // #define setup_key bdc `0` `1` `2` `3` "`4`" `5` `6` :lbl_key_pressed xa `0` p key_pressed "`4`" :lbl_delete_pressed xa `0` p delete_pressed #end //--------------------------------------------------------------------- // MACRO: key_pressed // -- arg0 ... char to display //--------------------------------------------------------------------- // #define key_pressed mpush "`0`" // add the key char to the memory string xi 67 240 10 // redraw text box (it has gradients) ta LC // left justify, vertical center t "`M`_" 243 10 457 43 T // display text within box, transparent #end //--------------------------------------------------------------------- // MACRO: delete_pressed //--------------------------------------------------------------------- // #define delete_pressed mpop 1 m key_pressed "" #end //--------------------------------------------------------------------- // MACRO: _template_ //--------------------------------------------------------------------- // #define _template_ #end //##################################################################### //# The following macros setup and operate each "page" in the demo //##################################################################### //--------------------------------------------------------------------- // MACRO: home_page //--------------------------------------------------------------------- // #define home_page // clear to background bitmap and draw the page: m clear_to_bm 1 xi 2 19 13 // reach logo xi 3 412 16 // demo title xi 4 85 102 // "Feature Tour" icon xi 5 258 100 // "Customer Examples" icon // create invisible hotspot, attach macro for "Feature Tour": xs 128 84 98 217 235 xm 128 feature_tour_page // create invisible hotspot, attach macro for "Customer Examples": xs 129 253 98 399 235 xm 129 customer_examples_page #end //--------------------------------------------------------------------- // MACRO: feature_tour_page //--------------------------------------------------------------------- // #define feature_tour_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button xi 7 339 16 // feature tour title xi 8 81 78 // benefits icon xi 9 201 78 // hi res icon xi 10 335 78 // key entry icon xi 11 76 167 // buttons icon xi 12 195 185 // sliders icon xi 13 329 181 // indicators icon // create invisible hotspot, attach macro for "Benefits": xs 128 81 76 139 141 xm 128 benefits_page // create invisible hotspot, attach macro for "High Resolution": xs 129 205 76 281 141 xm 129 hi_res_page // create invisible hotspot, attach macro for "Key Entry": xs 130 334 76 408 141 xm 130 key_entry_page // create invisible hotspot, attach macro for "Buttons": xs 131 76 168 142 234 xm 131 buttons_page // create invisible hotspot, attach macro for "Sliders": xs 132 196 183 288 222 xm 132 sliders_page // create invisible hotspot, attach macro for "Indicators": xs 133 330 181 412 227 xm 133 indicators_page #end //--------------------------------------------------------------------- // MACRO: benefits_page //--------------------------------------------------------------------- // #define benefits_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button feature_tour_page xi 15 387 16 // benefits title xi 16 33 96 // benifits body #end //--------------------------------------------------------------------- // MACRO: hi_res_page //--------------------------------------------------------------------- // #define hi_res_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button feature_tour_page xi 17 310 16 // hi res title xi 18 0 53 // hi res body #end //--------------------------------------------------------------------- // MACRO: key_entry_page //--------------------------------------------------------------------- // #define key_entry_page // clear to fully drawn page (minus the key labels) m clear_to_bm 60 // globally disable touch while we draw the keys, so pressing one of them // won't abort us before we finish drawing them all touch off // new in version 2.8.4 m setup_home_button m setup_back_button feature_tour_page // clear string memory mpop -1 // setup the keys f 16B ta LT S FFF 000 // want key's text to be white // -- top row: QWERTYUIOP m setup_key:lbl_key_pressed 1 11 63 1 "Q" 61 62 m setup_key:lbl_key_pressed 2 57 63 1 "W" 61 62 m setup_key:lbl_key_pressed 3 104 63 1 "E" 61 62 m setup_key:lbl_key_pressed 4 150 63 1 "R" 61 62 m setup_key:lbl_key_pressed 5 197 63 1 "T" 61 62 m setup_key:lbl_key_pressed 6 243 63 1 "Y" 61 62 m setup_key:lbl_key_pressed 7 290 63 1 "U" 61 62 m setup_key:lbl_key_pressed 8 336 63 1 "I" 61 62 m setup_key:lbl_key_pressed 9 383 63 1 "O" 61 62 m setup_key:lbl_key_pressed 10 429 63 1 "P" 61 62 // -- 2nd row: ASDFGHJKL m setup_key:lbl_key_pressed 11 32 114 1 "A" 61 62 m setup_key:lbl_key_pressed 12 78 114 1 "S" 61 62 m setup_key:lbl_key_pressed 13 125 114 1 "D" 61 62 m setup_key:lbl_key_pressed 14 171 114 1 "F" 61 62 m setup_key:lbl_key_pressed 15 218 114 1 "G" 61 62 m setup_key:lbl_key_pressed 16 264 114 1 "H" 61 62 m setup_key:lbl_key_pressed 17 311 114 1 "J" 61 62 m setup_key:lbl_key_pressed 18 357 114 1 "K" 61 62 m setup_key:lbl_key_pressed 19 404 114 1 "L" 61 62 // -- 3rd row: ZXCVBNM m setup_key:lbl_key_pressed 20 56 166 1 "Z" 61 62 m setup_key:lbl_key_pressed 21 102 166 1 "X" 61 62 m setup_key:lbl_key_pressed 22 149 166 1 "C" 61 62 m setup_key:lbl_key_pressed 23 195 166 1 "V" 61 62 m setup_key:lbl_key_pressed 24 242 166 1 "B" 61 62 m setup_key:lbl_key_pressed 25 288 166 1 "N" 61 62 m setup_key:lbl_key_pressed 26 335 166 1 "M" 61 62 // -- spacebar: m setup_key:lbl_key_pressed 27 148 219 1 " " 63 64 // -- delete key m setup_key:lbl_delete_pressed 28 380 166 3 "DEL" 65 66 // want key "output" text to be black: S 000 FFF // now, re-enable touch touch on #end //--------------------------------------------------------------------- // MACRO: buttons_page //--------------------------------------------------------------------- // #define buttons_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button feature_tour_page xi 19 391 16 // buttons title xi 20 54 195 // button labels // define the 4 buttons: bd 1 44 86 20 "" "" 0 0 0 0 21 22 bd 2 114 116 20 "" "" 0 0 0 0 23 24 bd 3 196 99 1 "" 0 0 25 26 bd 4 311 114 1 "" 0 0 27 28 #end //--------------------------------------------------------------------- // MACRO: sliders_page //--------------------------------------------------------------------- // #define sliders_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button feature_tour_page xi 29 399 16 // sliders title // define 5 sliders sl 131 30 46 72 35 0 0 1 0 100 0 sv 131 66 sl 132 31 131 72 35 0 0 1 0 100 0 sv 132 58 sl 133 32 216 72 35 0 0 1 0 100 0 sv 133 50 sl 134 33 301 72 35 0 0 1 0 100 0 sv 134 62 sl 135 34 383 72 35 0 0 1 0 100 0 sv 135 72 #end //--------------------------------------------------------------------- // MACRO: indicators_page //--------------------------------------------------------------------- // #define indicators_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button feature_tour_page xi 36 370 16 // indicators title m random_update_indicators #end //--------------------------------------------------------------------- // MACRO: customer_examples_page //--------------------------------------------------------------------- // #define customer_examples_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button xi 47 285 16 // customer examples title xi 48 45 111 // advanced laser systems icon xi 49 185 111 // chetco digital icon xi 50 324 111 // sciton icon // create invisible hotspot, attach macro for "Advanced Laser Systems": xs 128 45 111 156 237 xm 128 advanced_laser_page // create invisible hotspot, attach macro for "Chetco Digital": xs 129 185 111 296 222 xm 129 chetco_page // create invisible hotspot, attach macro for "Sciton": xs 130 324 111 435 220 xm 130 sciton_page #end //--------------------------------------------------------------------- // MACRO: advanced_laser_page //--------------------------------------------------------------------- // #define advanced_laser_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button customer_examples_page xi 51 242 16 // advanced laser systems title xi 52 32 84 // body m setup_open_detail advanced_laser_detail_page #end //--------------------------------------------------------------------- // MACRO: advanced_laser_detail_page //--------------------------------------------------------------------- // #define advanced_laser_detail_page m clear_to_bm 53 m setup_close_detail advanced_laser_page #end //--------------------------------------------------------------------- // MACRO: chetco_page //--------------------------------------------------------------------- // #define chetco_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button customer_examples_page xi 54 326 16 // chetco digital title xi 55 32 84 // body m setup_open_detail chetco_detail_page #end //--------------------------------------------------------------------- // MACRO: chetco_detail_page //--------------------------------------------------------------------- // #define chetco_detail_page m clear_to_bm 56 m setup_close_detail chetco_page #end //--------------------------------------------------------------------- // MACRO: sciton_page //--------------------------------------------------------------------- // #define sciton_page // clear to background bitmap and draw the page: m clear_to_bm 1 m setup_home_button m setup_back_button customer_examples_page xi 57 407 16 // sciton title xi 58 32 84 // body m setup_open_detail sciton_detail_page #end //--------------------------------------------------------------------- // MACRO: sciton_detail_page //--------------------------------------------------------------------- // #define sciton_detail_page m clear_to_bm 59 m setup_close_detail sciton_page #end //===== END OF FILE =======