XMCREATEPULLDOWNMENU(3)
π 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 π
π RELATED π
XmCascadeButton(3)XmCascadeButtonGadget(3)XmCreateOptionMenu(3)XmCreatePopupMenu(3)XmCreateSimplePulldownMenu(3)XmMenuShell(3)XmRowColumn(3)XmVaCreateSimplePulldownMenu(3)
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 π₯π
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms