| | +--- seq (box) --------------------+ | |
| | | seq_label seq_image | | |
| | +----------------------------------+ | |
+ | | +--- code (box) -------------------+ | |
+ | | | code_label code_list ... | | |
+ | | +----------------------------------+ | |
| +--------------------------------------+ |
+------------------------------------------+ */
Widget shell, frame;
Widget navi_area, FIRST, PREV, prev, range, next, NEXT, LAST;
Widget glyph_area, glyph[128], index_label[8];
Widget uvs_area, uvs_label;
-Widget render_area, clear, del, bidi, alt_subst, raw, seq;
-Widget raw_label, raw_image, seq_label, seq_image;
+Widget render_area, clear, del, bidi, alt_subst, raw, seq, code;
+Widget raw_label, raw_image, seq_label, seq_image, code_label, code_list;
unsigned long foreground, background;
typedef struct
else
base = g, base_width = advance;
}
- free (gstring.glyphs);
XtSetArg (arg[0], XtNbitmap, seq_pixmap);
XtSetValues (seq_image, arg, 1);
+
+ if (gstring.used > 0)
+ {
+ char *buf = alloca (gstring.used * 5);
+
+ sprintf (buf, "%04X", gstring.glyphs[0].glyph_id);
+ for (i = 1; i < gstring.used; i++)
+ sprintf (buf + 4 + (i - 1) * 5, " %04X", gstring.glyphs[i].glyph_id);
+ XtSetArg (arg[0], XtNlabel, buf);
+ XtSetValues (code_list, arg, 1);
+ }
+
+ free (gstring.glyphs);
}
XtSetArg (arg[1], XtNbitmap, seq_pixmap);
seq_image = XtCreateManagedWidget ("seq-image", labelWidgetClass,
seq, arg, 2);
+ XtSetArg (arg[6], XtNfromVert, seq);
+ code = XtCreateManagedWidget ("code", boxWidgetClass, render_area, arg, 7);
+ XtSetArg (arg[0], XtNborderWidth, 0);
+ XtSetArg (arg[1], XtNlabel, "code:");
+ code_label = XtCreateManagedWidget ("code-label", labelWidgetClass,
+ code, arg, 2);
+ XtSetArg (arg[1], XtNlabel, "");
+ XtSetArg (arg[2], XtNwidth, render_width);
+ code_list = XtCreateManagedWidget ("code-list", labelWidgetClass,
+ code, arg, 3);
XtInstallAllAccelerators (shell, shell);
}