home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vos2-121.zip / v / examp / mycmdwin.h < prev    next >
C/C++ Source or Header  |  1998-07-03  |  3KB  |  90 lines

  1. //=======================================================================
  2. //  mycmdwin.h:    Header file for minimal prototype V application
  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. //
  23. //  Files required for minimal application:
  24. //    protoapp.h    Header for the min app
  25. //    protoapp.cxx:    Source code for min app
  26. //    mydialog.h:    Header for sample modeless dialog
  27. //    mydialog.cxx:    Source for sample modeless dialog
  28. //    mymodal.h:    Header for sample modal dialog
  29. //    mymodal.cxx    Soruce for sample modal dialog
  30. //
  31. //    While these files were generated by hand, they are intended to
  32. //    serve as an example of files that could have been generated by
  33. //    the V interface generator (Vigr)
  34. //
  35.  
  36.   // Derive a window from the vStandardWindow class
  37.  
  38. #ifndef MYCMDWIN_H
  39. #define MYCMDWIN_H
  40.  
  41. #include <v/vcmdwin.h>    // So we can use vCmdWindow
  42. #include <v/vmenu.h>    // For the menu pane
  43. #include <v/vstatusp.h>    // For the status pane
  44. #include <v/vcmdpane.h> // command pane
  45. #include <v/vpen.h>    // for a pen
  46.  
  47. #ifdef vDEBUG
  48. #include <v/vdebug.h>
  49. #endif
  50.  
  51. #include "mydialog.h"    // user defined: myDialog
  52. #include "mymodal.h"    // user defined: myModalDialog
  53. #include "mycanvas.h"    // user defined: myCanvasPane
  54.  
  55.     class myCmdWindow : public vCmdWindow
  56.       {
  57.     friend int AppMain(int, char**);    // allow AppMain access
  58.  
  59.       public:        //---------------------------------------- public
  60.     myCmdWindow(char*, int, int); // Constructor with size
  61.     myCmdWindow(const myCmdWindow&);   // Constructor with size
  62.     virtual ~myCmdWindow();        // Destructor
  63.     virtual void WindowCommand(ItemVal id, ItemVal val, CmdType cType);
  64.     virtual void KeyIn(vKey keysym, unsigned int shift); // for key strokes
  65.  
  66.       protected:    //--------------------------------------- protected
  67.  
  68.       private:        //--------------------------------------- private
  69.  
  70.     // Each user CmdWindow should conform to a "Standard" window,
  71.     // which includes a menu bar, a canvas, an optional command bar,
  72.     // and an optional status bar.
  73.  
  74.     vMenuPane* myMenu;        // For the menu bar
  75.     myCanvasPane* myCanvas;        // For the canvas
  76.     vStatusPane* myStatus;        // For the status bar
  77.     vCommandPane* myCmdPane;    // for the command pane
  78.  
  79.     // Each user CmdWindow will probably have some dialogs and
  80.     // subwindows. Declare pointers to each instance here.
  81.  
  82.     myDialog* sampleDialog;
  83.     myModalDialog* sampleModalDialog;
  84.  
  85.     // other stuff
  86.     vPen _pen;
  87.     int changePen;
  88.       };
  89. #endif
  90.