This function pastes text (i.e. a sequence of Unicode characters) into the active selection of the text document specified by text_doc, replacing any currently selected text.
Parameter | Description |
---|---|
text_doc |
Handle of the associated text document instance. |
paste_command | |
nr_of_chars |
The length of the text, i.e. the number of characters (not bytes) in the memory buffer. If 0, no new characters will be inserted into the active selection of the text document, however any currently selected text will be erased. |
buffer |
A pointer to a memory buffer that holds the text to be pasted. If DV_NULL, no new characters will be inserted into the active selection of the text document, however any currently selected text will be erased. |
buffer_format |
Format of the text in the memory buffer. Can be one of the following: TX_BUFFER_FORMAT_1 1 /* 1 byte per character — for ANSI */ TX_BUFFER_FORMAT_2 2 /* 2 bytes per character — for UCS2 */ TX_BUFFER_FORMAT_3 3 /* 3 bytes per character */ TX_BUFFER_FORMAT_4 4 /* 4 bytes per character — for UCS4 */ These values have the following meaning:
|
unicode_flags | |
fontmap_sd |
If the function was successful, the return value will be the number of pasted characters. Otherwise, the function returns -1. The function will also return -1 if there are multiple (non-contiguous) or block (rectangular) active selections in the text document.