~ubuntu-branches/ubuntu/trusty/libcdk5/trusty

« back to all changes in this revision

Viewing changes to man/cdk_draw.3

  • Committer: Bazaar Package Importer
  • Author(s): John Goerzen
  • Date: 2007-06-06 03:54:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070606035431-ba4gdvw0h6ybffsu
Tags: 5.0.20060507-1
* New upstream release.
* Fixed header patching.  Patch from Robert Schiele.
  Closes: #402978, #416336.
* Update widget count in description.  Closes: #294709.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" $Id: cdk_draw.3,v 1.3 2005/12/30 22:45:48 tom Exp $
 
2
.de XX
 
3
..
 
4
.TH cdk_draw 3
 
5
.XX boxWindow
 
6
.XX attrbox
 
7
.XX drawObjBox
 
8
.XX drawLine
 
9
.XX drawShadow
 
10
.XX writeBlanks
 
11
.XX writeChar
 
12
.XX writeCharAttrib
 
13
.XX writeChtype
 
14
.XX writeChtypeAttrib
 
15
.SH NAME
 
16
cdk_draw \- Cdk Drawing Functions
 
17
.SH SYNOPSIS
 
18
.LP
 
19
.B cc
 
20
.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
 
21
.B \-lcdk
 
22
.RI "[ " "library" " \|.\|.\|. ]"
 
23
.LP
 
24
#include <cdk.h>
 
25
.nf
 
26
.TP 15
 
27
.B "void boxWindow ("
 
28
.BI "WINDOW *" "window",
 
29
.BI "chtype " "attr");
 
30
.TP 15
 
31
.B "void attrbox ("
 
32
.BI "WINDOW *" "win",
 
33
.BI "chtype " "tlc",
 
34
.BI "chtype " "trc",
 
35
.BI "chtype " "blc",
 
36
.BI "chtype " "brc",
 
37
.BI "chtype " "horz",
 
38
.BI "chtype " "vert",
 
39
.BI "chtype " "attr");
 
40
.TP 15
 
41
.B "void drawObjBox ("
 
42
.BI "WINDOW *" "win",
 
43
.BI "CDKOBJS *" "object");
 
44
.TP 15
 
45
.B "void drawLine ("
 
46
.BI "WINDOW *" "window",
 
47
.BI "int " "startx",
 
48
.BI "int " "starty",
 
49
.BI "int " "endx",
 
50
.BI "int " "endy",
 
51
.BI "chtype " "line");
 
52
.TP 15
 
53
.B "void drawShadow ("
 
54
.BI "WINDOW *" "shadowWin");
 
55
.TP 15
 
56
.B "void writeBlanks ("
 
57
.BI "WINDOW *" "window",
 
58
.BI "int " "xpos",
 
59
.BI "int " "ypos",
 
60
.BI "int " "align",
 
61
.BI "int " "start",
 
62
.BI "int " "end");
 
63
.TP 15
 
64
.B "void writeChar ("
 
65
.BI "WINDOW *" "window",
 
66
.BI "int " "xpos",
 
67
.BI "int " "ypos",
 
68
.BI "char *" "string",
 
69
.BI "int " "align",
 
70
.BI "int " "start",
 
71
.BI "int " "end");
 
72
.TP 15
 
73
.B "void writeCharAttrib ("
 
74
.BI "WINDOW *" "window",
 
75
.BI "int " "xpos",
 
76
.BI "int " "ypos",
 
77
.BI "char *" "string",
 
78
.BI "chtype " "attr",
 
79
.BI "int " "align",
 
80
.BI "int " "start",
 
81
.BI "int " "end");
 
82
.TP 15
 
83
.B "void writeChtype ("
 
84
.BI "WINDOW *" "window",
 
85
.BI "int " "xpos",
 
86
.BI "int " "ypos",
 
87
.BI "chtype *" "string",
 
88
.BI "int " "align",
 
89
.BI "int " "start",
 
90
.BI "int " "end");
 
91
.TP 15
 
92
.B "void writeChtypeAttrib ("
 
93
.BI "WINDOW *" "window",
 
94
.BI "int " "xpos",
 
95
.BI "int " "ypos",
 
96
.BI "chtype *" "string",
 
97
.BI "chtype " "attr",
 
98
.BI "int " "align",
 
99
.BI "int " "start",
 
100
.BI "int " "end");
 
101
.fi
 
102
.SH DESCRIPTION
 
103
These functions perform useful drawing and attribute operations.
 
104
.SH AVAILABLE FUNCTIONS
 
105
.TP 5
 
106
.B boxWindow
 
107
draw a box with on the window \fIwin\fP.
 
108
Like \fBattrbox\fP, 
 
109
this function ORs \fIattr\fP with each character as it draws the box.
 
110
.TP 5
 
111
.B attrbox
 
112
draw a box with on the window \fIwin\fP
 
113
letting the caller define each element of the box.
 
114
.IP
 
115
The parameters \fItlc\fP, \fItrc\fP, \fIblc\fP, \fIbrc\fP
 
116
are used for the
 
117
top-left,
 
118
top-right,
 
119
bottom-left and
 
120
bottom-right corners respectively.
 
121
The parameters
 
122
\fIhorz\fP and
 
123
\fIvert\fP
 
124
are used for the horizontal and vertical sides of the box.
 
125
Any of these parameters may be zero.
 
126
In that case, the function skips the corresponding element of the box.
 
127
.IP
 
128
The function ORs \fIattr\fP with each character as it draws the box.
 
129
.TP 5
 
130
.B drawObjBox
 
131
Draw a box around the given window \fIwin\fP
 
132
using the \fIobject\fP's defined line-drawing characters.
 
133
.TP 5
 
134
.B drawLine
 
135
draw a line on the given window.
 
136
.IP
 
137
The parameters \fIstarty\fP, \fIstartx\fP are the starting coordinates.
 
138
The parameters \fIendy\fP, \fIendx\fP are the ending coordinates.
 
139
The function writes the data in \fIline\fP to each coordinate in that
 
140
range including the start/end coordinates.
 
141
.IP
 
142
The function handles lines other than vertical or horizontal,
 
143
but normally it is used for that, e.g., with \fIline\fP set to
 
144
\fBACS_HLINE\fP or \fBACS_VLINE\fP.
 
145
.TP 5
 
146
.B drawShadow
 
147
draw a shadow on the right and bottom edges of a window.
 
148
.TP 5
 
149
.B writeBlanks
 
150
write a string of blanks, using \fBwriteChar\fP.
 
151
The parameters are passed to \fBwriteChar\fP as is.
 
152
There is no corresponding \fBwriteBlanksAttrib\fP function.
 
153
.TP 5
 
154
.B writeChar
 
155
writes out a \fBchar\ *\fP string without adding attributes.
 
156
The parameters are passed to \fBwriteCharAttrib\fP as is.
 
157
.TP 5
 
158
.B writeCharAttrib
 
159
writes out a \fBchar\ *\fP string with the given attributes added.
 
160
The string is written to the given \fIwindow\fP,
 
161
using its relative screen coordinates \fIypos\fP and \fIxpos\fP.
 
162
Compare with \fBwriteChtypeAttrib\fP, which writes a \fBchtype\ *\fP string.
 
163
.IP
 
164
The function ORs the attribute \fIattr\fP with each item from the string.
 
165
For instance, it may be \fBA_BOLD\fP.
 
166
The \fIalign\fP parameter controls whether it is written horizontally
 
167
(\fBHORIZONTAL\fP) or vertically (\fBVERTICAL\fP).
 
168
.IP
 
169
Finally, only a subset of the string is written,
 
170
i.e., from indices \fIstart\fP to \fIend\fP.
 
171
.TP 5
 
172
.B writeChtype
 
173
writes out a \fBchtype\ *\fP string without adding attributes.
 
174
The parameters are passed to \fBwriteChtypeAttrib\fP as is.
 
175
.TP 5
 
176
.B writeChtypeAttrib
 
177
writes out a \fIchtype\ *\fP string with the given attributes added.
 
178
The string is written to the given \fIwindow\fP,
 
179
using its relative screen coordinates \fIypos\fP and \fIxpos\fP.
 
180
You would normally construct the string from a \fIchar\ *\fP string
 
181
using \fBchar2Chtype\fP (3).
 
182
.IP
 
183
The function ORs the attribute \fIattr\fP with each item from the string.
 
184
For instance, it may be \fBA_BOLD\fP.
 
185
The \fIalign\fP parameter controls whether it is written horizontally
 
186
(\fBHORIZONTAL\fP) or vertically (\fBVERTICAL\fP).
 
187
.IP
 
188
Finally, only a subset of the string is written,
 
189
i.e., from indices \fIstart\fP to \fIend\fP.
 
190
.
 
191
.SH SEE ALSO
 
192
.BR cdk (3),
 
193
.BR cdk_util (3)