Blob Blame History Raw
'\" t
...\" RendTaA.sgm /main/8 1996/09/08 20:57:11 rws $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl			\" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl			\" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie     \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie     !\\*(f4 \{\
.	ft \\*(f4
.	ds f4\"
'	br \}
.el .ie !\\*(f3 \{\
.	ft \\*(f3
.	ds f3\"
'	br \}
.el .ie !\\*(f2 \{\
.	ft \\*(f2
.	ds f2\"
'	br \}
.el .ie !\\*(f1 \{\
.	ft \\*(f1
.	ds f1\"
'	br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH "XmRenderTable" "library call"
.SH "NAME"
\fBXmRenderTable\fR \(em Data type for a render table
.iX "XmRenderTable"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/Xm\&.h>
XmRenderTable
.fi
.SH "DESCRIPTION"
.PP
\fBXmRenderTable\fR is the data type for a render table, which
contains a table of renditions (\fBXmRendition\fRs)\&. Each rendition
consists of a set of attributes for rendering text, including a font
or fontset, colors, tabs, and lines\&.
Each rendition is identified with a tag\&.
.PP
When a compound string is displayed, for each segment in the string,
the rendition used to render that string is formed as follows\&. If the
segment has at least one rendition begin tag or if the list of tags
formed by accumulating from previous segments the rendition begin tags
and removing the rendition end tags is not empty, these tags are
matched with renditions in the render table\&. The effective rendition
used to render the segment is formed by successively merging each
rendition found into the current rendition with non-\fBXmAS_IS\fP
(\fBXmUNSPECIFIED_PIXEL\fP for color resources) values for resources
in the rendition to be merged, thus replacing the corresponding values of
the resources in the current rendition\&. Finally, if the resulting
rendition still has resources with unspecified values and the segment
has a locale or charset tag (these are optional and mutually
exclusive) this tag is matched with a rendition in the render table,
and the missing rendition values are filled in from that entry\&.
.PP
If no matching rendition is found for a particular tag, then the
\fBXmNnoRenditionCallback\fP of the \fBXmDisplay\fP object is called
and the render table is searched again for that tag\&.
.PP
If the resulting rendition does not specify a font or fontset, then
for segments whose text type is \fBXmCHARSET_TEXT\fP, the render table
will be searched for a rendition tagged with
\fBXmFONTLIST_DEFAULT_TAG\fP, and if a matching rendition is found, it
will be merged into the current rendition\&. If the resulting rendition
contains no font or fontset, the \fBXmNnoFontCallback\fP will be
called with the default rendition and "" as the font name\&. If no
rendition matches or no font was found after the callback, then the
first rendition in the render table will be merged into the current
rendition\&. If this rendition still has no font, then the segment will
not be rendered and a warning will be emitted\&.
.PP
For segments whose text type is \fBXmMULTIBYTE_TEXT\fP or
\fBXmWIDECHAR_TEXT\fP, the
render table will be searched for a rendition tagged with
\fB_MOTIF_DEFAULT_LOCALE\fP, and, if a matching rendition is found, it will be
merged into the current rendition\&. If the resulting rendition contains no
font, the \fBXmNnoFontCallback\fP will be called with the
default rendition and "" as the font name\&.
An application can have this callback attempt
to remedy this problem by calling \fBXmRenditionUpdate\fP on the input
rendition to provide a font for the widget to use\&. This may be done by
either providing an alternative font name to be loaded using the
\fBXmNfontName\fP and \fBXmNfontType\fP resources or with an already
loaded font using the \fBXmNfont\fP resource\&.
If no rendition matches or no font was found after the
callback, then the segment will not be rendered
and a warning will be issued\&.
.PP
Render tables are specified in resource files with the following
syntax:
.PP
.nf
\fIresource_spec\fP: [ \fItag\fP [, \fItag\fP ]* ]
.fi
.PP
where \fItag\fP is some string suitable for the \fBXmNtag\fP resource
of a rendition\&.
.PP
If no tags are specified, then a render table will be created that is
either empty or contains only a rendition with a tag of
\fB_MOTIF_DEFAULT_LOCALE\fP\&.
.PP
Specific values for specific rendition resources are specified using
the following syntax:
.PP
.nf
\fIresource_spec\fP [*|\&.] \fIrendition\fP[*|\&.] \fIresource_name\fP: \fIvalue\fP
.fi
.PP
where:
.IP "\fIresource_spec\fP" 10
Specifies the render table\&.
.IP "\fIrendition\fP" 10
Is either the class Rendition or a tag\&.
.IP "\fIresource_name\fP" 10
Is either
the class or name of a particular resource\&.
.IP "\fIvalue\fP" 10
Is the
specification of the value to be set\&.
.PP
Any resource line that consists of just a resource name or class
component with no rendition component or loose binding will be
assumed to specify resource values for a rendition with a tag of
\fB_MOTIF_DEFAULT_LOCALE\fP\&. In effect, this creates a default
rendition in much the same way that specifying no fontlist tag for a
fontlist resource causes the fontlist created to contain an entry
tagged with \fBXmFONTLIST_DEFAULT_TAG\fP:
.PP
.nf
\fIresource_spec\fP\&.\fIresource_name\fP: \fIvalue\fP
.fi
.PP
For example, the following would set the \fBXmNrenderTable\fP resource
of \fBlabel1\fP to a render
table consisting of three renditions tagged with
\fB_MOTIF_DEFAULT_LOCALE\fP, \fIbold\fP, and \fIoblique\fP, with values
for resources set as described in the resource specifications\&.
.PP
.nf
\f(CW*label1\&.renderTable: bold, oblique
*label1\&.renderTable\&.bold\&.renditionForeground: Green
*label1\&.renderTable\&.bold\&.fontName: *-*-*-bold-*-iso8859-1
*label1\&.renderTable\&.bold\&.fontType: FONT_IS_FONT
*label1\&.renderTable\&.oblique\&.renditionBackground: Red
*label1\&.renderTable\&.oblique\&.fontName: *-*-*-italic-*-iso8859-1
*label1\&.renderTable\&.oblique\&.fontType: FONT_IS_FONT
*label1\&.renderTable\&.oblique\&.underlineType: AS_IS
*label1\&.renderTable\&.fontName: fixed
*label1\&.renderTable\&.fontType: FONT_IS_FONT
*label1\&.renderTable\&.renditionForegound: black
*label1\&.renderTable*tabList: 1in, +1\&.5in, +3in\fR
.fi
.PP
.SH "RELATED"
.PP
\fBXmRenderTableAddRenditions\fP(3),
\fBXmRenderTableCopy\fP(3),
\fBXmRenderTableCvtFromProp\fP(3),
\fBXmRenderTableCvtToProp\fP(3),
\fBXmRenderTableFree\fP(3),
\fBXmRenderTableGetRendition\fP(3),
\fBXmRenderTableGetRenditions\fP(3),
\fBXmRenderTableGetTags\fP(3),
\fBXmRenderTableRemoveRenditions\fP(3),
\fBXmRendition\fP(3), and
\fBXmString\fP(3)\&.
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:28