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

  1. //    vedapp.h:    Header for vedApp class
  2. //=======================================================================
  3.  
  4. #ifndef vedAPP_H
  5. #define vedAPP_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.     enum Emulation {
  17.         Generic,
  18.         See,
  19.         Vi,
  20.         Emacs,
  21.         Epsilon,
  22.         WordStar
  23.       };
  24.  
  25. const int M_SetEmulation = M_User0;    // For setting emulation properly
  26.  
  27. #include "vedcmdw.h"    // we use vedCommandWindow
  28.  
  29.     class vedApp : public vApp
  30.       {
  31.     friend int AppMain(int, char**);    // allow AppMain access
  32.  
  33.       public:        //---------------------------------------- public
  34.  
  35.     vedApp(char* name, int sdi = 0, int h = 0, int w = 0);
  36.     virtual ~vedApp();
  37.  
  38.     // Routines from vApp that are normally overridden
  39.  
  40.     virtual vWindow* NewAppWin(vWindow* win, char* name, int w, int h,
  41.         vAppWinInfo* winInfo);
  42.  
  43.     virtual void Exit(void);
  44.  
  45.     virtual int CloseAppWin(vWindow*);
  46.  
  47.     virtual void CloseLastCmdWindow(vWindow* win, int exitcode);
  48.  
  49.     virtual void AppCommand(vWindow* win, ItemVal id, ItemVal val, CmdType cType);
  50.  
  51.     virtual void KeyIn(vWindow*, vKey, unsigned int);
  52.  
  53.     // New routines for this particular app
  54.  
  55.         Emulation GetEmulation() { return _emulation; }
  56.         void SetEmulation(Emulation em) { _emulation = em; }
  57.  
  58.       protected:    //--------------------------------------- protected
  59.  
  60.       private:        //--------------------------------------- private
  61.  
  62.     vedCmdWindow* _vedCmdWin;        // Pointer to instance of first window
  63.         Emulation _emulation;
  64.       };
  65. #endif
  66.