home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vos2-121.zip / v / icons / icondemo.h < prev    next >
C/C++ Source or Header  |  1998-06-23  |  3KB  |  96 lines

  1. //=======================================================================
  2. //  icondemo.h:    Header file for icon demo
  3. //  Copyright (C) 1995  Bruce E. Wampler
  4. //
  5. //  This program is part of the V C++ GUI Framework example programs.
  6. //
  7. //  This program is free software; you can redistribute it and/or modify
  8. //  it under the terms of the GNU General Public License as published by
  9. //  the Free Software Foundation; either version 2 of the License, or
  10. //  (at your option) any later version.
  11. //
  12. //  This program is distributed in the hope that it will be useful,
  13. //  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. //  GNU General Public License for more details.
  16. //
  17. //  You should have received a copy of the GNU General Public License
  18. //  (see COPYING) along with this program; if not, write to the Free
  19. //  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. //=======================================================================
  21.  
  22. //    mymodal.cxx    Soruce for sample modal dialog
  23. //
  24. //    While these files were generated by hand, they are intended to
  25. //    serve as an example of files that could have been generated by
  26. //    the V interface generator (Vigr)
  27. //
  28.  
  29. #ifndef ICONDEMO_H
  30. #define ICONDEMO_H
  31.  
  32. #ifdef vDEBUG
  33. #include <v/vdebug.h>
  34. #endif
  35.  
  36. #include <v/vapp.h>
  37. #include <v/vawinfo.h>    // for app info
  38.  
  39.  
  40. #include <v/vpane.h>
  41. #include <v/vcmdpane.h>
  42. #include <v/vcmdwin.h>
  43. #include <v/vcanvas.h>
  44.  
  45.  
  46.     class iconCmdWindow : public vCmdWindow
  47.       {
  48.       public:        //---------------------------------------- public
  49.     iconCmdWindow(char*, int, int); // Constructor with size
  50.     virtual ~iconCmdWindow();        // Destructor
  51.     virtual void WindowCommand(ItemVal id, ItemVal val, CmdType cType);
  52.  
  53.       protected:    //--------------------------------------- protected
  54.  
  55.       private:        //--------------------------------------- private
  56.  
  57.     vCanvasPane* myCanvas;    // For the canvas
  58.     vCommandPane* myCmdPane;    // for the command pane
  59.     vCommandPane* myCmdPane2;    // for the command pane
  60.     vCommandPane* myCmdPane3;    // for the command pane
  61.     vMenuPane* myMenu;
  62.       };
  63.  
  64.  
  65.     class iconApp : public vApp
  66.       {
  67.     friend int AppMain(int, char**);    // allow AppMain access
  68.  
  69.       public:        //---------------------------------------- public
  70.  
  71.     iconApp(char* name) : vApp(name) {}    // just call vApp
  72.  
  73.     virtual ~iconApp() {}
  74.  
  75.     // Routines from vApp that are normally overridden
  76.  
  77.     virtual vWindow* NewAppWin(vWindow* win, char* name, int h, int w,
  78.         vAppWinInfo* winInfo);
  79.  
  80.     virtual void Exit(void);
  81.  
  82.     virtual int CloseAppWin(vWindow*);
  83.  
  84.     virtual void AppCommand(vWindow* win, ItemVal id, ItemVal val, CmdType cType);
  85.  
  86.     virtual void KeyIn(vWindow*, vKey, unsigned int);
  87.  
  88.     // New routines for this particular app
  89.  
  90.       protected:    //--------------------------------------- protected
  91.  
  92.       private:        //--------------------------------------- private
  93.  
  94.       };
  95. #endif
  96.