### ISystemMenu

  The ISystemMenu class enables you to manipulate your application's copy of the system menu. You can add, change, or remove items from the system menu for your application.

  You can use the member functions in the classes IMenu and ISubmenu to change the ISystemMenu. You can also add objects of the class IMenuItem to the ISystemMenu.

  The member functions IMenu::disableItem and ISubmenu::disableItem can 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.

#### Portability Considerations

  AIX does not support the ISystemMenu::idClose member. In AIX, this is equivalent to the ClientMessage sent when the user selects Alt+F4 on a frame window.

  In OS/2 Presentation Manager, this is the same as the SC_CLOSE system command. You can use ISystemMenu::idClose with ICommandHandler::systemCommand. Within systemCommand, compare ISystemMenu::idClose to the event's command ID. This is useful when you require a confirmation window for closing your application.

#### Windows Considerations

  In the Windows operating system, ISystemMenu::idHide has the same effect as ISystemMenu::idMinimize.

### ISystemMenu - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class. You cannot copy or assign ISystemMenu objects because both the copy constructor and assignment operator are private functions.

~ISystemMenu

      public:
      virtual ~ISystemMenu()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

ISystemMenu

      public:
      ISystemMenu(IFrameWindow* owner)

  Constructs an ISystemMenu object for the system menu of the specified IFrameWindow object.

Exception

  IInvalidParameter | owner is 0. You must specify a valid IFrameWindow as the ISystemMenu owner.
  IInvalidRequest | The specified frame window does not have a system menu.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

### Item Identifiers

Use item identifier members when calling IMenu functions to affect items on the system menu.

When you want to add to the system menu pull-down, specify the ISystemMenu::idPulldown member for intoSubmenuId when calling IMenu::addItem. For example:

    sysmenu.addItem(myMenuItem, ISystemMenu::idPulldown);

If you do not specify ISystemMenu::idPulldown, myMenuItem appears on the title bar to the right of the system menu icon.

If you place additional menu items on the title bar, use bitmap items rather than text items.
Note: When adding a bitmap item to the title bar using IMenu::addBitmap, myBitmapHandle needs to reference a bitmap whose dimensions are 40 x 36. For example:

    sysmenu.addBitmap(myMenuItem, myBitmapHandle);

Additionally, if you add more that one bitmap to the right of the system menu icon, draw each bitmap so that its left edge provides a visual separator.

idClose

      public:
      static const unsigned long idClose

  Identifier of the Close system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

idHide

      public:
      static const unsigned long idHide

  Identifier of the Hide system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

Windows Considerations

  This identifier has the same value as the idMinimize identifier.

idMaximize

      public:
      static const unsigned long idMaximize

  Identifier of the Maximize system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

idMinimize

      public:
      static const unsigned long idMinimize

  Identifier of the Minimize system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

idMove

      public:
      static const unsigned long idMove

  Identifier of the Move system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

idPulldown

      public:
      static const unsigned long idPulldown

  Identifier of the system menu pull-down. Use this identifier as the submenu identifier for the system menu.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

idRestore

      public:
      static const unsigned long idRestore

  Identifier of the Restore system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

idSize

      public:
      static const unsigned long idSize

  Identifier of the Size system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

idWindowList

      public:
      static const unsigned long idWindowList

  Identifier of the Window list system menu item.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

### ISystemMenu - Inherited Member Functions and Data

#### Inherited Public Functions

  IMenu

  -     virtual ~IMenu()

  -     virtual IMenu& add(IMenuItem& menuItem, Cursor& cursor)

  -     virtual IMenu&
          addAsNext( IMenuItem& menuItem,
                     Cursor& cursor )

  -     virtual IMenu&
          addBitmap( unsigned long newItemId,
                     unsigned long bitmapResId,
                     unsigned long intoSubmenuId = 0 )

  -     virtual IMenu&
          addBitmap( unsigned long newItemId,
                     const IResourceId& bitmapResId,
                     unsigned long intoSubmenuId = 0 )

  -     virtual IMenu&
          addBitmap( unsigned long newItemId,
                     const IBitmapHandle& itemBitmap,
                     unsigned long intoSubmenuId = 0 )

  -     virtual IMenu&
          addItem( IMenuItem& menuItem,
                   unsigned long intoSubmenuId = 0 )

  -     virtual IMenu&
          addSeparator( unsigned long intoSubmenuId = 0 )

  -     virtual IMenu&
          addSeparator( unsigned long newItemId,
                        unsigned long intoSubmenuId )

  -     virtual IMenu&
          addSubmenu( unsigned long itemId,
                      const IResourceId& submenuResId )

  -     virtual IMenu& addSubmenu(unsigned long itemId)

  -     virtual IMenu&
          addText( unsigned long newItemId,
                   const IResourceId& textResId,
                   unsigned long intoSubmenuId = 0 )

  -     virtual IMenu&
          addText( unsigned long newItemId,
                   const char* itemText,
                   unsigned long intoSubmenuId = 0 )

  -     virtual IMenu&
          checkItem( unsigned long itemId,
                     bool check = true )

  -     virtual unsigned long
          conditionalCascade( unsigned long itemWithSubmenuId )

  -     Cursor
          cursor( unsigned long itemId,
                  unsigned long inSubmenuId = 0 ) const

  -     static Style defaultStyle()

  -     virtual IMenu& deleteAt(Cursor& cursor)

  -     virtual IMenu& deleteItem(unsigned long itemId)

  -     virtual IMenu& disableItem(unsigned long itemId)

  -     virtual IMenu& disableUpdate()

  -     virtual IMenuItem elementAt(const Cursor& cursor) const

  -     virtual IMenu&
          enableItem( unsigned long itemId,
                      bool enable = true )

  -     virtual IMenu& enableUpdate(bool enableWindow = true)

  -     virtual IWindowHandle handle() const

  -     virtual IMenu& hide()

  -     virtual unsigned long id() const

  -     IMenu(const IMenuHandle& menuHandle)

  -     virtual bool isFrameWindow() const

  -     bool isItemChecked(unsigned long itemId) const

  -     bool isItemEnabled(unsigned long itemId) const

  -     bool isShowing() const

  -     virtual bool isValid() const

  -     bool isVisible() const

  -     unsigned long itemHelpId(unsigned long menuItemId) const

  -     IDMItemProvider* itemProvider() const

  -     IRectangle itemRect(unsigned long itemId) const

  -     virtual IMenuHandle menuHandle() const

  -     IMenuItem menuItem(unsigned long itemId) const

  -     static IMenuHandle menuWithParent(IWindow& parent)

  -     unsigned long
          numberOfItems( unsigned long forSubmenuId = 0 ) const

  -     virtual IWindow* owner() const

  -     virtual IMenu&
          refresh( const IRectangle& invalidRectangle,
                   bool immediate = false )

  -     virtual IMenu&
          refresh( IWindow::RefreshType type = IWindow::paintAll )

  -     virtual IMenu&
          removeConditionalCascade( unsigned long itemWithSubmenuId )

  -     virtual IMenu&
          removeSubmenu( unsigned long itemWithSubmenuId )

  -     virtual IMenu& removeSubmenuAt(Cursor& cursor)

  -     virtual IMenu& selectItem(unsigned long itemId)

  -     virtual IMenu&
          setBitmap( unsigned long menuItemId,
                     const IResourceId& newBitmapResId )

  -     virtual IMenu&
          setBitmap( unsigned long menuItemId,
                     const IBitmapHandle& bitmapHandle )

  -     virtual IMenu&
          setBitmap( unsigned long menuItemId,
                     unsigned long newBitmapResId )

  -     virtual IMenu&
          setConditionalCascade( unsigned long itemWithSubmenuId,
                                 unsigned long defaultItemId )

  -     static void setDefaultStyle(const Style& aStyle)

  -     virtual IMenu& setItem(const IMenuItem& menuItem)

  -     virtual IMenu&
          setItemHelpId( unsigned long menuItemId,
                         unsigned long helpTopicId )

  -     IMenu& setItemProvider(IDMItemProvider* dragProvider)

  -     virtual IMenu&
          setSubmenu( unsigned long itemId,
                      const IResourceId& submenuResId )

  -     virtual IMenu&
          setText( unsigned long menuItemId,
                   const IResourceId& newTextResId )

  -     virtual IMenu&
          setText( unsigned long menuItemId,
                   const char* newText )

  -     virtual IMenu& show(bool showMenu = true)

  -     virtual IMenu& uncheckItem(unsigned long itemId)

  -     virtual IWindow* window() const

  INotifier

  -     virtual ~INotifier()

  -     virtual INotifier& disableNotification() = 0

  -     virtual INotifier&
          enableNotification( bool enable = true ) = 0

  -     INotifier()

  -     virtual bool isEnabledForNotification() const = 0

  -     virtual INotifier&
          notifyObservers( const INotificationEvent& event ) = 0

  -     virtual INotifier&
          notifyObserversAsync( const INotificationEvent& event )

  -     const IThreadId& threadId() const

  IStandardNotifier

  -     virtual ~IStandardNotifier()

  -     virtual IStandardNotifier& disableNotification()

  -     virtual IStandardNotifier&
          enableNotification( bool enable = true )

  -     virtual bool isEnabledForNotification() const

  -     IStandardNotifier(const IStandardNotifier& copy)

  -     IStandardNotifier()

  -     virtual INotifierAddress notifierAddress() const

  -     virtual IStandardNotifier&
          notifyObservers( const INotificationEvent& anEvent )

  -     virtual IStandardNotifier&
          notifyObserversAsync( const INotificationEvent& anEvent )

  -     IStandardNotifier&
          operator =( const IStandardNotifier& aStandardNotifier )

#### Inherited Public Data

  INotifier

  -     static INotificationId const allChangesId

  -     static INotificationId const deleteId

  IMenu

  -     static const Style classDefaultStyle

  -     static const Style noStyle

  -     static const Style visible

#### Inherited Protected Functions

  INotifier

  -     virtual INotifier&
          addObserver( IObserver& observer,
                       const IInterest& interest )

  -     virtual INotifier&
          notifyObservers( const INotificationId& id ) = 0

  -     virtual IObserverList&
          observerList( const IInterest* anInterest = 0 ) const = 0

  -     virtual INotifier& removeAllObservers() = 0

  -     virtual INotifier& removeObserver(IObserver& observer) = 0

  -     virtual INotifier&
          removeObserver( IObserver& observer,
                          const IInterest& interest )

  IStandardNotifier

  -     virtual IStandardNotifier&
          addObserver( IObserver& observer,
                       const IInterest& interest )

  -     virtual IStandardNotifier&
          notifyObservers( const INotificationId& nId )

  -     virtual IObserverList&
          observerList( const IInterest* anInterest = 0 ) const

  -     virtual IStandardNotifier& removeAllObservers()

  -     virtual IStandardNotifier&
          removeObserver( IObserver& observer,
                          const IInterest& interest )

  -     virtual IStandardNotifier&
          removeObserver( IObserver& observer )

  IMenu

  -     IMenu()

  -     void setWindow(IWindow* window)

#### Inherited Protected Data

  - None