home *** CD-ROM | disk | FTP | other *** search
- #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: *
- *$Log: R:/IBMCLASS/IBASEAPP/VCS/IFONTHDR.HPV $ *
- //
- // Rev 1.1 25 Oct 1992 16:57:10 nunn
- //changed library name to ICLUI
- //
- // Rev 1.0 24 Oct 1992 17:37:12 tsuji
- //Initial revision.
- *******************************************************************************/
- #ifndef _IHANDLER_
- #include <ihandler.hpp>
- #endif
- #ifndef _IHANDLE_
- #include <ihandle.hpp>
- #endif
-
- // Forward declarations for other classes:
- class IFontHandler;
- class IEvent;
-
- class IFontHandler : public IHandler
- /*******************************************************************************
- * This class handles the various messages that affect the font dialog. *
- * *
- * To use it, you must call the enableCustomProc method on the font package, *
- * then use the second constructor of the font dialog, add your instance of *
- * the font handler, and, finally, call showDialog to begin the font dialog. *
- * *
- * EXAMPLE: *
- * IFontPkg fntp; *
- * fntp.enableCustomProc(); *
- * IFontDialog* fntd = *
- * new IFontDialog((IWindow*)0, (IWindow*)pwin, fntp, IResourceId(0)); *
- * MyFontHandler mfh; *
- * mfh->enable(); *
- * fntd->addHandler(mfh); *
- * fntd->showDialog(); *
- * *
- *******************************************************************************/
- {
- public:
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There is 1 way to construct an instance of this class: |
- | 1. default |
- | Constructs a font handler. |
- ------------------------------------------------------------------------------*/
- IFontHandler() {;}
-
- /*---------------------------- DISPATCH EVENTS ---------------------------------
- | This method determines if the event is one of the font dialog events and, |
- | if so, calls the appropriate method. |
- | dispatchHandlerEvent - Checks for font dialog events. |
- ------------------------------------------------------------------------------*/
- Boolean
- dispatchHandlerEvent(IEvent& evt);
-
- protected:
- /*------------------------ FONT DIALOG EVENTS ----------------------------------
- | These functions are called when a font dialog event occurs. Override these |
- | to provide your own processing. . |
- | faceNameChanged - A new face name was selected in the dialog. |
- | filterFontName - Allows you to screen out a font name from the combo box |
- | filterStyle - Allows you to screen out a style from the combo box |
- | filterPointSize - Allows you to screen out a point size from the combo box|
- | pointSizeChanged - A new point size was selected in the dialog. |
- | styleChanged - A new style was selected in the dialog. |
- | updatePreviewArea - The preview area needs to be repainted. |
- ------------------------------------------------------------------------------*/
- virtual Boolean
- faceNameChanged (char* pszNewFaceName),
- filterFontName (char* pszFontName,
- unsigned long ulFontType),
- filterStyle (char* pszStyle,
- unsigned long ulFontType),
- filterPointSize (char* pszPointSize,
- unsigned long ulFontType),
- pointSizeChanged (char* pszPointSize),
- styleChanged (void* pvStyleInfo),
- updatePreviewArea (IWindowHandle whPreviewArea);
-
- };
-
- #endif /* IFONTHDR */