다음 코드는 TextField 위짓트와 RenderTable을 단일 Rendition으로 만듭니다. XmNlayoutAttrObject 및 XmNlayoutModifier 의사 자원은 지정되지 않은 채로 남았으므로 NULL로 설정됩니다. 이 값은 Rendition 명령과 관련된 레이아웃 객체가 존재하는 경우 기본 로켈에 속한다는 것을 의미합니다.
이 예제가 올바로 작동하려면 로켈을 코드 세트가 ISO 8859-6이고 로켈 지향 레이아웃 모듈이 IMPLICIT_BASIC 알고리즘을 지원할 수 있는 로켈로 설정되어야 합니다. Rendition의 LayoutObject의 ImplicitAlg 값은 Rendition의 XmNlayoutModifier 의사 자원에 의해 수정됩니다.
int n; Arg args[10]; Widget w; XmRendition rendition; XmStringTag renditionTag; XmRenderTable renderTable; w = XmCreateTextField(parent, "text field", args, 0); n = 0; XtSetArg(args[n], XmNfontName, "-*-*-medium-r-normal-*-24-*-*-*-*-*-*-*"); n++; XtSetArg(args[n], XmNfontType, XmFONT_IS_XOC); n++; renditionTag = (XmStringTag) "ArabicShaped"; rendition = XmRenditionCreate(w, renditionTag, args, n); renderTable = XmRenderTableAddRenditions(NULL, &rendition, 1, XmREPLACE_MERGE); XtVaSetValues(w, XmNrenderTable, renderTable, NULL); .... n = 0; XtSetArg(args[n], XmNlayoutModifier, "@ls implicitalg=basic"); n++; XmRenditionUpdate(rendition, args, n);