home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / hello6 / anotebw6.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  6.4 KB  |  157 lines

  1. /******************************************************************************
  2. * .FILE:         anotebw6.hpp                                                 *
  3. *                                                                             *
  4. * .DESCRIPTION:  Hello World Sample Program Version 6: NoteBookWindow Header  *
  5. *                                                                             *
  6. * .CLASSES:      ANotebookWindow                                              *
  7. *                ANotebookCommandHandler                                      *
  8. *                AHelloWindow                                                 *
  9. *                                                                             *
  10. * .COPYRIGHT:                                                                 *
  11. *    Licensed Material - Program-Property of IBM                              *
  12. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  13. *                                                                             *
  14. * .DISCLAIMER:                                                                *
  15. *   The following [enclosed] code is sample code created by IBM               *
  16. *   Corporation.  This sample code is not part of any standard IBM product    *
  17. *   and is provided to you solely for the purpose of assisting you in the     *
  18. *   development of your applications.  The code is provided 'AS IS',          *
  19. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  20. *   arising out of your use of the sample code, even if they have been        *
  21. *   advised of the possibility of such damages.                               *
  22. *                                                                             *
  23. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  24. *                                                                             *
  25. ******************************************************************************/
  26. #ifndef _ANOTEBW6_
  27. #define _ANOTEBW6_
  28.  
  29. #include <iframe.hpp>
  30. #include <icmdhdr.hpp>
  31. #include <inotebk.hpp>
  32. #include <imcelcv.hpp>
  33. #include <isetcv.hpp>
  34. #include <istattxt.hpp>
  35. #include <icheckbx.hpp>
  36. #include <islider.hpp>
  37. #include <iradiobt.hpp>
  38. #include <ipushbut.hpp>
  39. #include "ahellow6.hpp"
  40.  
  41. //Forward declarations for other classes:
  42. class ANotebookWindow;
  43. class AHelloWindow;
  44.  
  45. /**************************************************************************
  46. * Class ANotebookCommandHandler - Command handler that process commands   *
  47. *   for notebook window.                                                  *
  48. **************************************************************************/
  49. class ANotebookCommandHandler : public ICommandHandler
  50. {
  51.   public:
  52. /*---------------------------- Constructor -------------------------------|
  53. | Constructs an object with:                                              |
  54. | 1) A pointer to the notebook window                                     |
  55. -------------------------------------------------------------------------*/
  56.     ANotebookCommandHandler(ANotebookWindow *nbFrame);
  57.  
  58. /*---------------------------- Destructor --------------------------------|
  59. | Destructs an object with:                                               |
  60. | 1) A pointer to the notebook window                                     |
  61. -------------------------------------------------------------------------*/
  62.     virtual
  63.      ~ANotebookCommandHandler() { }
  64.  
  65.   protected:
  66. /*------------------------ Override Command Function ---------------------|
  67. | The command function is called to process application command events.   |
  68. |------------------------------------------------------------------------*/
  69.     virtual Boolean
  70.       command(ICommandEvent& cmdEvent);
  71.  
  72.   private:
  73.     ANotebookWindow *frame;
  74. };
  75.  
  76. /**************************************************************************
  77. * Class ANotebookWindow - Frame Window class containing an INotebook      *
  78. *   window for changing settings in the C++ Hello World sample.           *
  79. **************************************************************************/
  80. class ANotebookWindow : public IFrameWindow
  81. {
  82.   public:
  83.     ANotebookWindow(unsigned long windowId, AHelloWindow *ownerWnd);
  84.     virtual
  85.      ~ANotebookWindow();
  86.  
  87. /*------------------------ Public Settings Functions ---------------------|
  88. | These functions are used to change settings in the AHelloWindow and     |
  89. |   to set the values in the notebook when it is intialized and when      |
  90. |   the reset push button is pressed.                                     |
  91. |   applyEarthSettings - use earthPage settings to change earthWindow     |
  92. |              attributes.                                                |
  93. |   resetEarthSettings - set earthPage values by querying earthWindow     |
  94. |              attributes.                                                |
  95. |   applyDateTimeSettings - use dateTimePage settings to change           |
  96. |              AHelloWindow attributes.                                   |
  97. │   resetDateTimeSettings - set dateTimePage values by querying           |
  98. |              AHelloWindow attributes.                                   |
  99. |------------------------------------------------------------------------*/
  100.     ANotebookWindow
  101.      &applyEarthSettings(),
  102.      &resetEarthSettings(),
  103.      &applyDateTimeSettings(),
  104.      &resetDateTimeSettings();
  105.  
  106.   private:
  107.     INotebook
  108.       helloSettingsNotebook;
  109.     IMultiCellCanvas
  110.       earthPage,
  111.       earthColorSettings,
  112.       dateTimePage,
  113.       dateSettings,
  114.       timeSettings;
  115.     ISetCanvas
  116.       starsSettings,
  117.       earthPageButtons,
  118.       dateTimePageButtons;
  119.     IStaticText
  120.       earthPageHeading,
  121.       starsHeading,
  122.       layersHeading,
  123.       earthColorHeading,
  124.       dateTimePageHeading,
  125.       dateHeading,
  126.       dateLongExample,
  127.       dateShortExample,
  128.       timeHeading,
  129.       timeLongExample,
  130.       timeShortExample;
  131.     ISlider
  132.       layersSlider;
  133.     ICheckBox
  134.       twinkleBox,
  135.       brightBox;
  136.     IPushButton
  137.       earthApplyButton,
  138.       earthResetButton,
  139.       earthCloseButton,
  140.       dateTimeApplyButton,
  141.       dateTimeResetButton,
  142.       dateTimeCloseButton;
  143.     IRadioButton
  144.       cyanButton,
  145.       greenButton,
  146.       whiteButton,
  147.       yellowButton,
  148.       dateLongButton,
  149.       dateShortButton,
  150.       timeLongButton,
  151.       timeShortButton;
  152.     ANotebookCommandHandler
  153.       notebookCommandHandler;
  154. };
  155.  
  156. #endif
  157.