SYNTAX
XSWidget *wid;
DESCRIPTION
XSWidget is a typedef to a complex struct of private and public variables and describe a hierarchical tree of widgets to XSTEP toolkit. All widgets are liked to X server screens or windows and a complet set of X informations are available:
wid->display X display pointer wid->screen X screen number wid->window X window id wid->gc X graphic context id wid->width width of window wid->height height of window wid->font font of graphic context wid->fgcolor foreground color of graphic context wid->bgcolor background color of graphic context and window wid->name text name of widget wid->type XSTEP id of widget wid->depth depth of window wid->event global event information of display wid->pixmap stack of pixmaps (see XSPixmap) wid->text stack of texts (see XSText) wid->global display informations (see XSGlobal) wid->status widget statusAll XSWidgets are in widget stacks. These stacks are linked in the child pointer of screens and windows, you can scan the widget tree in any direction:
wid->desktop screen when this widget is mapped wid->parent parent widget wid->child child widget stack wid->next next widget in the stack wid->last last widget in the stack wid->group widget group leader of application wid->viewport viewport of scroll widgetAll stacks are NULL terminated.
Any XSWidget will reflect the color information available in the screen. A white pixel and black pixel will exist in any screen, gray and darkgray pixels will exist in 4-bit or better screens and a fixed colormap will be available in 8-bit screens:
wid->colormap fixed colormap for 8 bit screens wid->white white pixel of screen wid->black black pixel of screen wid->gray gray pixel of screen wid->darkgray darkgray pixel of screenAny color can be selected with XSTEP auxiliar functions XSColor (recommended) and XSNamedColor or any X color function.
A basic set of fonts is available:
wid->helvetica12m helvetica-medium size 12 wid->helvetica12b helvetica-bold size 12 wid->helvetica24b helvetica-bold size 24 wid->courier12m fixed width, courier-medium size 12For normal applications, Helvetica-medium-12 is the default font, for special texts, Helvetica-bold-12 and for big texts Helvetica-bold-24. In special situations a fixed width font can be used and Courier-medium-12 is available. You can select any other font from your X server with XLoadQueryFont():
XSWidget *d; d=XSDesktop(":0",argv,argc); d->font=XLoadQueryFont(d->display,"-*-avalon-medium-r-*-*-12-*-*-*-*-*-*-*");All XSWidgets can have callback functions actived by X server events, see XSCheckEvent for more detail.