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

  1. #ifndef _IPAINEVT_
  2.   #define _IPAINEVT_
  3. /*******************************************************************************
  4. * FILE NAME: ipainevt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IPaintEvent                                                              *
  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 <ievent.hpp>
  19. #include <icolor.hpp>
  20. #include <ihandle.hpp>
  21. #include <irect.hpp>
  22.  
  23. #include <igrafctx.hpp>
  24.  
  25. class IPoint;
  26.  
  27. #pragma pack(4)
  28.  
  29. class IPaintEvent : public IEvent {
  30. typedef IEvent
  31.   Inherited;
  32.  
  33. public:
  34. /*--------------------------- Constructors -----------------------------------*/
  35.   IPaintEvent ( const IEvent& event );
  36. virtual
  37.  ~IPaintEvent ( );
  38.  
  39. /*--------------------------------- Painting ---------------------------------*/
  40. IPaintEvent
  41.  &clearBackground ( const IColor&     background =
  42.                                       IGUIColor(IGUIColor::desktopBgnd) ),
  43.  &clearBackground ( const IRectangle& fillRectangle,
  44.                     const IColor&     background =
  45.                                       IGUIColor(IGUIColor::desktopBgnd) ),
  46.  &drawText        ( const char*       text,
  47.                     const IPoint&     atPoint,
  48.                     const IColor&     textColor =
  49.                                       IGUIColor(IGUIColor::windowStaticText) );
  50.  
  51. virtual IPresSpaceHandle
  52.  presSpaceHandle ( );
  53.  
  54. IPaintEvent
  55.  &setGraphicContext ( const IPresSpaceHandle& handle,
  56.                       Boolean                 setClipRegion = true );
  57. IPaintEvent
  58.  &setGraphicContext ( const IGraphicContext&  context,
  59.                       Boolean                 setClipRegion = true );
  60.  
  61. IRectangle
  62.   rect ( ) const;
  63.  
  64. private:
  65. /*--------------------------------- Private ----------------------------------*/
  66. IPaintEvent
  67.  &initializeGC();
  68.  
  69. IPresSpaceHandle
  70.   hpsCl;
  71. IRectangle
  72.   rectCl;
  73. Boolean
  74.   setGC;
  75. }; // IPaintEvent
  76.  
  77. #pragma pack()
  78.  
  79. /*----------------------------- Inline Functions -----------------------------*/
  80.   #include <ipainevt.inl>
  81.  
  82. #endif /* _IPAINEVT_ */
  83.