15ec34c4cSmrg<sect1 id="SimpleMenu_Widget">
2994689c1Smrg<title>SimpleMenu Widget</title>
3994689c1Smrg<!-- .XS -->
4994689c1Smrg<!-- 	SimpleMenu Widget -->
5994689c1Smrg<!-- .XE -->
65ec34c4cSmrg<indexterm significance="preferred"><primary>SimpleMenu widget</primary></indexterm>
7994689c1Smrg<literallayout class="monospaced">
8994689c1Smrg<!-- .TA 2.0i -->
9994689c1Smrg<!-- .ta 2.0i -->
10994689c1Smrg<!-- .sp -->
11994689c1SmrgApplication Header file	&lt;X11/Xaw/SimpleMenu.h&gt;
125ec34c4cSmrg<indexterm><primary>SimpleMenu.h</primary></indexterm>
13994689c1SmrgClass Header file	&lt;X11/Xaw/SimpleMenP.h&gt;
145ec34c4cSmrg<indexterm><primary>SimpleMenP.h</primary></indexterm>
15994689c1SmrgClass		simpleMenuWidgetClass
165ec34c4cSmrg<indexterm><primary>simpleMenuWidgetClass</primary></indexterm>
17994689c1SmrgClass Name	SimpleMenu
185ec34c4cSmrg<indexterm><primary>SimpleMenu widget</primary><secondary>class name</secondary></indexterm>
19994689c1SmrgSuperclass	OverrideShell
20994689c1Smrg<!-- .sp -->
21994689c1Smrg</literallayout>
22994689c1Smrg<para>
23994689c1Smrg<!-- .LP -->
24994689c1SmrgThe SimpleMenu widget is a container for the menu entries.  It is a
25994689c1Smrgdirect subclass of shell, and is should be created with
26421c997bSmrg<function>XtCreatePopupShell</function>, not <xref linkend='XtCreateManagedWidget' xrefstyle='select: title'/>.  This is the
27994689c1Smrgonly part of the menu that
28994689c1Smrgactually is associated with a window.  The SimpleMenu serves as the glue to bind
29994689c1Smrgthe individual menu entries together into a menu.
30994689c1Smrg</para>
315ec34c4cSmrg<sect2 id="SimpleMenu::Resources">
32994689c1Smrg<title>Resources</title>
33994689c1Smrg<para>
34994689c1Smrg<!-- .LP -->
355ec34c4cSmrg<indexterm><primary>SimpleMenu widget</primary><secondary>resources</secondary></indexterm>
36994689c1Smrg</para>
37994689c1Smrg<para>
38994689c1Smrg<!-- .LP -->
39994689c1SmrgThe resources associated with the SimpleMenu widget control aspects
40994689c1Smrgthat will affect the entire menu.
41994689c1Smrg<informaltable>
42994689c1Smrg  <tgroup cols='5' align='center'>
43994689c1Smrg  <colspec colname='c1'/>
44994689c1Smrg  <colspec colname='c2'/>
45994689c1Smrg  <colspec colname='c3'/>
46994689c1Smrg  <colspec colname='c4'/>
47994689c1Smrg  <colspec colname='c5'/>
48994689c1Smrg  <thead>
49994689c1Smrg    <row>
50994689c1Smrg      <entry>Name</entry>
51994689c1Smrg      <entry>Class</entry>
52994689c1Smrg      <entry>Type</entry>
53994689c1Smrg      <entry>Notes</entry>
54994689c1Smrg      <entry>Default Value</entry>
55994689c1Smrg    </row>
56994689c1Smrg  </thead>
57994689c1Smrg  <tbody>
58994689c1Smrg    <row>
59994689c1Smrg      <entry>accelerators</entry>
60994689c1Smrg      <entry>Accelerators</entry>
61994689c1Smrg      <entry>AcceleratorTable</entry>
62994689c1Smrg      <entry></entry>
63994689c1Smrg      <entry>NULL</entry>
64994689c1Smrg    </row>
65994689c1Smrg    <row>
66994689c1Smrg      <entry>ancestorSensitive</entry>
67994689c1Smrg      <entry>AncestorSensitive</entry>
68994689c1Smrg      <entry>Boolean</entry>
69994689c1Smrg      <entry>D</entry>
70994689c1Smrg      <entry>True</entry>
71994689c1Smrg    </row>
72994689c1Smrg    <row>
73994689c1Smrg      <entry>allowShellResize</entry>
74994689c1Smrg      <entry>AllowShellResize</entry>
75994689c1Smrg      <entry>Boolean</entry>
76994689c1Smrg      <entry></entry>
77994689c1Smrg      <entry>True</entry>
78994689c1Smrg    </row>
79994689c1Smrg    <row>
80994689c1Smrg      <entry>background</entry>
81994689c1Smrg      <entry>Background</entry>
82994689c1Smrg      <entry>Pixel</entry>
83994689c1Smrg      <entry></entry>
84994689c1Smrg      <entry>XtDefaultBackground</entry>
85994689c1Smrg    </row>
86994689c1Smrg    <row>
87994689c1Smrg      <entry>backgroundPixmap</entry>
88994689c1Smrg      <entry>Pixmap</entry>
89994689c1Smrg      <entry>Pixmap</entry>
90994689c1Smrg      <entry></entry>
91994689c1Smrg      <entry>XtUnspecifiedPixmap</entry>
92994689c1Smrg    </row>
93994689c1Smrg    <row>
94994689c1Smrg      <entry>backingStore</entry>
95994689c1Smrg      <entry>BackingStore</entry>
96994689c1Smrg      <entry>BackingStore</entry>
97994689c1Smrg      <entry></entry>
98994689c1Smrg      <entry>see below</entry>
99994689c1Smrg    </row>
100994689c1Smrg    <row>
101994689c1Smrg      <entry>borderColor</entry>
102994689c1Smrg      <entry>BorderColor</entry>
103994689c1Smrg      <entry>Pixel</entry>
104994689c1Smrg      <entry></entry>
105994689c1Smrg      <entry>XtDefaultForeground</entry>
106994689c1Smrg    </row>
107994689c1Smrg    <row>
108994689c1Smrg      <entry>borderPixmap</entry>
109994689c1Smrg      <entry>Pixmap</entry>
110994689c1Smrg      <entry>Pixmap</entry>
111994689c1Smrg      <entry></entry>
112994689c1Smrg      <entry>XtUnspecifiedPixmap</entry>
113994689c1Smrg    </row>
114994689c1Smrg    <row>
115994689c1Smrg      <entry>borderWidth</entry>
116994689c1Smrg      <entry>BorderWidth</entry>
117994689c1Smrg      <entry>Dimension</entry>
118994689c1Smrg      <entry></entry>
119994689c1Smrg      <entry>1</entry>
120994689c1Smrg    </row>
121994689c1Smrg    <row>
122994689c1Smrg      <entry>bottomMargin</entry>
123994689c1Smrg      <entry>VerticalMargins</entry>
124994689c1Smrg      <entry>Dimension</entry>
125994689c1Smrg      <entry></entry>
126994689c1Smrg      <entry>0</entry>
127994689c1Smrg    </row>
128994689c1Smrg    <row>
129994689c1Smrg      <entry>children</entry>
130994689c1Smrg      <entry>ReadOnly</entry>
131994689c1Smrg      <entry>WidgetList</entry>
132994689c1Smrg      <entry>R</entry>
133994689c1Smrg      <entry>NULL</entry>
134994689c1Smrg    </row>
135994689c1Smrg    <row>
136994689c1Smrg      <entry>createPopupChildProc</entry>
137994689c1Smrg      <entry>CreatePopupChildProc</entry>
138994689c1Smrg      <entry>Function</entry>
139994689c1Smrg      <entry></entry>
140994689c1Smrg      <entry>NULL</entry>
141994689c1Smrg    </row>
142994689c1Smrg    <row>
143994689c1Smrg      <entry>colormap</entry>
144994689c1Smrg      <entry>Colormap</entry>
145994689c1Smrg      <entry>Colormap</entry>
146994689c1Smrg      <entry></entry>
147994689c1Smrg      <entry>Parent's Colormap</entry>
148994689c1Smrg    </row>
149994689c1Smrg    <row>
150994689c1Smrg      <entry>cursor</entry>
151994689c1Smrg      <entry>Cursor</entry>
152994689c1Smrg      <entry>Cursor</entry>
153994689c1Smrg      <entry></entry>
154994689c1Smrg      <entry>None</entry>
155994689c1Smrg    </row>
156994689c1Smrg    <row>
157994689c1Smrg      <entry>depth</entry>
158994689c1Smrg      <entry>Depth</entry>
159994689c1Smrg      <entry>int</entry>
160994689c1Smrg      <entry>C</entry>
161994689c1Smrg      <entry>Parent's Depth</entry>
162994689c1Smrg    </row>
163994689c1Smrg    <row>
164994689c1Smrg      <entry>destroyCallback</entry>
165994689c1Smrg      <entry>Callback</entry>
166994689c1Smrg      <entry>XtCallbackList</entry>
167994689c1Smrg      <entry></entry>
168994689c1Smrg      <entry>NULL</entry>
169994689c1Smrg    </row>
170994689c1Smrg    <row>
171994689c1Smrg      <entry>geometry</entry>
172994689c1Smrg      <entry>Geometry</entry>
173994689c1Smrg      <entry>String</entry>
174994689c1Smrg      <entry></entry>
175994689c1Smrg      <entry>NULL</entry>
176994689c1Smrg    </row>
177994689c1Smrg    <row>
178994689c1Smrg      <entry>height</entry>
179994689c1Smrg      <entry>Height</entry>
180994689c1Smrg      <entry>Dimension</entry>
181994689c1Smrg      <entry></entry>
182994689c1Smrg      <entry>Enough space to contain all entries</entry>
183994689c1Smrg    </row>
184994689c1Smrg    <row>
185994689c1Smrg      <entry>label</entry>
186994689c1Smrg      <entry>Label</entry>
187994689c1Smrg      <entry>String</entry>
188994689c1Smrg      <entry></entry>
189994689c1Smrg      <entry>NULL</entry>
190994689c1Smrg    </row>
191994689c1Smrg    <row>
192994689c1Smrg      <entry>labelClass</entry>
193994689c1Smrg      <entry>LabelClass</entry>
194994689c1Smrg      <entry>Pointer</entry>
195994689c1Smrg      <entry></entry>
196994689c1Smrg      <entry>SmeBSBObjectClass</entry>
197994689c1Smrg    </row>
198994689c1Smrg    <row>
199994689c1Smrg      <entry>mappedWhenManaged</entry>
200994689c1Smrg      <entry>MappedWhenManaged</entry>
201994689c1Smrg      <entry>Boolean</entry>
202994689c1Smrg      <entry></entry>
203994689c1Smrg      <entry>True</entry>
204994689c1Smrg    </row>
205994689c1Smrg    <row>
206994689c1Smrg      <entry>menuOnScreen</entry>
207994689c1Smrg      <entry>MenuOnScreen</entry>
208994689c1Smrg      <entry>Boolean</entry>
209994689c1Smrg      <entry></entry>
210994689c1Smrg      <entry>True</entry>
211994689c1Smrg    </row>
212994689c1Smrg    <row>
213994689c1Smrg      <entry>numChildren</entry>
214994689c1Smrg      <entry>ReadOnly</entry>
215994689c1Smrg      <entry>Cardinal</entry>
216994689c1Smrg      <entry>R</entry>
217994689c1Smrg      <entry>0</entry>
218994689c1Smrg    </row>
219994689c1Smrg    <row>
220994689c1Smrg      <entry>overrideRedirect</entry>
221994689c1Smrg      <entry>OverrideRedirect</entry>
222994689c1Smrg      <entry>Boolean</entry>
223994689c1Smrg      <entry></entry>
224994689c1Smrg      <entry>True</entry>
225994689c1Smrg    </row>
226994689c1Smrg    <row>
227994689c1Smrg      <entry>popdownCallback</entry>
228994689c1Smrg      <entry>Callback</entry>
229994689c1Smrg      <entry>XtCallbackList</entry>
230994689c1Smrg      <entry></entry>
231994689c1Smrg      <entry>NULL</entry>
232994689c1Smrg    </row>
233994689c1Smrg    <row>
234994689c1Smrg      <entry>popupCallback</entry>
235994689c1Smrg      <entry>Callback</entry>
236994689c1Smrg      <entry>XtCallbackList</entry>
237994689c1Smrg      <entry></entry>
238994689c1Smrg      <entry>NULL</entry>
239994689c1Smrg    </row>
240994689c1Smrg    <row>
241994689c1Smrg      <entry>popupOnEntry</entry>
242994689c1Smrg      <entry>PopupOnEntry</entry>
243994689c1Smrg      <entry>Widget</entry>
244994689c1Smrg      <entry>A</entry>
245994689c1Smrg      <entry>Label or first entry</entry>
246994689c1Smrg    </row>
247994689c1Smrg    <row>
248994689c1Smrg      <entry>rowHeight</entry>
249994689c1Smrg      <entry>RowHeight</entry>
250994689c1Smrg      <entry>Dimension</entry>
251994689c1Smrg      <entry></entry>
252994689c1Smrg      <entry>0</entry>
253994689c1Smrg    </row>
254994689c1Smrg    <row>
255994689c1Smrg      <entry>saveUnder</entry>
256994689c1Smrg      <entry>SaveUnder</entry>
257994689c1Smrg      <entry>Boolean</entry>
258994689c1Smrg      <entry></entry>
259994689c1Smrg      <entry>False</entry>
260994689c1Smrg    </row>
261994689c1Smrg    <row>
262994689c1Smrg      <entry>screen</entry>
263994689c1Smrg      <entry>Screen</entry>
264994689c1Smrg      <entry>Screen</entry>
265994689c1Smrg      <entry>R</entry>
266994689c1Smrg      <entry>Parent's Screen</entry>
267994689c1Smrg    </row>
268994689c1Smrg    <row>
269994689c1Smrg      <entry>sensitive</entry>
270994689c1Smrg      <entry>Sensitive</entry>
271994689c1Smrg      <entry>Boolean</entry>
272994689c1Smrg      <entry></entry>
273994689c1Smrg      <entry>True</entry>
274994689c1Smrg    </row>
275994689c1Smrg    <row>
276994689c1Smrg      <entry>topMargin</entry>
277994689c1Smrg      <entry>VerticalMargins</entry>
278994689c1Smrg      <entry>Dimension</entry>
279994689c1Smrg      <entry></entry>
280994689c1Smrg      <entry>0</entry>
281994689c1Smrg    </row>
282994689c1Smrg    <row>
283994689c1Smrg      <entry>translations</entry>
284994689c1Smrg      <entry>Translations</entry>
285994689c1Smrg      <entry>TranslationTable</entry>
286994689c1Smrg      <entry></entry>
287994689c1Smrg      <entry>See below</entry>
288994689c1Smrg    </row>
289994689c1Smrg    <row>
290994689c1Smrg      <entry>visual</entry>
291994689c1Smrg      <entry>Visual</entry>
292994689c1Smrg      <entry>Visual</entry>
293994689c1Smrg      <entry></entry>
294994689c1Smrg      <entry>CopyFromParent</entry>
295994689c1Smrg    </row>
296994689c1Smrg    <row>
297994689c1Smrg      <entry>width</entry>
298994689c1Smrg      <entry>Width</entry>
299994689c1Smrg      <entry>Dimension</entry>
300994689c1Smrg      <entry></entry>
301994689c1Smrg      <entry>Width of widest entry</entry>
302994689c1Smrg    </row>
303994689c1Smrg    <row>
304994689c1Smrg      <entry>x</entry>
305994689c1Smrg      <entry>Position</entry>
306994689c1Smrg      <entry>Position</entry>
307994689c1Smrg      <entry></entry>
308994689c1Smrg      <entry>0</entry>
309994689c1Smrg    </row>
310994689c1Smrg    <row>
311994689c1Smrg      <entry>y</entry>
312994689c1Smrg      <entry>Position</entry>
313994689c1Smrg      <entry>Position</entry>
314994689c1Smrg      <entry></entry>
315994689c1Smrg      <entry>0</entry>
316994689c1Smrg    </row>
317994689c1Smrg  </tbody>
318994689c1Smrg  </tgroup>
319994689c1Smrg</informaltable>
320994689c1Smrg<!-- .Ac -->
321994689c1Smrg<!-- .As -->
322994689c1Smrg<variablelist>
323994689c1Smrg  <varlistentry>
324994689c1Smrg    <term>
325994689c1Smrg      <function>backingStore</function>
326994689c1Smrg    </term>
327994689c1Smrg    <listitem>
328994689c1Smrg      <para>
3295ec34c4cSmrg<indexterm><primary>conversions</primary><secondary>BackingStore</secondary></indexterm>
330994689c1SmrgDetermines what type of backing store will be used for the menu.  Legal
331994689c1Smrgvalues for this resource are <function>NotUseful</function>, <function>WhenMapped</function>, and
332994689c1Smrg<function>Always</function>.  These values are the backing-store integers defined in
333994689c1Smrg&lt;X11/X.h&gt;.
334994689c1Smrg<!-- .Rs "notUseful, whenMapped, always, \fPand\fP default" -->
335994689c1SmrgIf <function>default</function> is specified (the default behavior) the server will use
336994689c1Smrgwhatever it thinks is appropriate.
337994689c1Smrg<!-- .Bg -->
338994689c1Smrg<!-- .Gp -->
339994689c1Smrg<!-- .Bc -->
340994689c1Smrg<!-- .Bp -->
341994689c1Smrg<!-- .Bw -->
342994689c1Smrg      </para>
343994689c1Smrg    </listitem>
344994689c1Smrg  </varlistentry>
345994689c1Smrg  <varlistentry>
346994689c1Smrg    <term>
347994689c1Smrg      <function>bottomMargin</function>
348994689c1Smrg    </term>
349994689c1Smrg    <listitem>
350994689c1Smrg      <para>
351994689c1Smrg<!-- .br -->
352994689c1Smrg<!-- .ns -->
353994689c1Smrg      </para>
354994689c1Smrg    </listitem>
355994689c1Smrg  </varlistentry>
356994689c1Smrg  <varlistentry>
357994689c1Smrg    <term>
358994689c1Smrg      <function>topMargin</function>
359994689c1Smrg    </term>
360994689c1Smrg    <listitem>
361994689c1Smrg      <para>
362994689c1SmrgThe amount of space between the top or bottom of the menu and the menu entry
363994689c1Smrgclosest to that edge.
364994689c1Smrg<!-- .Ch -->
365994689c1Smrg<!-- .Cm -->
366994689c1Smrg      </para>
367994689c1Smrg    </listitem>
368994689c1Smrg  </varlistentry>
369994689c1Smrg  <varlistentry>
370994689c1Smrg    <term>
371994689c1Smrg      <function>cursor</function>
372994689c1Smrg    </term>
373994689c1Smrg    <listitem>
374994689c1Smrg      <para>
375994689c1SmrgThe shape of the mouse pointer whenever it is in this widget.
376994689c1Smrg<!-- .Dp -->
377994689c1Smrg<!-- .Dc -->
378994689c1Smrg      </para>
379994689c1Smrg    </listitem>
380994689c1Smrg  </varlistentry>
381994689c1Smrg  <varlistentry>
382994689c1Smrg    <term>
383994689c1Smrg      geometry
384994689c1Smrg    </term>
385994689c1Smrg    <listitem>
386994689c1Smrg      <para>
387994689c1SmrgIf this resource is specified it will override the x, y, width and
388994689c1Smrgheight of this widget.  The format of this string is
389994689c1Smrg[&lt;<emphasis remap='I'>width</emphasis>&gt;x&lt;<emphasis remap='I'>height</emphasis>&gt;][{+ -} &lt;<emphasis remap='I'>xoffset</emphasis>&gt; {+ -}&lt;<emphasis remap='I'>yoffset</emphasis>&gt;].
390994689c1Smrg<!-- .Hw -->
391994689c1Smrg      </para>
392994689c1Smrg    </listitem>
393994689c1Smrg  </varlistentry>
394994689c1Smrg  <varlistentry>
395994689c1Smrg    <term>
396994689c1Smrg      <function>label</function>
397994689c1Smrg    </term>
398994689c1Smrg    <listitem>
399994689c1Smrg      <para>
400994689c1SmrgThis label will be placed at the top of the SimpleMenu, and may not be
401994689c1Smrghighlighted.  The name of the
402994689c1Smrglabel object is <function>menuLabel</function>.  Using this name it is possible to
403994689c1Smrgmodify the label's attributes through the resource database.  When the label
404994689c1Smrgis created, the <function>label</function> is hard coded to the value of <function>label</function>, and
405994689c1Smrg<function>justify</function> is hard coded as <function>XtJustifyCenter</function>.
406994689c1Smrg      </para>
407994689c1Smrg    </listitem>
408994689c1Smrg  </varlistentry>
409994689c1Smrg  <varlistentry>
410994689c1Smrg    <term>
411994689c1Smrg      <function>labelClass</function>
412994689c1Smrg    </term>
413994689c1Smrg    <listitem>
414994689c1Smrg      <para>
415994689c1SmrgSpecifies the type of Sme object created as the menu label.
416994689c1Smrg<!-- .Mm -->
417994689c1Smrg      </para>
418994689c1Smrg    </listitem>
419994689c1Smrg  </varlistentry>
420994689c1Smrg  <varlistentry>
421994689c1Smrg    <term>
422994689c1Smrg      <function>menuOnScreen</function>
423994689c1Smrg    </term>
424994689c1Smrg    <listitem>
425994689c1Smrg      <para>
426994689c1SmrgIf the menu is automatically positioned under the cursor with the
427994689c1Smrg<function>XawPositionSimpleMenu</function> action, and this resource is <function>True</function>,
428994689c1Smrgthen the menu will always be fully visible on the screen.
429994689c1Smrg<!-- .Nc -->
430994689c1Smrg      </para>
431994689c1Smrg    </listitem>
432994689c1Smrg  </varlistentry>
433994689c1Smrg  <varlistentry>
434994689c1Smrg    <term>
435994689c1Smrg      overrideRedirect
436994689c1Smrg    </term>
437994689c1Smrg    <listitem>
438994689c1Smrg      <para>
439994689c1SmrgDetermines the value of the override_redirect attribute of the
440994689c1SmrgSimpleMenu's window.  The override_redirect attribute of a window
441994689c1Smrgdetermines whether or not a window manager may interpose itself between
442994689c1Smrgthis window and the root window of the display.  For more information
4435ec34c4cSmrgsee the <olink targetdoc='icccm' targetptr='icccm'
4445ec34c4cSmrg><citetitle>Interclient Communications Conventions Manual</citetitle></olink>.
445994689c1Smrg      </para>
446994689c1Smrg    </listitem>
447994689c1Smrg  </varlistentry>
448994689c1Smrg  <varlistentry>
449994689c1Smrg    <term>
450994689c1Smrg      popdownCallback
451994689c1Smrg    </term>
452994689c1Smrg    <listitem>
453994689c1Smrg      <para>
454994689c1Smrg<!-- .br -->
455994689c1Smrg<!-- .ns -->
456994689c1Smrg      </para>
457994689c1Smrg    </listitem>
458994689c1Smrg  </varlistentry>
459994689c1Smrg  <varlistentry>
460994689c1Smrg    <term>
461994689c1Smrg      popupCallback
462994689c1Smrg    </term>
463994689c1Smrg    <listitem>
464994689c1Smrg      <para>
465994689c1SmrgThese callback functions are called by the Xt Intrinsics whenever the
466994689c1Smrgshell is popped up or down (See <emphasis remap='I'>(xT</emphasis> for details).
467994689c1Smrg      </para>
468994689c1Smrg    </listitem>
469994689c1Smrg  </varlistentry>
470994689c1Smrg  <varlistentry>
471994689c1Smrg    <term>
472994689c1Smrg      <function>popupOnEntry</function>
473994689c1Smrg    </term>
474994689c1Smrg    <listitem>
475994689c1Smrg      <para>
476994689c1SmrgThe <function>XawPositionSimpleMenu</function> action will, by default, popup the
477994689c1SmrgSimpleMenu with its label (or first entry) directly under the
478994689c1Smrgpointer.  To popup the menu under
479994689c1Smrganother entry, set this resource to the menu entry that should be
480994689c1Smrgunder the pointer, when the menu is popped up.  This allows the
481994689c1Smrgapplication to offer the user a default menu entry that can be selected
482994689c1Smrgwith out moving the pointer.
483994689c1Smrg      </para>
484994689c1Smrg    </listitem>
485994689c1Smrg  </varlistentry>
486994689c1Smrg  <varlistentry>
487994689c1Smrg    <term>
488994689c1Smrg      <function>rowHeight</function>
489994689c1Smrg    </term>
490994689c1Smrg    <listitem>
491994689c1Smrg      <para>
492994689c1SmrgIf this resources is zero (the default) then each menu entry will be
493994689c1Smrggiven its desired height.  If this resource has any other value then
494994689c1Smrgall menu entries will be forced to be <function>rowHeight</function> pixels high.
495994689c1Smrg      </para>
496994689c1Smrg    </listitem>
497994689c1Smrg  </varlistentry>
498994689c1Smrg  <varlistentry>
499994689c1Smrg    <term>
500994689c1Smrg      saveUnder
501994689c1Smrg    </term>
502994689c1Smrg    <listitem>
503994689c1Smrg      <para>
504994689c1SmrgIf this is <function>True</function> then save unders will be active on the menu's window.
505994689c1Smrg<!-- .Sc -->
506994689c1Smrg<!-- .Se -->
507994689c1Smrg<!-- .Tr -->
508994689c1Smrg<!-- .Xy -->
509994689c1Smrg    </para>
510994689c1Smrg  </listitem>
511994689c1Smrg  </varlistentry>
512994689c1Smrg</variablelist>
513994689c1Smrg</para>
5145ec34c4cSmrg</sect2>
5155ec34c4cSmrg<sect2 id="SimpleMenu_Actions">
516994689c1Smrg<title>SimpleMenu Actions</title>
5175ec34c4cSmrg<indexterm><primary>SimpleMenu widget</primary><secondary>actions</secondary></indexterm>
518994689c1Smrg<para>
519994689c1Smrg<!-- .LP -->
520994689c1SmrgThe SimpleMenu widget supports the following actions:
521994689c1Smrg</para>
522994689c1Smrg<itemizedlist>
523994689c1Smrg  <listitem>
524994689c1Smrg    <para>
525994689c1SmrgSwitching the entry under the mouse pointer between
526994689c1Smrgthe foreground and background colors with <function>highlight</function>
527994689c1Smrgand <function>unhighlight</function>
528994689c1Smrg    </para>
529994689c1Smrg  </listitem>
530994689c1Smrg  <listitem>
531994689c1Smrg    <para>
532994689c1SmrgProcessing menu entry callbacks with <function>notify</function>
533994689c1Smrg<!-- .sp -->
534994689c1Smrg    </para>
535994689c1Smrg  </listitem>
536994689c1Smrg</itemizedlist>
537994689c1Smrg<para>
538994689c1Smrg<!-- .LP -->
5395ec34c4cSmrg<indexterm><primary>SimpleMenu widget</primary><secondary>default translations</secondary></indexterm>
540994689c1SmrgThe following are the default translation bindings used
541994689c1Smrgby the SimpleMenu widget:
542994689c1Smrg</para>
543994689c1Smrg<para>
544994689c1Smrg<!-- .LP -->
545994689c1Smrg<!-- .sp -->
546994689c1Smrg<literallayout class="monospaced">
547994689c1Smrg<!-- .TA .5i 2.25i -->
548994689c1Smrg<!-- .ta .5i 2.25i -->
5495ec34c4cSmrg	&lt;EnterWindow&gt;:	highlight(&#x2006;)
5505ec34c4cSmrg	&lt;LeaveWindow&gt;:	unhighlight(&#x2006;)
5515ec34c4cSmrg	&lt;BtnMotion&gt;:	highlight(&#x2006;)
5525ec34c4cSmrg	&lt;BtnUp&gt;:	MenuPopdown(&#x2006;) notify(&#x2006;) unhighlight(&#x2006;)
553994689c1Smrg</literallayout>
554994689c1Smrg<!-- .sp -->
555994689c1Smrg</para>
556994689c1Smrg<para>
557994689c1Smrg<!-- .LP -->
5585ec34c4cSmrg<indexterm><primary>SimpleMenu widget</primary><secondary>MenuPopdown routine</secondary></indexterm>
559994689c1SmrgThe user can pop down the menu without activating any of the callback
560994689c1Smrgfunctions by releasing the pointer button when no menu item is
561994689c1Smrghighlighted.
562994689c1Smrg<!-- .sp -->
563994689c1Smrg</para>
564994689c1Smrg<para>
565994689c1Smrg<!-- .LP -->
566994689c1SmrgThe full list of actions supported by SimpleMenu is:
567994689c1Smrg<variablelist>
568994689c1Smrg  <varlistentry>
569994689c1Smrg    <term>
570994689c1Smrg      <function>highlight</function>()
571994689c1Smrg    </term>
572994689c1Smrg    <listitem>
573994689c1Smrg      <para>
574994689c1SmrgHighlight the menu entry that is currently under the pointer.
575994689c1SmrgOnly a item that is highlighted will be notified when the <function>notify</function>
576994689c1Smrgaction is invoked.  The look of a highlighted entry is determined by
577994689c1Smrgthe menu entry.
578994689c1Smrg      </para>
579994689c1Smrg    </listitem>
580994689c1Smrg  </varlistentry>
581994689c1Smrg  <varlistentry>
582994689c1Smrg    <term>
5835ec34c4cSmrg      <function>unhighlight</function>(&#x2006;)
584994689c1Smrg    </term>
585994689c1Smrg    <listitem>
586994689c1Smrg      <para>
587994689c1SmrgUnhighlights the currently highlighted menu item, and returns it to
588994689c1Smrgits normal look.
589994689c1Smrg      </para>
590994689c1Smrg    </listitem>
591994689c1Smrg  </varlistentry>
592994689c1Smrg  <varlistentry>
593994689c1Smrg    <term>
5945ec34c4cSmrg      <function>notify</function>(&#x2006;)
595994689c1Smrg    </term>
596994689c1Smrg    <listitem>
597994689c1Smrg      <para>
598994689c1SmrgNotifies the menu entry that is currently highlighted that is has been
599994689c1Smrgselected.  It is the responsibility of the menu entry to take the
600994689c1Smrgappropriate action.
601994689c1Smrg      </para>
602994689c1Smrg    </listitem>
603994689c1Smrg  </varlistentry>
604994689c1Smrg  <varlistentry>
605994689c1Smrg    <term>
606994689c1Smrg      <function>MenuPopdown</function>(<emphasis remap='I'>menu</emphasis>)
607994689c1Smrg    </term>
608994689c1Smrg    <listitem>
609994689c1Smrg      <para>
610994689c1SmrgThis action is defined in <emphasis remap='I'>(xT</emphasis>.
6115ec34c4cSmrg<indexterm><primary>SimpleMenu widget</primary><secondary>MenuPopdown routine</secondary></indexterm>
612994689c1Smrg    </para>
613994689c1Smrg  </listitem>
614994689c1Smrg  </varlistentry>
615994689c1Smrg</variablelist>
616994689c1Smrg</para>
6175ec34c4cSmrg</sect2>
6185ec34c4cSmrg<sect2 id="Positioning_the_SimpleMenu">
619994689c1Smrg<title>Positioning the SimpleMenu</title>
6205ec34c4cSmrg<indexterm significance="preferred"><primary>XawPositionSimpleMenu</primary></indexterm>
6215ec34c4cSmrg<indexterm significance="preferred"><primary>SimpleMenu widget</primary><secondary>positioning</secondary></indexterm>
622994689c1Smrg<para>
623994689c1Smrg<!-- .LP -->
624994689c1SmrgIf the SimpleMenu widget is to be used as a pulldown menu then the
625994689c1SmrgMenuButton widget, or some other outside means should be used to place
626994689c1Smrgthe menu when it is popped up.
627994689c1Smrg</para>
628994689c1Smrg<para>
629994689c1Smrg<!-- .LP -->
630994689c1SmrgIf popup menus are desired it will be necessary to add the
631994689c1Smrg<function>XawPositionSimpleMenu</function> and <function>MenuPopup</function> actions to the
632994689c1Smrgtranslation table of the widget that will be popping up the menu.  The
633994689c1Smrg<function>MenuPopup</function> action is described in <emphasis remap='I'>(xT</emphasis>.
634994689c1Smrg<function>XawPositionSimpleMenu</function> is a global action procedure registered by
635994689c1Smrgthe SimpleMenu widget when the first one is created or the convenience
636421c997bSmrgroutine <xref linkend='XawSimpleMenuAddGlobalActions' xrefstyle='select: title'/> is called.
637994689c1Smrg</para>
638994689c1Smrg<para>
639994689c1Smrg<!-- .LP -->
640994689c1SmrgTranslation writers should be aware that Xt does not register grabs on
6415ec34c4cSmrg<quote>don't care</quote> modifiers, and therefore the left hand side of the
642994689c1Smrgproduction should be written to exclude unspecified modifiers.
643994689c1SmrgFor example these are the translations needed to popup some of
644994689c1Smrg<function>xterm's</function> menus:
645994689c1Smrg<!-- .sp -->
646994689c1Smrg</para>
647994689c1Smrg<para>
648994689c1Smrg<!-- .LP -->
649994689c1Smrg<literallayout class="monospaced">
650994689c1Smrg<!-- .TA .5i 2.25i -->
651994689c1Smrg<!-- .ta .5i 2.25i -->
652994689c1Smrg	!Ctrl&lt;Btn1Down&gt;: XawPositionSimpleMenu(xterm) MenuPopup(xterm)
653994689c1Smrg	!Ctrl&lt;Btn2Down&gt;: XawPositionSimpleMenu(modes) MenuPopup(modes)
654994689c1Smrg</literallayout>
655994689c1Smrg<!-- .sp 1 -->
656994689c1Smrg</para>
657994689c1Smrg<para>
658994689c1Smrg<!-- .LP -->
659994689c1Smrg<variablelist>
660994689c1Smrg  <varlistentry>
661994689c1Smrg    <term>
662994689c1Smrg      <function>XawPositionSimpleMenu</function>(<emphasis remap='I'>menu</emphasis>)
663994689c1Smrg    </term>
664994689c1Smrg    <listitem>
665994689c1Smrg      <para>
666994689c1SmrgThe <function>XawPositionSimpleMenu</function> routine will search for the menu name
667994689c1Smrgpassed to it using <function>XtNameToWidget</function> starting with the widget
668994689c1Smrginvoking the action as the reference widget.  If it is unsuccessful it
669994689c1Smrgwill continue up the widget tree using each of the invoking widget's
670994689c1Smrgancestors as the reference widget.  If it is still unsuccessful it will
671994689c1Smrgprint a warning message and give up.  <function>XawPositionSimpleMenu</function> will
672994689c1Smrgposition the menu directly under the pointer cursor.  The menu will be
673994689c1Smrgplaced so that the pointer cursor is centered on the entry named by the
674994689c1Smrg<function>popupOnEntry</function> resource.  If the <function>menuOnScreen</function> resource is
675994689c1Smrg<function>True</function> then the menu will always be fully visible on the screen.
676994689c1Smrg    </para>
677994689c1Smrg  </listitem>
678994689c1Smrg  </varlistentry>
679994689c1Smrg</variablelist>
680994689c1Smrg</para>
6815ec34c4cSmrg</sect2>
6825ec34c4cSmrg<sect2 id="SimpleMenu::Convenience_Routines">
683994689c1Smrg<title>Convenience Routines</title>
6845ec34c4cSmrg<sect3 id="Registering_the_Global_Action_Routines">
685994689c1Smrg<title>Registering the Global Action Routines</title>
686994689c1Smrg<para>
687994689c1Smrg<!-- .LP -->
6885ec34c4cSmrg<indexterm><primary>XawPositionSimpleMenu</primary></indexterm>
689994689c1SmrgThe <function>XawPositionSimpleMenu</function> action routine may often be invoked
690994689c1Smrgbefore any menus have been created.  This can occur when an
691994689c1Smrgapplication uses dynamic menu creation.  In these cases an application will
692994689c1Smrgneed to register this global action routine by calling
693421c997bSmrg<xref linkend='XawSimpleMenuAddGlobalActions' xrefstyle='select: title'/>:
6945ec34c4cSmrg<indexterm significance="preferred"><primary>XawSimpleMenuAddGlobalActions</primary></indexterm>
695421c997bSmrg<funcsynopsis id='XawSimpleMenuAddGlobalActions'>
696994689c1Smrg<funcprototype>
697994689c1Smrg  <funcdef>void<function> XawSimpleMenuAddGlobalActions</function></funcdef>
698994689c1Smrg  <paramdef>XtAppContext<parameter> app_con</parameter></paramdef>
699994689c1Smrg</funcprototype>
700994689c1Smrg</funcsynopsis>
701994689c1Smrg<!-- .FN -->
702994689c1Smrg<variablelist>
703994689c1Smrg  <varlistentry>
704994689c1Smrg    <term>
705994689c1Smrg      <emphasis remap='I'>app_con</emphasis>
706994689c1Smrg    </term>
707994689c1Smrg    <listitem>
708994689c1Smrg      <para>
709994689c1SmrgSpecifies the application context in which this action should be registered.
710994689c1Smrg    </para>
711994689c1Smrg  </listitem>
712994689c1Smrg  </varlistentry>
713994689c1Smrg</variablelist>
714994689c1Smrg</para>
715994689c1Smrg<para>
716994689c1Smrg<!-- .LP -->
717994689c1SmrgThis function need only be called once per application and must be
718994689c1Smrgcalled before any widget that uses <function>XawPositionSimpleMenu</function> action
719994689c1Smrgis realized.
720994689c1Smrg</para>
7215ec34c4cSmrg</sect3>
7225ec34c4cSmrg<sect3 id="Getting_and_Clearing_the_Current_Menu_Entry">
723994689c1Smrg<title>Getting and Clearing the Current Menu Entry</title>
724994689c1Smrg<para>
725994689c1Smrg<!-- .LP -->
726994689c1SmrgTo get the currently highlighted menu entry use
727421c997bSmrg<xref linkend='XawSimpleMenuGetActiveEntry' xrefstyle='select: title'/>:
7285ec34c4cSmrg<indexterm significance="preferred"><primary>XawSimpleMenuGetActiveEntry</primary></indexterm>
729421c997bSmrg<funcsynopsis id='XawSimpleMenuGetActiveEntry'>
730994689c1Smrg<funcprototype>
731994689c1Smrg  <funcdef>Widget<function> XawSimpleMenuGetActiveEntry</function></funcdef>
732994689c1Smrg  <paramdef>Widget<parameter> w</parameter></paramdef>
733994689c1Smrg</funcprototype>
734994689c1Smrg</funcsynopsis>
735994689c1Smrg<!-- .FN -->
736994689c1Smrg<variablelist>
737994689c1Smrg  <varlistentry>
738994689c1Smrg    <term>
739994689c1Smrg      <emphasis remap='I'>w</emphasis>
740994689c1Smrg    </term>
741994689c1Smrg    <listitem>
742994689c1Smrg      <para>
743994689c1SmrgSpecifies the SimpleMenu widget.
744994689c1Smrg    </para>
745994689c1Smrg  </listitem>
746994689c1Smrg  </varlistentry>
747994689c1Smrg</variablelist>
748994689c1Smrg</para>
749994689c1Smrg<para>
750994689c1Smrg<!-- .LP -->
751994689c1SmrgThis function returns the menu entry that is
752994689c1Smrgcurrently highlighted, or NULL if no entry is highlighted.
753994689c1Smrg</para>
754994689c1Smrg<para>
755994689c1Smrg<!-- .LP -->
756994689c1Smrg<!-- .sp -->
757994689c1SmrgTo clear the SimpleMenu widget's internal information about the
758994689c1Smrgcurrently highlighted menu entry use
759421c997bSmrg<xref linkend='XawSimpleMenuClearActiveEntry' xrefstyle='select: title'/>:
7605ec34c4cSmrg<indexterm significance="preferred"><primary>XawSimpleMenuClearActiveEntry</primary></indexterm>
761421c997bSmrg<funcsynopsis id='XawSimpleMenuClearActiveEntry'>
762994689c1Smrg<funcprototype>
763994689c1Smrg  <funcdef>Widget<function> XawSimpleMenuClearActiveEntry</function></funcdef>
764994689c1Smrg  <paramdef>Widget<parameter> w</parameter></paramdef>
765994689c1Smrg</funcprototype>
766994689c1Smrg</funcsynopsis>
767994689c1Smrg<!-- .FN -->
768994689c1Smrg<variablelist>
769994689c1Smrg  <varlistentry>
770994689c1Smrg    <term>
771994689c1Smrg      <emphasis remap='I'>w</emphasis>
772994689c1Smrg    </term>
773994689c1Smrg    <listitem>
774994689c1Smrg      <para>
775994689c1SmrgSpecifies the SimpleMenu widget.
776994689c1Smrg    </para>
777994689c1Smrg  </listitem>
778994689c1Smrg  </varlistentry>
779994689c1Smrg</variablelist>
780994689c1Smrg</para>
781994689c1Smrg<para>
782994689c1Smrg<!-- .LP -->
783994689c1SmrgThis function unsets all internal references to the currently
784994689c1Smrghighlighted menu entry.  It does not <emphasis remap='I'>unhighlight</emphasis> or otherwise
785994689c1Smrgalter the appearance of the active entry.  This function is primarily
786994689c1Smrgfor use by implementors of menu entries.
787994689c1Smrg
788994689c1Smrg</para>
789994689c1Smrg</sect3>
790994689c1Smrg</sect2>
7915ec34c4cSmrg</sect1>
792