home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / pibterm / pibt41s1.arc / DOSCDUMP.MOD < prev    next >
Text File  |  1987-12-26  |  4KB  |  101 lines

  1. (*----------------------------------------------------------------------*)
  2. (*              Do_Screen_Dump --- write screen image to file           *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Do_Screen_Dump;
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*      Procedure:  Do_Screen_Dump                                      *)
  10. (*                                                                      *)
  11. (*      Purpose:    Handles screen dump requests                        *)
  12. (*                                                                      *)
  13. (*      Calling sequence:                                               *)
  14. (*                                                                      *)
  15. (*         Do_Screen_Dump;                                              *)
  16. (*                                                                      *)
  17. (*      Remarks:                                                        *)
  18. (*                                                                      *)
  19. (*         Depending upon the current text/graphics mode, either the    *)
  20. (*         text screen or the graphics screen is written out.           *)
  21. (*                                                                      *)
  22. (*----------------------------------------------------------------------*)
  23.  
  24. VAR
  25.    Vid_Mode      : INTEGER;
  26.    Graphics_Mode : BOOLEAN;
  27.  
  28. (*----------------------------------------------------------------------*)
  29. (*      Do_Text_Screen_Dump --- write text screen image to file         *)
  30. (*----------------------------------------------------------------------*)
  31.  
  32. PROCEDURE Do_Text_Screen_Dump;
  33.  
  34. BEGIN (* Do_Text_Screen_Dump *)
  35.  
  36.    Save_Partial_Screen( Saved_Screen, 10, 10, 70, 13 );
  37.  
  38.    IF Screen_Dump_Name <> '' THEN
  39.       BEGIN
  40.          Write_Screen( Screen_Dump_Name );
  41.          Draw_Menu_Frame( 10, 10, 70, 13, Menu_Frame_Color, Menu_Title_Color,
  42.                           Menu_Text_Color, '' );
  43.          WRITE('Screen dump written to ',Screen_Dump_Name );
  44.       END
  45.    ELSE
  46.       BEGIN
  47.          Draw_Menu_Frame( 10, 10, 70, 13, Menu_Frame_Color, Menu_Title_Color,
  48.                           Menu_Text_Color, '' );
  49.          WRITE('No screen dump file defined, dump not done.');
  50.       END;
  51.  
  52.    Window_Delay;
  53.  
  54.    Restore_Screen_And_Colors( Saved_Screen );
  55.  
  56. END   (* Do_Text_Screen_Dump *);
  57.  
  58. (*----------------------------------------------------------------------*)
  59. (*   Do_Graphics_Screen_Dump --- write graphics screen image to file    *)
  60. (*----------------------------------------------------------------------*)
  61.  
  62. PROCEDURE Do_Graphics_Screen_Dump;
  63.  
  64. BEGIN (* Do_Graphics_Screen_Dump *)
  65.  
  66.    Save_Screen( Saved_Screen );
  67.  
  68.    IF Graphics_Dump_Name <> '' THEN
  69.       BEGIN
  70.          Write_Graphics_Screen( Graphics_Dump_Name );
  71.          Draw_Menu_Frame( 10, 10, 70, 13, Menu_Frame_Color, Menu_Title_Color,
  72.                           Menu_Text_Color, '' );
  73.          WRITE('Screen dump written to ',Graphics_Dump_Name );
  74.       END
  75.    ELSE
  76.       BEGIN
  77.          Draw_Menu_Frame( 10, 10, 70, 13, Menu_Frame_Color, Menu_Title_Color,
  78.                           Menu_Text_Color, '' );
  79.          WRITE('No graphics screen dump file defined, dump not done.');
  80.       END;
  81.  
  82.    Window_Delay;
  83.  
  84.    Restore_Screen_And_Colors( Saved_Screen );
  85.  
  86. END   (* Do_Graphics_Screen_Dump *);
  87.  
  88. (*----------------------------------------------------------------------*)
  89.  
  90. BEGIN (* Do_Screen_Dump *)
  91.  
  92.    Vid_Mode      := Current_Video_Mode;
  93.    Graphics_Mode := ( Vid_Mode >= MedRes_GraphMode ) AND
  94.                     ( Vid_Mode <> Mono_TextMode );
  95.  
  96.    IF Graphics_Mode THEN
  97.       Do_Graphics_Screen_Dump
  98.    ELSE
  99.       Do_Text_Screen_Dump;
  100.  
  101. END   (* Do_Screen_Dump *);