home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IPOPMENU.HPP < prev    next >
C/C++ Source or Header  |  1993-10-22  |  4KB  |  87 lines

  1. #ifndef _IPOPMENU_
  2.   #define _IPOPMENU_
  3. /******************************************************************************
  4. * FILE NAME: ipopmenu.hpp                                                     *
  5. *                                                                             *
  6. * DESCRIPTION:                                                                *
  7. *    Declaration of the class:                                                *
  8. *      IPopUpMenu - Creates pop-up menu.                                      *
  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. *******************************************************************************/
  18. #ifndef _IMENU_
  19. #include <imenu.hpp>
  20. #endif
  21.  
  22. /*----------------------------------------------------------------------------*/
  23. /* Align classes on four byte boundary.                                       */
  24. /*----------------------------------------------------------------------------*/
  25. #pragma pack(4)
  26.  
  27. // Forward declarations for other classes
  28. class   IResourceId;
  29. class   IPoint;
  30. class   IWindow;
  31.  
  32. class IPopUpMenu : public IMenu {
  33. typedef IMenu
  34.  Inherited;
  35. /*******************************************************************************
  36. *  The IPopUpMenu class is used to create a pop-up menu.  The library          *
  37. *  supports the creation of pop-up menus on demand using the                   *
  38. *  IMenuHandler::makePopUpMenu function.                                       *
  39. *******************************************************************************/
  40. public:
  41. /*------------------ Constructor/Destructor ------------------------------------
  42. |  You can construct an instance of this class in the following ways:          |
  43. |   - By creating an empty menu bar using a window ID, frame window owner,     |
  44. |     and styles.                                                              |
  45. |   - By creating a menu bar with a menu resource ID and frame window owner.   |
  46. ------------------------------------------------------------------------------*/
  47.   IPopUpMenu ( IWindow*           owner,
  48.                unsigned long      menuWindowId,
  49.                const Style&       style        = defaultStyle());
  50.  
  51.   IPopUpMenu ( const IResourceId& menuResId,
  52.                IWindow*           owner );
  53. virtual
  54.   ~IPopUpMenu ( );
  55.  
  56. /*------------------------ Show Menu -------------------------------------------
  57. | This function provides a mean to show the pop-up menu:                       |
  58. |   show - Displays the pop-up menu at the given location. If                  |
  59. |          IWindow::setAutoDeleteObject(true) is invoked, the instance of      |
  60. |          this class is deleted when the pop-up menu terminates.              |
  61. ------------------------------------------------------------------------------*/
  62. IPopUpMenu
  63.   &show ( const IPoint& atLocation );
  64.  
  65. /*----------------------- Private -----------------------------------*/
  66. private:
  67. /*------------------- Hidden Functions. -----------------------------------
  68. | The following inherited functions are hidden in this class.              |
  69. |-------------------------------------------------------------------------*/
  70.   IPopUpMenu(const IPopUpMenu&);
  71.   IPopUpMenu &operator=(const IPopUpMenu&);
  72. IPopUpMenu
  73.   &show(Boolean showMenu=true);
  74. };
  75.  
  76. /*----------------------------------------------------------------------------*/
  77. /* Resume compiler default packing.                                           */
  78. /*----------------------------------------------------------------------------*/
  79. #pragma pack()
  80.  
  81. /*--------------------------------- Inlines ----------------------------------*/
  82. #ifndef I_NO_INLINES
  83.   #include <ipopmenu.inl>
  84. #endif
  85.  
  86. #endif  /* _IPOPMENU_ */
  87.