home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 2.ddi / TVDEMOS.ZIP / TVBGI.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.7 KB  |  68 lines

  1. /*---------------------------------------------------------*/
  2. /*                                                         */
  3. /*   Turbo Vision 1.0                                      */
  4. /*   Turbo Vision BGI Support Demo Header File             */
  5. /*   Copyright (c) 1991 by Borland International           */
  6. /*                                                         */
  7. /*---------------------------------------------------------*/
  8.  
  9. #if !defined( __TVBGI_H )
  10. #define __TVBGI_H
  11.  
  12. #define Uses_TApplication
  13. #define Uses_TMenuBar
  14. #define Uses_TStatusLine
  15. #include <tv.h>
  16.  
  17. const
  18.    MAXSIZE = 80,
  19.    MAXPATH = 150;
  20.  
  21. char pathToDrivers[MAXPATH] = "..\\..\\BGI";  // Default location of *.BGI files
  22. const
  23.    cmNewWin     = 1000,
  24.    cmSetBGIPath = 1002,
  25.    cmDoGraphics = 1003;
  26.  
  27. const
  28.    hlChangeDir  = cmChangeDir,        // History list ID
  29.    hlSetBGIPath = cmSetBGIPath;       // History list ID
  30.  
  31. class TBGIApp : public TApplication
  32. {
  33. public:
  34.  
  35.     TBGIApp();
  36.     virtual ~TBGIApp();
  37.  
  38.     virtual void handleEvent( TEvent& Event );
  39.     static TMenuBar *initMenuBar( TRect );
  40.     static TStatusLine *initStatusLine( TRect );
  41.     virtual void outOfMemory();
  42.     void newWin();
  43.     void doGraphics();
  44.     void setBGIPath();
  45.     void changeDir();
  46.     void tile();
  47.     void cascade();
  48.  
  49.     int appDriver;
  50.     int appMode;
  51.     char *bgiPath;
  52. };
  53.  
  54. extern Boolean graphActive;
  55. extern void    *driverPtr;
  56. extern unsigned int driverSize;
  57. extern char  emptyString[];
  58. extern char *bgiPath;
  59. extern int driver;
  60. extern int mode;
  61.  
  62. extern Boolean graphAppInit( int, int, char *, Boolean);
  63. extern void graphAppDone();
  64. extern Boolean graphicsStart();
  65. extern void graphicsStop();
  66.  
  67. #endif  // __TVBGI_H
  68.