The following options are not applicable to all EZ widgets. However, they are shared by all widgets that have labels and hence deserve to be listed here.
EZ_LABEL_STRING
This option sets/modifies the label string of a widget. If the
widget is currently viewable, it is updated immediately.
EZ_TEXT_LINE_LENGTH
This option sets the maximum line length, in characters, for a label.
If a label string is longer than this length, it will be broken
into multiple lines. The default value for this attribute is 30
characters.
EZ_FONT_NAME
This option sets the font for a label string. Valid value is a
a valid X11 font name specification. For example
"-Adobe-Helvetica-Bold-r-Normal--18-180-75-75-P-99-iso8859-1
"
EZ_FONT_ID
This option sets the font from a font id. A font id is an integer
returend by EZ_LoadXFont
.
int EZ_LoadXFont(char *fontName)
This function loads the X font specified by fontName
and
returns its internal identifier. In case it failes, it returns
0.
EZ_LABEL_POSITION
This option sets the anchor position of a label. It is used only
if a widget has a dimension larger than its minimal dimension.
Valid values are
EZ_CENTER
EZ_LEFT
EZ_RIGHT
EZ_TOP
EZ_BOTTOM
EZ_TOP_LEFT
EZ_TOP_RIGHT
EZ_BOTTOM_LEFT
EZ_BOTTOM_RIGHT
EZ_CENTER
.
EZ_LABEL_JUSTIFICATION
This option sets the justification of a textual label. Valid values are
EZ_CENTER
EZ_LEFT
EZ_RIGHT
EZ_LEFT
.
EZ_PIXMAP_FILE
This option sets a pixmap label from a file.
Valid value is a file name.
The file should contain a valid xpm image or
X bitmap image.
EZ_PIXMAP_DATA
This option sets a pixmap label from xpm data, a char **
that is a valid xpm image.
EZ_BITMAP_DATA
This option sets the bitmap label from bitmap data. This
option needs 3 values; char *data, int width, int height
.
EZ_IMAGE_FILE
This option sets an image label. Valid value is a file name.
Currently, EZwgl can only recognize images in gif, ppm
and xpm formats.
EZ_X_PIXMAP
This option sets a pixmap label from a native X pixmap.
It needs 5 values,
Pixmap pixmap
, int x, int y
, int width, int height
.
where pixmap
is a native X pixmap,
x, y, width, height
are the origin and size of
the portion of the pixmap to be used.
This is the only way to use a subimage
to label a widget.
pixmap
should be created by one of
XCreatePixmap
EZ_CreateXPixmapFromXpmData
EZ_CreateXPixmapFromXpmFile
EZ_CreateXPixmapFromBitmapFile
EZ_CreateXPixmapFromImageFile
EZ_LABEL_PIXMAP
This option sets up a pixmap label using EZwgl's
internal pixmap. Value must be created by one of
EZ_CreateLabelPixmapFromXpmFile
EZ_CreateLabelPixmapFromXpmData
EZ_CreateLabelPixmapFromXBitmapFile
EZ_CreateLabelPixmapFromXBitmapData
EZ_CreateLabelPixmapFromImageFile