15ec34c4cSmrg<sect1 id="MenuButton_Widget">
2994689c1Smrg<title>MenuButton Widget</title>
3994689c1Smrg<!-- .XS -->
4994689c1Smrg<!-- 	MenuButton Widget -->
5994689c1Smrg<!-- .XE -->
65ec34c4cSmrg<indexterm significance="preferred"><primary>MenuButton widget</primary></indexterm>
7994689c1Smrg<!-- .sp -->
8994689c1Smrg<literallayout class="monospaced">
9994689c1Smrg<!-- .TA 2.0i -->
10994689c1Smrg<!-- .ta 2.0i -->
11994689c1SmrgApplication Header file	&lt;X11/Xaw/MenuButton.h&gt;
125ec34c4cSmrg<indexterm><primary>MenuButton.h</primary></indexterm>
13994689c1SmrgClass Header file	&lt;X11/Xaw/MenuButtonP.h&gt;
145ec34c4cSmrg<indexterm><primary>MenuButtonP.h</primary></indexterm>
15994689c1SmrgClass		menuButtonWidgetClass
165ec34c4cSmrg<indexterm><primary>menuButtonWidgetClass</primary></indexterm>
17994689c1SmrgClass Name	MenuButton
185ec34c4cSmrg<indexterm><primary>MenuButton widget</primary><secondary>class name</secondary></indexterm>
19994689c1SmrgSuperclass	Command
20994689c1Smrg</literallayout>
21994689c1Smrg<para>
22994689c1Smrg<!-- .LP -->
23994689c1Smrg<!-- .sp -->
24994689c1SmrgThe MenuButton widget is an area, often rectangular,
25994689c1Smrgthat displays a graphic.  The graphic may be a text
26994689c1Smrgstring containing multiple lines of characters in an 8
27994689c1Smrgbit or 16 bit character set (to be displayed with a
28994689c1Smrg<emphasis remap='I'>font</emphasis>), or in a multi-byte encoding (for use with
29994689c1Smrga <emphasis remap='I'>fontset</emphasis>).  The graphic may also be a bitmap or
30994689c1Smrgpixmap.
31994689c1Smrg</para>
32994689c1Smrg<para>
33994689c1Smrg<!-- .LP -->
34994689c1SmrgWhen the pointer cursor is on a MenuButton widget, the
35994689c1SmrgMenuButton becomes highlighted by drawing a rectangle
36994689c1Smrgaround its perimeter.  This highlighting indicates
37994689c1Smrgthat the MenuButton is ready for selection.  When a
38994689c1Smrgpointer button is pressed, the MenuButton widget will
39994689c1Smrgpop up the menu named in the <function>menuName</function> resource.
40994689c1Smrg</para>
415ec34c4cSmrg<sect2 id="MenuButton::Resources">
42994689c1Smrg<title>Resources</title>
43994689c1Smrg<para>
44994689c1Smrg<!-- .LP -->
45994689c1SmrgWhen creating a MenuButton widget instance,
46994689c1Smrgthe following resources are retrieved from the argument list
47994689c1Smrgor from the resource database:
48994689c1Smrg</para>
49994689c1Smrg<para>
50994689c1Smrg<!-- .LP -->
515ec34c4cSmrg<indexterm><primary>MenuButton widget</primary><secondary>resources</secondary></indexterm>
52994689c1Smrg<informaltable>
53994689c1Smrg  <tgroup cols='5' align='center'>
54994689c1Smrg  <colspec colname='c1'/>
55994689c1Smrg  <colspec colname='c2'/>
56994689c1Smrg  <colspec colname='c3'/>
57994689c1Smrg  <colspec colname='c4'/>
58994689c1Smrg  <colspec colname='c5'/>
59994689c1Smrg  <thead>
60994689c1Smrg    <row>
61994689c1Smrg      <entry>Name</entry>
62994689c1Smrg      <entry>Class</entry>
63994689c1Smrg      <entry>Type</entry>
64994689c1Smrg      <entry>Notes</entry>
65994689c1Smrg      <entry>Default Value</entry>
66994689c1Smrg    </row>
67994689c1Smrg  </thead>
68994689c1Smrg  <tbody>
69994689c1Smrg    <row>
70994689c1Smrg      <entry>accelerators</entry>
71994689c1Smrg      <entry>Accelerators</entry>
72994689c1Smrg      <entry>AcceleratorTable</entry>
73994689c1Smrg      <entry></entry>
74994689c1Smrg      <entry>NULL</entry>
75994689c1Smrg    </row>
76994689c1Smrg    <row>
77994689c1Smrg      <entry>ancestorSensitive</entry>
78994689c1Smrg      <entry>AncestorSensitive</entry>
79994689c1Smrg      <entry>Boolean</entry>
80994689c1Smrg      <entry>D</entry>
81994689c1Smrg      <entry>True</entry>
82994689c1Smrg    </row>
83994689c1Smrg    <row>
84994689c1Smrg      <entry>background</entry>
85994689c1Smrg      <entry>Background</entry>
86994689c1Smrg      <entry>Pixel</entry>
87994689c1Smrg      <entry></entry>
88994689c1Smrg      <entry>XtDefaultBackground</entry>
89994689c1Smrg    </row>
90994689c1Smrg    <row>
91994689c1Smrg      <entry>backgroundPixmap</entry>
92994689c1Smrg      <entry>Pixmap</entry>
93994689c1Smrg      <entry>Pixmap</entry>
94994689c1Smrg      <entry></entry>
95994689c1Smrg      <entry>XtUnspecifiedPixmap</entry>
96994689c1Smrg    </row>
97994689c1Smrg    <row>
98994689c1Smrg      <entry>bitmap</entry>
99994689c1Smrg      <entry>Bitmap</entry>
100994689c1Smrg      <entry>Pixmap</entry>
101994689c1Smrg      <entry></entry>
102994689c1Smrg      <entry>None</entry>
103994689c1Smrg    </row>
104994689c1Smrg    <row>
105994689c1Smrg      <entry>borderColor</entry>
106994689c1Smrg      <entry>BorderColor</entry>
107994689c1Smrg      <entry>Pixel</entry>
108994689c1Smrg      <entry></entry>
109994689c1Smrg      <entry>XtDefaultForeground</entry>
110994689c1Smrg    </row>
111994689c1Smrg    <row>
112994689c1Smrg      <entry>borderPixmap</entry>
113994689c1Smrg      <entry>Pixmap</entry>
114994689c1Smrg      <entry>Pixmap</entry>
115994689c1Smrg      <entry></entry>
116994689c1Smrg      <entry>XtUnspecifiedPixmap</entry>
117994689c1Smrg    </row>
118994689c1Smrg    <row>
119994689c1Smrg      <entry>borderWidth</entry>
120994689c1Smrg      <entry>BorderWidth</entry>
121994689c1Smrg      <entry>Dimension</entry>
122994689c1Smrg      <entry></entry>
123994689c1Smrg      <entry>1</entry>
124994689c1Smrg    </row>
125994689c1Smrg    <row>
126994689c1Smrg      <entry>callback</entry>
127994689c1Smrg      <entry>Callback</entry>
128994689c1Smrg      <entry>XtCallbackList</entry>
129994689c1Smrg      <entry></entry>
130994689c1Smrg      <entry>NULL</entry>
131994689c1Smrg    </row>
132994689c1Smrg    <row>
133994689c1Smrg      <entry>colormap</entry>
134994689c1Smrg      <entry>Colormap</entry>
135994689c1Smrg      <entry>Colormap</entry>
136994689c1Smrg      <entry></entry>
137994689c1Smrg      <entry>Parent's Colormap</entry>
138994689c1Smrg    </row>
139994689c1Smrg    <row>
140994689c1Smrg      <entry>cornerRoundPercent</entry>
141994689c1Smrg      <entry>CornerRoundPercent</entry>
142994689c1Smrg      <entry>Dimension</entry>
143994689c1Smrg      <entry></entry>
144994689c1Smrg      <entry>25</entry>
145994689c1Smrg    </row>
146994689c1Smrg    <row>
147994689c1Smrg      <entry>cursor</entry>
148994689c1Smrg      <entry>Cursor</entry>
149994689c1Smrg      <entry>Cursor</entry>
150994689c1Smrg      <entry></entry>
151994689c1Smrg      <entry>None</entry>
152994689c1Smrg    </row>
153994689c1Smrg    <row>
154994689c1Smrg      <entry>cursorName</entry>
155994689c1Smrg      <entry>Cursor</entry>
156994689c1Smrg      <entry>String</entry>
157994689c1Smrg      <entry></entry>
158994689c1Smrg      <entry>None</entry>
159994689c1Smrg    </row>
160994689c1Smrg    <row>
161994689c1Smrg      <entry>depth</entry>
162994689c1Smrg      <entry>Depth</entry>
163994689c1Smrg      <entry>int</entry>
164994689c1Smrg      <entry>C</entry>
165994689c1Smrg      <entry>Parent's Depth</entry>
166994689c1Smrg    </row>
167994689c1Smrg    <row>
168994689c1Smrg      <entry>destroyCallback</entry>
169994689c1Smrg      <entry>Callback</entry>
170994689c1Smrg      <entry>XtCallbackList</entry>
171994689c1Smrg      <entry></entry>
172994689c1Smrg      <entry>NULL</entry>
173994689c1Smrg    </row>
174994689c1Smrg    <row>
175994689c1Smrg      <entry>encoding</entry>
176994689c1Smrg      <entry>Encoding</entry>
177994689c1Smrg      <entry>UnsignedChar</entry>
178994689c1Smrg      <entry></entry>
179994689c1Smrg      <entry>XawTextEncoding8bit</entry>
180994689c1Smrg    </row>
181994689c1Smrg    <row>
182994689c1Smrg      <entry>font</entry>
183994689c1Smrg      <entry>Font</entry>
184994689c1Smrg      <entry>XFontStruct</entry>
185994689c1Smrg      <entry></entry>
186994689c1Smrg      <entry>XtDefaultFont</entry>
187994689c1Smrg    </row>
188994689c1Smrg    <row>
189994689c1Smrg      <entry>fontSet</entry>
190994689c1Smrg      <entry>FontSet</entry>
191994689c1Smrg      <entry>XFontSet</entry>
192994689c1Smrg      <entry></entry>
193994689c1Smrg      <entry>XtDefaultFontSet</entry>
194994689c1Smrg    </row>
195994689c1Smrg    <row>
196994689c1Smrg      <entry>foreground</entry>
197994689c1Smrg      <entry>Foreground</entry>
198994689c1Smrg      <entry>Pixel</entry>
199994689c1Smrg      <entry></entry>
200994689c1Smrg      <entry>XtDefaultForeground</entry>
201994689c1Smrg    </row>
202994689c1Smrg    <row>
203994689c1Smrg      <entry>height</entry>
204994689c1Smrg      <entry>Height</entry>
205994689c1Smrg      <entry>Dimension</entry>
206994689c1Smrg      <entry>A</entry>
207994689c1Smrg      <entry>graphic height + 2 * <function>internalHeight</function></entry>
208994689c1Smrg    </row>
209994689c1Smrg    <row>
210994689c1Smrg      <entry>highlightThickness</entry>
211994689c1Smrg      <entry>Thickness</entry>
212994689c1Smrg      <entry>Dimension</entry>
213994689c1Smrg      <entry>A</entry>
214994689c1Smrg      <entry>2 (0 if Shaped)</entry>
215994689c1Smrg    </row>
216994689c1Smrg    <row>
217994689c1Smrg      <entry>insensitiveBorder</entry>
218994689c1Smrg      <entry>Insensitive</entry>
219994689c1Smrg      <entry>Pixmap</entry>
220994689c1Smrg      <entry></entry>
221994689c1Smrg      <entry>GreyPixmap</entry>
222994689c1Smrg    </row>
223994689c1Smrg    <row>
224994689c1Smrg      <entry>internalHeight</entry>
225994689c1Smrg      <entry>Height</entry>
226994689c1Smrg      <entry>Dimension</entry>
227994689c1Smrg      <entry></entry>
228994689c1Smrg      <entry>2</entry>
229994689c1Smrg    </row>
230994689c1Smrg    <row>
231994689c1Smrg      <entry>internalWidth</entry>
232994689c1Smrg      <entry>Width</entry>
233994689c1Smrg      <entry>Dimension</entry>
234994689c1Smrg      <entry></entry>
235994689c1Smrg      <entry>4</entry>
236994689c1Smrg    </row>
237994689c1Smrg    <row>
238994689c1Smrg      <entry>international</entry>
239994689c1Smrg      <entry>International</entry>
240994689c1Smrg      <entry>Boolean</entry>
241994689c1Smrg      <entry>C</entry>
242994689c1Smrg      <entry>False</entry>
243994689c1Smrg    </row>
244994689c1Smrg    <row>
245994689c1Smrg      <entry>justify</entry>
246994689c1Smrg      <entry>Justify</entry>
247994689c1Smrg      <entry>Justify</entry>
248994689c1Smrg      <entry></entry>
249994689c1Smrg      <entry>XtJustifyCenter (center)</entry>
250994689c1Smrg    </row>
251994689c1Smrg    <row>
252994689c1Smrg      <entry>label</entry>
253994689c1Smrg      <entry>Label</entry>
254994689c1Smrg      <entry>String</entry>
255994689c1Smrg      <entry></entry>
256994689c1Smrg      <entry>name of widget</entry>
257994689c1Smrg    </row>
258994689c1Smrg    <row>
259994689c1Smrg      <entry>leftBitmap</entry>
260994689c1Smrg      <entry>LeftBitmap</entry>
261994689c1Smrg      <entry>Bitmap</entry>
262994689c1Smrg      <entry></entry>
263994689c1Smrg      <entry>None</entry>
264994689c1Smrg    </row>
265994689c1Smrg    <row>
266994689c1Smrg      <entry>mappedWhenManaged</entry>
267994689c1Smrg      <entry>MappedWhenManaged</entry>
268994689c1Smrg      <entry>Boolean</entry>
269994689c1Smrg      <entry></entry>
270994689c1Smrg      <entry>True</entry>
271994689c1Smrg    </row>
272994689c1Smrg    <row>
273994689c1Smrg      <entry>menuName</entry>
274994689c1Smrg      <entry>MenuName</entry>
275994689c1Smrg      <entry>String</entry>
276994689c1Smrg      <entry></entry>
277994689c1Smrg      <entry>"menu"</entry>
278994689c1Smrg    </row>
279994689c1Smrg    <row>
280994689c1Smrg      <entry>pointerColor</entry>
281994689c1Smrg      <entry>Foreground</entry>
282994689c1Smrg      <entry>Pixel</entry>
283994689c1Smrg      <entry></entry>
284994689c1Smrg      <entry>XtDefaultForeground</entry>
285994689c1Smrg    </row>
286994689c1Smrg    <row>
287994689c1Smrg      <entry>pointerColorBackground</entry>
288994689c1Smrg      <entry>Background</entry>
289994689c1Smrg      <entry>Pixel</entry>
290994689c1Smrg      <entry></entry>
291994689c1Smrg      <entry>XtDefaultBackground</entry>
292994689c1Smrg    </row>
293994689c1Smrg    <row>
294994689c1Smrg      <entry>resize</entry>
295994689c1Smrg      <entry>Resize</entry>
296994689c1Smrg      <entry>Boolean</entry>
297994689c1Smrg      <entry></entry>
298994689c1Smrg      <entry>True</entry>
299994689c1Smrg    </row>
300994689c1Smrg    <row>
301994689c1Smrg      <entry>screen</entry>
302994689c1Smrg      <entry>Screen</entry>
303994689c1Smrg      <entry>Screen</entry>
304994689c1Smrg      <entry>R</entry>
305994689c1Smrg      <entry>Parent's Screen</entry>
306994689c1Smrg    </row>
307994689c1Smrg    <row>
308994689c1Smrg      <entry>sensitive</entry>
309994689c1Smrg      <entry>Sensitive</entry>
310994689c1Smrg      <entry>Boolean</entry>
311994689c1Smrg      <entry></entry>
312994689c1Smrg      <entry>True</entry>
313994689c1Smrg    </row>
314994689c1Smrg    <row>
315994689c1Smrg      <entry>shapeStype</entry>
316994689c1Smrg      <entry>ShapeStyle</entry>
317994689c1Smrg      <entry>ShapeStyle</entry>
318994689c1Smrg      <entry></entry>
319994689c1Smrg      <entry>Rectangle</entry>
320994689c1Smrg    </row>
321994689c1Smrg    <row>
322994689c1Smrg      <entry>translations</entry>
323994689c1Smrg      <entry>Translations</entry>
324994689c1Smrg      <entry>TranslationTable</entry>
325994689c1Smrg      <entry></entry>
326994689c1Smrg      <entry>See below</entry>
327994689c1Smrg    </row>
328994689c1Smrg    <row>
329994689c1Smrg      <entry>width</entry>
330994689c1Smrg      <entry>Width</entry>
331994689c1Smrg      <entry>Dimension</entry>
332994689c1Smrg      <entry>A</entry>
333994689c1Smrg      <entry>graphic width + 2 * <function>internalWidth</function></entry>
334994689c1Smrg    </row>
335994689c1Smrg    <row>
336994689c1Smrg      <entry>x</entry>
337994689c1Smrg      <entry>Position</entry>
338994689c1Smrg      <entry>Position</entry>
339994689c1Smrg      <entry></entry>
340994689c1Smrg      <entry>0</entry>
341994689c1Smrg    </row>
342994689c1Smrg    <row>
343994689c1Smrg      <entry>y</entry>
344994689c1Smrg      <entry>Position</entry>
345994689c1Smrg      <entry>Position</entry>
346994689c1Smrg      <entry></entry>
347994689c1Smrg      <entry>0</entry>
348994689c1Smrg    </row>
349994689c1Smrg    <row>
350994689c1Smrg      <entry>_</entry>
351994689c1Smrg    </row>
352994689c1Smrg  </tbody>
353994689c1Smrg  </tgroup>
354994689c1Smrg</informaltable>
355994689c1Smrg<!-- .Ac -->
356994689c1Smrg<!-- .As -->
357994689c1Smrg<!-- .Bg -->
358994689c1Smrg<!-- .Gp -->
359994689c1Smrg<!-- .Bm -->
360994689c1Smrg<!-- .Bc -->
361994689c1Smrg<!-- .Bp -->
362994689c1Smrg<!-- .Bw -->
363994689c1Smrg<!-- .Cb -->
364994689c1Smrg<!-- .Cm -->
365994689c1Smrg<!-- .Cr -->
366994689c1Smrg<!-- .Cu -->
367994689c1Smrg<!-- .Cn -->
368994689c1Smrg<!-- .Dp -->
369994689c1Smrg<!-- .Dc -->
370994689c1Smrg<!-- .Lf -->
371994689c1Smrg<!-- .Ls -->
372994689c1Smrg<!-- .Lg -->
373994689c1Smrg<!-- .Hw -->
374994689c1Smrg<!-- .Ht -->
375994689c1Smrg<!-- .Ib -->
376994689c1Smrg<!-- .Ih -->
377994689c1Smrg<!-- .In -->
378994689c1Smrg<!-- .Ju -->
379994689c1Smrg<!-- .La -->
380994689c1Smrg<!-- .Mm -->
381994689c1Smrg<variablelist>
382994689c1Smrg  <varlistentry>
383994689c1Smrg    <term>
384994689c1Smrg      <function>menuName</function>
385994689c1Smrg    </term>
386994689c1Smrg    <listitem>
387994689c1Smrg      <para>
388994689c1SmrgThe name of a popup shell to popup as a menu.  The MenuButton
389994689c1Smrgwill search for this name using <function>XtNameToWidget</function> starting
390994689c1Smrgwith itself as the reference widget.  If the search is
391994689c1Smrgunsuccessful the widget will continue up the widget tree using
392994689c1Smrgeach of its ancestors as the reference widget passed to
393994689c1Smrg<function>XtNameToWidget</function>.  If no widget of called <function>menuName</function> is
394994689c1Smrgfound by this algorithm, the widget will print a warning message
395994689c1Smrgand give up.  When the menu is found it will be popped up
396994689c1Smrgexclusive and spring_loaded.  The MenuButton widget does not
397994689c1Smrgcopy the value of this resource into newly allocated memory. The
398994689c1Smrgapplication programmer must pass the resource value in
399994689c1Smrgnonvolatile memory.
400994689c1Smrg<!-- .Pf -->
401994689c1Smrg<!-- .Pb -->
402994689c1Smrg<!-- .Re -->
403994689c1Smrg<!-- .Sc -->
404994689c1Smrg<!-- .Se -->
405994689c1Smrg<!-- .Ss -->
406994689c1Smrg<!-- .Tr -->
407994689c1Smrg<!-- .Xy -->
408994689c1Smrg    </para>
409994689c1Smrg  </listitem>
410994689c1Smrg  </varlistentry>
411994689c1Smrg</variablelist>
412994689c1Smrg</para>
4135ec34c4cSmrg</sect2>
4145ec34c4cSmrg<sect2 id="MenuButton_Actions">
415994689c1Smrg<title>MenuButton Actions</title>
4165ec34c4cSmrg<indexterm><primary>MenuButton widget</primary><secondary>actions</secondary></indexterm>
417994689c1Smrg<para>
418994689c1Smrg<!-- .LP -->
419994689c1SmrgThe MenuButton widget supports the following actions:
420994689c1Smrg</para>
421994689c1Smrg<itemizedlist>
422994689c1Smrg  <listitem>
423994689c1Smrg    <para>
424994689c1SmrgSwitching the button between the foreground and background
425994689c1Smrgcolors with <function>set</function> and <function>unset</function>
426994689c1Smrg    </para>
427994689c1Smrg  </listitem>
428994689c1Smrg  <listitem>
429994689c1Smrg    <para>
430994689c1SmrgProcessing application callbacks with <function>notify</function>
431994689c1Smrg    </para>
432994689c1Smrg  </listitem>
433994689c1Smrg  <listitem>
434994689c1Smrg    <para>
435994689c1SmrgSwitching the internal border between highlighted
436994689c1Smrgand unhighlighted states with <function>highlight</function> and <function>unhighlight</function>
437994689c1Smrg    </para>
438994689c1Smrg  </listitem>
439994689c1Smrg  <listitem>
440994689c1Smrg    <para>
441994689c1SmrgPopping up a menu with <function>PopupMenu</function>
442994689c1Smrg    </para>
443994689c1Smrg  </listitem>
444994689c1Smrg</itemizedlist>
445994689c1Smrg<para>
446994689c1Smrg<!-- .LP -->
447994689c1SmrgThe following are the default translation bindings used by the
448994689c1SmrgMenuButton widget:
449994689c1Smrg</para>
450994689c1Smrg<para>
451994689c1Smrg<!-- .LP -->
452994689c1Smrg<!-- .sp -->
453994689c1Smrg<literallayout class="monospaced">
454994689c1Smrg<!-- .TA .5i 2.25i -->
455994689c1Smrg<!-- .ta .5i 2.25i -->
4565ec34c4cSmrg	&lt;EnterWindow&gt;:	highlight(&#x2006;)
4575ec34c4cSmrg	&lt;LeaveWindow&gt;:	reset(&#x2006;)
4585ec34c4cSmrg	&lt;BtnDown&gt;:	reset(&#x2006;) PopupMenu(\)
459994689c1Smrg</literallayout>
460994689c1Smrg</para>
4615ec34c4cSmrg</sect2>
4625ec34c4cSmrg<sect2 id='MenuButton_Actions_b'>
463421c997bSmrg<title>MenuButton Actions</title>
464994689c1Smrg<para>
465994689c1Smrg<!-- .LP -->
466994689c1SmrgThe full list of actions supported by MenuButton is:
467994689c1Smrg<variablelist>
468994689c1Smrg  <varlistentry>
469994689c1Smrg    <term>
470994689c1Smrg      <function>highlight</function>(<function>condition</function>)
471994689c1Smrg    </term>
472994689c1Smrg    <listitem>
473994689c1Smrg      <para>
474994689c1SmrgDisplays the internal highlight border in the color (<function>foreground</function>
475994689c1Smrgor <function>background</function> ) that contrasts with the interior color of the
476994689c1SmrgCommand widget.  The conditions <function>WhenUnset</function> and <function>Always</function> are
477994689c1Smrgunderstood by this action procedure.  If no argument is passed,
478994689c1Smrg<function>WhenUnset</function> is assumed.
479994689c1Smrg      </para>
480994689c1Smrg    </listitem>
481994689c1Smrg  </varlistentry>
482994689c1Smrg  <varlistentry>
483994689c1Smrg    <term>
4845ec34c4cSmrg      <function>unhighlight</function>(&#x2006;)
485994689c1Smrg    </term>
486994689c1Smrg    <listitem>
487994689c1Smrg      <para>
488994689c1SmrgDisplays the internal highlight border in the color (<function>XtNforeground</function>
489994689c1Smrgor <function>background</function> ) that matches the interior color of the
490994689c1SmrgMenuButton widget.
491994689c1Smrg      </para>
492994689c1Smrg    </listitem>
493994689c1Smrg  </varlistentry>
494994689c1Smrg  <varlistentry>
495994689c1Smrg    <term>
4965ec34c4cSmrg      <function>set</function>(&#x2006;)
497994689c1Smrg    </term>
498994689c1Smrg    <listitem>
499994689c1Smrg      <para>
500994689c1SmrgEnters the <function>set</function> state, in which <function>notify</function> is possible.  This
501994689c1Smrgaction causes the button to display its interior in the
502994689c1Smrg<function>foreground</function> color.  The label or bitmap is displayed in the
503994689c1Smrg<function>background</function> color.
504994689c1Smrg      </para>
505994689c1Smrg    </listitem>
506994689c1Smrg  </varlistentry>
507994689c1Smrg  <varlistentry>
508994689c1Smrg    <term>
5095ec34c4cSmrg      <function>unset</function>(&#x2006;)
510994689c1Smrg    </term>
511994689c1Smrg    <listitem>
512994689c1Smrg      <para>
513994689c1SmrgCancels the <emphasis remap='I'>set</emphasis> state and displays the interior of the button in the
514994689c1Smrg<function>background</function> color.  The label or bitmap is displayed in the
515994689c1Smrg<function>foreground</function> color.
516994689c1Smrg      </para>
517994689c1Smrg    </listitem>
518994689c1Smrg  </varlistentry>
519994689c1Smrg  <varlistentry>
520994689c1Smrg    <term>
5215ec34c4cSmrg      <function>reset</function>(&#x2006;)
522994689c1Smrg    </term>
523994689c1Smrg    <listitem>
524994689c1Smrg      <para>
525994689c1SmrgCancels any <function>set</function> or <function>highlight</function> and displays the interior of the
526994689c1Smrgbutton in the <function>background</function> color, with the label displayed in the
527994689c1Smrg<function>foreground</function> color.
528994689c1Smrg      </para>
529994689c1Smrg    </listitem>
530994689c1Smrg  </varlistentry>
531994689c1Smrg  <varlistentry>
532994689c1Smrg    <term>
5335ec34c4cSmrg      <function>notify</function>(&#x2006;)
534994689c1Smrg    </term>
535994689c1Smrg    <listitem>
536994689c1Smrg      <para>
537994689c1SmrgWhen the button is in the <function>set</function> state this action calls all functions in
538994689c1Smrgthe callback list named by the <function>callback</function> resource.  The value of
539994689c1Smrgthe call_data argument in these callback functions is undefined.
540994689c1Smrg      </para>
541994689c1Smrg    </listitem>
542994689c1Smrg  </varlistentry>
543994689c1Smrg  <varlistentry>
544994689c1Smrg    <term>
5455ec34c4cSmrg      <function>PopupMenu</function>(&#x2006;)
546994689c1Smrg    </term>
547994689c1Smrg    <listitem>
548994689c1Smrg      <para>
549994689c1SmrgPops up the menu specified by the <function>menuName</function> resource.
550994689c1Smrg    </para>
551994689c1Smrg  </listitem>
552994689c1Smrg  </varlistentry>
553994689c1Smrg</variablelist>
554994689c1Smrg</para>
555994689c1Smrg<para>
556994689c1Smrg<!-- .LP -->
557994689c1SmrgThe MenuButton widget does not place a server grab on itself.
558994689c1SmrgInstead, PopupMenu is registered as a grab action.
559994689c1SmrgAs a result, clients which popup menus without using XtMenuPopup
560994689c1Smrgor MenuPopup or PopupMenu in translations will fail to have a grab active.
561994689c1SmrgThey should make a call to XtRegisterGrabAction on the appropriate action
562994689c1Smrgin the application initialization routine, or use a different translation.
563994689c1Smrg<!-- .bp -->
564994689c1Smrg
565994689c1Smrg</para>
566994689c1Smrg</sect2>
5675ec34c4cSmrg</sect1>
568