The IContainerControl::ObjectCursor class iterates the container by finding objects based on the selection criteria established during construction of the cursor. The cursor become undefined when objects are added or removed from the container.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~ObjectCursor()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Construct an object of this class to iterate objects in the container.
public:
ObjectCursor( const IContainerControl& container, const IContainerObject* parentObject, bool allDescendents = false )
Construct an object of this class to iterate all objects having the specified object as a parent. Optionally, you can specify whether to iterate just the immediate child objects or all descendents of the specified parent.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
ObjectCursor( const IContainerControl& container, IContainerObject::Emphasis emphasis = IContainerObject::none, EnumerationOrder enumeration = itemOrder )
Construct an object of this class to iterate all records either in the container or by meeting the emphasis selection criteria. Optionally, you can specify whether to iterate records in item order (the default) or Z-order.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to control cursor movement based on the type of objects indicated in the construction of the cursor.
![]() |
public:
virtual bool setToFirst()
Points to the first object in the container. If there are no objects in the container, false is returned. This function validates a cursor that was set invalid as a result of adding or removing objects from the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool setToLast()
Points to the last object in the container. If there is a last object, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool setToNext()
Points to the next object in the container. If the cursor does not point to an object, this function is the same as setToFirst. The cursor does not point to an object when it is initially created. In other words, setToNext on a new cursor is the same as setToFirst.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool setToPrevious()
Points to the previous or last object in the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to validate the cursor.
![]() |
public:
virtual ObjectCursor& invalidate()
Flags the cursor as not valid.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool isValid() const
Queries whether the cursor is valid. The cursor is not valid if any of the following occur:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to retrieve objects.
![]() |
public:
virtual IContainerObject* current() const
Returns the current object of this cursor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerObject* first()
Points to and returns the first object in the container that meets the criteria established during the construction of the cursor. If there are no objects in the container, 0 is returned. This function validates a cursor that was set invalid as a result of adding or removing columns from the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerObject* last()
Points to and returns the last object in the container. Returns 0 if there are no objects in the container. This function validates a cursor that was set invalid as a result of adding or removing objects from the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerObject* next()
Points to and returns the next or first object in the container. If the cursor has reached the end of the list of objects in the container, 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IContainerObject* previous()
Points to and returns the previous or last object in the container.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual ObjectCursor& setCurrent( const IContainerObject* currentObject )
Sets the cursor to point to the specified object and validates the cursor. This function does not check for visibility.
Windows | OS/2 | AIX |
Yes | Yes | Yes |