home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
ISYSMENU.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-22
|
7KB
|
120 lines
#ifndef _ISYSMENU_
#define _ISYSMENU_
/******************************************************************************
* FILE NAME: isysmenu.hpp *
* *
* DESCRIPTION: *
* Declaration of the class: *
* ISystemMenu - wrapper for the system menu *
* *
* 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. *
* *
******************************************************************************/
#ifndef _IMENU_
#include <imenu.hpp>
#endif
/*----------------------------------------------------------------------------*/
/* Align classes on four byte boundary. */
/*----------------------------------------------------------------------------*/
#pragma pack(4)
class IFrameWindow;
class ISystemMenu : public IMenu {
typedef IMenu
Inherited;
/******************************************************************************
* The ISystemMenu class creates a menu object for the system menu of a window *
* so that it can be used to manipulate its menu item. The member functions *
* in IMenu and ISubmenu can be used to change the ISystemMenu (see notes *
* below). IMenuItem objects can be added to the ISystemMenu. *
* *
* NOTES: 1) The IMenu::disableItem and ISubmenu::disableItem functions may *
* have no effect in certain situations. For example, you cannot *
* disable the Size menu item on the system menu if the frame window *
* has a sizing border. *
* *
* 2) If you use the IMenu::addBitmap or ISubmenu::addBitmap function *
* to add a new bit map to the right of the system menu bit map on *
* the title bar, the bitmapHandle argument must reference a bit map *
* that has the same dimensions as an icon (40 x 36). If this *
* argument references a bit map that is larger than an icon, the *
* bit map will be clipped. You also need to provide a visual *
* indication of separation along the left side of the bit map if *
* more than one such bit map will appear on the title bar. *
* *
* Example: *
* ISystemMenu menu(myFrame); *
* //The system menu can now be manipulated using "menu" *
******************************************************************************/
public:
/*------------------ Constructor ----------------------------------------------
| The only way to construct instances of this class is with an owner frame |
| window. |
------------------------------------------------------------------------------*/
ISystemMenu ( IFrameWindow* owner );
/*---------- IDs for Items that Appear on the System Menu ----------------------
| The following constants should be used when calling IMenu member functions |
| to affect items on the system menu. |
| |
| Use idPulldown as the intoSubmenuId argument when you want to add to the |
| system menu pull-down, as in the following example: |
| |
| sysmenu.addItem(myMenuItem, ISystemMenu::idPulldown); |
| |
| If idPulldown is not specified on the add call, such as: |
| |
| sysmenu.addItem(myMenuItem); |
| |
| then myMenuItem would appear on the title bar to the right of the system |
| menu icon. If you are going to place additional menu items on the title |
| bar, they should be bit-map items rather than text. |
| |
| NOTE: When adding a bit-map item to the title bar using a call, such as: |
| |
| sysmenu.addBitmap(myMenuItem, myBitmapHandle); |
| |
| then myBitmapHandle should reference a bit map whose dimensions are |
| 40 x 36. Additionally, if you will be adding more that one bit map |
| to the right of the system menu icon, each bit map should be drawn |
| so that its left edge provides some kind of visual separator. |
------------------------------------------------------------------------------*/
static const unsigned long
idPulldown,
idRestore,
idMove,
idSize,
idMinimize,
idMaximize,
idHide,
idClose,
idWindowList;
virtual
~ISystemMenu ( );
/*----------------------- Private -----------------------------------*/
private:
/*------------------- Hidden Functions. -----------------------------------
| The following inherited functions are hidden in this class. |
|-------------------------------------------------------------------------*/
ISystemMenu(const ISystemMenu&);
ISystemMenu &operator=(const ISystemMenu&);
};
/*----------------------------------------------------------------------------*/
/* Resume compiler default packing. */
/*----------------------------------------------------------------------------*/
#pragma pack()
#endif /* _ISYSMENU_ */