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

πŸ’– XmCreateSelectionDialog πŸ’–

okay bestie, gather round, we're doing a library call today and honestly? it's giving iconic. this is XmCreateSelectionDialog(3) and it's about to be your new fave πŸŽ€


✨ NAME ✨

XmCreateSelectionDialog β€” the SelectionBox SelectionDialog convenience creation function. yeah. say that five times fast. it's literally a lil shortcut function that hands you a whole SelectionDialog and does the boring setup for you 🫢


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so XmCreateSelectionDialog is a convenience creation function, which is just fancy speak for "girl, I already did the tedious part." it creates a DialogShell and an unmanaged SelectionBox child of that DialogShell. two for one, no cap πŸ’…

a SelectionDialog does exactly what it sounds like: it offers the user a choice from a list of alternatives and then gets a selection. and it comes fully loaded with:

  • a scrolling list of alternatives
  • an editable text field for the selected alternative
  • labels for the text field
  • four buttons

the default button labels are OK, Cancel, Apply, and Help β€” the classic four, the friend group of buttons, truly the main character lineup πŸ‘‘

and here's a lil bonus: one additional WorkArea child may be added to the SelectionBox after creation. one. not two. don't be greedy πŸ“

XmCreateSelectionDialog forces the value of the SelectionBox resource XmNdialogType to XmDIALOG_SELECTION.

XmCreateSelectionDialog forces the value of the Shell resource XmNallowShellResize to True.

now for the pop-up/pop-down situation, this part matters:

use XtManageChild to pop up the SelectionDialog (passing the SelectionBox as the widget parameter); use XtUnmanageChild to pop it down.

lowkey important: those forces above are not suggestions, they are forces. the function sets them and that's that, periodt.

and here's your args, one by one, no skips:

  • parent β€” specifies the parent widget ID. the one who birthed this whole situation.
  • name β€” specifies the name of the created widget. give her a name, she deserves one.
  • arglist β€” specifies the argument list. all the resource-y goodness goes here.
  • argcount β€” specifies the number of attribute/value pairs in the argument list (arglist). yes, you have to count them yourself. it's fine. you're built different.

and if you want the complete definition of SelectionBox and all its associated resources, go read XmSelectionBox(3). that's the deep lore. iykyk πŸ“š


🌈 RETURN 🌈

returns the SelectionBox widget ID. that's it. that's the tea. hold onto it, you'll need it πŸ’œ



and that's the whole page bestie!! no cap, you're now certified in SelectionDialog creation πŸŽ€ ngl this one is a certified banger. anyway β€” this was XmCreateSelectionDialog, a library call manual page, and the sign-off is literally just the same title all over again because manpages love a little echo, so: XmCreateSelectionDialog(library call). mwah. go forth and create dialogs, queen πŸ‘‘πŸ’–