home *** CD-ROM | disk | FTP | other *** search
- #ifndef _ISIZEHDR_
- #define _ISIZEHDR_
- /*******************************************************************************
- * FILE NAME: isizehdr.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * IResizeHandler - Process a resizing event for a window/control. *
- * *
- * *
- * 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: S:/ibmclass/ibaseapp/vcs/isizehdr.hpv $ *
- //
- // Rev 1.21 26 Oct 1992 00:36:12 tsuji
- // Format/document in the style of the standard header file.
- *******************************************************************************/
- #ifndef _IHANDLER_
- #include <ihandler.hpp>
- #endif
-
- // Forward declarations for other classes:
- class IResizeHandler; /* szh */
- class IResizeEvent;
- class IEvent;
-
- class IResizeHandler : public IHandler {
- /*******************************************************************************
- * This class handles processing of resizing events for all windows and *
- * controls. *
- * *
- * The IResizeHandler class is designed to handle resizing events, which grow *
- * or shrink a window or control on the screen. If registered to a window or *
- * control (by being passed on a call to its addHandler() function), the *
- * IResizeHandler object will be called to process the resizing event. It does *
- * this by creating an IResizeEvent object and routing it to the virtual *
- * virtual windowResize() function (this virtual function allows you to supply *
- * your own specialized processing of the event). The return value from the *
- * virtual function specifies if the IResizeEvent should be passed on to *
- * another handler object to be processed, as described below: *
- * *
- * Value Meaning *
- * ------ -------- *
- * true The IResizeEvent has been handled and requires no additional *
- * processing. *
- * false The IResizeEvent should be passed to the next handler (if this is *
- * the last handler for the window or control it should be passed on *
- * to the default window procedure). *
- * *
- * EXAMPLE: *
- * MyWindow::MyWindow() *
- * : ... *
- * { *
- * MyResizeHandler* szh = new MyResizeHandler(); *
- * ... *
- * addHandler(szh); *
- * ... *
- * show(); *
- * } *
- * Boolean MyResizeHandler::windowResize(IResizeEvent& evt) *
- * { *
- * // Specialized processing here. *
- * ... *
- * return true; *
- * } *
- *******************************************************************************/
- typedef IHandler Inherited;
- public:
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There is 1 way to construct instances of this class: |
- | 1. default constructor |
- ------------------------------------------------------------------------------*/
- IResizeHandler ( ) {;}
-
- /*----------------------- 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 windowResize function if size event |
- ------------------------------------------------------------------------------*/
- Boolean
- dispatchHandlerEvent ( IEvent& evt );
-
- protected:
- /*------------------------ EVENT PROCESSING FUNCTIONS --------------------------
- | This function must be supplied by a derived class in order to provide |
- | processing for a resizing event. |
- | windowResize - function used to process the resizing event |
- ------------------------------------------------------------------------------*/
- virtual Boolean
- windowResize ( IResizeEvent& evt ) = 0;
- };
- #endif /* ISIZEHDR */