Index

C/C++ Functions

txTextPasteViaPowerObjPlus

DT_SLONG txTextPasteViaPowerObjPlus(DT_TXDOC text_doc, DT_PDDOC power_doc, DT_SLONG obj, DT_SLONG paste_flags, const DT_ULONG exclusions[])

Short Description: Paste a PowerDoc object into current text selection with format exclusions

txTextPasteViaPowerObj

DT_SLONG txTextPasteViaPowerObj(DT_TXDOC text_doc, DT_PDDOC power_doc, DT_SLONG obj, DT_SLONG paste_flags)

Short Description: Paste a PowerDoc object into current text selection

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.

Parameters

ParameterDescription

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.

  • Bit 0: If unset (0), the funtion does not subsequently run Unicode's implicit bidirectional reordering algorithm on the affected paragraph(s). If set (1), the funtion does subsequently run Unicode's implicit bidirectional reordering algorithm on the affected paragraph(s). In this case the function uses the same font map and the same Unicode flags that were used when the text document was created by calling txTextIniViaStream, txTextIniViaBuffer, txTextMakeViaStream or txTextMakeViaBuffer.
  • Bits 1-31 are reserved for future use. Must be all set to 0.

exclusions

Will be documented in the future.

Return Value

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.

Comments

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.

 

Index