+ if (!pullDown)
+ {
+ menu = XmCreatePopupMenu ((Widget) parent, wxMOTIF_STR("popup"), args, 3);
+#if 0
+ XtAddCallback(menu,
+ XmNunmapCallback,
+ (XtCallbackProc)wxMenuPopdownCallback,
+ (XtPointer)this);
+#endif
+ }
+ else
+ {
+ char mnem = wxFindMnemonic (title);
+ menu = XmCreatePulldownMenu ((Widget) parent, wxMOTIF_STR("pulldown"), args, 3);
+
+ wxString title2(wxStripMenuCodes(title));
+ wxXmString label_str(title2);
+ buttonWidget = XtVaCreateManagedWidget(title2,
+#if wxUSE_GADGETS
+ xmCascadeButtonGadgetClass, (Widget) parent,
+#else
+ xmCascadeButtonWidgetClass, (Widget) parent,
+#endif
+ XmNlabelString, label_str(),
+ XmNsubMenuId, menu,
+ (String)wxFont::GetFontTag(), m_font.GetFontTypeC(dpy),
+ XmNpositionIndex, menuIndex,
+ NULL);
+
+ if (mnem != 0)
+ XtVaSetValues (buttonWidget, XmNmnemonic, mnem, NULL);
+ }