932.1.1
(Windows/ATE) Fix a annoyance with combo boxes positioned just slightly above an XTREE disappearing while the XTREE is visible.
932.1.2
(Windows/ATE) Checkbox controls created with INFLD may now contain more text in the label portion than would otherwise be allowed by the number of columns. This allows you to squeeze longer labels into a shorter space, but increases the risk of them being truncated when displaying in a lower resolution or DPI.
932.0.1
(Windows/ATE) Introduce another new GDI printing command:
//TEXTRECTANGLE, left, top, right, bottom
bla bla bla bla bla bla bla bling
bla bla bla bla bla bla
//TEXTRECTANGLE
This command is similar to the //TEXTINDENT command, both in what it is used for and also in the fact that it consists of a starting and ending command (the ending command has no arguments), with any number of lines of text in between the two.
//TEXTRECTANGLE formats the text (up to the ending //TEXTRECTANGLE) to fit in within the rectangular coordinates provided, applying word wrap to the lines as needed. Note that any existing CRLF line terminators will be respected; in the example above, the word "bling" will mark the end of a line, no matter how the rest of it formats.
If the text does not all fit in the rectangle, the last word will be printed with an ellipsis (...) following it. See MIAMEX,MX_GDICALC below for information on calculating in advance how much text will fit.
See the EXLIB program MMOGDI for an example.
932.0.2
(Windows/ATE) A new MIAMEX function (148 or MX_GDICALC) performs various calculations on the length and/or height of a string as it will appear when printed. In the case of a rectangle, it will also break the string into two parts, the first of which will fit within the rectangle (leaving the second part to be printed in another space or on the next page).
xcall MIAMEX, MX_GDICALC, op, handle, status {,params}
The handle variable (F6 or B4) is returned by the open operation (OP 1) and must be specified to all the others. status will be returned from each operation, with 0=success; all others are errors, with the most typical being:
Error |
Description |
---|---|
-1 |
Unable to open printer context (bad printer name or failure to first open printer) |
-2 |
Bad map mode |
-3 |
Error setting font |
-4 |
Insufficient number of parameters passed |
-5 |
Illegal opcode |
others |
Negative of the system error number |
OP 1 (MXGDI_OPENPTR) Open a printer device context.
xcall MIAMEX, MX_GDICALC, mxgdi_openptr, handle, status, printer, mapmode
PRINTER (string) may be any form of printer name allowed by SPOOL.SBR (e.g. a null string for the A-Shell or Windows default; a printer init file name, a printer share name, or a printer local driver name). MAPMODE must be one of the map modes allowed in the GDI //SETMAPMODE statement (LOENGLISH, HIENGLISH, LOMETRIC, HIMETRIC, TEXT, TWIPS, DECIPOINTS).
OP 2 (MXGDI_SETFONT) Choose a font
xcall MIAMEX, MX_GDICALC, mxgdi_setfont, handle, status, pointsz, {,face, pitchfam, charset, wt, style}
This is equivalent to the GDI //SETFONT statement (which see in the Development Guide for parameter information). Once the font is set, it remains set until changed with another OP 2 call.
OP 3 (MXGDI_CALCRECT) Calculate rectangular text metrics
xcall MIAMEX, MX_GDICALC, mxgdi_calcrect, handle, status, lft, top, rght, btm, memo$, height, overflow$
OP 3 calculates how much of the text in the MEMO$ variable will fit inside the rectangle defined by LFT,TOP,RGHT,BTM. If it all fits, then HEIGHT will be returned set to the height needed. Otherwise, MEMO$ will be truncated at the length that will fit, and the remainder will be returned in OVERFLOW$. HEIGHT will be set to BTM-TOP (i.e. the height of the specified rectangular area.) This command is useful in conjunction with //TEXTRECTANGLE for determining in advance how tall the rectangle must be (either for drawing a border rectangle with //RECTANGLE, or for breaking a long memo in half, putting the remainder on another page.)
OP 4 (MXGDI_CALCLEN) Calculate length of a string
xcall MIAMEX, MX_GDICALC, mxgdi_calclen, handle, status, memo$, length
OP 4 is similar to OP 3, but just tells you how long the specified string will be when printed in the current printer/font. MEMO$ is assumed to be a simple string with no embedded CRLF characters.
OP 5 (MXGDI_CLOSEPTR) Close printer context
xcall MIAMEX, MX_GDICALC, mxgdi_closeptr, handle, status
OP 5 closes the printer context, and MUST be done before printing to it.
See the sample program MMOGDI.BP and the updated sample text file TSTGDI.TXT in the EXLIB for examples of using XCALL MIAMEX,MX_GDICALC and /TEXTRECTANGLE.
932.0.3
(Window/ATE) TAB(-10,23);<windows-command>;chr(127); now supports a new macro $DEL to delete a file. For example:
? TAB(-10,23);"$DEL %ATELOCALDIR%\myfile.dat";chr(127);
input "",A
This would delete the file myfile.dat from the directory specified by the environment variable ATELOCALDIR (which is set by ATE to point to its FTP Local Directory). The return code is CR for success or ^C for failure. Note that a non-existent file is treated as success, so the only error would be if the file existed but could not be deleted.