1XmRenderTable(library call)                        XmRenderTable(library call)
2
3
4

NAME

6       XmRenderTable — Data type for a render table
7

SYNOPSIS

9       #include <Xm/Xm.h>
10       XmRenderTable
11

DESCRIPTION

13       XmRenderTable is the data type for a render table, which contains a ta‐
14       ble of renditions (XmRenditions). Each rendition consists of a  set  of
15       attributes  for  rendering  text,  including a font or fontset, colors,
16       tabs, and lines.  Each rendition is identified with a tag.
17
18       When a compound string is displayed, for each segment  in  the  string,
19       the  rendition  used to render that string is formed as follows. If the
20       segment has at least one rendition begin tag or if  the  list  of  tags
21       formed  by accumulating from previous segments the rendition begin tags
22       and removing the rendition end  tags  is  not  empty,  these  tags  are
23       matched  with  renditions  in the render table. The effective rendition
24       used to render the segment is formed by successively merging each  ren‐
25       dition  found  into  the current rendition with non-XmAS_IS (XmUNSPECI‐
26       FIED_PIXEL for color resources) values for resources in  the  rendition
27       to  be merged, thus replacing the corresponding values of the resources
28       in the current rendition. Finally, if the resulting rendition still has
29       resources  with  unspecified  values  and  the  segment has a locale or
30       charset tag (these are optional and mutually  exclusive)  this  tag  is
31       matched with a rendition in the render table, and the missing rendition
32       values are filled in from that entry.
33
34       If no matching rendition is found for a particular tag, then  the  XmN‐
35       noRenditionCallback  of  the  XmDisplay object is called and the render
36       table is searched again for that tag.
37
38       If the resulting rendition does not specify a font or fontset, then for
39       segments  whose  text  type is XmCHARSET_TEXT, the render table will be
40       searched for a rendition tagged with XmFONTLIST_DEFAULT_TAG, and  if  a
41       matching  rendition is found, it will be merged into the current rendi‐
42       tion. If the resulting rendition contains no font or fontset, the  XmN‐
43       noFontCallback  will be called with the default rendition and "" as the
44       font name. If no rendition matches or no font was found after the call‐
45       back,  then the first rendition in the render table will be merged into
46       the current rendition. If this rendition still has no  font,  then  the
47       segment will not be rendered and a warning will be emitted.
48
49       For  segments  whose  text type is XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT,
50       the  render  table  will  be  searched  for  a  rendition  tagged  with
51       _MOTIF_DEFAULT_LOCALE,  and,  if a matching rendition is found, it will
52       be merged into the current rendition. If the resulting  rendition  con‐
53       tains  no  font,  the XmNnoFontCallback will be called with the default
54       rendition and "" as the font name.  An application can have this  call‐
55       back attempt to remedy this problem by calling XmRenditionUpdate on the
56       input rendition to provide a font for the widget to use.  This  may  be
57       done  by  either  providing an alternative font name to be loaded using
58       the XmNfontName and XmNfontType resources or  with  an  already  loaded
59       font  using  the  XmNfont resource.  If no rendition matches or no font
60       was found after the callback, then the segment will not be rendered and
61       a warning will be issued.
62
63       Render  tables  are specified in resource files with the following syn‐
64       tax:
65
66       resource_spec: [ tag [, tag ]* ]
67
68       where tag is some string suitable for the XmNtag resource of  a  rendi‐
69       tion.
70
71       If  no  tags are specified, then a render table will be created that is
72       either  empty  or  contains  only   a   rendition   with   a   tag   of
73       _MOTIF_DEFAULT_LOCALE.
74
75       Specific  values  for  specific rendition resources are specified using
76       the following syntax:
77
78       resource_spec [*|.] rendition[*|.] resource_name: value
79
80       where:
81
82       resource_spec
83                 Specifies the render table.
84
85       rendition Is either the class Rendition or a tag.
86
87       resource_name
88                 Is either the class or name of a particular resource.
89
90       value     Is the specification of the value to be set.
91
92       Any resource line that consists of just a resource name or class compo‐
93       nent  with  no  rendition component or loose binding will be assumed to
94       specify   resource   values   for   a   rendition   with   a   tag   of
95       _MOTIF_DEFAULT_LOCALE.  In  effect, this creates a default rendition in
96       much the same way that  specifying  no  fontlist  tag  for  a  fontlist
97       resource  causes  the  fontlist created to contain an entry tagged with
98       XmFONTLIST_DEFAULT_TAG:
99
100       resource_spec.resource_name: value
101
102       For example, the following would set  the  XmNrenderTable  resource  of
103       label1  to  a  render  table consisting of three renditions tagged with
104       _MOTIF_DEFAULT_LOCALE, bold, and oblique, with values for resources set
105       as described in the resource specifications.
106
107       *label1.renderTable: bold, oblique
108       *label1.renderTable.bold.renditionForeground: Green
109       *label1.renderTable.bold.fontName: *-*-*-bold-*-iso8859-1
110       *label1.renderTable.bold.fontType: FONT_IS_FONT
111       *label1.renderTable.oblique.renditionBackground: Red
112       *label1.renderTable.oblique.fontName: *-*-*-italic-*-iso8859-1
113       *label1.renderTable.oblique.fontType: FONT_IS_FONT
114       *label1.renderTable.oblique.underlineType: AS_IS
115       *label1.renderTable.fontName: fixed
116       *label1.renderTable.fontType: FONT_IS_FONT
117       *label1.renderTable.renditionForegound: black
118       *label1.renderTable*tabList: 1in, +1.5in, +3in
119
121       XmRenderTableAddRenditions(3),  XmRenderTableCopy(3), XmRenderTableCvt‐
122       FromProp(3),  XmRenderTableCvtToProp(3),  XmRenderTableFree(3),  XmRen‐
123       derTableGetRendition(3),      XmRenderTableGetRenditions(3),     XmRen‐
124       derTableGetTags(3),  XmRenderTableRemoveRenditions(3),  XmRendition(3),
125       and XmString(3).
126
127
128
129                                                   XmRenderTable(library call)
Impressum