home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
ICNRDIEV.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
7KB
|
147 lines
#ifndef _ICNRDIEV_
#define _ICNRDIEV_
/*******************************************************************************
* FILE NAME: icnrdiev.hpp *
* *
* DESCRIPTION: *
* This file contains the declaration(s) of the class(es): *
* ICnrDrawItemEvent *
* ICnrDrawBackgroundEvent *
* *
* 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 _IDIEVT_
#include <idievt.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// forward declares
class IContainerObject;
class IContainerControl;
class IContainerColumn;
class ICnrDrawItemEvent : public IDrawItemEvent
{
typedef IDrawItemEvent
Inherited;
/*******************************************************************************
* The ICnrDrawItemEvent class provides the information necessary to draw *
* objects in the container. This event will not be dispatched unless the: *
* - IContainerControl::handleDrawItem style is set when the container is *
* created, or *
* - IContainerControl::enableDrawItem function is called after construction. *
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| The only way to construct an instance of this class is from an instance of |
| the IEvent class. |
------------------------------------------------------------------------------*/
ICnrDrawItemEvent ( IEvent& event);
~ICnrDrawItemEvent ( );
/*----------------------- Related Types ---------------------------------------
| The following type is used to identify the area where drawing occurs: |
| ItemType - The type of the item being drawn. Valid values are: |
| text - The text in all views except the details view. |
| icon - An icon in the icon, name or tree view. |
| treeIcon - An expanded or collapsed tree icon. |
| detailsView - Any drawing in the details view. |
| title - The container title. |
------------------------------------------------------------------------------*/
enum ItemType {
text,
icon,
treeIcon,
detailsView,
title };
/*-------------------------- Accessors -----------------------------------------
| These functions provide a means of getting the accessible attributes of |
| instances of this class: |
| container - Returns the container being drawn. |
| object - Returns the object in the container being drawn. |
| column - If an object being drawn is in the details view, the |
| column is returned. If an object is not being drawn |
| or the view is other than a details view, 0 is |
| returned. |
| itemType - Returns the type of the item being drawn. |
| itemPresSpaceHandle - Returns the item's presentation space. |
| itemRect - Returns the rectangle of the item's size. |
------------------------------------------------------------------------------*/
virtual IContainerObject
*object ( ) const;
virtual IContainerControl
*container ( ) const;
virtual IContainerColumn
*column ( ) const;
virtual ItemType
itemType ( ) const;
virtual IPresSpaceHandle
itemPresSpaceHandle ( ) const;
virtual IRectangle
itemRect ( ) const;
};
class ICnrDrawBackgroundEvent : public IEvent
{
typedef IEvent
Inherited;
/*******************************************************************************
* The ICnrDrawBackgroundEvent class provides the information necessary to *
* draw objects in a container. This event is not dispatched unless the: *
* - IContainerControl::handleDrawItem style is set when the container is *
* created, or *
* - IContainerControl::enableDrawItem function is called after construction.*
*******************************************************************************/
public:
/*------------------------ Constructors ----------------------------------------
| The only way to construct an instance of this class is from an instance of |
| the IEvent class. |
------------------------------------------------------------------------------*/
ICnrDrawBackgroundEvent ( IEvent& event);
~ICnrDrawBackgroundEvent ( );
/*-------------------------- Accessors -----------------------------------------
| These functions provide a means of getting the accessible attributes of |
| instances of this class: |
| container - Returns the container being drawn. |
| itemPresSpaceHandle - Returns the item's presentation space handle. |
| itemId - Returns the item's ID. |
| itemRect - Returns the rectangle of the item. |
------------------------------------------------------------------------------*/
virtual IContainerControl
*container ( ) const;
virtual IPresSpaceHandle
itemPresSpaceHandle ( ) const;
virtual unsigned long
itemId ( ) const;
virtual IRectangle
itemRect ( ) const;
};
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif // _ICNRDIEV_