This function pastes a PowerDoc object from an arbitrary Power Engine document 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. |
power_doc |
Handle of the Power Engine document that contains the PowerDoc object to be pasted. |
obj |
PowerDoc object to be pasted, i.e. the index of the PowerDoc object in the Power Engine document. The specified object must represent the Text Fragment object. See Guidelines For Creating PowerDoc Objects for information on how to create the Text Fragment object using the D-Type Power Engine API. |
paste_flags |
A set of bit values to fine tune the behavior of the function.
|
exclusions |
Will be documented in the future. |
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.
This function makes it possible to insert a text fragment from an arbitrary Power Engine document into the active selection of the current text document. The text fragment can consist of standard glyphs or characters or, alternatively, PowerGlyphs (or PowerChars in the future). PowerGlyphs are particularly useful since they can be used to build tables, images, diagrams, mathematical formulas etc. In other words, by pasting text fragments consisting of PowerGlyphs, this function provides a means of pasting complex and/or non-textual objects into text documents.
See the Text Fragment object in the Guidelines For Creating PowerDoc Objects for information on how to create Text Fragments using the D-Type Power Engine API.
In order to view the modified text document it is necessary to subsequently call the txTextDraw function.