home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION DBVIEW (dbe_mode)
- *****************************************************************
-
- * A DBEDIT view control used when AEDBAR is active
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- # include "inkey.ch"
-
- LOCAL keypress := LASTKEY(), ret_value := 1
-
- DO CASE
- * Mode is idle, put a general message in window
- CASE dbe_mode = 0
- AEDMSG('mw_view')
-
- * At top of file, beep and say blinking "bof" message
- CASE dbe_mode = 1
- ERRORBEEP()
- AEDMSG('mw_bof', colblink)
-
- * At bottom of file, beep and say blinking "eof" message
- CASE dbe_mode = 2
- ERRORBEEP()
- AEDMSG('mw_eof', colblink)
-
- * Empty file. Display message.
- CASE dbe_mode = 3
- AEDMSG('File is empty')
-
- * Any other key
- CASE dbe_mode = 4
- IF (keypress <= K_F2 .OR. keypress > 256 ;
- .OR. keypress = K_F1) .AND. TYPE('fkeyset') != 'U'
-
- * Call special keys procedure if any function key or
- * alternate key combination is pressed. The variable,
- * "fkeyset" must contain the procedure name.
-
- IF .NOT. EMPTY(fkeyset)
- SETCOLOR(old_color)
- DO &fkeyset WITH 'DBVIEW', 0, '', keypress
- ENDIF
- ELSE
- * End the view and return
- AEDMSG('mw_pgdn')
- ret_value = 0
- ENDIF
- ENDCASE
-
- RETURN ret_value
-
-
-