XMCREATEPULLDOWNMENU(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

πŸ’– XmCreatePulldownMenu πŸ’–

okay so bestie, gather round, because today we're talking about XmCreatePulldownMenu β€” a RowColumn widget convenience creation function, from the library call corner of the manual. yes it's a mouthful, no you don't have to be scared of it, i got you 🫢


✨ SYNOPSIS ✨

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

🌸 DESCRIPTION 🌸

So what does XmCreatePulldownMenu actually do? It creates an instance of a RowColumn widget of type XmMENU_PULLDOWN and hands you back the associated widget ID. that's it, that's the whole job, and it does it flawlessly πŸ’…

Here's the rundown of what you're passing in:

  • parent β€” the parent widget ID. who's the mom, basically.
  • name β€” the name of the created widget. give it a cute one.
  • arglist β€” the argument list. all your little attribute/value pairs live here.
  • argcount β€” the number of attribute/value pairs in the argument list (arglist).

and then, real talk: the number of attribute/value pairs in the argument list (arglist). when this function is used to create the Pulldown menu pane, a MenuShell widget is automatically created as the parent of the menu pane. If the widget specified by the parent parameter is a Popup or a Pulldown menu pane, the MenuShell widget is created as a child of the parent MenuShell; otherwise, it is created as a child of the specified parent widget. it's giving "i handled the plumbing for you, you're welcome" ✨

XmCreatePulldownMenu is provided as a convenience function for creating RowColumn widgets configured to operate as Pulldown menu panes, and it is not implemented as a separate widget class. it's a shortcut, not a whole new species. no cap.

A Pulldown 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. the drama of it all, the edge πŸ’€

A Pulldown menu pane is used with submenus that are to be attached to a CascadeButton or a CascadeButtonGadget. This is the case for all menu panes that are part of a PulldownMenu system (a MenuBar), the menu pane associated with an OptionMenu, and any menu panes that cascade from a Popup menu pane. Pulldown menu panes that are to be associated with an OptionMenu must be created before the OptionMenu is created. πŸ‘‘ yes, order matters, bestie, do not play with me on this one.

The Pulldown menu pane must be attached to a CascadeButton or CascadeButtonGadget that resides in a MenuBar, a Popup menu pane, a Pulldown menu pane, or an OptionMenu. It is attached with the button resource XmNsubMenuId. that's the little handshake 🀝

A MenuShell widget is required between the Pulldown menu pane and its parent. If the application uses this convenience function for creating a Pulldown menu pane, the MenuShell is automatically created as the real parent of the menu pane; otherwise, it is the application's responsibility to create the MenuShell widget. so like… if you don't use the convenience function, that's on you fr fr πŸ™ˆ

πŸ¦‹ the hierarchy situation (iykyk)

To function correctly when incorporated into a menu, the Pulldown menu pane's hierarchy must be considered. This hierarchy depends on the type of menu system that is being built, as follows:

  • If the Pulldown menu pane is to be pulled down from a MenuBar, its parent must be the MenuBar.
  • If the Pulldown menu pane is to be pulled down from a Popup or another Pulldown menu pane, its parent must be that Popup or Pulldown menu pane.
  • If the Pulldown menu pane is to be pulled down from an OptionMenu, its parent must be the same as the OptionMenu parent.

πŸŽ€ tear-off moment

PullDown 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, it's iconic.


⭐ RETURN ⭐

Returns the RowColumn widget ID. that's your prize, your little trophy, your widget ID πŸ†



and that's the whole page, bestie! πŸ’œ this was XmCreatePulldownMenu(library call) β€” you'll find it filed under that same name, library call section, straight from the source and dated as it was. now go build a menu, you main character πŸ”₯πŸŽ€