home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vos2-121.zip / v / vide / videapp.h < prev    next >
C/C++ Source or Header  |  1998-10-20  |  2KB  |  68 lines

  1. //    videapp.h:    Header for videApp class
  2. //=======================================================================
  3.  
  4. #ifndef videAPP_H
  5. #define videAPP_H
  6.  
  7. // Include standard V files as needed
  8.  
  9. #ifdef vDEBUG
  10. #include <v/vdebug.h>
  11. #endif
  12.  
  13. #include <v/vapp.h>
  14. #include <v/vawinfo.h>
  15.  
  16. #include "videcmdw.h"    // we use videCommandWindow
  17.  
  18.     enum Emulation {
  19.         Generic,
  20.         See,
  21.         Vi,
  22.         Emacs,
  23.         Epsilon,
  24.         WordStar
  25.       };
  26.  
  27.     class videApp : public vApp
  28.       {
  29.     friend int AppMain(int, char**);    // allow AppMain access
  30.  
  31.       public:        //---------------------------------------- public
  32.  
  33.     videApp(char* name, int sdi = 0, int h = 0, int w = 0);
  34.     virtual ~videApp();
  35.  
  36.     // Routines from vApp that are normally overridden
  37.  
  38.     virtual vWindow* NewAppWin(vWindow* win, char* name, int w, int h,
  39.         vAppWinInfo* winInfo = 0);
  40.  
  41.     virtual void Exit(void);
  42.  
  43.     virtual int CloseAppWin(vWindow*);
  44.  
  45.     virtual void AppCommand(vWindow* win, ItemVal id, ItemVal val, CmdType cType);
  46.  
  47.     virtual void KeyIn(vWindow*, vKey, unsigned int);
  48.  
  49.           // New routines for this particular app
  50.  
  51.         videCmdWindow* GetMsgWindow() { return _videCmdWin; }
  52.         void SetMkFile(char* mkf);
  53.         char* GetMkFile() { return _videMkFile; }
  54.         Emulation GetEmulation() { return _emulation; }
  55.         void SetEmulation(Emulation em) { _emulation = em; }
  56.  
  57.     vFont DefaultFont;
  58.  
  59.       protected:    //--------------------------------------- protected
  60.  
  61.       private:        //--------------------------------------- private
  62.  
  63.         Emulation _emulation;
  64.     videCmdWindow* _videCmdWin;        // Pointer to instance of first window
  65.         char _videMkFile[maxFileNameSize];
  66.       };
  67. #endif
  68.