Typedefs | |
typedef BentleyStatus(* | ClipboardFunc_Changed )(int *numResponses, ClipboardResponse *clipboardResponseP, ClipboardFormatInfo *clipboardInfoP, int numFormats) |
UserFunction called for events related to the windows clipboard. More... | |
Functions | |
static ClipboardFunc_Changed | SetPasteFunction (ClipboardFunc_Changed newCallback) |
An MDL application can use this to set a function to be called when the windows clipboard changes. More... | |
static ClipboardFunc_Changed | SetCutFunction (ClipboardFunc_Changed newCallback) |
An MDL application can use this to set a function to be called when a MicroStation user clicks on the Edit menu option. More... | |
static ClipboardFunc_Changed | SetCopyFunction (ClipboardFunc_Changed newCallback) |
An MDL application can use this to set a function to be called when a MicroStation user clicks on the Edit menu option. More... | |
void * | mdlClipboard_getClipboardData (UInt32 format) |
The mdlClipboard_getClipboardData function retrieves a data handle or buffer to the current clipboard data having a specified format. More... | |
UInt | mdlClipboard_getClipboardFormatName (UInt wFormat, WStringR clipboardFormatName) |
The mdlClipboard_getClipboardFormatName function retrieves from the clipboard the name of the specified registered format. More... | |
StatusInt | mdlClipboard_emptyClipboard () |
The mdlClipboard_emptyClipboard function empties the clipboard. More... | |
UInt | mdlClipboard_registerClipboardFormat (WCharCP clipboardFormatName) |
The mdlClipboard_registerClipboardFormat function registers a new clipboard format name. More... | |
void * | mdlClipboard_setClipboardData (UInt32 clipboardFormat, void const *clipboardData, size_t clipboardDataLen) |
The mdlClipboard_setClipboardData function adds or replaces the specified data format to the clipboard. More... | |
UInt | mdlClipboard_openClipboard () |
mdlClipboard_openClipboard opens the Windows clipboard for examination by your application and prevents other applications from changing the clipboard contents. More... | |
UInt | mdlClipboard_closeClipboard () |
mdlClipboard_closeClipboard releases your MDL application's exclusive lock on the Windows Clipboard. More... | |
typedef BentleyStatus(* ClipboardFunc_Changed)(int *numResponses, ClipboardResponse *clipboardResponseP, ClipboardFormatInfo *clipboardInfoP, int numFormats) |
UserFunction called for events related to the windows clipboard.
UInt mdlClipboard_closeClipboard | ( | ) |
mdlClipboard_closeClipboard releases your MDL application's exclusive
lock on the Windows Clipboard.
You must call this function after each call to mdlClipboard_openClipboard.
StatusInt mdlClipboard_emptyClipboard | ( | ) |
The mdlClipboard_emptyClipboard function empties the clipboard.
All data objects in the clipboard are discarded. This function is typically called before one or more mdlClipboard_setClipboardData functions are called. It is bad practice to add data to the clipboard without first clearing the existing contents of the clipboard.
void* mdlClipboard_getClipboardData | ( | UInt32 | format | ) |
The mdlClipboard_getClipboardData function retrieves a data handle or
buffer to the current clipboard data having a specified format.
The clipboard must have been opened previously.
[in] | format | Clipboard format number |
The mdlClipboard_getClipboardFormatName function retrieves from the
clipboard the name of the specified registered format.
The function copies the name to the specified buffer.
[in] | wFormat | specifies the type of format to be retrieved. This parameter must not specify any of the predefined clipboard formats. |
[out] | clipboardFormatName | The WString that receives the format name. |
UInt mdlClipboard_openClipboard | ( | ) |
mdlClipboard_openClipboard opens the Windows clipboard for examination
by your application and prevents other applications from changing the clipboard contents.
Your application should call mdlClipboard_closeClipboard after it is finished processing the clipboard.
UInt mdlClipboard_registerClipboardFormat | ( | WCharCP | clipboardFormatName | ) |
The mdlClipboard_registerClipboardFormat function registers a new clipboard
format name.
The registered format can be used in subsequent clipboard functions as a valid format in which to render or retrieve data. It is this name that other applications can identify the various data formats within the clipboard.
[in] | clipboardFormatName | points to a NULL-terminated string that names the new format. |
Symbolic Name | Value | Meaning |
---|---|---|
CF_TEXT | 1 | Text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A NULL character signals the end of the data. |
CF_BITMAP | 2 | A handle of a bitmap. |
CF_METAFILEPICT | 3 | Handle of a metafile picture format as defined by the METAFILEPICT structure. |
CF_SYLK | 4 | Microsoft Symbolic Link (SYLK) format. |
CF_DIF | 5 | The data is in Software Arts' Data Interchange Format. |
CF_TIFF | 6 | Tag image file format (TIFF). |
CF_OEMTEXT | 7 | Text format containing characters in the OEM character set. Each line ends with a carriage return/linefeed (CR-LF) combination. A NULL character signals the end of the data. |
CF_DIB | 8 | The data is a memory block containing a BITMAPINFO structure followed by the bitmap data. |
CF_PALETTE | 9 | Handle of a color palette. Whenever an application places data in the clipboard that depends on or assumes a color palette, it should place the palette in the clipboard as well. If the clipboard contains data in the CF_PALETTE (logical color palette) format, the application should select and realize any other data in the clipboard against that logical palette. When displaying clipboard data, Windows Clipboard always uses as its current palette any object on the clipboard that is in the CF_PALETTE format. |
CF_PENDATA | 10 | Data for the pen extensions to the Windows operating system. |
CF_RIFF | 11 | Represents audio data more complex than can be represented in a CF_WAVE standard wave format. |
CF_WAVE | 12 | Represents audio data in one of the standard wave formats, such as 11 kHz or 22 kHz PCM. |
CF_UNICODETEXT | 13 | Unicode text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A NULL character signals the end of the data. |
CF_ENHMETAFILE | 14 | A handle of an enhanced metafile (HENHMETAFILE). |
void* mdlClipboard_setClipboardData | ( | UInt32 | clipboardFormat, |
void const * | clipboardData, | ||
size_t | clipboardDataLen | ||
) |
The mdlClipboard_setClipboardData function adds or replaces the specified
data format to the clipboard.
The clipboard must have been opened previously.
[in] | clipboardFormat | specifies the format of the data. It can be any one of the system- defined clipboard formats, or a format registered by the mdlClipboard_registerClipboardFormat function. |
[in] | clipboardData | specifies the data to be placed into the clipboard. This parameter must not be NULL and will be rejected if it is. If your application manages its own handle memory, you may place a handle to the data in this parameter. |
[in] | clipboardDataLen | specifies the length in bytes of the above data buffer. If this parameter is -1 then the value of pClipboardData is treated as a handle and not an address. When this value is positive, the data buffer is copied into an allocated data handle. |
|
static |
An MDL application can use this to set a function to be called when a MicroStation user clicks on the Edit menu option.
The specified function will be called synchronously.
[in] | newCallback | The new function to call, or NULL. |
When any MDL application registers a clipboard strategy routine.
When any MDL application unregistered a clipboard strategy routine.
When any MDL application that has a registered clipboard strategy routine is unloaded.
When a MicroStation user clicks on the Edit menu option.
|
static |
An MDL application can use this to set a function to be called when a MicroStation user clicks on the Edit menu option.
The specified function will be called synchronously.
[in] | newCallback | The new function to call, or NULL. |
When any MDL application registers a clipboard strategy routine.
When any MDL application unregistered a clipboard strategy routine.
When any MDL application that has a registered clipboard strategy routine is unloaded.
When a MicroStation user clicks on the Edit menu option.
|
static |
An MDL application can use this to set a function to be called when the windows clipboard changes.
The specified function will be called synchronously.
[in] | newCallback | The new function to call, or NULL. |
When any MDL application registers a clipboard strategy routine.
When any MDL application unregistered a clipboard strategy routine.
When any MDL application that has a registered clipboard strategy routine is unloaded.
When the Windows clipboard changes (i.e., when a user copies or cuts something into the clipboard).