XMCREATESIMPLEOPTIONMENU(3)
π NAME π
XmCreateSimpleOptionMenu β a RowColumn widget convenience creation function, and bestie, it's literally the shortcut you've been waiting for π
β¨ SYNOPSIS β¨
#include <Xm/RowColumn.h>
Widget XmCreateSimpleOptionMenu(
Widget parent,
String name,
ArgList arglist,
Cardinal argcount);
π¦ DESCRIPTION π¦
Okay so listen. XmCreateSimpleOptionMenu creates an instance of a RowColumn widget of type XmMENU_OPTION and hands you back the associated widget ID. That's it. That's the whole job. Slay π
This routine creates an OptionMenu and its submenu, and that submenu is full of PushButtonGadget or CascadeButtonGadget children. No cap. Here's the naming tea, because the naming is very specific and you will be quizzed on it:
- Each button gets named
button_n, where n is an integer from0(zero) to the number of buttons in the menu minus 1. - Each separator gets named
separator_n, where n is an integer from0(zero) to the number of separators in the menu minus 1.
Buttons and separators are named and created in the order they're specified in the RowColumn simple menu creation resources supplied in the argument list. Order matters, bestie β the vibe check is the argument order. π«Ά
Now the arguments, one by one, no skipping:
parentβ specifies the parent widget IDnameβ specifies the name of the created widgetarglistβ specifies the argument listargcountβ specifies the number of attribute/value pairs in the argument list (arglist)
The user can specify resources in a resource file for the automatically created widgets and gadgets of an OptionMenu. Those widgets (or gadgets) and the associated OptionMenu areas are, and yes this is a little list, so here it is:
- Option Menu Label Gadget β
OptionLabel - Option Menu Cascade Button β
OptionButton
A number of resources exist specifically for use with this and other simple menu creation routines. Important: the only button types allowed in the XmNbuttonType resource are XmPUSHBUTTON, XmCASCADEBUTTON, XmSEPARATOR, and XmDOUBLE_SEPARATOR. That's the whole list. Anything else is not it, and we don't do that here. π
For a complete definition of RowColumn and its associated resources, go read XmRowColumn(3). Iconic behavior, honestly. π
π RETURN π
Returns the RowColumn widget ID. Periodt. π
πΈ RELATED πΈ
okay that's the whole page, you ate it, go build something cute ππ§
This little love letter is from the XmCreateSimpleOptionMenu(library call) manual page, so if you ever need to cite your source, that's the glow-up credit. πβ¨π
π¦ 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