2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LABELCLIPPING 3TSOL "Jul 20, 2007"
8 labelclipping, Xbsltos, Xbcleartos \- translate a binary label and clip to the
13 \fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-ltsol\fR \fB-lDtTsol\fR [\fIlibrary\fR...]
18 #include <Dt/label_clipping.h>
20 \fBXmString\fR \fBXbsltos\fR(\fBDisplay *\fR\fIdisplay\fR, \fBconst m_label_t *\fR\fIsenslabel\fR,
21 \fBDimension\fR \fIwidth\fR, \fBconst XmFontList\fR \fIfontlist\fR, \fBconst int\fR \fIflags\fR);
26 \fBXmString\fR \fBXbcleartos\fR(\fBDisplay *\fR\fIdisplay\fR, \fBconst m_label_t *\fR\fIclearance\fR,
27 \fBDimension\fR \fIwidth\fR, \fBconst XmFontList\fR \fIfontlist\fR, \fBconst int\fR \fIflags\fR);
33 The calling process must have \fBPRIV_SYS_TRANS_LABEL\fR in its set of
34 effective privileges to translate labels or clearances that dominate the
35 current process' sensitivity label.
42 The structure controlling the connection to an X Window System display.
51 The sensitivity label to be translated.
60 The clearance to be translated.
69 The width of the translated label or clearance in pixels. If the specified
70 width is shorter than the full label, the label is clipped and the presence of
71 clipped letters is indicated by an arrow. In this example, letters have been
72 clipped to the right of: TS<-. See the \fBsbltos\fR(3TSOL) manual page for more
73 information on the clipped indicator. If the specified width is equal to the
74 display width (\fIdisplay\fR), the label is not truncated, but word-wrapped
75 using a width of half the display width.
84 A list of fonts and character sets where each font is associated with a
94 The value of flags indicates which words in the \fBlabel_encodings\fR(4) file
95 are used for the translation. See the \fBbltos\fR(3TSOL) manual page for a
96 description of the flag values: \fBLONG_WORDS\fR, \fBSHORT_WORDS\fR,
97 \fBLONG_CLASSIFICATION\fR, \fBSHORT_CLASSIFICATION\fR, \fBALL_ENTRIES,\fR
98 \fBACCESS_RELATED,\fR \fBVIEW_EXTERNAL\fR, \fBVIEW_INTERNAL\fR,
99 \fBNO_CLASSIFICATION\fR. \fBBRACKETED\fR is an additional flag that can be used
100 with \fBXbsltos()\fR only. It encloses the sensitivity label in square brackets
107 These functions return a compound string that represents the character-coded
108 form of the sensitivity label or clearance that is translated. The compound
109 string uses the language and fonts specified in \fIfontlist\fR and is clipped
110 to \fIwidth\fR. These functions return \fINULL\fR if the label or clearance is
111 not a valid, required type as defined in the \fBlabel_encodings\fR(4) file, or
112 not dominated by the process' sensitivity label and the
113 \fBPRIV_SYS_TRANS_LABEL\fR privilege is not asserted.
118 \fB\fB/usr/dt/include/Dt/label_clipping.h\fR\fR
122 Header file for label clipping functions
128 \fB\fB/etc/security/tsol/label_encodings\fR\fR
132 The label encodings file contains the classification names, words, constraints,
133 and values for the defined labels of this system.
138 \fBExample 1 \fRTranslate and Clip a Clearance.
141 This example translates a clearance to text using the long words specified in
142 the \fBlabel_encodings\fR(4) file, a font list, and clips the translated
143 clearance to a width of 72 pixels.
148 xmstr = Xbcleartos(XtDisplay(topLevel),
149 &clearance, 72, fontlist, LONG_WORDS
156 See \fBattributes\fR(5) for descriptions of the following attributes:
164 ATTRIBUTE TYPE ATTRIBUTE VALUE
166 Interface Stability Obsolete
173 The labelclipping functions, \fBXbsltos()\fR and \fBXbcleartos()\fR, are
174 obsolete. Use the \fBlabel_to_str\fR(3TSOL) function instead.
178 \fBbltos\fR(3TSOL), \fBlabel_to_str\fR(3TSOL), \fBlibtsol\fR(3LIB),
179 \fBlabel_encodings\fR(4), \fBattributes\fR(5)
182 See \fBXmStringDraw\fR(3) and \fBFontList\fR(3) for information on the creation
183 and structure of a font list.
187 The functionality described on this manual page is available only if the system
188 is configured with Trusted Extensions.