VSetTextLoc
Name
VSetTextLoc - sets the location of the Text (Tablet) Item within a window.
Synopsis
VSetTextLoc(item, x, y)
TEXT *item;
int x, y;
Description
VSetTextLoc sets the location of the Text (Tablet) Item within a window. The
location is relative to the window coordinate system. VSetTextLoc redisplays
the tablet if it is ON.
Structures
typedef struct _text {
Window win; /*window in which item resides*/
GC *gc;
int x,y; /*location of upper-left corner of item*/
int w; /*width of the total item area in fonts*/
int h; /*height of the total item area in PIXELS*/
short label_width; /*width of label in pixels*/
short label_height; /*height of label*/
short label_ascent; /*ascent dimension of font*/
short label_x; /*position of the label*/
short label_y;
int thick; /*thickness of the frame of the item*/
int width; /*current width of item in pixels*/
int fw,fh; /*size of font*/
char label[150]; /*label of the text item*/
char value[200]; /*value of the text item*/
int pos; /*pos indicates the index of the first VALUE*/
int state; /*indicates if text item is OFF(0) or ON(1)*/
int mode; /*text item is DISABLED(0) or ENABLED (1)*/
int (*func)(); /*notify procedure*/
struct _text *next; /*next text item*/
XFontStruct *font_struct; /*Font used on the window*/
} TEXT;
Return Value
0 - work successfully.
266 - invalid Text Item ID.
Parameters
item - Text Item ID.
x, y - new location of the Text Item (with respect to the Item window); if
the point is outside the window it is ignored.
Side Effects
Changes the x,y fields in the Text Item refered to by ID.
Entry Conditions
VCreateColormap should be called earlier, else VSetTextLoc prints an
error message to the standard error stream, produces a core dump file and
exits from the current process.
Related Functions
VAddText.