upload tizen2.0 source
[framework/uifw/xorg/lib/libxaw.git] / specs / SmeBSB.xml
1 <sect1 id="SmeBSB_Object">
2 <title>SmeBSB Object</title>
3 <para>
4 <!-- .LP -->
5 <!-- .XS -->
6 <!--    SmeBSB Object -->
7 <!-- .XE -->
8 <!-- .IN "SmeBSB object" "" "@DEF@" -->
9 <literallayout class="monospaced">
10 <!-- .TA 2.0i -->
11 <!-- .ta 2.0i -->
12 <!-- .sp -->
13 Application Header file &lt;X11/Xaw/SmeBSB.h&gt;
14 <!-- .IN "SmeBSB.h" "" -->
15 Class Header file       &lt;X11/Xaw/SmeBSBP.h&gt;
16 <!-- .IN "SmeBSBP.h" "" -->
17 Class           smeBSBObjectClass
18 <!-- .IN "smeBSBObjectClass" "" -->
19 Class Name      SmeBSB
20 <!-- .IN "SmeBSB object" "class name" -->
21 Superclass      Sme
22 <!-- .sp -->
23 </literallayout>
24 </para>
25 <para>
26 <!-- .LP -->
27 The SmeBSB object is used to create a menu entry that contains a string,
28 and optional bitmaps in its left and right margins.  Since each menu
29 entry is an independent object, the application is able to change the
30 font, color, height, and other attributes of the menu entries, on an
31 entry by entry basis.  The format of the string may either be the encoding
32 of the 8 bit <function>font</function> utilized, or in a multi-byte encoding for use with a
33 <function>fontSet</function>.
34 </para>
35 <sect2 id='SmeBSB::Resources'>
36 <title>Resources</title>
37 <!-- .IN "SmeBSB object" "resources" -->
38 <para>
39 <!-- .LP -->
40 The resources associated with the SmeBSB object are defined in this section,
41 and affect only the single menu entry specified by this object.
42 <informaltable>
43   <tgroup cols='5' align='center'>
44   <colspec colname='c1'/>
45   <colspec colname='c2'/>
46   <colspec colname='c3'/>
47   <colspec colname='c4'/>
48   <colspec colname='c5'/>
49   <thead>
50     <row>
51       <entry>Name</entry>
52       <entry>Class</entry>
53       <entry>Type</entry>
54       <entry>Notes</entry>
55       <entry>Default Value</entry>
56     </row>
57   </thead>
58   <tbody>
59     <row>
60       <entry>ancestorSensitive</entry>
61       <entry>AncestorSensitive</entry>
62       <entry>Boolean</entry>
63       <entry>D</entry>
64       <entry>True</entry>
65     </row>
66     <row>
67       <entry>callback</entry>
68       <entry>Callback</entry>
69       <entry>Callback</entry>
70       <entry></entry>
71       <entry>NULL</entry>
72     </row>
73     <row>
74       <entry>destroyCallback</entry>
75       <entry>Callback</entry>
76       <entry>XtCallbackList</entry>
77       <entry></entry>
78       <entry>NULL</entry>
79     </row>
80     <row>
81       <entry>font</entry>
82       <entry>Font</entry>
83       <entry>FontStruct</entry>
84       <entry></entry>
85       <entry>XtDefaultFont</entry>
86     </row>
87     <row>
88       <entry>fontSet</entry>
89       <entry>FontSet</entry>
90       <entry>XFontSet</entry>
91       <entry></entry>
92       <entry>XtDefaultFontSet</entry>
93     </row>
94     <row>
95       <entry>foreground</entry>
96       <entry>Foreground</entry>
97       <entry>Pixel</entry>
98       <entry></entry>
99       <entry>XtDefaultForeground</entry>
100     </row>
101     <row>
102       <entry>height</entry>
103       <entry>Height</entry>
104       <entry>Dimension</entry>
105       <entry>A</entry>
106       <entry>Font height + <function>vertSpace</function></entry>
107     </row>
108     <row>
109       <entry>international</entry>
110       <entry>International</entry>
111       <entry>Boolean</entry>
112       <entry>C</entry>
113       <entry>False</entry>
114     </row>
115     <row>
116       <entry>justify</entry>
117       <entry>Justify</entry>
118       <entry>Justify</entry>
119       <entry></entry>
120       <entry>XtjustifyLeft</entry>
121     </row>
122     <row>
123       <entry>label</entry>
124       <entry>Label</entry>
125       <entry>String</entry>
126       <entry></entry>
127       <entry>NULL</entry>
128     </row>
129     <row>
130       <entry>leftBitmap</entry>
131       <entry>LeftBitmap</entry>
132       <entry>Pixmap</entry>
133       <entry></entry>
134       <entry>XtUnspecifiedPixmap</entry>
135     </row>
136     <row>
137       <entry>leftMargin</entry>
138       <entry>leftMargin</entry>
139       <entry>Dimension</entry>
140       <entry></entry>
141       <entry>4</entry>
142     </row>
143     <row>
144       <entry>rightBitmap</entry>
145       <entry>RightBitmap</entry>
146       <entry>Pixmap</entry>
147       <entry></entry>
148       <entry>XtUnspecifiedPixmap</entry>
149     </row>
150     <row>
151       <entry>rightMargin</entry>
152       <entry>rightMargin</entry>
153       <entry>Dimension</entry>
154       <entry></entry>
155       <entry>4</entry>
156     </row>
157     <row>
158       <entry>sensitive</entry>
159       <entry>Sensitive</entry>
160       <entry>Boolean</entry>
161       <entry></entry>
162       <entry>True</entry>
163     </row>
164     <row>
165       <entry>vertSpace</entry>
166       <entry>VertSpace</entry>
167       <entry>int</entry>
168       <entry></entry>
169       <entry>25</entry>
170     </row>
171     <row>
172       <entry>width</entry>
173       <entry>Width</entry>
174       <entry>Dimension</entry>
175       <entry>A</entry>
176       <entry>TextWidth + margins</entry>
177     </row>
178   </tbody>
179   </tgroup>
180 </informaltable>
181
182 <!-- .As -->
183 <variablelist>
184   <varlistentry>
185     <term>callback</term>
186     <listitem>
187       <para>
188 All callback functions on this list are called when the SimpleMenu
189 <emphasis remap='I'>notifies</emphasis> this entry that the user has selected it.
190       </para>
191     </listitem>
192   </varlistentry>
193   <varlistentry>
194     <term>font</term>
195     <listitem>
196       <para>
197 The text font to use when displaying the <function>label</function>, when the
198 <function>international</function> resource is <function>false</function>.
199       </para>
200     </listitem>
201   </varlistentry>
202   <varlistentry>
203     <term>fontSet</term>
204     <listitem>
205       <para>
206 The text font set to use when displaying the <function>label</function>, when the
207 <function>international</function> resource is <function>true</function>.
208       </para>
209     </listitem>
210   </varlistentry>
211   <varlistentry>
212     <term>foreground</term>
213     <listitem>
214       <para>
215 A pixel value which indexes the SimpleMenu's colormap to derive the
216 foreground color of the menu entry's window.  This color is also
217 used to render all 1's in the left and right <function>bitmaps</function>.
218 <!-- .Hw -->
219 Keep in mind that the SimpleMenu widget will force the width of all
220 menu entries to be the width of the longest entry.
221 <!-- .In -->
222       </para>
223     </listitem>
224   </varlistentry>
225   <varlistentry>
226     <term>justify</term>
227     <listitem>
228       <para>
229 <!-- .IP <function>justify</function> 1.5i -->
230 How the label is to be rendered between the left and right margins when
231 the space is wider than the actual text.  This resource may be
232 specified with the values <function>XtJustifyLeft</function>, <function>XtJustifyCenter</function>,
233 or <function>XtJustifyRight</function>.  When specifying the justification from a
234 resource file the values <function>left</function>, <function>center</function>, or <function>right</function> may be
235 used.
236       </para>
237     </listitem>
238   </varlistentry>
239   <varlistentry>
240     <term>label</term>
241     <listitem>
242       <para>
243 This is a the string that will be displayed in the menu entry.  The
244 exact location of this string within the bounds of the menu entry is
245 controlled by the <function>leftMargin</function>, <function>rightMargin</function>, <function>vertSpace</function>,
246 and <function>justify</function> resources.
247       </para>
248     </listitem>
249   </varlistentry>
250   <varlistentry>
251     <term>leftBitmap</term>
252     <listitem>
253       <para>
254 <!-- .br -->
255 <!-- .ns -->
256       </para>
257     </listitem>
258   </varlistentry>
259   <varlistentry>
260     <term>rightBitmap</term>
261     <listitem>
262       <para>
263 <!-- .IP <function>rightBitmap</function> 1.5i -->
264 This is a name of a bitmap to display in the left or right margin of the
265 menu entry.  All 1's in the bitmap will be rendered in the foreground
266 color, and all 0's will be drawn in the background color of the
267 SimpleMenu widget.  It is the
268 programmers' responsibility to make sure that the menu entry is tall
269 enough, and the appropriate margin wide enough to accept the bitmap.
270 If care is not taken the bitmap may extend into another menu entry, or
271 into this entry's label.
272       </para>
273     </listitem>
274   </varlistentry>
275   <varlistentry>
276     <term>leftMargin</term>
277     <listitem>
278       <para>
279 <!-- .br -->
280 <!-- .ns -->
281       </para>
282     </listitem>
283   </varlistentry>
284   <varlistentry>
285     <term>rightMargin</term>
286     <listitem>
287       <para>
288 This is the amount of space (in pixels) that will be left between the
289 edge of the menu entry and the label string.
290 <!-- .Se -->
291       </para>
292     </listitem>
293   </varlistentry>
294   <varlistentry>
295     <term>vertSpace</term>
296     <listitem>
297       <para>
298 This is the amount of vertical padding, expressed as a percentage of
299 the height of the font, that is to be placed around the label of a
300 menu entry.. The label and bitmaps are always centered vertically
301 within the menu.  The default value for this
302 resource (25) causes the default height to be 125% of the height of the
303 font.
304       </para>
305     </listitem>
306   </varlistentry>
307 </variablelist>
308 </para>
309 </sect2>
310 </sect1>