home *** CD-ROM | disk | FTP | other *** search
- (if (not (tblsearch "APPID" "_SDI_SPEED_KIT_1_"))
- (progn
- (xload "SDIKIT")
- )
- )
- (setq _BLACK 0
- _BLUE 1
- _GREEN 2
- _CYAN 3
- _RED 4
- _MAGENTA 5
- _BROWN 6
- _LIGHTGRAY 7
- _DARKGRAY 8
- _LIGHTBLUE 9
- _LIGHTGREEN 10
- _LIGHTCYAN 11
- _LIGHTRED 12
- _LIGHTMAGENTA 13
- _YELLOW 14
- _WHITE 15
- _F1 15104
- _F10 17408
- _ESCKEY 283
- _ENTER 7181
- _CANCEL 11779
- _SPACE 14624
- )
-
- (defun c:textmenu(/ ret one two thr fou fiv six)
- (screenblue3)
- (nocursor)
- (setq a
- (textmenu
- " CHOOSE ONE OF THESE or F10 ESC CANCEL to exit " 3 ;<< Default is the third choice!
- (list
- (setq one "This is the FIRST choice!")
- (setq two "This is the SECOND choice!")
- (setq thr "This is the THIRD choice")
- (setq fou "and the FOURTH")
- (setq fiv "and the FIFTH choice....")
- (setq six "AND so on and so on and so on ... ")
- )
- ))
- (nocursor)
- (setcurs 1 1)
- (setq ret "You've selected \"");
- (cond
- ((= a 1)
- (setq ret(strcat ret one))
- )
- ((= a 2)
- (setq ret(strcat ret two))
- )
- ((= a 3)
- (setq ret(strcat ret thr))
- )
- ((= a 4)
- (setq ret(strcat ret fou))
- )
- ((= a 5)
- (setq ret(strcat ret fiv))
- )
- ((= a 6)
- (setq ret(strcat ret six))
- )
- ((= a _F10)
- (setq ret(strcat ret " the F10 key"))
- )
- ((= a _ESCKEY)
- (setq ret(strcat ret " the ESCAPE key"))
- )
- ((= a _CANCEL)
- (setq ret(strcat ret " the CANCEL key <ouch!> "))
- )
- (t nil)
- )
- (setq ret (strcat ret "\""))
- (message ret 0)
- (prin1)
- )
-
- (defun screenblue1()
- (setcolors
- (list
- _WHITE ;forward text color
- _BLUE ;background color
- _RED ;border background color
- _WHITE ;border text color
- _BLACK ;hilited text color
- _CYAN ;hilited background color
- )
- )
- (princ)
- )
-
- (defun screenblue2()
- (setcolors
- (list
- _WHITE ;forward text color
- _BLUE ;<<--- FOR CLS ;background color
- _RED ;border background color
- _GREEN ;border text color
- _BLACK ;hilited text color
- _CYAN ;hilited background color
- )
- )
- (princ)
- )
-
- (defun screenblack()
- (setcolors
- (list
- _WHITE ;forward text color
- _BLACK;<<--- FOR CLS ;background color
- _CYAN ;border background color
- _RED ;border text color
- _BLACK ;hilited text color
- _BLUE ;hilited background color
- )
- )
- (princ)
- )
-
- (defun screenblue3()
- (setcolors
- (list
- _WHITE ;forward text color
- _BLUE ;<<--- FOR CLS ;background color
- _RED ;border background color
- _WHITE ;border text color
- _BLACK ;hilited text color
- _CYAN ;hilited background color
- )
- )
- (princ)
- )
-
- (defun screengray()
- (setcolors
- (list
- _WHITE ;forward text color
- _BLACK ;<<--- FOR CLS ;background color
- _BLUE ;border background color
- _WHITE ;border text color
- _BLACK ;hilited text color
- _CYAN ;hilited background color
- )
- )
- (princ)
- )
-
- (defun c:cls()(cls)(prin1))
-
- (defun c:drawwindow()
- (nocursor)
- (screenblue1)
- (cls)
- (window 10 5 70 20 0 1)
- (display 1 25 "Window with no height and single border >>")
- (grread)
- (screenblue2)
- (cls)
- (window 10 5 70 20 1 1)
- (display 1 25 "Window with height = 1 and single border >>")
- (grread)
- (screenblue1)
- (cls)
- (screenblue2)
- (window 10 5 70 20 2 1)
- (display 1 25 "Window with height = 2 and single border >>")
- (grread)
- (screenblue3)
- (cls)
- (screenblack)
- (setspeed 300)
- (window 10 5 70 20 1 1)
- (display 1 25 "Window with height = 1, single border and speed of 300 >>")
- (grread)
- (screenblue1)
- (cls)
- (screenblack)
- (setspeed 50)
- (window 5 4 75 21 1 2)
- (display 1 25 "Window with height = 1, double border and speed of 50 >>")
- (grread)
- (setspeed 0)
- (screenblue3)
- (prin1)
- )
-
- (defun nested()
- (screenblue1)
- (cls)
- (screengray)
- (window 5 5 50 15 1 1)
- (window 8 8 53 18 1 1)
- (window 11 11 56 21 1 1)
- (window 14 14 59 24 1 1)
- (setcurs 1 1)
- (display 28 1 "NESTED WINDOWS ARE PRETTY!");
- )
-
-
- (defun c:quicktext()
- (window 10 5 70 20 1 1)
- (display 11 6 "THIS IS THE FIRST LINE OF TEXT TO BE DISPLAYED!")
- (display 11 7 "THIS IS THE SECOND LINE OF TEXT TO BE DISPLAYED!")
- (display 11 8 "THIS IS THE THIRD LINE OF TEXT TO BE DISPLAYED!")
- (display 11 9 "THIS IS THE FOURTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 10 "THIS IS THE FIFTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 11 "THIS IS THE SIXTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 12 "THIS IS THE SEVENTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 13 "THIS IS THE EIGHTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 14 "THIS IS THE NINTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 15 "THIS IS THE TENTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 16 "THIS IS THE ELEVENTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 17 "THIS IS THE TWELFTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 18 "THIS IS THE THIRTEENTH LINE OF TEXT TO BE DISPLAYED!")
- (display 11 19 "THIS IS THE FOURTEENTH LINE OF TEXT TO BE DISPLAYED!")
- (princ)
- )
-
- (defun c:demo()
- (textscr)
- (save_video 0)
- (setspeed 0)
- (setvar "cmdecho" 0)
- (cls)
- (nocursor)
- (message "Welcome to SDI'S SPEED-KITS VOLUME I" 0)
- (message "Hit any key to show window possibilities" 0)
- (c:drawwindow)
- (cls)
- (nested)
- (nocursor)
- (message "Hit any key to show the text menuing possibilities" 0)
- (c:textmenu)
- (nocursor)
- (message "Watch this for speed...50 iterations!" 0)
- (screenblue2)
- (setspeed 0)
- (repeat 50
- (c:quicktext)
- )
- (nocursor)
- (message "Now that was quick!" 0)
- (cls)
- ;(c:sdidemo)
- (nocursor)
- (restore_video 0)
- (c:sdidemo); <<-- This is the stuff you get when Registered!
- (message "Register today to receive the full library for only $35.00!" 1)
- (setcurs 1 23)
- (oncursor)
- (prin1)
- )