writeCharAttrib3
Cdk drawing functions
Part of cdk_draw(3).
Usage
cc [flag ...]
file ...
-lcdk
[library ...]
Overview
These functions perform useful drawing and attribute operations.
Available functions
boxWindow-
draw a box with on the window win. Like
attrbox, this function ORs attr with each character as it draws the box.
attrbox-
draw a box with on the window win letting the caller define each element of the box.
-
The parameters tlc, trc, blc, brc are used for the top-left, top-right, bottom-left and bottom-right corners respectively. The parameters horz and vert are used for the horizontal and vertical sides of the box. Any of these parameters may be zero. In that case, the function skips the corresponding element of the box.
-
The function ORs attr with each character as it draws the box.
drawObjBox-
Draw a box around the given window win using the object's defined line-drawing characters.
drawLine-
draw a line on the given window.
-
The parameters starty, startx are the starting coordinates. The parameters endy, endx are the ending coordinates. The function writes the data in line to each coordinate in that range including the start/end coordinates.
-
The function handles lines other than vertical or horizontal, but normally it is used for that, e.g., with line set to
ACS_HLINEorACS_VLINE.
drawShadow-
draw a shadow on the right and bottom edges of a window.
writeBlanks-
write a string of blanks, using
writeChar. The parameters are passed towriteCharas is. There is no correspondingwriteBlanksAttribfunction.
writeChar-
writes out a char * string without adding attributes. The parameters are passed to
writeCharAttribas is.
writeCharAttrib-
writes out a char * string with the given attributes added. The string is written to the given window, using its relative screen coordinates ypos and xpos.
-
Compare with
writeChtypeAttrib, which writes a chtype * string.
-
The function ORs the attribute attr with each item from the string. For instance, it may be
A_BOLD. The align parameter controls whether it is written horizontally (HORIZONTAL) or vertically (VERTICAL).
-
Finally, only a subset of the string is written. The function starts with the data from the start item of string, and ends before the end item. If start is greater than, or equal to end, no data is written.
writeChtype-
writes out a chtype * string without adding attributes. The parameters are passed to
writeChtypeAttribas is.
writeChtypeAttrib-
writes out a chtype * string with the given attributes added. The string is written to the given window, using its relative screen coordinates ypos and xpos. You would normally construct the string from a char * string using
char2Chtype(3).
-
The function ORs the attribute attr with each item from the string. For instance, it may be
A_BOLD. The align parameter controls whether it is written horizontally (HORIZONTAL) or vertically (VERTICAL).
-
Finally, only a subset of the string is written. The function starts with the data from the start item of string, and ends before the end item. If start is greater than, or equal to end, no data is written.
History
- Debian 13 (Trixie): the text shown here
- Debian 12 (Bookworm) to Debian 9 (Stretch)
- Debian 8 (Jessie) to Debian 7 (Wheezy)
- Debian 6.0 (Squeeze) to Debian 5.0 (Lenny)