home *** CD-ROM | disk | FTP | other *** search
- CLEAR
- IF ISCOLOR()
- ltr1clr = "B/H/"
- ltr2clr = "G/H/"
- ltr3clr = "C/H/"
- ltr4clr = "R/H/"
- ltr5clr = "M/H/"
- ltr6clr = "O/H/"
- ltr7clr = "W/H/"
- fastclr = "R/H/"
- ELSE
- ltr1clr = "W/H/"
- ltr2clr = "W/H/"
- ltr3clr = "W/H/"
- ltr4clr = "W/H/"
- ltr5clr = "W/H/"
- ltr6clr = "W/H/"
- ltr7clr = "W/H/"
- fastclr = "W/H/"
- ENDIF
- SET CURSOR OFF
- STORE 0 to wn1, wn2, wn3, wn4, wn5, wn6, wn7
- * init first window and use defaults
- wn1 = _SINIT_WN(1,16,8,8)
- * set use bios flag to true
- _sst_ubios(wn1, .T.)
- * draw the window on screen
- _SDRW_WN(wn1)
- * put a big letter in it
- _BIGSTR("W",1,16,CHR(219), ltr1clr, 0)
- mv_wn(wn1,0,150)
- * init the second window
- wn2 = _SINIT_WN(1,16,8,8)
- * set use bios flag to true
- _sst_ubios(wn2, .T.)
- * draw the window on screen
- _SDRW_WN(wn2)
- * put a big letter on the screen
- _BIGSTR("e",1,16,CHR(219), ltr2clr, 0)
- mv_wn(wn2,8,150)
- * init the third window
- wn3 = _SINIT_WN(1,16,8,8)
- * set use bios flag to true
- _sst_ubios(wn3, .T.)
- * draw the window on screen
- _SDRW_WN(wn3)
- * put a big letter on the screen
- _BIGSTR("l",1,16,CHR(219), ltr3clr, 0)
- mv_wn(wn3,16,150)
- * init the fourth window
- wn4 = _SINIT_WN(1,16,8,8)
- * set use bios flag to true
- _sst_ubios(wn4, .T.)
- * draw the window on screen
- _SDRW_WN(wn4)
- * put a big letter on the screen
- _BIGSTR("c",1,16,CHR(219), ltr4clr, 0)
- mv_wn(wn4,24,150)
- * init the fifth window
- wn5 = _SINIT_WN(1,16,8,8)
- * set use bios flag to true
- _sst_ubios(wn5, .T.)
- * draw the window on screen
- _SDRW_WN(wn5)
- * put a big letter on the screen
- _BIGSTR("o",1,16,CHR(219), ltr5clr, 0)
- mv_wn(wn5,32,150)
- * init the sixth window
- wn6 = _SINIT_WN(1,16,8,8)
- * set use bios flag to true
- _sst_ubios(wn6, .T.)
- * draw the window on screen
- _SDRW_WN(wn6)
- * put a big letter on the screen
- _BIGSTR("m",1,16,CHR(219), ltr6clr, 0)
- mv_wn(wn6,40,150)
- * init the seventh window
- wn7 = _SINIT_WN(1,16,8,8)
- * set use bios flag to true
- _sst_ubios(wn7, .T.)
- * draw the window on screen
- _SDRW_WN(wn7)
- * put a big letter on the screen
- _BIGSTR("e",1,16,CHR(219), ltr7clr, 0)
- mv_wn(wn7,48,150)
- @ 10,10 SAY "To Windows For Clipper!"
- @ 11,0 SAY ''
- TEXT
- Welcome, this is a demo of the Windows For Clipper Library for the
- Summer '87 version of the compiler. This demo will give you a breif
- introduction to the power of the library and what it can do for you.
-
- The above display was generated by initializing each window, drawing
- each window, drawing each BIG letter, and then inserting a 150 count loop
- to delay movement. Your ROM BIOS was used to write the characters. Next,
- it will do all of the above, without the 150 count loop and using direct
- screen writes. Ready to watch it scream!
-
- Press A key when you're ready
- ENDTEXT
- INKEY(0)
- CLEAR
- _srem_wn(wn1)
- _srem_wn(wn2)
- _srem_wn(wn3)
- _srem_wn(wn4)
- _srem_wn(wn5)
- _srem_wn(wn6)
- _srem_wn(wn7)
- STORE 0 to wn1, wn2, wn3, wn4, wn5, wn6, wn7
- * init first window and use defaults
- wn1 = _SINIT_WN(1,16,8,8)
- * draw the window on screen
- _SDRW_WN(wn1)
- * put a big letter in it
- _BIGSTR("W",1,16,CHR(219), ltr1clr, 1)
- mv_wn(wn1,0,0)
- * init the second window
- wn2 = _SINIT_WN(1,16,8,8)
- * draw the window on screen
- _SDRW_WN(wn2)
- * put a big letter on the screen
- _BIGSTR("e",1,16,CHR(219), ltr2clr, 1)
- mv_wn(wn2,8,0)
- * init the second window
- wn3 = _SINIT_WN(1,16,8,8)
- * draw the window on screen
- _SDRW_WN(wn3)
- * put a big letter on the screen
- _BIGSTR("l",1,16,CHR(219), ltr3clr, 1)
- mv_wn(wn3,16,0)
- * init the second window
- wn4 = _SINIT_WN(1,16,8,8)
- * draw the window on screen
- _SDRW_WN(wn4)
- * put a big letter on the screen
- _BIGSTR("c",1,16,CHR(219), ltr4clr, 1)
- mv_wn(wn4,24,0)
- * init the second window
- wn5 = _SINIT_WN(1,16,8,8)
- * draw the window on screen
- _SDRW_WN(wn5)
- * put a big letter on the screen
- _BIGSTR("o",1,16,CHR(219), ltr5clr, 1)
- mv_wn(wn5,32,0)
- * init the second window
- wn6 = _SINIT_WN(1,16,8,8)
- * draw the window on screen
- _SDRW_WN(wn6)
- * put a big letter on the screen
- _BIGSTR("m",1,16,CHR(219), ltr6clr, 1)
- mv_wn(wn6,40,0)
- * init the second window
- wn7 = _SINIT_WN(1,16,8,8)
- * draw the window on screen
- _SDRW_WN(wn7)
- * put a big letter on the screen
- _BIGSTR("e",1,16,CHR(219), ltr7clr, 1)
- mv_wn(wn7,48,0)
- _BIGSTR("FAST!",20,10,CHR(177), fastclr, 1)
- @ 19,0 SAY ''
- TEXT
- Impressive ? Well, if you think so that's great! If you're not convinced
- yet, just stick around and maybe what you will see in the rest of the demo
- will impress you. I hope so!
-
- Press Any Key To Continue
- ENDTEXT
- INKEY(0)
- _srem_wn(wn1)
- _srem_wn(wn2)
- _srem_wn(wn3)
- _srem_wn(wn4)
- _srem_wn(wn5)
- _srem_wn(wn6)
- _srem_wn(wn7)
- SET CURSOR ON
- CLEAR
-
- RETURN
-
- FUNCTION mv_wn
- parameter window, stop, delay
- wnrow = 16
- **************************************************
- * this loop moves window right across the screen *
- **************************************************
- FOR wncol = 8 TO 64 STEP 8
- timer = 0
- **********************************************
- * move the window to new column, row coords. *
- **********************************************
- _smove_wn(window, wncol, wnrow)
- DO WHILE timer <= delay
- timer = timer + 1
- ENDDO
- NEXT
- *****************************************************
- * this loop moves window down right side of screen *
- *****************************************************
- wncol = 64
- FOR wnrow = 8 TO 0 STEP -8
- timer = 0
- **********************************************
- * move the window to new column, row coords. *
- **********************************************
- _smove_wn(window, wncol, wnrow)
- DO WHILE timer <= delay
- timer = timer + 1
- ENDDO
- NEXT
- *************************************************
- * this loop moves window left across the screen *
- *************************************************
- wnrow = 0
- FOR wncol = 56 TO stop STEP -8
- timer = 0
- _smove_wn(window, wncol, wnrow)
- **********************************************
- * move the window to new column, row coords. *
- **********************************************
- DO WHILE timer <= delay
- timer = timer + 1
- ENDDO
- NEXT
-