home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ICLUI.ZIP / HELLO5 / AHELLOW5.HPP < prev    next >
Text File  |  1993-03-06  |  6KB  |  87 lines

  1. #ifndef AHELLOWINDOW_HPP
  2. #define AHELLOWINDOW_HPP
  3. /******************************************************************************/
  4. /* HELLO WORLD SAMPLE PROGRAM - Version 5: Class Header (AHELLOW5.HPP)        */
  5. /*                                                                            */
  6. /* COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1993. */
  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. #include <iframe.hpp>           //Include IFrameWindow Class Header
  20. #include <icmdhdr.hpp>          //Include ICommandEvent & ICommandHandler     v3
  21. #include <iselhdr.hpp>          //Include ISelectHandler                      v5
  22. #include <ihelphdr.hpp>         //Include IHelpHandler                        v5
  23.  
  24. class ATextDialog;              //Define the ATextDialog Class                v4
  25. class AEarthWindow;             //Define the AEarthWindow Class               v5
  26.  
  27. //**************************************************************************
  28. // Class:   AHelloWindow                                                   *
  29. //                                                                         *
  30. // Purpose: Main Window for C++ Hello World sample application             *
  31. //          It is a subclass of IFrameWindow, ICommandHandler and          *  v3
  32. //          ISelectHandler (Processing List Box Selection)                 *  v5
  33. //                                                                         *
  34. //**************************************************************************
  35. class AHelloWindow : public IFrameWindow,
  36.                      public ICommandHandler,                                //v3
  37.                      public ISelectHandler                                  //v5
  38. {
  39.   public:                               //Define the Public Information
  40.     AHelloWindow(unsigned long windowId); //Constructor for this class
  41.  
  42.   protected:                            //Define Protected Member             v3
  43.     virtual Boolean setupButtons();     //Setup Buttons                       v4
  44.     virtual Boolean setupClient();      //Setup Client Window                 v5
  45.     virtual Boolean setupHelp();        //Setup Help                           .
  46.     virtual Boolean setupInfoArea() ;   //Setup Information Area               .
  47.     virtual Boolean setupMenuBar();     //Setup Menu Bar                       .
  48.     virtual Boolean setupStatusArea();  //Setup Status Area                   v5
  49.  
  50.     virtual Boolean setText(const char* text);//Set Text using String         v5
  51.  
  52.     virtual Boolean selected(IControlEvent& evt);                           //v5
  53.     Boolean command(ICommandEvent& cmdEvent);                               //v3
  54.  
  55.   private:                              //Define Private Information
  56.     IStaticText   * hello;              //Hello contains "Hello, World" text
  57.     IInfoArea     * infoArea;           //Define an Information Area          v2
  58.                                         //  Control to create an information   .
  59.                                         //  area beneath the client area      v2
  60.     IStaticText   * statusLine;         //Status Line at top of client window v3
  61.     IMenuBar      * menuBar;            //Define Menu Bar                     v3
  62.     ATextDialog   * textDialog;         //Define Text Dialog                  v4
  63.     IPushButton   * leftButton;           //Define Left Button                 .
  64.     IPushButton   * centerButton;         //Define Center Button               .
  65.     IPushButton   * rightButton;          //Define Right Button               v4
  66.     IHelpWindow   * help;               //Define Help Window                  v5
  67.     AEarthWindow  * earthWindow;        //Define earthWindow                  v5
  68.     ISplitCanvas  * clientWindow;       //Define canvas as a Split Canvas     v5
  69.     ISplitCanvas  * helloCanvas;        //Define hello canvas                 v5
  70.     IListBox      * listBox;            //Define ListBox                      v5
  71. };
  72.  
  73. //**************************************************************************  v5
  74. // Class:   AHelpHandler                                                   *   .
  75. //                                                                         *   .
  76. // Purpose: Subclass of IHelpHandler so that the correct keys help         *   .
  77. //          panel can be displayed when keys help is requested.            *   .
  78. //                                                                         *   .
  79. //**************************************************************************   .
  80. class AHelpHandler: public IHelpHandler//                                      .
  81. {                                       //                                     .
  82.   protected:                            //Define Protected Member              .
  83.    virtual Boolean                      //                                     .
  84.      keysHelpId(IEvent& evt);           //Override this function               .
  85. };                                                                          //v5
  86. #endif
  87.