home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / icheckbx.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.3 KB  |  99 lines

  1. #ifndef _ICHECKBX_
  2.   #define _ICHECKBX_
  3. /*******************************************************************************
  4. * FILE NAME: icheckbx.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *    ICheckBox                                                                 *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #include <isetbut.hpp>
  19. #include <irect.hpp>
  20.  
  21. class ISize;
  22. class IWindowHandle;
  23. class ICheckBoxData;
  24.  
  25. #pragma pack(4)
  26.  
  27. class ICheckBox : public ISettingButton  {
  28. typedef ISettingButton
  29.   Inherited;
  30. public:
  31. class Style;
  32. /*------------------------------- Constructors -------------------------------*/
  33.   ICheckBox  (unsigned long id,
  34.               IWindow* parent,
  35.               IWindow* owner,
  36.               const IRectangle& initial= IRectangle(),
  37.               const Style& style = defaultStyle() );
  38.  
  39.   ICheckBox  (unsigned long id,
  40.               IWindow*      parent);
  41.  
  42.   ICheckBox  (const IWindowHandle& handle);
  43.  
  44. virtual
  45.   ~ICheckBox ( );
  46.  
  47. /*---------------------------------- Styles ----------------------------------*/
  48. INESTEDBITFLAGCLASSDEF3(Style, ICheckBox, IWindow,
  49.                         IControl, IButton);
  50.  
  51. static const Style
  52.   IC_IMPORTU classDefaultStyle,
  53.   IC_IMPORTU autoSelect;
  54.  
  55. static Style
  56.   defaultStyle      ( );
  57. static void
  58.   setDefaultStyle   ( const Style&    style );
  59.  
  60. virtual unsigned long
  61.   convertToGUIStyle ( const IBitFlag& style,
  62.                       Boolean         extendedOnly = false ) const;
  63.  
  64. /*------------------------------- Auto Select --------------------------------*/
  65. virtual ICheckBox
  66.   &enableAutoSelect  ( Boolean enable=true ),
  67.   &disableAutoSelect ( );
  68. virtual Boolean
  69.   isAutoSelect       ( ) const;
  70.  
  71. protected:
  72. /*---------------------------------- Layout ----------------------------------*/
  73. virtual ISize
  74.   calcMinimumSize    ( ) const;
  75.  
  76. /*---------------------- Event Handling Implementation -----------------------*/
  77.  
  78. private:
  79. /*--------------------------------- Private ----------------------------------*/
  80. friend class ICheckHandler;
  81.  
  82. static Style
  83.   currentDefaultStyle;
  84.  
  85. ICheckBoxData
  86.  *fCheckBoxData;
  87.  
  88. /*----------------------------- Hidden Functions -----------------------------*/
  89.   ICheckBox       (const ICheckBox&);
  90.   ICheckBox
  91.      &operator=   (const ICheckBox&);
  92. };  // class ICheckBox
  93.  
  94. INESTEDBITFLAGCLASSFUNCS(Style, ICheckBox);
  95.  
  96. #pragma pack()
  97.  
  98. #endif  /* _ICHECKBX_ */
  99.