From: handa Date: Tue, 18 May 2010 07:54:20 +0000 (+0000) Subject: (create_otf_script_widgets): Create a box X-Git-Tag: REL-0-9-12~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=bf40bc427bf292f450654ae2ab1195428caa00b1;p=m17n%2Flibotf.git (create_otf_script_widgets): Create a box widget for each script in a limited-width box. --- 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); } }