#include <mw/coecontrolarray.h>
class CCoeControlArray::TCursor |
Public Member Functions | |
---|---|
TCursor(const CCoeControlArray &, TInt) | |
T * | Control() |
const T * | Control() |
TInt | Index() |
IMPORT_C TBool | IsValid() |
IMPORT_C TBool | Next() |
IMPORT_C TBool | Prev() |
IMPORT_C TBool | operator!=(const TCursor &) |
IMPORT_C TBool | operator==(const TCursor &) |
This class is an iterator for the CCoeControlArray class.
TCursor | ( | const CCoeControlArray & | aArray, |
TInt | aIndex | ||
) |
Constructor.
Parameter | Description |
---|---|
aArray | The array |
aIndex | The index into the array |
const T * | Control | ( | ) | const |
Gets the control.
Returns: The control at the current cursor position.
IMPORT_C TBool | IsValid | ( | ) | const |
Checks if the cursor is valid. Use this to replace the comparison with NULL that you would do with pointers. This function is typically used on the cursors returned by the find operations.
Returns: ETrue if the cursor points to a control, EFalse otherwise
IMPORT_C TBool | Next | ( | ) |
Updates the cursor so that it points to the next element in the array. If the current element is the last one then this function returns EFalse.
Returns: EFalse if the current element was the last one in the array, ETrue otherwise
IMPORT_C TBool | Prev | ( | ) |
Updates the cursor so that it points to the previous element in the array. If the current element is the first one then this function does nothing and returns EFalse.
Returns: EFalse if the current element was the first one in the array, ETrue if it wasn't and the function actually did something.
Checks if the cursors are different. Cursors are equal if they point to the same control in the same array else they are different.
Parameter | Description |
---|---|
aCursor | The other cursor. |
Returns: EFalse if the cursors point to the same position in the same array, EFalse otherwise.