GEOS SDK TechDocs
|
|
2.3 Transfer Data Structures
|
3 Using The Clipboard
There are several built-in transfer formats that many GEOS applications may support; each of these types is an enumeration of
ClipboardItemFormat
. Additionally, custom formats can be defined to allow special data structures to be cut, copied, pasted, or quick-transferred without translation into text or graphics strings. The Transfer VM File may contain up to ten formats of a given transfer item.
ClipboardItemFormat
is shown below.
typedef enum /* word */ {
CIF_TEXT,
CIF_GRAPHICS_STRING,
CIF_FILES,
CIF_SPREADSHEET,
CIF_INK,
CIF_GROBJ,
CIF_GEODEX,
CIF_BITMAP,
CIF_SOUND_SYNTH,
CIF_SOUND_SAMPLE
} ClipboardItemFormat;
A transfer item of CIF_TEXT format is headed by a
TextTransferBlockHeader
structure. The text follows this header in the VM chain. A transfer item of CIF_GRAPHICS_STRING format is simply the entire GString stored in the transfer VM file in the VM chain.
Because every format identifier has two components, it is highly unlikely that two different designers will create overlapping custom formats.
The format is defined as a
ClipboardItemFormatID
type, which is a dword composed of two word-sized pieces. The first piece is a constant representing the format ID number (such as CIF_TEXT or CIF_GRAPHICS_STRING). The second piece is a constant representing the Manufacturer ID number of the manufacturer responsible for creating the format.
To create a custom format, simply define these two items as appropriate (your Manufacturer ID should be set already). Then define your format to fit within the structures used by the Clipboard (shown above).
GEOS SDK TechDocs
|
|
2.3 Transfer Data Structures
|
3 Using The Clipboard