home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IPAINEVT.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
5KB
|
108 lines
#ifndef _IPAINEVT_
#define _IPAINEVT_
/*******************************************************************************
* FILE NAME: ipainevt.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* IPaintEvent - Represents a window repaint event. *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _IEVENT_
#include <ievent.hpp>
#endif
// Forward declarations for other classes:
#ifndef _ICOLOR_
#include <icolor.hpp>
#endif
#ifndef _IHANDLE_
#include <ihandle.hpp>
#endif
#ifndef _IRECT_
#include <irect.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
class IPaintEvent : public IEvent {
typedef IEvent
Inherited;
/*******************************************************************************
* The IPaintEvent class represents a paint event, which requires a window or *
* control to update its appearance on the screen. This event object is *
* created by an IPaintHandler object and passed to its virtual paintWindow *
* function for processing. All window updates should be done using the *
* presentation space handle supplied by the IPaintEvent object. *
*******************************************************************************/
public:
/*------------------------- Constructors/Destructor ----------------------------
| The only way to construct instances of this class is from an IEvent object. |
------------------------------------------------------------------------------*/
IPaintEvent ( IEvent& event );
virtual
~IPaintEvent ( );
/*-------------------------------- Accessors -----------------------------------
| These functions return information related to the paint event. |
| presSpaceHandle - Returns the handle of the presentation space to use for |
| any drawing. |
| rect - Returns the screen rectangle for the portion of the |
| window that needs updating. |
------------------------------------------------------------------------------*/
const IPresSpaceHandle
&presSpaceHandle ( ) const;
const IRectangle
&rect ( ) const;
/*--------------------------------- Painting -----------------------------------
| These functions can be used to update a window's appearance on the screen. |
| clearBackground - Clears the specified rectangle, filling it with the |
| specified color. If no rectangle is specified, the |
| rectangle that needs updating is used. |
| drawText - Draws the specified text, beginning at the specified |
| point, using the specified color for the text. |
------------------------------------------------------------------------------*/
IPaintEvent
&clearBackground ( const IColor& background =
IGUIColor(IGUIColor::desktopBgnd) ),
&clearBackground ( const IRectangle& fillRectangle,
const IColor& background =
IGUIColor(IGUIColor::desktopBgnd) ),
&drawText ( const char* text,
const IPoint& atPoint,
const IColor& textColor =
IGUIColor(IGUIColor::windowStaticText) );
private:
/*--------------------------------- Private ----------------------------------*/
IPresSpaceHandle
hpsCl;
IRectangle
rectCl;
}; // IPaintEvent
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
/*----------------------------- Inline Functions -----------------------------*/
#ifndef I_NO_INLINES
#include <ipainevt.inl>
#endif
#endif /* _IPAINEVT_ */