File: cdk_marquee.3

package info (click to toggle)
libcdk 4.9.9-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,876 kB
  • ctags: 2,249
  • sloc: ansic: 28,664; sh: 6,966; makefile: 211; cpp: 42
file content (254 lines) | stat: -rw-r--r-- 9,545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
.de It
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH cdk_marquee 3 "24 April 1997"
.SH NAME
newCDKMarquee, activateCDKMarquee, drawCDKMarquee, eraseCDKMarquee, 
setCDKMarqueeULChar, setCDKMarqueeURChar,
setCDKMarqueeLLChar, setCDKMarqueeLRChar,
setCDKMarqueeVerticalChar, setCDKMarqueeHorizontalChar,
setCDKMarqueeBoxAttribute,
setCDKMarqueeBackgroundColor,
destroyCDKMarquee \- Creates a managed curses marquee widget.
.SH SYNOPSIS
.LP
.B cc
.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
.B \-lcdk
.RI "[ " "library" " \|.\|.\|. ]"
.LP
#include <cdk.h>
.LP
.BI "CDKMARQUEE *newCDKMarquee (CDKSCREEN *" "cdkscreen",
.BI "int " "xpos",
.BI "int " "ypos",
.BI "int " "fieldWidth",
.BI "boolean " "shadow");
.LP
.BI "int activateCDKMarquee (CDKMARQUEE *" "marquee",
.BI "char *" "message",
.BI "int " "delay",
.BI "int " "repeat",
.BI "boolean " "box");
.LP
.BI "void setCDKMarqueeULChar (CDKMARQUEE *", "marquee",
.BI "chtype " "character");
.LP
.BI "void setCDKMarqueeURChar (CDKMARQUEE *", "marquee",
.BI "chtype " "character");
.LP
.BI "void setCDKMarqueeLLChar (CDKMARQUEE *", "marquee",
.BI "chtype " "character");
.LP
.BI "void setCDKMarqueeLRChar (CDKMARQUEE *", "marquee",
.BI "chtype " "character");
.LP
.BI "void setCDKMarqueeVerticalChar (CDKMARQUEE *", "marquee",
.BI "chtype " "character");
.LP
.BI "void setCDKMarqueeHorizontalChar (CDKMARQUEE *", "marquee",
.BI "chtype " "character");
.LP
.BI "void setCDKMarqueeBoxAttribute (CDKMARQUEE *", "marquee",
.BI "chtype " "character");
.LP
.BI "void setCDKMarqueeBackgroundColor (CDKMARQUEE *", "marquee",
.BI "char * " "color");
.LP
.BI "void moveCDKMarquee (CDKMARQUEE *" "marquee",
.BI "int " "box",
.BI "int " "box",
.BI "boolean " "relative",
.BI "boolean " "refresh");
.LP
.BI "void positionCDKMarquee (CDKMARQUEE *" "marquee");
.LP
.BI "void drawCDKMarquee (CDKMARQUEE *" "marquee",
.BI "boolean " "box");
.LP
.BI "void eraseCDKMarquee (CDKMARQUEE *" "marquee");
.LP
.BI "void destroyCDKMarquee (CDKMARQUEE *" "marquee");
.LP
.SH DESCRIPTION
The Cdk marquee widget creates a pop-up marquee window. The following are 
functions which create or manipulate the Cdk marquee widget.

.SH AVAILABLE FUNCTIONS
CDKMARQUEE *newCDKMarquee (CDKSCREEN *\f2screen\f1, int \f2xpos\f1, int \f2ypos\f1, int \f2fieldWidth\f1, boolean \f2shadow\f1);
.RS 3
This function creates a pointer to a marquee widget. The \f2screen\f1 parameter
is the screen you wish this widget to be placed in. The parameter \f2xpos\f1
controls the placement of the object along the horizontal axis. This parameter
can accept an integer value or one of the pre-defined values of \f4LEFT\f1,
\f4RIGHT\f1, and \f4CENTER\f1. The parameter \f2ypos\f1 controls the placement
of the object along the vertical axis. This parameter can accept an integer 
value or one of the pre-defined values of \f4TOP\f1, \f4BOTTOM\f1, and \f4CENTER\f1.
The \f2width\f1 parameter state how wide the field is to be. If you provide a
value of zero for the width, the widget will assume the full width of the
screen. If a negative value is provided, then the widget will assume the
full width of the screen minus the value provided. The \f2shadow\f1 parameter 
accepts a boolean value to turn the shadow on or off around this widget. If 
the widget could not be created then a \f4NULL\f1 pointer is returned.
.RE

int activateCDKMarquee (CDKMARQUEE *\f2marquee\f1, char *\f2message\f1, int \f2delay\f1, int \f2repeat\f1, boolean \f2box\f1);
.RS 3
This function activates the marquee widget. The \f2marquee\f1 parameter is a
pointer to a defined marquee widget. The \f2delay\f1 parameter states how long
to wait between movements. This value is highly dependent on each machine the
program runs on. The \f2repeat\f1 value tells the marquee widget how many times
to display the given message. The \f2box\f1 option draws the widget with or 
without a box. This function returns -1 if the message passed is \f4NULL\f1,
0 otherwise.
.RE

void setCDKMarqueeULChar (CDKMARQUEE *\f2marquee\f1, chtype \f2character\f1);
.RS 3
This function sets the upper left hand corner of the widgets box to
the given character.
.RE

void setCDKMarqueeURChar (CDKMARQUEE *\f2marquee\f1, chtype \f2character\f1);
.RS 3
This function sets the upper right hand corner of the widgets box to
the given character.
.RE

void setCDKMarqueeLLChar (CDKMARQUEE *\f2marquee\f1, chtype \f2character\f1);
.RS 3
This function sets the lower left hand corner of the widgets box to
the given character.
.RE

void setCDKMarqueeLRChar (CDKMARQUEE *\f2marquee\f1, chtype \f2character\f1);
.RS 3
This function sets the lower right hand corner of the widgets box to
the given character.
.RE

void setCDKMarqueeVerticalChar (CDKMARQUEE *\f2marquee\f1, chtype \f2character\f1);
.RS 3
This function sets the vertical drawing character for the box to
the given character.
.RE

void setCDKMarqueeHorizontalChar (CDKMARQUEE *\f2marquee\f1, chtype \f2character\f1);
.RS 3
This function sets the horizontal drawing character for the box to
the given character.
.RE

void setCDKMarqueeBoxAttribute (CDKMARQUEE *\f2marquee\f1, chtype \f2attribute\f1);
.RS 3
This function sets the attribute of the box.
.RE

void setCDKMarqueeBackgroundColor (CDKMARQUEE *\f2marquee\f1, char *\f2color\f1);
.RS 3
This sets the background color of the widget. The parameter \f2color\f1
is in the format of the Cdk format strings. To get more information look
at the \f4cdk_display\f1 manual page.
.RE

void moveCDKMarquee (CDKMARQUEE *\f2marquee\f1, int \f2xpos\f1, int \f2ypos\f1, boolean \f2relative\f1, boolean \f2refresh\f1);
.RS 3
This function moves the given widget to the given position. The parameters
\f2xpos\f1 and \f2ypos\f1 is the new position of the widget. The parameter
\f2xpos\f1 can accept an integer value or one of the pre-defined values of
\f4TOP\f1, \f4BOTTOM\f1, and \f4CENTER\f1. The parameter \f2ypos\f1 can 
accept an integer value or one of the pre-defined values of \f4LEFT\f1,
\f4RIGHT\f1, and \f4CENTER\f1. The parameter \f2relative\f1 states whether
the \f2xpos\f1/\f2ypos\f1 pair is a relative move or an absolute move. For
example if \f2xpos\f1 = 1 and \f2ypos\f1 = 2 and \f2relative\f1 = \f2TRUE\f1,
then the widget would move one row down and two columns right. If the value
of \f2relative\f1 was \f2FALSE\f1 then the widget would move to the position
(1,2). Do not use the values of \f4TOP\f1, \f4BOTTOM\f1, \f4LEFT\f1, 
\f4RIGHT\f1, or \f4CENTER\f1 when \f2relative\f1 = \f4TRUE\f1. (wierd things 
may happen). The final parameter \f2refresh\f1 is a boolean value which 
states whether the widget will get refreshed after the move or not.
.RE

void positionCDKMarquee (CDKMARQUEE *\f2marquee\f1);
.RS 3
This function allows the user to move the widget around the screen via the
cursor/keypad keys. The following key bindings can be used to move the
widget around the screen.
.LP
.nf
\f4Key Bindings\f1
.RS 3
\f2Key          Action\f1
Up Arrow     Moves the widget up one line.
Down Arrow   Moves the widget down one line.
Left Arrow   Moves the widget left one column
Right Arrow  Moves the widget right one column
Keypad-1     Moves the widget down one line
             and left one column.
Keypad-2     Moves the widget down one line.
Keypad-3     Moves the widget down one line
             and right one column.
Keypad-4     Moves the widget left one column
Keypad-5     Centers the widget both vertically
             and horizontally.
Keypad-6     Moves the widget right one column
Keypad-7     Moves the widget up one line
             and left one column.
Keypad-8     Moves the widget up one line.
Keypad-9     Moves the widget up one line
             and right one column.
t            Moves the widget to the top of the screen.
b            Moves the widget to the bottom of the screen.
l            Moves the widget to the left of the screen.
r            Moves the widget to the right of the screen.
c            Centers the widget between the left and 
             right of the window.
C            Centers the widget between the top and 
             bottom of the window.
Escape       Returns the widget to it's original position.
Return       Exits the function and leaves the widget
             where it was.
.fi
.RE
.RS 3
.LP
Keypad means that if the keyboard you are using has a keypad, then the
Num-Lock light has to be on in order to use the keys as listed. (The
numeric keys at the top of the keyboard will work as well.)
.LP
void drawCDKMarquee (CDKMARQUEE *\f2marquee\f1, boolean \f2box\f1);
.RS 3
This function draws the marquee widget on the screen. The \f2box\f1 option 
draws the widget with or without a box.
.RE

void eraseCDKMarquee (CDKMARQUEE *\f2marquee\f1);
.RS 3
This function removes the widget from the screen. This does \f4NOT\f1 destroy
the widget.
.RE

void destroyCDKMarquee (CDKMARQUEE *\f2marquee\f1);
.RS 3
This function removes the widget from the screen and frees up any memory the
object may be using.
.RE

.SH SEE ALSO
.BR cdk (3),
.BR cdk_binding (3),
.BR cdk_display (3),
.BR cdk_screen (3)
.SH NOTES
.PP
The header file \f4<cdk.h>\f1 automatically includes the header files
\f4<curses.h>\f1, \f4<stdlib.h>\f1, \f4<string.h>\f1, \f4<ctype.h>\f1,
\f4<unistd.h>\f1, \f4<dirent.h>\f1, \f4<time.h>\f1, \f4<errno.h>\f1,
\f4<pwd.h>\f1, \f4<grp.h>\f1, \f4<sys/stat.h>\f1, and \f4<sys/types.h>\f1.
The \f4<curses.h>\f1 header file includes \f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.PP
If you have \f4Ncurses\f1 installed on your machine add -DNCURSES to the 
compile line to include the Ncurses header files instead.