From bf40bc427bf292f450654ae2ab1195428caa00b1 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 18 May 2010 07:54:20 +0000 Subject: [PATCH] (create_otf_script_widgets): Create a box widget for each script in a limited-width box. --- example/otfview.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/example/otfview.c b/example/otfview.c index 481c964..82c3cfe 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -85,6 +85,9 @@ XtAppContext context; | | idxh[7] glyph[112] ... glyph[127]| | | | idxl[0] ... idxl[15] | | | +--------------------------------------+ | + | +--- script_area (box) ----------------+ | + | | script(langsys) DFLT ... | | + | +--------------------------------------+ | | +---- uvs_area (box) (optional) -------+ | | | uvs[?].w ... | | | +--------------------------------------+ | @@ -1252,15 +1255,20 @@ create_otf_script_widgets (Widget prev) } else { + Widget box; + XtSetArg (arg[0], XtNborderWidth, 0); + XtSetArg (arg[1], XtNwidth, render_width - (FONT_WIDTH * 15)); + XtSetArg (arg[2], XtNorientation, XtorientHorizontal); + box = XtCreateManagedWidget ("scritp-list", boxWidgetClass, prev, arg, 2); XtSetArg (arg[0], XtNstate, True); - w = XtCreateManagedWidget (name, toggleWidgetClass, prev, arg, 1); + w = XtCreateManagedWidget (name, toggleWidgetClass, box, arg, 1); XtAddCallback (w, XtNcallback, ScriptProc, NULL); XtSetArg (arg[0], XtNradioGroup, w); for (i = 1; i < n; i++) { compose_script_langsys (script_langsys[i].script, script_langsys[i].langsys, name); - w = XtCreateManagedWidget (name, toggleWidgetClass, prev, arg, 1); + w = XtCreateManagedWidget (name, toggleWidgetClass, box, arg, 1); XtAddCallback (w, XtNcallback, ScriptProc, NULL); } } -- 1.7.10.4