+update_widget_face (widget_value* wv, Lisp_Image_Instance *ii,
+ Lisp_Object domain)
+{
+#ifdef LWLIB_WIDGETS_MOTIF
+ XmFontList fontList;
+#endif
+ /* Update the foreground. */
+ Lisp_Object pixel = FACE_FOREGROUND
+ (IMAGE_INSTANCE_WIDGET_FACE (ii),
+ domain);
+ XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)), bcolor;
+ lw_add_widget_value_arg (wv, XtNforeground, fcolor.pixel);
+
+ /* Update the background. */
+ pixel = FACE_BACKGROUND (IMAGE_INSTANCE_WIDGET_FACE (ii),
+ domain);
+ bcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel));
+ lw_add_widget_value_arg (wv, XtNbackground, bcolor.pixel);
+
+#ifdef LWLIB_WIDGETS_MOTIF
+ fontList = XmFontListCreate
+ (FONT_INSTANCE_X_FONT
+ (XFONT_INSTANCE (query_string_font
+ (IMAGE_INSTANCE_WIDGET_TEXT (ii),
+ IMAGE_INSTANCE_WIDGET_FACE (ii),
+ domain))), XmSTRING_DEFAULT_CHARSET);
+ lw_add_widget_value_arg (wv, XmNfontList, (XtArgVal)fontList);
+#endif
+ lw_add_widget_value_arg
+ (wv, XtNfont, (XtArgVal)FONT_INSTANCE_X_FONT
+ (XFONT_INSTANCE (query_string_font
+ (IMAGE_INSTANCE_WIDGET_TEXT (ii),
+ IMAGE_INSTANCE_WIDGET_FACE (ii),
+ domain))));
+}
+
+static void
+update_tab_widget_face (widget_value* wv, Lisp_Image_Instance *ii,
+ Lisp_Object domain)
+{
+ if (wv->contents)
+ {
+ widget_value* val = wv->contents, *cur;
+
+ /* Give each child label the correct foreground color. */
+ Lisp_Object pixel = FACE_FOREGROUND
+ (IMAGE_INSTANCE_WIDGET_FACE (ii),
+ domain);
+ XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel));
+ lw_add_widget_value_arg (val, XtNtabForeground, fcolor.pixel);
+
+ for (cur = val->next; cur; cur = cur->next)
+ {
+ if (cur->value)
+ {
+ lw_copy_widget_value_args (val, cur);
+ }
+ }
+ }
+}
+
+static void