1cdk_draw(3)                Library Functions Manual                cdk_draw(3)
2
3
4

NAME

6       cdk_draw - Cdk Drawing Functions
7

SYNOPSIS

9       cc [ flag ... ] file ...  -lcdk [ library ... ]
10
11       #include <cdk.h>
12
13       void boxWindow (
14                      WINDOW *window,
15                      chtype attr);
16
17       void attrbox ( WINDOW *win,
18                      chtype tlc,
19                      chtype trc,
20                      chtype blc,
21                      chtype brc,
22                      chtype horz,
23                      chtype vert,
24                      chtype attr);
25
26       void drawObjBox (
27                      WINDOW *win,
28                      CDKOBJS *object);
29
30       void drawLine (
31                      WINDOW *window,
32                      int startx,
33                      int starty,
34                      int endx,
35                      int endy,
36                      chtype line);
37
38       void drawShadow (
39                      WINDOW *shadowWin);
40
41       void writeBlanks (
42                      WINDOW *window,
43                      int xpos,
44                      int ypos,
45                      int align,
46                      int start,
47                      int end);
48
49       void writeChar (
50                      WINDOW *window,
51                      int xpos,
52                      int ypos,
53                      char *string,
54                      int align,
55                      int start,
56                      int end);
57
58       void writeCharAttrib (
59                      WINDOW *window,
60                      int xpos,
61                      int ypos,
62                      char *string,
63                      chtype attr,
64                      int align,
65                      int start,
66                      int end);
67
68       void writeChtype (
69                      WINDOW *window,
70                      int xpos,
71                      int ypos,
72                      chtype *string,
73                      int align,
74                      int start,
75                      int end);
76
77       void writeChtypeAttrib (
78                      WINDOW *window,
79                      int xpos,
80                      int ypos,
81                      chtype *string,
82                      chtype attr,
83                      int align,
84                      int start,
85                      int end);
86

DESCRIPTION

88       These functions perform useful drawing and attribute operations.
89

AVAILABLE FUNCTIONS

91       boxWindow
92            draw  a  box  with on the window win.  Like attrbox, this function
93            ORs attr with each character as it draws the box.
94
95       attrbox
96            draw a box with on the window win letting the caller  define  each
97            element of the box.
98
99            The  parameters tlc, trc, blc, brc are used for the top-left, top-
100            right, bottom-left and  bottom-right  corners  respectively.   The
101            parameters  horz and vert are used for the horizontal and vertical
102            sides of the box.  Any of these parameters may be zero.   In  that
103            case, the function skips the corresponding element of the box.
104
105            The function ORs attr with each character as it draws the box.
106
107       drawObjBox
108            Draw  a box around the given window win using the object's defined
109            line-drawing characters.
110
111       drawLine
112            draw a line on the given window.
113
114            The parameters starty, startx are the starting  coordinates.   The
115            parameters  endy,  endx  are the ending coordinates.  The function
116            writes the data in line to each coordinate in that range including
117            the start/end coordinates.
118
119            The  function handles lines other than vertical or horizontal, but
120            normally it is used for that, e.g., with line set to ACS_HLINE  or
121            ACS_VLINE.
122
123       drawShadow
124            draw a shadow on the right and bottom edges of a window.
125
126       writeBlanks
127            write  a  string  of  blanks, using writeChar.  The parameters are
128            passed to writeChar as  is.   There  is  no  corresponding  write‐
129            BlanksAttrib function.
130
131       writeChar
132            writes out a char * string without adding attributes.  The parame‐
133            ters are passed to writeCharAttrib as is.
134
135       writeCharAttrib
136            writes out a char * string with the given attributes  added.   The
137            string  is  written to the given window, using its relative screen
138            coordinates ypos and xpos.  Compare with writeChtypeAttrib,  which
139            writes a chtype * string.
140
141            The  function  ORs  the  attribute  attr  with  each item from the
142            string.  For instance, it may be A_BOLD.  The align parameter con‐
143            trols  whether  it  is written horizontally (HORIZONTAL) or verti‐
144            cally (VERTICAL).
145
146            Finally, only a subset  of  the  string  is  written,  i.e.,  from
147            indices start to end.
148
149       writeChtype
150            writes  out  a  chtype *  string  without  adding attributes.  The
151            parameters are passed to writeChtypeAttrib as is.
152
153       writeChtypeAttrib
154            writes out a chtype * string with the given attributes added.  The
155            string  is  written to the given window, using its relative screen
156            coordinates ypos and  xpos.   You  would  normally  construct  the
157            string from a char * string using char2Chtype (3).
158
159            The  function  ORs  the  attribute  attr  with  each item from the
160            string.  For instance, it may be A_BOLD.  The align parameter con‐
161            trols  whether  it  is written horizontally (HORIZONTAL) or verti‐
162            cally (VERTICAL).
163
164            Finally, only a subset  of  the  string  is  written,  i.e.,  from
165            indices start to end.
166

SEE ALSO

168       cdk(3), cdk_util(3)
169
170
171
172                                                                   cdk_draw(3)
Impressum