home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / HELLO6 / ADIALOG6.HPP < prev    next >
C/C++ Source or Header  |  1995-04-07  |  7KB  |  101 lines

  1. #ifndef _ADIALOG6_
  2. #define _ADIALOG6_
  3. /*****************************************************************************
  4. * HELLO WORLD SAMPLE PROGRAM - Version 6: ATextDialog Class (adialog6.hpp)   *
  5. *                                                                            *
  6. * COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1995. *
  7. *                                                                            *
  8. * DISCLAIMER OF WARRANTIES:                                                  *
  9. *   The following [enclosed] code is sample code created by IBM              *
  10. *   Corporation.  This sample code is not part of any standard IBM product   *
  11. *   and is provided to you solely for the purpose of assisting you in the    *
  12. *   development of your applications.  The code is provided "AS IS",         *
  13. *   without warranty of any kind.  IBM shall not be liable for any damages   *
  14. *   arising out of your use of the sample code, even if they have been       *
  15. *   advised of the possibility of such damages.                              *
  16. *****************************************************************************/
  17. //NOTE: WE RECOMMEND USING A FIXED-SPACE FONT TO LOOK AT THE SOURCE.
  18.  
  19. #ifndef _IFRAME_                                                            //V4
  20.   #include <iframe.hpp>         //Include IFrameWindow class header           V4
  21. #endif                                                                      //V4
  22. #ifndef _ICMDHDR_                                                           //V4
  23.   #include <icmdhdr.hpp>        //Include ICommandHandler class header        V4
  24. #endif                                                                      //V4
  25. #ifndef _ISTRING_                                                           //V4
  26.   #include <istring.hpp>        //Include IString class header                V4
  27. #endif                                                                      //V4
  28. #ifndef _IMCELCV_                                                           //V4
  29.   #include <imcelcv.hpp>        //Include IMultiCellCanvas class header       V4
  30. #endif                                                                      //V4
  31. #ifndef _ISTATTXT_                                                          //V4
  32.   #include <istattxt.hpp>       //Include IStaticText class header            V4
  33. #endif                                                                      //V4
  34. #ifndef _ICOMBOBX_                                                          //V6
  35.   #include <icombobx.hpp>       //Include IComboBox class header              V6
  36. #endif                                                                      //V6
  37. #ifndef _ISETCV_                                                            //V4
  38.   #include <isetcv.hpp>         //Include ISetCanvas class header             V4
  39. #endif                                                                      //V4
  40. #ifndef _IPUSHBUT_                                                          //V4
  41.   #include <ipushbut.hpp>       //Include IPushButton class header            V4
  42. #endif                                                                      //V4
  43.  
  44. //Forward declarations for other classes:
  45. class ATextDialog;                                                          //V4
  46.  
  47. /**************************************************************************   V4
  48. * Class:   ADialogCommandHandler                                          *   V4
  49. *                                                                         *   V4
  50. * Purpose: New Command Handler class that handles commands                *   V4
  51. *          specifically for ADialogWindow class windows.                  *   V4
  52. *                                                                         *   V4
  53. **************************************************************************/ //V4
  54. class ADialogCommandHandler : public ICommandHandler {                      //V4
  55. public:                                                                     //V4
  56.   ADialogCommandHandler(ATextDialog *dialogFrame);                          //V4
  57. virtual ~ADialogCommandHandler() { }                                        //V4
  58. protected:                                                                  //V4
  59. /*------------------------ Override Command Function ---------------------|   V4
  60. | The command function is called to handle application command events.    |   V4
  61. |------------------------------------------------------------------------*/ //V4
  62. virtual Boolean                                                             //V4
  63.   command(ICommandEvent& cmdEvent);                                         //V4
  64.  
  65. private:                                                                    //V4
  66.   ATextDialog *frame;                                                       //V4
  67. };
  68.  
  69. /**************************************************************************   V4
  70. * Class:   ATextDialog                                                    *   V4
  71. *                                                                         *   V4
  72. * Purpose: Dialog Window class for C++ Hello World sample application.    *   V4
  73. *          It is derived from IFrameWindow class.                         *   V4
  74. *                                                                         *   V4
  75. **************************************************************************/ //V4
  76. class ATextDialog : public IFrameWindow                                     //V4
  77. {                                                                           //V4
  78. public:                                                                     //V4
  79.     ATextDialog(IString & textString, IWindow * ownerWnd);                  //V4
  80. virtual ~ATextDialog();                     //Destructor for this class       V4
  81.  
  82. virtual ATextDialog                                                         //V4
  83.    &setTextFromEntryField();                                                //V4
  84.  
  85.   private:                                                                  //V4
  86.     IString             &saveText;                                          //V4
  87.     IMultiCellCanvas    clientCanvas;                                       //V4
  88.     IStaticText         statText;                                           //V4
  89.     IComboBox           textField;                                          //V6
  90.     ISetCanvas          buttons;                                            //V4
  91.     IPushButton         pushButton1,                                        //V4
  92.                         pushButton2;                                        //V4
  93.     ADialogCommandHandler dialogCommandHandler;                             //V4
  94.  
  95.     ATextDialog(const ATextDialog&);    //Default copy constructor            V4
  96. ATextDialog                                                                 //V4
  97.     &operator=(const ATextDialog&);     //Default assignment operator         V4
  98. };                                                                          //V4
  99.  
  100. #endif                                                                      //V4
  101.