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

  1. #ifndef _I3STATBX_
  2. #define _I3STATBX_
  3. /*******************************************************************************
  4. * FILE NAME: i3statbx.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     I3stateCheckBox                                                          *
  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. #include <ibitflag.hpp>
  21.  
  22. class IRectangle;
  23. class ISize;
  24. class IWindowHandle;
  25. class I3StateCheckBoxData;
  26.  
  27. #pragma pack(4)
  28.  
  29.  
  30. class I3StateCheckBox : public ISettingButton {
  31. typedef ISettingButton
  32.   Inherited;
  33. public:
  34. class Style;
  35. /*------------------------------- Constructors -------------------------------*/
  36.   I3StateCheckBox (unsigned long id,
  37.                    IWindow* parent,
  38.                    IWindow* owner,
  39.                    const IRectangle& initial= IRectangle(),
  40.                    const Style& style = defaultStyle() );
  41.  
  42.   I3StateCheckBox (unsigned long id,
  43.                    IWindow*      parent);
  44.  
  45.   I3StateCheckBox (const IWindowHandle& handle);
  46.  
  47. virtual
  48.   ~I3StateCheckBox( );
  49.  
  50. /*---------------------------------- Styles ----------------------------------*/
  51. INESTEDBITFLAGCLASSDEF3(Style, I3StateCheckBox,
  52.                                  IWindow, IControl, IButton);
  53.  
  54. static const Style
  55.   IC_IMPORTU classDefaultStyle,
  56.   IC_IMPORTU autoSelect;
  57.  
  58. static Style
  59.   defaultStyle      ( );
  60. static void
  61.   setDefaultStyle   ( const Style&    style );
  62.  
  63. virtual unsigned long
  64.   convertToGUIStyle ( const IBitFlag& style,
  65.                       Boolean         extendedOnly = false ) const;
  66.  
  67.  
  68. /*------------------------------- Auto Select --------------------------------*/
  69. virtual I3StateCheckBox
  70.   &enableAutoSelect  (Boolean enable=true),
  71.   &disableAutoSelect ( );
  72. virtual Boolean
  73.   isAutoSelect       ( ) const;
  74.  
  75. /*-------------------------------- Selection ---------------------------------*/
  76. I3StateCheckBox&
  77.   selectHalftone  ( );
  78. Boolean
  79.   isHalftone      ( ) const;
  80.  
  81. protected:
  82. /*---------------------------------- Layout ----------------------------------*/
  83. virtual ISize
  84.   calcMinimumSize ( ) const;
  85.  
  86. private:
  87. /*---------------------------------- Private ---------------------------------*/
  88. friend class I3StateHandler;
  89.  
  90. static Style
  91.   currentDefaultStyle;
  92.  
  93. I3StateCheckBoxData
  94.  *f3StateCheckBoxData;
  95.  
  96. /*----------------------------- Hidden Functions -----------------------------*/
  97.   I3StateCheckBox  (const I3StateCheckBox&);
  98.   I3StateCheckBox
  99.     &operator=     (const I3StateCheckBox&);
  100. };  // I3StateCheckBox
  101.  
  102. INESTEDBITFLAGCLASSFUNCS(Style, I3StateCheckBox);
  103.  
  104.  
  105. #pragma pack()
  106.  
  107. #endif  /* _I3STATBX_ */
  108.