aboutsummaryrefslogtreecommitdiff
path: root/libXaw/specs/SmeBSB.xml
blob: 539bdcb031eb787d9fd4bccc7db0c0017f75e54d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
<sect1 id="SmeBSB_Object">
<title>SmeBSB Object</title>
<para>
<!-- .LP -->
<!-- .XS -->
<!-- 	SmeBSB Object -->
<!-- .XE -->
<!-- .IN "SmeBSB object" "" "@DEF@" -->
<literallayout class="monospaced">
<!-- .TA 2.0i -->
<!-- .ta 2.0i -->
<!-- .sp -->
Application Header file	&lt;X11/Xaw/SmeBSB.h&gt;
<!-- .IN "SmeBSB.h" "" -->
Class Header file	&lt;X11/Xaw/SmeBSBP.h&gt;
<!-- .IN "SmeBSBP.h" "" -->
Class		smeBSBObjectClass
<!-- .IN "smeBSBObjectClass" "" -->
Class Name	SmeBSB
<!-- .IN "SmeBSB object" "class name" -->
Superclass	Sme
<!-- .sp -->
</literallayout>
</para>
<para>
<!-- .LP -->
The SmeBSB object is used to create a menu entry that contains a string,
and optional bitmaps in its left and right margins.  Since each menu
entry is an independent object, the application is able to change the
font, color, height, and other attributes of the menu entries, on an
entry by entry basis.  The format of the string may either be the encoding
of the 8 bit <function>font</function> utilized, or in a multi-byte encoding for use with a
<function>fontSet</function>.
</para>
<sect2 id="smebsb_resources">
<title>Resources</title>
<!-- .IN "SmeBSB object" "resources" -->
<para>
<!-- .LP -->
The resources associated with the SmeBSB object are defined in this section,
and affect only the single menu entry specified by this object.
<informaltable>
  <tgroup cols='5' align='center'>
  <colspec colname='c1'/>
  <colspec colname='c2'/>
  <colspec colname='c3'/>
  <colspec colname='c4'/>
  <colspec colname='c5'/>
  <thead>
    <row>
      <entry>Name</entry>
      <entry>Class</entry>
      <entry>Type</entry>
      <entry>Notes</entry>
      <entry>Default Value</entry>
    </row>
  </thead>
  <tbody>
    <row>
      <entry>ancestorSensitive</entry>
      <entry>AncestorSensitive</entry>
      <entry>Boolean</entry>
      <entry>D</entry>
      <entry>True</entry>
    </row>
    <row>
      <entry>callback</entry>
      <entry>Callback</entry>
      <entry>Callback</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>destroyCallback</entry>
      <entry>Callback</entry>
      <entry>XtCallbackList</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>font</entry>
      <entry>Font</entry>
      <entry>FontStruct</entry>
      <entry></entry>
      <entry>XtDefaultFont</entry>
    </row>
    <row>
      <entry>fontSet</entry>
      <entry>FontSet</entry>
      <entry>XFontSet</entry>
      <entry></entry>
      <entry>XtDefaultFontSet</entry>
    </row>
    <row>
      <entry>foreground</entry>
      <entry>Foreground</entry>
      <entry>Pixel</entry>
      <entry></entry>
      <entry>XtDefaultForeground</entry>
    </row>
    <row>
      <entry>height</entry>
      <entry>Height</entry>
      <entry>Dimension</entry>
      <entry>A</entry>
      <entry>Font height + <function>vertSpace</function></entry>
    </row>
    <row>
      <entry>international</entry>
      <entry>International</entry>
      <entry>Boolean</entry>
      <entry>C</entry>
      <entry>False</entry>
    </row>
    <row>
      <entry>justify</entry>
      <entry>Justify</entry>
      <entry>Justify</entry>
      <entry></entry>
      <entry>XtjustifyLeft</entry>
    </row>
    <row>
      <entry>label</entry>
      <entry>Label</entry>
      <entry>String</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>leftBitmap</entry>
      <entry>LeftBitmap</entry>
      <entry>Pixmap</entry>
      <entry></entry>
      <entry>XtUnspecifiedPixmap</entry>
    </row>
    <row>
      <entry>leftMargin</entry>
      <entry>leftMargin</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>4</entry>
    </row>
    <row>
      <entry>rightBitmap</entry>
      <entry>RightBitmap</entry>
      <entry>Pixmap</entry>
      <entry></entry>
      <entry>XtUnspecifiedPixmap</entry>
    </row>
    <row>
      <entry>rightMargin</entry>
      <entry>rightMargin</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>4</entry>
    </row>
    <row>
      <entry>sensitive</entry>
      <entry>Sensitive</entry>
      <entry>Boolean</entry>
      <entry></entry>
      <entry>True</entry>
    </row>
    <row>
      <entry>vertSpace</entry>
      <entry>VertSpace</entry>
      <entry>int</entry>
      <entry></entry>
      <entry>25</entry>
    </row>
    <row>
      <entry>width</entry>
      <entry>Width</entry>
      <entry>Dimension</entry>
      <entry>A</entry>
      <entry>TextWidth + margins</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<!-- .As -->
<variablelist>
  <varlistentry>
    <term>callback</term>
    <listitem>
      <para>
All callback functions on this list are called when the SimpleMenu
<emphasis remap='I'>notifies</emphasis> this entry that the user has selected it.
      </para>
    </listitem>
  </varlistentry> 
  <varlistentry>
    <term>font</term>
    <listitem>
      <para>
The text font to use when displaying the <function>label</function>, when the
<function>international</function> resource is <function>false</function>.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>fontSet</term>
    <listitem>
      <para>
The text font set to use when displaying the <function>label</function>, when the
<function>international</function> resource is <function>true</function>.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>foreground</term>
    <listitem>
      <para>
A pixel value which indexes the SimpleMenu's colormap to derive the
foreground color of the menu entry's window.  This color is also
used to render all 1's in the left and right <function>bitmaps</function>.
<!-- .Hw -->
Keep in mind that the SimpleMenu widget will force the width of all
menu entries to be the width of the longest entry.
<!-- .In -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>justify</term>
    <listitem>
      <para>
<!-- .IP <function>justify</function> 1.5i -->
How the label is to be rendered between the left and right margins when
the space is wider than the actual text.  This resource may be
specified with the values <function>XtJustifyLeft</function>, <function>XtJustifyCenter</function>,
or <function>XtJustifyRight</function>.  When specifying the justification from a
resource file the values <function>left</function>, <function>center</function>, or <function>right</function> may be
used.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>label</term>
    <listitem>
      <para>
This is a the string that will be displayed in the menu entry.  The
exact location of this string within the bounds of the menu entry is
controlled by the <function>leftMargin</function>, <function>rightMargin</function>, <function>vertSpace</function>,
and <function>justify</function> resources.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>leftBitmap</term>
    <listitem>
      <para>
<!-- .br -->
<!-- .ns -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>rightBitmap</term>
    <listitem>
      <para>
<!-- .IP <function>rightBitmap</function> 1.5i -->
This is a name of a bitmap to display in the left or right margin of the
menu entry.  All 1's in the bitmap will be rendered in the foreground
color, and all 0's will be drawn in the background color of the
SimpleMenu widget.  It is the
programmers' responsibility to make sure that the menu entry is tall
enough, and the appropriate margin wide enough to accept the bitmap.
If care is not taken the bitmap may extend into another menu entry, or
into this entry's label.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>leftMargin</term>
    <listitem>
      <para>
<!-- .br -->
<!-- .ns -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>rightMargin</term>
    <listitem>
      <para>
This is the amount of space (in pixels) that will be left between the
edge of the menu entry and the label string.
<!-- .Se -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>vertSpace</term>
    <listitem>
      <para>
This is the amount of vertical padding, expressed as a percentage of
the height of the font, that is to be placed around the label of a
menu entry.. The label and bitmaps are always centered vertically
within the menu.  The default value for this
resource (25) causes the default height to be 125% of the height of the
font.
      </para>
    </listitem>
  </varlistentry>
</variablelist>
</para>
</sect2>
</sect1>