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

  1. #ifndef _ICUSTBEV_
  2. #define _ICUSTBEV_
  3. /*******************************************************************************
  4. * FILE NAME: icustbev.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *    Declaration of the classes:                                               *
  8. *      ICustomButtonDrawEvent                                                  *
  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 <ictlevt.hpp>
  19. #include <irect.hpp>
  20. #include <igrafctx.hpp>
  21.  
  22. class ICustomButton;
  23.  
  24. #pragma pack(4)
  25.  
  26.  
  27. class ICustomButtonDrawEvent : public IControlEvent {
  28. typedef IControlEvent
  29.   Inherited;
  30. public:
  31. /*------------------------------- Constructors -------------------------------*/
  32.   ICustomButtonDrawEvent (const IEvent&                 event);
  33.   ICustomButtonDrawEvent (const ICustomButtonDrawEvent& event);
  34.   ICustomButtonDrawEvent (const IEvent&                 event,
  35.                           const ISize&                  size );
  36.  
  37. virtual
  38.  ~ICustomButtonDrawEvent ( );
  39.  
  40. /*------------------------------ Drawing -------------------------------------*/
  41. IGraphicContext
  42.   &graphicContext    ( ) const;
  43.  
  44. enum ButtonState {
  45.   buttonUp,
  46.   buttonDown,
  47.   buttonLatched
  48. };
  49.  
  50. ButtonState
  51.   buttonState () const;
  52.  
  53. Boolean
  54.   drawUp      () const,
  55.   drawDown    () const,
  56.   drawLatched () const;
  57.  
  58. IRectangle
  59.   drawingArea () const;
  60.  
  61. virtual ICustomButtonDrawEvent
  62.   &setDrawingArea ( const IRectangle& rectangle );
  63.  
  64. Boolean
  65.   isButtonEnabled () const;
  66.  
  67. /*----------------------------- Custom Button --------------------------------*/
  68. virtual ICustomButton
  69.  *customButton () const;
  70.  
  71.  
  72. private:
  73. /*--------------------------------- Private ----------------------------------*/
  74.   ICustomButtonDrawEvent& operator = ( const ICustomButtonDrawEvent& );
  75. IRectangle
  76.   fRectangle;
  77. IGraphicContext
  78.   fGraphicContext;
  79. };
  80.  
  81.  
  82. #pragma pack()
  83.  
  84. #endif /* _ICUSTBEV_ */
  85.