home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IPOPMENU_
- #define _IPOPMENU_
- /**************************************************************/
- /* FILE NAME: ipopmenu.hpp */
- /* */
- /* DESCRIPTION: */
- /* Declaration of the class: */
- /* IPopUpMenu - PopUp Menu created from a resource */
- /* */
- /* COPYRIGHT: */
- /* Licensed Materials - Property of IBM */
- /* (c) Copyright IBM Corporation 1992, 1993 */
- /* US Government Users Restricted Rights - Use duplication */
- /* or disclosure restricted by GSA ADP Schedule Contract */
- /* with IBM Corp. */
- /* */
- // $Log: G:/IBMCLASS/IBASEAPP/VCS/IPOPMENU.HPV $ */
- //
- // Rev 1.4 26 Oct 1992 10:07:28 HARPERSP
- // Updates for documentation.
- //
- // Rev 1.2 08 Oct 1992 09:25:18 HARPERSP
- // First update using $Log$
- // Had to re-PUT because comment prefix was wrong.
- /* */
- /**************************************************************/
-
- #ifndef _IMENU_
- #include <imenu.hpp>
- #endif
- #ifndef _IHANDLE_
- #include <ihandle.hpp>
- #endif
- #ifndef _IRESLIB_
- #include <ireslib.hpp>
- #endif
-
- // Forward declarations for other classes
- class IPopUpMenu; /* pumn */
- class IResourceId;
- class IPoint;
- class IWindow;
- class IRectangle;
-
- class IPopUpMenu : public IMenu
- {
-
- /**********************************************************************
- * A PopUp Menu can be constructed when IMenuHandler::makePopUpMenu() *
- * is called. *
- * See IMenuHandler and ISubMenu classes for more detail. *
- * *
- **********************************************************************/
-
- public:
-
- /*------------------ CONSTRUCTORS/DESTRUCTORS -------------------------
- | There is 1 way to construct instances of this class: |
- | |
- | 1. IPopUpMenu(const IResourceId& menuResId, |
- | const IWindow* owner, |
- | Boolean autoDelete = true); |
- | |
- | Constructs the menu from the Resource specified by menuResId. |
- | owner is the Object to which the IPopUpMenu applies. |
- | |
- | if autoDelete is true, the IPopMenu object |
- | is deleted by IMenuHandler it's no longer visible. |
- | |
- | The PopUpMenu will not be visible until its show() member function|
- | is called. |
- | |
- | EXAMPLE: see IMenuHandler |
- | |
- ---------------------------------------------------------------------*/
-
- IPopUpMenu(const IResourceId& menuResId,
- const IWindow* owner,
- // message is received.
- Boolean autoDelete = true);
-
- ~IPopUpMenu();
-
- /*---------------------- ACCESSORS ------------------------------------
- | show - makes the PopUp visible |
- | |
- | isAutoDelete - returns true if the menu will be automatically |
- | deleted when it pops down. |
- | |
- ---------------------------------------------------------------------*/
-
- void show(const IPoint& ptAt);
-
- Boolean isAutoDelete() {return autoDeleteCl;};
-
- /*----------------------- PRIVATE -----------------------------------*/
- private:
-
- void create(const IResourceId& menuResId);
- const IWindow* pwndClOwner;
- Boolean autoDeleteCl;
-
- };
- #endif /* _IPOPMENU_ */