Assuming that your widget provides code for the four resources described in the previous section, the XmStringDraw function is a good choice for rendering the text onto the screen. The XmStringDraw function takes 11 arguments, 4 of which are the values of the resources described in the previous section.
For example, the ExmString widget calls XmStringDraw inside its DrawVisual method. The call appears as follows:
/* If the compound string is not NULL and if there is enough space in the widget to draw at least a little portion of the compound string, then render the string with XmStringDraw. */ if (sw->string.compound_string && (sw->simple.visual.width != 0) && (sw->simple.visual.height != 0)) { XmStringDraw (XtDisplay(sw), XtWindow(sw), sw->string.render_table, sw->string.compound_string, wc->simple_class.select_gc(w), sw->simple.visual.x, sw->simple.visual.y, sw->simple.visual.width, sw->string.alignment, sw->primitive.layout_direction, NULL); ...