home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IPAGEHDR_
- #define _IPAGEHDR_
- /*******************************************************************************
- * FILE NAME: ipagehdr.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * IPageHandler - Process notebook page events for an INoteBook object. *
- * *
- * *
- * 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. *
- * *
- *$Log: R:/IBMCLASS/IBASEAPP/VCS/IPAGEHDR.HPV $ *
- //
- // Rev 1.23 25 Oct 1992 16:57:24 nunn
- // changed library name to ICLUI
- //
- // Rev 1.22 25 Oct 1992 14:24:54 tsuji
- // Format/document in the style of the standard header file.
- *******************************************************************************/
- #ifndef _IHANDLER_
- #include <ihandler.hpp>
- #endif
-
- // Forward declarations for other classes:
- class IPageHandler; /* pgh */
- class IControlEvent;
- class IPageEvent;
- class IEvent;
-
- class IPageHandler : public IHandler {
- /*******************************************************************************
- * This class handles processing of page change events for the following *
- * controls: INoteBook. *
- * *
- * The IPageHandler class is designed to handle events resulting from a user *
- * interacting with a notebook page. If registered to the appropriate window *
- * (by being passed on the addHandler() function of the control or the owner *
- * window of the control), the IPageHandler object will be called to process *
- * the page event. It does this by creating either an IControlEvent or *
- * IPageEvent object and routing it to the appropriate virtual function (the *
- * virtual functions allow you to supply your own specialized processing of *
- * the event). The return value from the virtual functions specifies if the *
- * IScrollEvent should be passed on to another handler object to be processed, *
- * as described below: *
- * *
- * Value Meaning *
- * ------ -------- *
- * true The IControlEvent has been handled and requires no additional *
- * processing. *
- * false The IControlEvent should be passed to the next handler (if this is *
- * the last handler for the control it should be passed on the first *
- * handler of the owner for the control, and if the last handler for *
- * the owner window it should be passed on the default window *
- * procedure). *
- * *
- * EXAMPLE: *
- * MyWindow::MyWindow() *
- * : ... *
- * { *
- * MyPageHandler* pgh = new MyPageHandler(); *
- * ... *
- * INoteBook* nbk = new INoteBook(ID_NB, this, this, IRectangle(...)); *
- * ef->addHandler(edh); *
- * ... *
- * show(); *
- * } *
- * Boolean MyPageHandler::pageSelected(IPageEvent& evt) *
- * { *
- * Boolean bProcessed = false; *
- * // do some processing *
- * ... *
- * return bProcessed; *
- * } *
- *******************************************************************************/
- typedef IHandler Inherited;
- public:
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There is 1 way to construct instances of this class: |
- | 1. default constructor |
- ------------------------------------------------------------------------------*/
- IPageHandler ( ) {;}
-
- /*----------------------- EVENT DISPATCHING INTERFACE --------------------------
- | This function evaluates the event to determine if it is one appropriate for |
- | this handler object to process. If so it calls the virtual function used to |
- | process the event. |
- | dispatchHandlerEvent - invokes the appropriate function if page event |
- ------------------------------------------------------------------------------*/
- Boolean
- dispatchHandlerEvent ( IEvent& evt );
-
- protected:
- /*------------------------ EVENT PROCESSING FUNCTIONS --------------------------
- | This function must be supplied by a derived class in order to provide |
- | processing for an input change event. |
- | pageResized - function used to process a page size change event |
- | pageSelected - function used to process a page selection event |
- | pageDeleted - function used to process a page deletion event |
- ------------------------------------------------------------------------------*/
- virtual Boolean
- pageResized ( IControlEvent& evt ) { return false; }
- virtual Boolean
- pageSelected ( IPageEvent& evt ) { return false; }
- virtual Boolean
- pageDeleted ( IControlEvent& evt ) { return false; }
- };
- #endif /* IPAGEHDR */