xcall MIAMEX, MX_SINK, opcode, srow, scol, erow, ecol, bgc
MX_SINK (MIAMEX 126) creates or removes a sunken effect for the specified rectangular area by drawing or removing a border with shading to give it a beveled effect. This is the same routine used by INFLD (when in text mode) to give the field being edited the appearance of being slightly sunken. You can also get this effect by using the MBF_SUNKEN flag with AUI_CONTROL to create a static text control with that style, but in that case, you cannot freely write on top of the control. With MX_SINK, the effect does not conflict with character-level I/O to that screen area, which is why it works with INFLD in text mode only.
Note, however, that the effect depends on the beveling feature being enabled; see links below for details.
Parameters
opcode (Num) [in]
Value |
Operation |
Description |
---|---|---|
0 |
Unsink |
Remove the border which gave it the sunken appearance |
1 |
Sink |
Apply a 3D border to give the rectangle the appearance of being sunken. See example below. |
srow,scol,erow,ecol (Num) [in]
coordinates (integer rows and columns only, no millirows or millicolumns) of the rectangular box to be sunk or unsunk.
bgc (Num) [in]
The palette index number for the desired background color. -1 indicates the current background color for that area. 0-7 are normal intensity background colors; 8-15 are reduced intensity. (See menu Settings > Colors for the colors currently associated with those palette numbers.) Note that in almost all cases, the best choice is to set bgc to match the background of the screen area in question; typically -1 will accomplish that, unless the screen has multiple background colors.
Examples
This first image shows the sunken effect in INFLD. Note that the effect is disabled by GUI mode, type |G as well as by types i , |_ and |p.
This next example is from the test program MIAMEX in EXLIB:[908,30] which illustrates sinking and unsinking a text area.
See Also
History
2023 December, A-Shell 1752.2: Coordinate mismatch corrected.