IClipboard::Cursor

The IClipboard::Cursor class is a nested class used to iterate through the available formats of data in the clipboard. Unlike many other cursor classes, IClipboard::Cursor only supports movement in a forward direction. When you use a cursor loop like the one in the following example, the clipboard formats are returned in the same order that they were added.

  // Iterate over clipboard formats...
  IClipboard clipboard(frameWindowHandle);
  IClipboard::Cursor(clipboard);
  for ( cursor.setToFirst(); cursor.isValid(); cursor.setToNext() )
    { // Do something with each format
      cout << "The format is: " << clipboard.format(cursor);
    }


IClipboard::Cursor - Member Functions and Data by Group

Constructors & Destructor

Use these members to construct and destruct IClipboard::Cursor objects. You cannot copy or assign IClipboard::Cursor objects because the copy constructor and assignment operator are private.


[view class]
~Cursor
public:
virtual ~Cursor()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
Cursor
public:
Cursor(IClipboard& clipboard)

You can construct objects of this class from a reference to an IClipboard object.

clipboard
Reference to a clipboard object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Cursor Movement

You use the cursor movement members to position the clipboard cursor.


[view class]
setToFirst
public:
virtual bool setToFirst()

Positions the cursor on the first format in the clipboard. Returns true if the cursor points to a valid format.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToNext
public:
virtual bool setToNext()

Positions the cursor on the next format in the clipboard. If you call setToNext before calling setToFirst, it positions the cursor on the first format in the clipboard. Returns true if the cursor points to a valid format.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Cursor Validation

Use the cursor validation members to determine if the clipboard cursor is valid or to indicate that it is no longer valid.


[view class]
invalidate
public:
virtual void invalidate()

Puts the cursor in an invalid state.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isValid
public:
virtual bool isValid() const

If the cursor is valid, returns true.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IClipboard::Cursor - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data