home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TVTOOL.ZIP / TVAPP.INT < prev    next >
Encoding:
Text File  |  1992-10-08  |  3.1 KB  |  113 lines

  1. {*
  2. *   TvApp.pas
  3. *
  4. *   Enhancements to Turbo Vision Apps.pas.
  5. *
  6. *   Copyright 1992 by Richard W. Hansen
  7. *
  8. *}
  9.  
  10. UNIT TvApp;
  11.  
  12. {$I TVDEFS.INC}
  13.  
  14. INTERFACE
  15.  
  16.  
  17. USES
  18.   App, Dialogs, Drivers, Objects, Views;
  19.  
  20.  
  21. CONST
  22.   { New Palette Layout }
  23.   { 1-63 are normal palette entries }
  24.   { 64-71 are the help colors defined in HELPFILE.PAS }
  25.   { 72-101 are 3D palette entries }
  26.   { 102 is the busy window color }
  27.   { 72 = Frame normal }
  28.   { 73 = Frame shaded }
  29.   { 74 = Frame passive }
  30.   { 75 = Frame Icon/Frame dragging }
  31.   { 76 = Button normal }
  32.   { 77 = Button text }
  33.   { 78 = Button disabled text }
  34.   { 71 = Button shortcut text }
  35.   { 80 = Button shaded }
  36.   { 81 = Button default text }
  37.   { 82 = Outline normal }
  38.   { 83 = Outline shaded }
  39.   { 84 = Inputline active }
  40.   { 85 = Inputline selected text }
  41.   { 86 = Inputline arrow }
  42.   { 87 = ListViewer normal }
  43.   { 88 = ListViewer focused }
  44.   { 89 = ListViewer selected }
  45.   { 90 = ListViewer divider }
  46.   { 91 = Reserved }
  47.   { 92 = Reserved }
  48.   { 93 = Reserved }
  49.   { 94 = Reserved }
  50.   { 95 = Reserved }
  51.   { 96 = Reserved }
  52.   { 97 = Reserved }
  53.   { 99 = Reserved }
  54.   { 100= Reserved }
  55.   { 101= Reserved }
  56.   { 102= Busy indicator }
  57.  
  58.   CNewColor =
  59.    { this is for help colors }
  60.     #$00#$00#$00#$00#$00#$00#$00#$00 +
  61.    {|     frame     |        button         |outline| input line|}
  62.     #$7F#$78#$70#$71#$7F#$70#$73#$7E#$78#$7F#$7F#$78#$70#$07#$0F +
  63.    {|  list viewer  |   reserved                        |busy}
  64.     #$70#$7F#$07#$78#$00#$00#$00#$00#$00#$00#$00#$00#$00#$CF;
  65.   CNewBlackWhite =
  66.    { this is for help colors }
  67.     #$00#$00#$00#$00#$00#$00#$00#$00 +
  68.     #$7F#$70#$78#$70#$7F#$70#$78#$0F#$70#$7F#$7F#$70#$70#$07#$0F +
  69.     #$70#$7F#$07#$78#$00#$00#$00#$00#$00#$00#$00#$00#$00#$8F;
  70.   CNewMonochrome =
  71.    { this is for help colors }
  72.     #$00#$00#$00#$00#$00#$00#$00#$00 +
  73.     #$7F#$70#$78#$70#$7F#$70#$78#$0F#$70#$7F#$7F#$70#$70#$07#$0F +
  74.     #$70#$7F#$07#$78#$00#$00#$00#$00#$00#$00#$00#$00#$00#$8F;
  75.  
  76.   CBusyWindow = #102#102#102#102#102#102#102#102;
  77.  
  78.  
  79. TYPE
  80.   { The TBusyWindow provides a way of displaying a "Working.." or other
  81.     message to the user during disk activity etc.
  82.   }
  83.   PBusyWindow = ^TBusyWindow;
  84.   TBusyWindow = Object(TWindow)
  85.     Constructor Init(AMessage : String);
  86.     Function    GetPalette: PPalette;                     Virtual;
  87.     Procedure   Show;                                     Virtual;
  88.   end;
  89.  
  90.  
  91.   { TNewApplication sets up a TBusyWIindow, and has ready made methods
  92.     for showing and erasing one. It also has a GetEvent method that
  93.     turns off the mouse cursor when the keyboard is used.
  94.   }
  95.   PNewApplication = ^TNewApplication;
  96.   TNewApplication = Object(TApplication)
  97.     MouseVisible : Boolean;
  98.     ToggleMouse  : Boolean;
  99.  
  100.     Constructor Init;
  101.     Procedure   ShowBusy;
  102.     Procedure   ClearBusy;
  103.     Procedure   GetEvent(var Event: TEvent);              Virtual;
  104.     Procedure   SetMouseToggle(Enable : Boolean);
  105.     Function    GetPalette: PPalette;                     Virtual;
  106.   end;
  107.  
  108.  
  109. CONST
  110.   BusyWindow  : PBusyWindow = nil;
  111.  
  112.  
  113.