### ISubmenu::Cursor

  The nested class ISubmenu::Cursor defines objects that you can use to iterate through the menu items in a submenu. In the same way that you can use a cursor to iterate through the objects in a collection, you can use this cursor object to iterate through a submenu.

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

### Constructors & Destructor

You can construct and destruct objects of this class.

~Cursor

      public:
      virtual ~Cursor()

Supported Platforms

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

Cursor

      public:
      Cursor(const ISubmenu& menu)

  Constructs a cursor object for a submenu. You can only construct objects of this class from an object of the class ISubmenu.

Exception

  IInvalidRequest | The menu is invalid. Verify that the menu object exists.

Supported Platforms

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

### Cursor Movement

Use cursor movement members to set the cursor to a menu item in the submenu. The cursor must be set to an item in the submenu before it can be used to access, add, or remove menu items.

setToFirst

      public:
      virtual bool setToFirst()

  Points the cursor to the first menu item. The cursor is invalidated if the submenu is empty.

Supported Platforms

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

setToLast

      public:
      virtual bool setToLast()

  Points the cursor to the last menu item.

Supported Platforms

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

setToNext

      public:
      virtual bool setToNext()

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

Supported Platforms

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

setToPrevious

      public:
      virtual bool setToPrevious()

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

Supported Platforms

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

### Cursor Validation

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

invalidate

      public:
      virtual void invalidate()

  Flags this 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

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

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None