home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IFONTHDR.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
6KB
|
95 lines
#ifndef _IFONTHDR_
#define _IFONTHDR_
/*******************************************************************************
* FILE NAME: IFONTHDR.HPP *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* IFontPkg - Package of font information for the font dialog. *
* *
* COPYRIGHT: *
* (C) Copyright IBM Corporation 1992 *
* All Rights Reserved *
* Licensed Materials * Property of IBM *
* *
* HISTORY: *
*******************************************************************************/
#ifndef _IHANDLER_
#include <ihandler.hpp>
#endif
#ifndef _IHANDLE_
#include <ihandle.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward declarations for other classes:
class IEvent;
class IFontDialog;
class IFontDialogHandler : public IHandler {
/*******************************************************************************
* The IFontDialogHandler class handles the various messages that affect the *
* font dialog. *
* *
* To use it, you must create a handler derived from IFontDialogHandler. This *
* handler must then be attached to an instance of an IFontDialog. To add a *
* handler to a modal IFontDialog, you must pass a pointer to the handler on *
* the IFontDialog constructor. *
* *
* Example: *
* // Attaching a handler to a modeless dialog *
* MyFontHandler mfh; *
* IFontDialog* fntd = *
* new IFontDialog(desktopWindow(), pwin, IFontDialog::modeless); *
* mfh->handleEventsFor(fntd); *
* *
* *
*******************************************************************************/
public:
/*------------------------ Constructor/Destructor ------------------------------
| The only way to construct an instance of this class is by using the |
| default constructor. |
------------------------------------------------------------------------------*/
IFontDialogHandler();
~IFontDialogHandler();
protected:
/*---------------------------- Dispatch Events ---------------------------------
| This method determines if the event is one of the font dialog events. If it |
| is, it calls the appropriate method. |
| dispatchHandlerEvent - Checks for font dialog events. |
------------------------------------------------------------------------------*/
virtual Boolean
dispatchHandlerEvent(IEvent& evt);
/*------------------------ Font Dialog Dismissal -------------------------------
| This function is called when a font dialog is dismissed. You should override |
| so that you get can the dialog results. |
| modelessResults - Called when a modeless dialog is dismissed. This |
| function is called even if the dialog is cancelled. |
| This is done so that you can destroy the IFontDialog |
| if needed. Use IFontDialog::pressedOK to determine |
| whether the user dismissed the dialog by pressing the |
| OK push button. |
| |
| If you need to destroy the IFontDialog object, do not |
| delete the IFontDialog* pointer from within |
| modelessResults. Instead, call |
| endingDialog->setAutoDeleteObject(). |
------------------------------------------------------------------------------*/
virtual Boolean
modelessResults (IFontDialog* endingDialog);
};
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif /* IFONTHDR */