home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / ibmcli / ihelp.hp_ / IHELP.HPP
Encoding:
C/C++ Source or Header  |  1992-10-26  |  5.2 KB  |  118 lines

  1. #ifndef _IHELP_
  2. #define _IHELP_
  3. /*******************************************************************************
  4. * FILE NAME: ihelp.hpp.                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IHelp - This GUI help instance class                                     *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *$Log:   R:/IBMCLASS/IBASEAPP/VCS/IHELP.HPV  $
  18. //
  19. //   Rev 1.1   26 Oct 1992 10:48:58   nunn
  20. //Kevin's changes for 10/26
  21.    
  22.       Rev 1.1   26 Oct 1992 00:00:01   kleong
  23.    Miscellaneous improvements.
  24. *******************************************************************************/
  25. #ifndef _IBASE_
  26.   #include <ibase.hpp>
  27. #endif
  28. #ifndef _IHANDLE_
  29.   #include <ihandle.hpp>
  30. #endif
  31.  
  32. // Forward declarations for other classes:
  33. class IWindow;
  34. class IWindowHandle;
  35. class ISize;
  36. class IResourceId;
  37.  
  38. class IHelp : public IBase {
  39. /*******************************************************************************
  40. * The IHelp class defines help panels using the system help Information        *
  41. * Presentation Facility                                                        *
  42. *                                                                              *
  43. * <2 to 3 paragraphs describing how objects of this class are used>            *
  44. *                                                                              *
  45. * EXAMPLE:                                                                     *
  46. *   <sample code>                                                              *
  47. *******************************************************************************/
  48. typedef IBase Inherited;
  49. public :
  50. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  51. | There are one way to construct instances of this class:                      |
  52. |   1. Construct a help instance given the help table resource ID,
  53.        the active application window and the help file name.
  54. ------------------------------------------------------------------------------*/
  55.  
  56.   IHelp(const IResourceId& resid, const IWindow* activeWindow,
  57.         const char* helpFileName);
  58.   ~IHelp();
  59.  
  60. /*-------------------------------- ACCESSORS -----------------------------------
  61. | These function provide means of getting and setting the accessible           |
  62. | attributes of instances of this class:  
  63.     associate           - Associates the help instance with the
  64.                           application window chain
  65.     handle              - Returns the help instance window handle
  66.     setActiveWindow     - Sets the active window to receive help
  67.                           window events
  68.     setCoverpageSize    - Sets the size of the help window coverpage
  69.     setHelpFile         - Sets a list of help library file
  70.     setHelpForHelp      - Replaces the Help For Help panel
  71.     setHelpWindowAccel  - Replaces the help window accelerator table
  72.     setTitle            - Sets the help window title
  73.     setUsingHelp        - Replaces the Using Help panel
  74.     setHelpWindowMenu   - Replaces the help window menu
  75.     setHelpTable        - Replaces the help table resource
  76. ------------------------------------------------------------------------------*/
  77. const IWindowHandle
  78.   &handle() const;
  79.  
  80. IHelp 
  81.   &associate(const IWindow* windowChain),
  82.   &setActiveWindow(const IWindow* window),
  83.   &setCoverpageSize(const ISize& newSize),
  84.   &setHelpFile(const char* helpFile),
  85.   &setHelpForHelp(unsigned long helpId),
  86.   &setHelpWindowAccel(const IResourceId& accelResId),
  87.   &setTitle(const char* title),
  88.   &setTitle(const IResourceId& id),
  89.   &setUsingHelp(unsigned long helpId);
  90.  
  91. //     IHelp& setHelpWindowMenu(const IResourceId& menuResId);
  92. //     IHelp& setHelpTable(const IResourceId& helpResId);
  93.  
  94. enum Indicator {visible, invisible, flash};
  95. IHelp
  96.   &setPanelId(Indicator ind);
  97.  
  98. /*-------------------------------- ACCESSORS -----------------------------------
  99. | These function provide means of showing the help window panels.              |
  100.     show  -  Displays specific help window panel
  101.     hide  -  Dismisses the help window
  102. ------------------------------------------------------------------------------*/
  103. enum HelpType {index, general, keys, contents};
  104. IHelp
  105.   &show(HelpType type),
  106.   &show(unsigned long id),
  107.   &show(const char* panelName),
  108.   &hide(); 
  109.  
  110. /*--------------------------------- PRIVATE ----------------------------------*/
  111. private :
  112. void
  113.   *phelpdata;
  114. IWindowHandle
  115.   helpHandle;
  116. };
  117. #endif
  118.