home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
ISLIDHDR.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
8KB
|
125 lines
#ifndef _ISLIDHDR_
#define _ISLIDHDR_
/*******************************************************************************
* FILE NAME: islidhdr.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* ISliderDrawHandler - The slider draw-item handler class. *
* *
* 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 _IHANDLER_
#include <ihandler.hpp>
#endif
#ifndef _IDIEVT_
#include <idievt.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward declarations for other classes:
class ISliderDrawHandler : public IHandler {
typedef IHandler
Inherited;
/*******************************************************************************
* The ISliderDrawHandler class is used to draw slider and progress indicator *
* control objects. You can draw the: *
* - Slider shaft *
* - Ribbon strip *
* - Slider arm *
* - Slider background *
* *
* The slider or progress indicator must be created with the handleDrawItem *
* style specified or must set this style using the *
* IProgressIndicator::enableDrawItem member function. *
* *
* An ISliderDrawHandler object should be attached to the control (slider or *
* progress indicator) that generated the draw item event or to the owner *
* window of the control. This is done by passing the control or the owner *
* window on the handleEventsFor function of the ISliderDrawHandler object. *
* *
* When it receives a draw item event, the ISliderDrawHandler object processes *
* the event by creating an IControlEvent object and routing it to the *
* appropriate virtual function. You can override these virtual functions to *
* supply your own specialized processing of the event. The return value from *
* the virtual function specifies whether the IControlEvent should be passed *
* on for additional processing, as follows: *
* *
* Value Meaning *
* --------------- *
* true - The IControlEvent object requires no additional processing and *
* should not be passed to another handler. *
* false - The IControlEvent object should be passed on for additional *
* processing, as follows: *
* -- If there is a next handler for the control or window, the *
* event is passed on to the next handler. *
* -- If this is the last handler for the control, the event is *
* dispatched to the owner window of the control *
* (see IWindow::dispatch). *
* -- If this is the last handler for the owner window, the event is *
* passed on a call to the owner window's defaultProcedure *
* function (see IWindow::defaultProcedure). *
*******************************************************************************/
public:
/*-------------------------- Constructor/Destructor ----------------------------
| The only way to construct instances of this class is to use the default |
| constructor. |
------------------------------------------------------------------------------*/
ISliderDrawHandler ( );
virtual
~ISliderDrawHandler ( );
protected:
/*--------------------------- Command Dispatching ------------------------------
| This function evaluates the event to determine if it is appropriate for |
| this handler object to process. If it is, this function calls the virtual |
| function used to process the event. |
| dispatchHandlerEvent - Calls the appropriate virtual function to process |
| a draw item event. |
------------------------------------------------------------------------------*/
virtual Boolean
dispatchHandlerEvent ( IEvent& event );
/*------------------------- Event Handling Functions ---------------------------
| The following event handling functions are invoked by this handler when the |
| slider or progress indicator is to be painted. You should override these |
| functions to provide the appropriate behavior for a derived class. These |
| functions are expected to return true if the item has been drawn. If false |
| is returned, the item has not been drawn and the slider control draws it. |
| The default behavior of these functions is to return false. |
| drawShaft - The application overrides this function to handle |
| drawing the slider's shaft. |
| drawRibbonStrip - The application overrides this function to handle |
| drawing the slider's ribbon strip. |
| drawArm - The application overrides this function to handle |
| drawing the slider's arm. |
| drawBackground - The application overrides this function to handle |
| drawing the slider's background. |
------------------------------------------------------------------------------*/
virtual Boolean
drawShaft ( IDrawItemEvent& event ),
drawRibbonStrip ( IDrawItemEvent& event ),
drawArm ( IDrawItemEvent& event ),
drawBackground ( IDrawItemEvent& event );
}; // ISliderDrawHandler
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif /* _ISLIDHDR_ */