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.
Constructors & DestructorYou can construct and destruct objects of this class.
![]() |
public:
virtual ~Cursor()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
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.
| IInvalidRequest | The menu is invalid. Verify that the menu object exists. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Cursor MovementUse 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.
![]() |
public:
virtual bool setToFirst()
Points the cursor to the first menu item. The cursor is invalidated if the submenu is empty.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual bool setToLast()
Points the cursor to the last menu item.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual bool setToNext()
Points the cursor to the next menu item. If there is none, the cursor is invalidated.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual bool setToPrevious()
Points the cursor to the previous menu item. If there is none, the cursor is invalidated.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Cursor ValidationUse 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.
![]() |
public:
virtual void invalidate()
Flags this cursor as invalid.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual bool isValid() const
Queries whether this cursor points to a valid menu item.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |