Programming Reference: ODPopup

# Programming Reference

## ODPopup

Class Definition File | Popup.idl
Class C++ Binding | Popup.xh

Class Hierarchy

    SOMObject
       ODObject
          ODRefCntObject
             ODBaseMenuBar
                ODMenuBar
                   ODPopup

Description | This class enables parts to have a base pop-up menu. Parts obtain an instance to this class using the window state's CopyBasePopup method. The ODPopup instance received back contains a base pop-up menu with the items View in Window as, Properties, Show as, and Help. Parts can then add or modify this menu.

Methods

The methods defined by the ODPopup class include:

- AddDefaultMenuItemBefore
- AddDefaultMenuItemLast
- CreateX11PlatformMenu (AIX)
- DestroyX11PlatformMenu (AIX)

Overridden Methods | The ODMenuBar class methods are overridden by the ODPopup class. For additional information on the ODMenuBar class methods, see ODMenuBar.

### AddDefaultMenuItemBefore

This method adds one of the predefined OpenDoc menu items to the pop-up menu.

Signature

    ODBoolean AddDefaultMenuItemBefore (ODMenuItemID menuItemID,
                                        ODMenuItemID beforeID)

Parameters

menuItemID (ODMenuItemID) - input

  A predefined OpenDoc menu ID.

beforeID (ODMenuItemID) - input

  The menu item before which the new item is to be inserted.

Returns

rv (ODBoolean) - returns

  Success indicator.

  kODTrue | Successful completion.
  kODFalse | Error occurred.

### AddDefaultMenuItemLast

This method adds one of the predefined OpenDoc menu items to the end of the pop-up menu.

Signature

    ODBoolean AddDefaultMenuItemLast (ODMenuItemID menuItemID)

Parameters

menuItemID (ODMenuItemID) - input

  A predefined OpenDoc menu ID.

Returns

rv (ODBoolean) - returns

  Success indicator.

  kODTrue | Successful completion.
  kODFalse | Error occurred.

### CreateX11PlatformMenu (AIX)

This method creates a new platform menu.

Signature

    ODPlatformMenu CreateX11PlatformMenu (ODMenuID menuID)

Parameters

menuID (ODMenuID) - input

  The ID of the new platform menu.

Returns

rv (ODPlatformMenu) - returns

  A new ODPlatformMenu object. Pass this object to ODPopup methods that require an ODPlatfromMenu object as a parameter.

Remarks

This method creates a new platform menu for use on AIX with ODPopup methods that require a platform-menu parameter.

### DestroyX11PlatformMenu (AIX)

This method disposes of a platform menu.

Signature

    void DestroyX11PlatformMenu (ODPlatformMenu menu)

Parameters

menu (ODPlatformMenu) - input

  The platform menu to be destroyed.

Returns

None.

Remarks

This method disposes of a platform menu created by the CreateX11PlatformMenu method that is no longer needed.

[ Top | Previous | Next | Contents | Index | Documentation Homepage ]