7
* Description of the widget:
12
* Copyright 1999, Mike Glover
13
* All rights reserved.
15
* Redistribution and use in source and binary forms, with or without
16
* modification, are permitted provided that the following conditions
18
* 1. Redistributions of source code must retain the above copyright
19
* notice, this list of conditions and the following disclaimer.
20
* 2. Redistributions in binary form must reproduce the above copyright
21
* notice, this list of conditions and the following disclaimer in the
22
* documentation and/or other materials provided with the distribution.
23
* 3. All advertising materials mentioning features or use of this software
24
* must display the following acknowledgment:
25
* This product includes software developed by Mike Glover
27
* 4. Neither the name of Mike Glover, nor the names of contributors
28
* may be used to endorse or promote products derived from this software
29
* without specific prior written permission.
31
* THIS SOFTWARE IS PROVIDED BY MIKE GLOVER AND CONTRIBUTORS ``AS IS'' AND
32
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34
* ARE DISCLAIMED. IN NO EVENT SHALL MIKE GLOVER OR CONTRIBUTORS BE LIABLE
35
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45
* Declare any definitions you need to make.
47
#define MAX_LABEL_ROWS 300
50
* Declare the CDK label structure.
57
chtype *info[MAX_LABEL_ROWS];
58
int infoLen[MAX_LABEL_ROWS];
59
int infoPos[MAX_LABEL_ROWS];
74
typedef struct SLabel CDKLABEL;
77
* This creates a new CDK label widget.
79
CDKLABEL *newCDKLabel (
80
CDKSCREEN * /* screen */,
86
boolean /* shadow */);
89
* This was added to make the builder simpler. All this will
90
* do is call drawCDKLabel.
92
void activateCDKLabel (
93
CDKLABEL * /* label */,
94
chtype * /* actions */);
97
* This sets multiple attributes of the widget.
100
CDKLABEL * /* label */,
101
char ** /* message */,
106
* This sets the contents of the label.
108
void setCDKLabelMessage (
109
CDKLABEL * /* label */,
112
chtype **getCDKLabelMessage (
113
CDKLABEL * /* label */,
117
* This sets the box attribute of the widget.
119
void setCDKLabelBox (
120
CDKLABEL * /* label */,
122
boolean getCDKLabelBox (
123
CDKLABEL * /* label */);
126
* This draws the label.
128
#define drawCDKLabel(obj,Box) drawCDKObject(obj,Box)
131
* These functions set the drawing characters of the widget.
133
void setCDKLabelULChar (
134
CDKLABEL * /* label */,
135
chtype /* character */);
137
void setCDKLabelURChar (
138
CDKLABEL * /* label */,
139
chtype /* character */);
141
void setCDKLabelLLChar (
142
CDKLABEL * /* label */,
143
chtype /* character */);
145
void setCDKLabelLRChar (
146
CDKLABEL * /* label */,
147
chtype /* character */);
149
void setCDKLabelVerticalChar (
150
CDKLABEL * /* label */,
151
chtype /* character */);
153
void setCDKLabelHorizontalChar (
154
CDKLABEL * /* label */,
155
chtype /* character */);
157
void setCDKLabelBoxAttribute (
158
CDKLABEL * /* label */,
159
chtype /* character */);
162
* This sets the background color of the widget.
164
void setCDKLabelBackgroundColor (
165
CDKLABEL * /* label */,
169
* This erases the label.
171
#define eraseCDKLabel(obj) eraseCDKObject(obj)
174
* This destroys the label and the memory used by it.
176
void destroyCDKLabel (
177
CDKLABEL * /* label */);
180
* This draws the label then waits for the user to press
181
* the key defined by the 'key' parameter.
184
CDKLABEL * /* label */,
188
* This moves the label.
190
#define moveCDKLabel(obj,xpos,ypos,relative,refresh) moveCDKObject(obj,xpos,ypos,relative,refresh)
193
* This allows the user to interactively position the label.
195
#define positionCDKLabel(widget) positionCDKObject(ObjOf(widget),widget->win)
197
#endif /* CDKLABEL_H */