### IMenu::Cursor

  The IMenu::Cursor class creates and manages the cursor for menu items. You can add or update items anywhere in a menu structure using this class.

### IMenu::Cursor - Member Functions and Data by Group

### Constructors & Destructor

You can only construct objects of this class from an object of the IMenu class and an optional submenu ID. The submenu defaults to 0 for the top-level menu items. You can also destruct objects of this class.

~Cursor

      public:
      virtual ~Cursor()

Supported Platforms

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

Cursor

      public:
      Cursor(const IMenu& menu, unsigned long forSubmenuId = 0)

  Use this function to construct a cursor object for a menu.

  You can define a cursor for a submenu using forSubmenuId to specify the identifier of the submenu.

Exception

  IInvalidRequest | The menu item identifier is invalid. Verify that the identifier represents an item in the menu.
  IInvalidRequest | The menu is not valid. A valid menu object must be provided.

Supported Platforms

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

### Cursor Movement

Use cursor movement members to move the cursor across the IMenu object.

setToFirst

      public:
      virtual bool setToFirst()

  Points to the first menu item. If successful, true is returned. If the menu is empty, the cursor is invalidated and false is returned.

Supported Platforms

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

setToLast

      public:
      virtual bool setToLast()

  Points to the last menu item. If successful, true is returned.

Supported Platforms

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

setToNext

      public:
      virtual bool setToNext()

  Points to the next menu item. If there is none, the cursor is invalidated. If successful, true is returned.

Supported Platforms

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

setToPrevious

      public:
      virtual bool setToPrevious()

  Points to the previous menu item. If there is none, the cursor is invalidated. If successful, true is returned.

Supported Platforms

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

### Cursor Validation

Use cursor validation members to determine if the cursor is valid or to invalidate it. The cursor must be valid in order to use it to access an item.

invalidate

      public:
      virtual void invalidate()

  Flags the cursor as invalid.

Supported Platforms

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

isValid

      public:
      virtual bool isValid() const

  Queries whether this cursor points to a valid menu item.

Supported Platforms

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

### IMenu::Cursor - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None