MFC Grid manual

CTextClipboardFormat Class Reference

Text data source for clipboard copy and drag&prop operations. More...

#include <Dapfor/GUI/TextClipboardFormat.h>

Inheritance diagram for CTextClipboardFormat:

IClipboardFormat

List of all members.


Public Member Functions

 CTextClipboardFormat ()
 Constructor.
 ~CTextClipboardFormat ()
 Virtual destructor.
virtual void Prepare (const Handles &handles, const CHeader &header)
 Prepares data for serialization to the clipboard.
virtual long GetSerializationSize () const
 Gets the size in bytes needed to store data to a binary buffer.
virtual void Serialize (void *buffer, const CGrid &grid, ContextType contextType, long userData) const
 Serializes data to a binary buffer.
virtual void Clear ()
 Clears temporary data created during a serialization process.
virtual int GetFormatId () const
 Gets CF_TEXT identifier.
virtual bool Deserialize (const void *buffer, long bufSize, const IObjectImporter *importer, IClipboardFormat::RestoredInfo &restoredInfo)

Detailed Description

Text data source for clipboard copy and drag&prop operations.

Version:
1.0.0.0 Initial version

Member Function Documentation

void Prepare ( const Handles &  handles,
const CHeader header 
) [virtual]

Prepares data for serialization to the clipboard.

Parameters:
[in] handles Handles to be serialized.
[in] header CGrid header. Usually a current header is used.

Implements IClipboardFormat.

long GetSerializationSize (  )  const [virtual]

Gets the size in bytes needed to store data to a binary buffer.

Returns:
Size, needed to store data in bytes.

Implements IClipboardFormat.

void Serialize ( void *  buffer,
const CGrid grid,
ContextType  contextType,
long  userData 
) const [virtual]

Serializes data to a binary buffer.

Parameters:
[in] buffer Storage to which data is serialized. The buffer must be preliminary allocated with the size, returned by GetSerializationSize() function
[in] grid Reference to the grid
[in] contextType Context from which data is taken.
[in] userData 32-bit user-defined value

Implements IClipboardFormat.

int GetFormatId (  )  const [virtual]

Gets CF_TEXT identifier.

Returns:
CF_TEXT identifier.

Implements IClipboardFormat.

bool Deserialize ( const void *  buffer,
long  bufSize,
const IObjectImporter importer,
IClipboardFormat::RestoredInfo restoredInfo 
) [virtual]

Parameters:
[in] buffer A binary buffer, got from the clipboard.
[in] bufSize Buffer size.
[in] importer Pointer to an object that can instantiate objects of specified classes from the binary form. Usually Common::CTypeFactory is used which permits to import data from other applications.
[in,out] restoredInfo Storage, that keeps all restored data with its hierarchy.
Returns:
Always false.

Implements IClipboardFormat.