home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IHELPHDR.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
9KB
|
159 lines
#ifndef _IHELPHDR_
#define _IHELPHDR_
/*******************************************************************************
* FILE NAME: ihelphdr.hpp *
* *
* DESCRIPTION: *
* Declaration of the class(es): *
* IHelpHandler - This class deals with help events *
* *
* 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 _IHELPEVT_
#include <ihelpevt.hpp>
#endif
#ifndef _IFRAME_
#include <iframe.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
// Forward declarations for other classes:
class IHelpHandler;
class ICommandEvent;
class IFrameWindow;
class IHelpHandler : public IHandler {
/*******************************************************************************
* The IHelpHandler class deals with help window events. *
*******************************************************************************/
typedef IHandler Inherited;
public:
/*---------------------------- Destructor ------------------------------------*/
~IHelpHandler ();
/*---------------------------- Event Handling ----------------------------------
| These functions provide means of handling help events |
| |
| hypertextSelect - Called when the user selects a hypertext field. The |
| default action does nothing. |
| subitemNotFound - Called when the user requests help on a field that IPF |
| cannot find in the help subtable. The default action |
| sets the event result to 0, indicating to IPF to do |
| nothing. |
| menuBarCommand - Called when the user has selected a customized menu bar |
| item. The default action does nothing. |
| handleError - Called when an error is caused by a user interaction. |
| The default action displays a message box that |
| indicates the ErrorType of the IHelpErrorEvent. |
| helpUndefined - Called when the user requests general help and it is |
| not defined. The default action does nothing. The |
| application can override this and either: |
| - Display its own window, or |
| - Use IHelpWindow::show to display a particular |
| window. |
| showTutorial - Called when the user selects the Tutorial choice from |
| a help window. The default action does nothing. |
| keysHelpId - Called when the user selects the Keys Help choice from |
| a help window. The default action sets the event |
| result to 0, indicating to IPF to do nothing. The |
| application can override the default action and set the |
| result to the ID of the help window it wants IPF to |
| display. |
| showContents - Called when the table of contents window is displayed. |
| The default action sets the event result to false and |
| allows IPF to process the event. |
| showCoverPage - Called when the cover page is displayed. The default |
| action sets the event result to false and allows IPF to |
| process the event. |
| showPage - Called when a child window of the cover page is opened. |
| The default action sets the event result to false and |
| allows IPF to process the event. |
| swapPage - Called when a child window of the cover page is |
| swapped. The default action sets the event result to |
| false and allows IPF to process the event. |
| showIndex - Called when the index window is displayed. The default |
| action sets the event result to false and allows IPF to |
| process the event. |
| showHistory - Called when the history window is displayed. The |
| default action sets the event result to false and |
| allows IPF to process the event. |
| showSearchLis - Called when the search list is displayed. The default |
| action sets the event result to false and allows IPF to |
| process the event. |
| openLibrary - Called when a new library is opened. The default |
| action sets the event result to false and allows IPF to |
| process the event. |
| controlSelect - Called when a control was selected. The default action |
| sets the event result to false and allows IPF to |
| process the event. |
------------------------------------------------------------------------------*/
virtual Boolean
hypertextSelect (IHelpHypertextEvent& hypertextEvent),
subitemNotFound (IHelpSubitemNotFoundEvent& event),
menuBarCommand (IHelpMenuBarEvent& menuBarEvent),
handleError (IHelpErrorEvent& errorEvent),
helpUndefined (IEvent& event),
showTutorial (IHelpTutorialEvent& tutorialEvent),
keysHelpId (IEvent& event),
showContents (IHelpNotifyEvent& notifyEvent),
showCoverPage (IHelpNotifyEvent& notifyEvent),
showPage (IHelpNotifyEvent& notifyEvent),
swapPage (IHelpNotifyEvent& notifyEvent),
showIndex (IHelpNotifyEvent& notifyEvent),
showHistory (IHelpNotifyEvent& notifyEvent),
showSearchList (IHelpNotifyEvent& notifyEvent),
openLibrary (IHelpNotifyEvent& notifyEvent),
controlSelect (IHelpNotifyEvent& notifyEvent);
/*---------------------------- Window Attachment -------------------------------
| These functions permit attaching and detaching the handler object to and from|
| a help application window. |
| handleEventsFor - Attaches the handler to the application window. |
| stopHandlingEventsFor - Detaches the handler from the application window. |
------------------------------------------------------------------------------*/
virtual IHelpHandler
&handleEventsFor ( IFrameWindow* applicationWindow ),
&stopHandlingEventsFor ( IFrameWindow* applicationWindow );
protected:
/*-------------------------------- Overrides -----------------------------------
| This class overrides the following inherited function: |
| dispatchHandlerEvent - Processes help error messages and dispatches |
| help event handling functions. |
------------------------------------------------------------------------------*/
virtual Boolean
dispatchHandlerEvent(IEvent& evt);
private:
/* Hidden functions */
virtual IHandler
&handleEventsFor ( IWindow* window ),
&stopHandlingEventsFor ( IWindow* window );
};
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif /* IHELPHDR */