home *** CD-ROM | disk | FTP | other *** search
- {*
- * TvApp.pas
- *
- * Enhancements to Turbo Vision Apps.pas.
- *
- * Copyright 1992 by Richard W. Hansen
- *
- *}
-
- UNIT TvApp;
-
- {$I TVDEFS.INC}
-
- INTERFACE
-
-
- USES
- App, Dialogs, Drivers, Objects, Views;
-
-
- CONST
- { New Palette Layout }
- { 1-63 are normal palette entries }
- { 64-71 are the help colors defined in HELPFILE.PAS }
- { 72-101 are 3D palette entries }
- { 102 is the busy window color }
- { 72 = Frame normal }
- { 73 = Frame shaded }
- { 74 = Frame passive }
- { 75 = Frame Icon/Frame dragging }
- { 76 = Button normal }
- { 77 = Button text }
- { 78 = Button disabled text }
- { 71 = Button shortcut text }
- { 80 = Button shaded }
- { 81 = Button default text }
- { 82 = Outline normal }
- { 83 = Outline shaded }
- { 84 = Inputline active }
- { 85 = Inputline selected text }
- { 86 = Inputline arrow }
- { 87 = ListViewer normal }
- { 88 = ListViewer focused }
- { 89 = ListViewer selected }
- { 90 = ListViewer divider }
- { 91 = Reserved }
- { 92 = Reserved }
- { 93 = Reserved }
- { 94 = Reserved }
- { 95 = Reserved }
- { 96 = Reserved }
- { 97 = Reserved }
- { 99 = Reserved }
- { 100= Reserved }
- { 101= Reserved }
- { 102= Busy indicator }
-
- CNewColor =
- { this is for help colors }
- #$00#$00#$00#$00#$00#$00#$00#$00 +
- {| frame | button |outline| input line|}
- #$7F#$78#$70#$71#$7F#$70#$73#$7E#$78#$7F#$7F#$78#$70#$07#$0F +
- {| list viewer | reserved |busy}
- #$70#$7F#$07#$78#$00#$00#$00#$00#$00#$00#$00#$00#$00#$CF;
- CNewBlackWhite =
- { this is for help colors }
- #$00#$00#$00#$00#$00#$00#$00#$00 +
- #$7F#$70#$78#$70#$7F#$70#$78#$0F#$70#$7F#$7F#$70#$70#$07#$0F +
- #$70#$7F#$07#$78#$00#$00#$00#$00#$00#$00#$00#$00#$00#$8F;
- CNewMonochrome =
- { this is for help colors }
- #$00#$00#$00#$00#$00#$00#$00#$00 +
- #$7F#$70#$78#$70#$7F#$70#$78#$0F#$70#$7F#$7F#$70#$70#$07#$0F +
- #$70#$7F#$07#$78#$00#$00#$00#$00#$00#$00#$00#$00#$00#$8F;
-
- CBusyWindow = #102#102#102#102#102#102#102#102;
-
-
- TYPE
- { The TBusyWindow provides a way of displaying a "Working.." or other
- message to the user during disk activity etc.
- }
- PBusyWindow = ^TBusyWindow;
- TBusyWindow = Object(TWindow)
- Constructor Init(AMessage : String);
- Function GetPalette: PPalette; Virtual;
- Procedure Show; Virtual;
- end;
-
-
- { TNewApplication sets up a TBusyWIindow, and has ready made methods
- for showing and erasing one. It also has a GetEvent method that
- turns off the mouse cursor when the keyboard is used.
- }
- PNewApplication = ^TNewApplication;
- TNewApplication = Object(TApplication)
- MouseVisible : Boolean;
- ToggleMouse : Boolean;
-
- Constructor Init;
- Procedure ShowBusy;
- Procedure ClearBusy;
- Procedure GetEvent(var Event: TEvent); Virtual;
- Procedure SetMouseToggle(Enable : Boolean);
- Function GetPalette: PPalette; Virtual;
- end;
-
-
- CONST
- BusyWindow : PBusyWindow = nil;
-
-
-