Please enable JavaScript to view this site.

A-Shell Reference

Updated April 2022

This is a structure containing various extended parameters and options. If omitted, suitable defaults will be supplied, although that will severely limit the capabilities of the tree control. For those parameters which are essentially Boolean options, 0=false and 1=true. Most of the fields in txtctl are input-only, but a few, such as SAVEOFFSET are updated as well, and some are output-only; these are indicated with "[in/out]" or "[out]" in the following table, which lists the structure members alphabetically for easy reference. To use the txtctl structure in your program, include the xtext.sdf and xtext.def files and then map an instance of the structure for each XText in the program, e.g.:

MAP1 TXC, TXTCTL                ! define instance of TXTCTL structure named TXC

...

TXC.DOCFFMT'SRC = TXFF_TEXT

TXC.CTLNO = -1

etc.

 

Or include the xtext.map file which includes actual map statements for txtctl, rather than a structure definition; in that case, members would be assigned as follows:

TXC'DOCFFMT'SRC = TXFF_TEXT

TXC'CTLNO = -1

etc.

 

Note that the first method (declaring an instance of the defined structure txtctl and using the structure dot member notation) has the advantage of making it easy to define and maintain separate copies of the structure for multiple XTEXTs.

By convention in this document, we refer to the members of the txtctl structure using structure.member notation, as if you had declared an instance of the structure txtctl named TXC, as in the example above.

SYMBOL

Type

I/O

Description

BCOLOR

B,4

in

Background (window) color. See FCOLOR.

BPROTCLR

B,4

in

Background protected color. See PROTROWS.

CTLID

B,2

out

Control ID (overall A-Shell AUI control list).

CTLNO

B,1

in/out

Specifies control to use.

DELCTLID

B,4

in

ID of control to delete on entrance (life sign). This functions exactly like the analogous XTR.DELCTLID parameter in XTREE, which see for important notes.

DOCFMT'DST

B,2

in

Format of output (dst).

DOCFMT'SRC

B,2

in

Format of input (src).

FCOLOR

B,4

in

Foreground (text) color.

FLAGMASK

B,2

in

1's indicate which flags to update

FLAGS#

B,4

in

Various low-level flags; see TXF#_xxx in ASHINC:XTEXT.DEF.

FMAPAPP

B,4

in

1's enable FKEY to be send to app (exitcode).

FMAPCTL

B,4

in

1's enable FKEY to be sent to control.

FONTATTR

B,4

in

Expresses font attributes in the same way as does fontattr in AUI_CONTROL.

FONTFACE

S,32

in

Font typeface.

FONTSIZE

B,2

in

Font point size.

FPROTCLR

B,4

in

Foreground protected text color.

HFLAGMASK

B,2

in

Bitmap controlling interpretation of the TXC.flags# fields; ; same concept as for TXC.flagmask.

HFLAGS#

B,4

in

HTML flags. See TXFH1_xxx and TXFH2_xxx in ASHINC:XTEXT.DEF for bit flag definitions. Note that most options require that the source document format as well as the destination (see TXC.DOCFMT'SRC and TXC.DOCFMT'DST) have the TXFF_HTML flag set —i.e. they may not work when converting from one document type to another. Also, see the Comments under TXC.DOCFMT'DST for important notes relating to the TXF_PRINTFIEW and TXF_FITVIEW flags.

IDNAME

S,40

in

ctlname or parentname>ctlname

KBDSTR

S,11

in

Click code.

MAXBYTES

B,2

in

Maximum bytes allowed (0 = unlimited).

MAXROWS

B,2

in

Optional row count limit. If specified, a warning dialog will display when the limit is exceeded (as soon as it happens, periodically, and on exit). Text of dialog can be customized via SBRMSG.xxx 023,002 and 023,003.

MENUMASK1,

MENUMASK2

B,4

in

TXC.menumask1 and TXC.menumask2 allow individual items and groups of menus to be removed when the TXF_MENU and TXF_POPUP flags are used. See TXMF1_xxx and TXMF2_xxx in ASHINC:XTEXT.DEF for the bit flag definitions.

MGNBOTTOM*

B,2

in

Bottom margin (twips). Mainly of interest in TXF_PRINTVIEW mode.

MGNFOOTER*

B,2

in

Footer margin (twips). Mainly of interest in TXF_PRINTVIEW mode.

MGNHEADER*

B,2

in

Header margin (twips). Mainly of interest in TXF_PRINTVIEW mode.

MGNLEFT*

B,2

in

Left margin (twips). Mainly of interest in TXF_PRINTVIEW mode.

MGNRIGHT*

B,2

in

Right margin (twips). Mainly of interest in TXF_PRINTVIEW mode.

MGNTOP*

B,2

in

Top margin (twips). Mainly of interest in TXF_PRINTVIEW mode.

MODIFIED*

B,1

out

Non-zero if text buffer modified.

ORIENT

B,2

in

Orientation (0=dflt, 1=port, 2=land). Mainly of interest in TXF_PRINTVIEW mode.

OUTBYTES

B,4

out

Number of bytes output.

OUTINES

B,4

out

Number of lines output (or to be output).

OVERFLOW

B,1

out

Non-zero if text too big for dst param.

PAPERSIZE

B,2

in

Paper size (see DMPAPER_xxx). Mainly of interest in TXF_PRINTVIEW mode.

PARENTID

B,2

in

ID of parent of control (e.g. a dialog): 0 for a normal child control on the main window.

PROTROWS

B,4

in

Rows to protect (-1 = all, -2 all but last).

SAVEOFFSET

B,4

in/out

Position in buffer to start next save (or -1 to restart a previously incomplete save operation from the beginning).

SFLAGS

B,2

in

Search flags

SRCHKEY

S,30

in

String to search for

TIMEOUT

B,4

in

Milliseconds until timeout. The timer gets reset on keystrokes and on mouse activity within the control. If the timer expires, XTEXT will return EXITCODE=11 (like INFLD and XTREE) and any editing changes will be saved.

TOOLBARMASK

B,4

in

1's remove object from toolbar (see TXTB_xxx).

WRAPWIDTH

B,2

in

Width in characters for word wrap.

XCOL

B,2

in/out

Cursor column on exit and optionally on entrance (base 1). See TXF_POSCUR.

XCUROFFSET

B,4

in/out

Absolute cursor position on exit and optionally on entrance. (base 0)

XROW

B,4

in/out

Cursor row on exit and optionally on entrance (base 1). See TXF_POSCUR.

Definition file: xtext.sdf

 

* Warning: setting any of the margin fields has the probably-undesirable side effect of triggering the text-modified flag. This results in the "text has changed - do you want to save" message box appearing even when no changes have been made. You can eliminate the spurious message/question by setting the TXF8_ESC_SAVE bit in TXC.flags8, and you could use another exitcode to distinguish abort/discard from save, but it might be preferable to just eliminate the margins.