home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ICLUI.ZIP / HELLO6 / ACOLORW6.HPP < prev    next >
Text File  |  1993-03-09  |  5KB  |  102 lines

  1. #ifndef ACOLORWINDOW_HPP
  2. #define ACOLORWINDOW_HPP
  3. /******************************************************************************/
  4. /* HELLO WORLD SAMPLE PROGRAM - Version 6: AColorWindow Class  (ACOLORW6.CPP) */
  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.  
  18. //**************************************************************************
  19. // The entire file was created at version 6                                *
  20. //**************************************************************************
  21.  
  22. #include <iframe.hpp>                   //IFrameWindow Class (Parent)
  23. #include <icmdhdr.hpp>                  //ICommandHandler (Parent)
  24.  
  25. class IEntryField;
  26. class INotebook::Page;
  27. class INotebook;
  28. class IMultiCellCanvas;
  29. class IRadioButton;
  30. #include <iradiobt.hpp>                 //IRadioButton
  31. class IPushButton;
  32. class IListBox;
  33.  
  34. //**************************************************************************
  35. // Class:   AColorWindow                                                   *
  36. //                                                                         *
  37. // Purpose: Dialog window for the C++ Hello World sample application.      *
  38. //          It is a subclass of IFrameWindow, ICommandHandler              *
  39. //                                                                         *
  40. //**************************************************************************
  41. class AColorWindow : public IFrameWindow, public ICommandHandler
  42. {
  43. public:
  44.   AColorWindow (                        //Construtor for "Page" Window
  45.     IStaticText * staticWindow,
  46.     IListBox * listWindow,
  47.     IWindow * ownerWnd);
  48.   ~AColorWindow();                      //Destructor
  49.  
  50. protected:
  51.  
  52. class AColorButton : public IRadioButton//Create AColorButton Class
  53. {
  54.   AColorButton(unsigned long windowId,
  55.                IWindow * parentOwner,
  56.                unsigned long stringId);
  57. } ;
  58.  
  59.   virtual Boolean
  60.     command(ICommandEvent& cmdevt);     //Process the dialog command events
  61.   virtual Boolean createStaticPage();   //Create the Static Color Page
  62.   virtual Boolean createListPage();     //Create the ListBox Color Page
  63.  
  64.   virtual Boolean applyStatic();        //Apply Changes from Static Page
  65.   virtual Boolean applyList();          //Apply Changes from List Page
  66.  
  67. private:
  68.   IStaticText      * staticTarget;      //Target Window for Color Changes
  69.   IListBox         * listTarget;        //Target Window for Color Changes
  70.   INotebook        * notebook;          //Notebook Window
  71.   INotebook::Page    staticPage;        //Static Color Page
  72.   INotebook::Page    listPage;          //ListBox Color Page
  73.   IMultiCellCanvas * staticCanvas;      //Static Color Canvas
  74.   IMultiCellCanvas * listCanvas;        //ListBox Color Canvas
  75.  
  76.   AColorButton     * staticWhite;       //Static White Radio Button
  77.   AColorButton     * staticBlack;       //Static Black Radio Button
  78.   AColorButton     * staticBlue;        //Static Blue Radio Button
  79.   AColorButton     * staticRed;         //Static Red Radio Button
  80.   AColorButton     * staticPink;        //Static Pink Radio Button
  81.   AColorButton     * staticGreen;       //Static Green Radio Button
  82.   AColorButton     * staticCyan;        //Static Cyan Radio Button
  83.   AColorButton     * staticYellow;      //Static Yellow Radio Button
  84.  
  85.   IPushButton      * staticApply;       //Static Apply Button
  86.   IPushButton      * staticCancel;      //Static Cancel Button
  87.  
  88.   AColorButton     * listWhite;         //ListBox White Radio Button
  89.   AColorButton     * listBlack;         //ListBox Black Radio Button
  90.   AColorButton     * listBlue;          //ListBox Blue Radio Button
  91.   AColorButton     * listRed;           //ListBox Red Radio Button
  92.   AColorButton     * listPink;          //ListBox Pink Radio Button
  93.   AColorButton     * listGreen;         //ListBox Green Radio Button
  94.   AColorButton     * listCyan;          //ListBox Cyan Radio Button
  95.   AColorButton     * listYellow;        //ListBox Yellow Radio Button
  96.  
  97.   IPushButton      * listApply;         //ListBox Apply Button
  98.   IPushButton      * listCancel;        //ListBox Cancel Button
  99.  
  100. }; // AColorWindow
  101. #endif
  102.