Opcode determines the operational mode.
Symbol |
Value |
Description |
TXOP_CREATE |
1 |
This is the only operation you really need. It starts by creating a new text editing control or re-using an existing one, based on the TXC.CTLNO field of the txtctl parameter, which see for details. The control is then loaded with text, based on the src parameter and TXC.DOCFMT'SRC field of the txtctl parameter. In this, the "normal" usage mode, a single XCALL XTEXT causes the control object to be created and loaded with data. (If the src parameter is empty, the new control starts out empty.) The focus is then put on the control, where the user can perform text editing operations until some kind of exit key or event is triggered. At that point, unless the TXF_DEFERSAVE flag is specified, the contents of the control are returned to the application via the dst parameter. Finally, unless the TXF_MODELESS flag is specified, the control is deleted. |
2 |
The reedit operation is identical to the TXOP_CREATE operation except that it operates on an existing control and its existing contents. If you have more than one active text edit control defined, then the TXC.CTLNO field of the txtctl parameter must indicate which one to reedit. The src parameter is ignored. | |
3 |
The operation deletes the control, and is only necessary when the control was created with the XTF_MODELESS flag (otherwise it would have been deleted automatically). Note that you can also delete the XTEXT control (like any other control) by clearing the screen with Tab(-1,0); | |
4 |
The display operation creates the control, displays it, and leaves it on the screen (regardless of whether XTF_MODELESS set. | |
5 |
The save operation retrieves the current contents of the specified text control and either returns it to the application or writes it to a text file, depending on the TXC.DOCFMT'DST flags. This is useful in conjunction with previous TXOP_CREATE operations using TXF_DEFERSAVE and TXF_MODELESS flags. (TXOP_SAVE overrides the TXF_DEFERSAVE flag.) | |
TXOPF_PRINT |
&h010 |
May be added to TXOP_CREATE or TXOP_REEDIT to print an XTEXT document independently of anything else and outside of the normal A-Shell printing subsystem. The combination TXOP_CREATE + TXOPF_PRINT can be used to print an XTEXT document from the source (file or buffer), while TXOP_REEDIT + TXOPF_PRINT can be used to print an XTEXT document that is currently open and displayed. You may also request to have XTEXT display a standard printer select dialog by setting the flag TXF8_SEL_PTR_DLG (&h10000000) to the TXC.FLAGS8 field in the txtctl parameter. If the printer dialog option is not select, then printing via TXOP_CREATE + TXOPF_PRINT will not display the XTEXT. Note that this flag was added to A-Shell in build 1149 of May 2009. When used with ATE, both A-Shell (server) and ATE (client) require that version or later. |
TXOPF_PREVIEW |
&h020 |
Mmay be added to TXOP_CREATE, TXOP_REEDIT, or TXOP_DISPLAY to cause XTEXT to display the print preview window. In the case of TXOP_CREATE or TXOP_REEDIT, the user will be left to manipulate the preview, which also means that he/she will be able to print and/or return to edit mode. |
Definition file: ashinc:xtext.def |