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

  1. #ifndef _IBUTTON_
  2.   #define _IBUTTON_
  3. /*******************************************************************************
  4. * FILE NAME: ibutton.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *    IButton                                                                   *
  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 <itextctl.hpp>
  19.  
  20. class IColor;
  21. class IButtonData;
  22.  
  23. #pragma pack(4)
  24.  
  25. class IButton : public ITextControl {
  26. typedef ITextControl
  27.   Inherited;
  28. public:
  29. /*------------------------------- Constructors -------------------------------*/
  30. virtual
  31.  ~IButton ( );
  32.  
  33. /*---------------------------------- Styles ----------------------------------*/
  34. INESTEDBITFLAGCLASSDEF2(Style, IButton, IWindow, IControl);
  35.  
  36. static const Style
  37.   IC_IMPORTU noPointerFocus;
  38.  
  39. /*------------------------------- Mouse Focus --------------------------------*/
  40. virtual IButton
  41.  &enableMouseClickFocus  ( Boolean enable = true ),
  42.  &disableMouseClickFocus ( );
  43. Boolean
  44.   allowsMouseClickFocus  ( ) const;
  45.  
  46. /*-------------------------------- Highlight ---------------------------------*/
  47. Boolean
  48.   isHighlighted ( ) const;
  49.  
  50. virtual IButton
  51.  &highlight     ( Boolean highlight = true ),
  52.  &unhighlight   ( );
  53.  
  54. /*-------------------------------- Selection ---------------------------------*/
  55. virtual IButton
  56.  &click         ( );
  57.  
  58. /*---------------------------------- Color -----------------------------------*/
  59. #ifndef IC_WIN_FLAGNOP
  60. virtual IColor
  61.   disabledForegroundColor ( ) const,
  62.   hiliteForegroundColor   ( ) const,
  63.   hiliteBackgroundColor   ( ) const;
  64. #endif //!IC_WIN_FLAGNOP
  65. virtual IColor
  66.   foregroundColor         ( ) const,
  67.   backgroundColor         ( ) const;
  68.  
  69. /*--------------------- Notification Event Descriptions ----------------------*/
  70. static INotificationId const
  71.   IC_IMPORTU buttonClickId;
  72.  
  73. /*-------------------------- Observer Notification ---------------------------*/
  74. virtual IButton
  75.   &enableNotification (Boolean enable = true);
  76.  
  77. /*----------------------------------- Text -----------------------------------*/
  78. virtual IButton
  79.  &setText       ( const char* text ),
  80.  &setText       ( const IResourceId& text );
  81.  
  82. protected:
  83.  
  84. /*-------------------------- Protected Constructors --------------------------*/
  85.   IButton ( );
  86.  
  87. private:
  88. /*----------------------------- Hidden Functions -----------------------------*/
  89.   IButton       ( const IButton& );
  90. IButton
  91.  &operator=     ( const IButton& );
  92.  
  93. /*--------------------------------- Private ----------------------------------*/
  94. friend class IButtonHandler;
  95. IButtonData
  96.  *fButtonData;
  97.  
  98. };  // class IButton
  99.  
  100. INESTEDBITFLAGCLASSFUNCS(Style, IButton);
  101.  
  102. #pragma pack()
  103.  
  104. #endif  /* _IBUTTON_ */
  105.