XMCREATESIMPLEOPTIONMENU(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 πŸ’–

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 from 0 (zero) to the number of buttons in the menu minus 1.
  • Each separator gets named separator_n, where n is an integer from 0 (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 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)

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. πŸ’œ



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. πŸ’–βœ¨πŸŽ€