XMCREATEPOPUPMENU(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

✨ NAME ✨

XmCreatePopupMenu β€” a RowColumn widget convenience creation function πŸ’… (like, she makes popup menus for you, bestie, no cap)


🌸 SYNOPSIS 🌸

#include <Xm/RowColumn.h>
Widget XmCreatePopupMenu(
Widget parent,
String name,
ArgList arglist,
Cardinal argcount);

πŸŽ€ DESCRIPTION πŸŽ€

okay so XmCreatePopupMenu creates an instance of a RowColumn widget of type XmMENU_POPUP and hands you back the associated widget ID. that's the whole vibe. πŸ¦‹

and here's the cute part: when you use this function to create the Popup menu pane, a MenuShell widget gets automatically created as the parent of the menu pane. the parent of that MenuShell widget is whatever widget you passed in as the parent parameter. so it's giving "built-in babysitter" energy, fr fr. πŸ‘‘

XmCreatePopupMenu is provided as a convenience function for creating RowColumn widgets configured to operate as Popup menu panes, and β€” important β€” it is not implemented as a separate widget class. she's a shortcut, not a whole new species. ✨

the PopupMenu is used as the first menu pane within a PopupMenu system; all other menu panes are of the Pulldown type. a Popup menu pane displays a 3-D shadow, unless the feature is disabled by the application. the shadow appears around the edge of the menu pane. iconic. 🫢

⚠️ the Popup menu pane must be created as the child of a MenuShell widget in order to function properly when it is incorporated into a menu. like, it's not optional, bestie, it's the rules.

if your application uses this convenience function for creating a Popup menu pane, the MenuShell is automatically created as the real parent of the menu pane. πŸ’– but if your application does not use this convenience function to create the RowColumn that functions as a Popup menu pane, then it is the application's responsibility to create the MenuShell widget. not me doing that for you. you're on your own for that one. 😭

and to actually access the PopupMenu, the application must first position the widget using the XmMenuPosition function and then manage it using XtManageChild. position first, manage second. that's the order. periodt. πŸ’…

here's the parameter rundown, in bullet form because we love a list:

  • parent β€” Specifies the parent widget ID
  • name β€” Specifies the name of the created widget
  • arglist β€” Specifies the argument list
  • argcount β€” Specifies the number of attribute/value pairs in the argument list (arglist)

alsooo, Popup menu panes support tear-off capabilities for tear-off menus through XmRowColumn resources. 🌈 for a complete definition of RowColumn and its associated resources, see XmRowColumn(3). go read it, i'll wait. πŸ’œ


πŸ”₯ RETURN πŸ”₯

Returns the RowColumn widget ID. that's it, that's the tea. β˜•β­



and that's the whole page, bestie!! πŸŽ€ this was XmCreatePopupMenu from the library call manual, footer and all β€” same name up top, same name down at the bottom. go make some menus, you've got this. πŸ’–βœ¨πŸ¦‹