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

  1. #ifndef _IPOPMENU_
  2.   #define _IPOPMENU_
  3. /**************************************************************/
  4. /* FILE NAME: ipopmenu.hpp                                    */
  5. /*                                                            */
  6. /* DESCRIPTION:                                               */
  7. /*    Declaration of the class:                               */
  8. /*      IPopUpMenu - PopUp Menu  created from a resource      */
  9. /*                                                            */
  10. /* COPYRIGHT:                                                 */
  11. /*   Licensed Materials - Property of IBM                     */
  12. /*   (c) Copyright IBM Corporation 1992, 1993                 */
  13. /*   US Government Users Restricted Rights - Use duplication  */
  14. /*   or disclosure restricted by GSA ADP Schedule Contract    */
  15. /*   with IBM Corp.                                           */
  16. /*                                                            */
  17. //   $Log:   G:/IBMCLASS/IBASEAPP/VCS/IPOPMENU.HPV  $                                                    */
  18. // 
  19. //    Rev 1.4   26 Oct 1992 10:07:28   HARPERSP
  20. // Updates for documentation.
  21. // 
  22. //    Rev 1.2   08 Oct 1992 09:25:18   HARPERSP
  23. // First update using $Log$
  24. // Had to re-PUT because comment prefix was wrong.
  25. /*                                                            */
  26. /**************************************************************/
  27.  
  28. #ifndef _IMENU_
  29. #include <imenu.hpp>
  30. #endif
  31. #ifndef _IHANDLE_
  32. #include <ihandle.hpp>
  33. #endif
  34. #ifndef _IRESLIB_
  35. #include <ireslib.hpp>
  36. #endif
  37.  
  38. // Forward declarations for other classes
  39. class   IPopUpMenu;     /*  pumn  */
  40. class   IResourceId;
  41. class   IPoint;
  42. class   IWindow;
  43. class   IRectangle;
  44.  
  45. class IPopUpMenu : public IMenu
  46. {
  47.  
  48. /**********************************************************************
  49. * A PopUp Menu can be constructed when IMenuHandler::makePopUpMenu()  *
  50. * is called.                                                          *
  51. * See IMenuHandler and ISubMenu classes for more detail.              *
  52. *                                                                     *
  53. **********************************************************************/
  54.  
  55.   public:
  56.  
  57. /*------------------ CONSTRUCTORS/DESTRUCTORS -------------------------
  58. |  There is 1 way to construct instances of this class:               |
  59. |                                                                     |
  60. |   1. IPopUpMenu(const IResourceId& menuResId,                       |
  61. |          const IWindow* owner,                                      |
  62. |          Boolean autoDelete = true);                                |
  63. |                                                                     |
  64. |      Constructs the menu from the Resource specified by menuResId.  |
  65. |      owner is the Object to which the IPopUpMenu applies.           |
  66. |                                                                     |
  67. |     if autoDelete is true, the IPopMenu object                      |
  68. |      is deleted by IMenuHandler it's no longer visible.             |
  69. |                                                                     |
  70. |   The PopUpMenu will not be visible until its show() member function|
  71. |   is called.                                                        |
  72. |                                                                     |
  73. |   EXAMPLE: see IMenuHandler                                         |
  74. |                                                                     |
  75. ---------------------------------------------------------------------*/
  76.  
  77.      IPopUpMenu(const IResourceId& menuResId,
  78.                 const IWindow* owner,
  79.                 // message is received.
  80.                 Boolean autoDelete = true);
  81.  
  82.      ~IPopUpMenu();
  83.  
  84. /*---------------------- ACCESSORS ------------------------------------
  85. |   show - makes the PopUp visible                                    |
  86. |                                                                     |
  87. |   isAutoDelete - returns true if the menu will be automatically     |
  88. |                  deleted when it pops down.                         |
  89. |                                                                     |
  90. ---------------------------------------------------------------------*/
  91.  
  92.      void show(const IPoint& ptAt);
  93.  
  94.      Boolean isAutoDelete() {return autoDeleteCl;};
  95.  
  96. /*----------------------- PRIVATE -----------------------------------*/
  97.   private:
  98.  
  99.      void create(const IResourceId& menuResId);
  100.      const IWindow* pwndClOwner;
  101.      Boolean autoDeleteCl;
  102.  
  103. };
  104. #endif  /* _IPOPMENU_ */
  105.