DESIGN (kwidgets) functions


LIBRARY ROUTINE

xvw_create_label - create a label object

LIBRARY CALL

xvobject xvw_create_label(
   xvobject parent,
   char     *name)

INPUT

OUTPUT

none

RETURN VALUE

The label object on success, NULL on failure

DESCRIPTION

A label object is for the display of non-editable text on Khoros graphical user interfaces. If desired, a label object may also display a pixmap, in addition to the text. The label object supports multiline text; simply include "\n" in the text to indicate the end of a line. Label text and pixmaps may be left, center, or right justified.

There are three major differences between a label object and a text object. Firstly, a label object is a gadget; ie, it has no window of its own, but uses the window of its parent. A text object, on the other hand, is a widget; it has a dedicated window of its own. Secondly, the label object supports the display of non-editable text only; the text displayed by a text object can be edited by the user unless it is explicitly handled by the application via the paste callback, irregardless if a cursor is displayed. Thirdly, the label object is implemented as part of Khoros GUI services; the text object, use the label as a subpart in order to provide editability. For most non-editable text display uses, a label object is preferable, and has the advantage that it is much faster to refresh than a text object.

The difference between a label object and a string object is that the label object is meant for display of text on graphical user interfaces, while the string object is an annotation, meant for display of text on images, area objects, and so on.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DESIGN/objects/library/kwidgets/src/Label.c

SEE ALSO

kwidgets(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.