XMVACREATETOGGLEBUTTON(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 ✨

okay so bestie, welcome to the library call zone πŸ’– we're doing two functions today, and they're basically twins:

  • XmVaCreateToggleButton
  • XmVaCreateManagedToggleButton

they're a ToggleButton widget convenience creation functions situation ✨ that's it, that's the name section, slay.


🌸 SYNOPSIS 🌸

#include <Xm/ToggleB.h>

Widget XmVaCreateToggleButton(
Widget parent,
String name,
...);

Widget XmVaCreateManagedToggleButton(
Widget parent,
String name,
...);

like. look at them. matching outfits. iconic πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so what these do is create an instance of a ToggleButtonGadget widget, and then hand you back the associated widget ID. cute, right? πŸŽ€

both of these routines use the ANSI C variable-length argument list (varargs) calling convention β€” so yeah, the ... is doing real work, no cap.

lowkey important: the page says the XmVaCreateToggleButton function is a convenience routine that calls XtCreateWidget.
and it also says the XmVaCreateToggleButton function is a convenience routine that calls XtCreateManagedWidget. that's exactly how it's written, so that's how we're keeping it, fr fr πŸ™ˆ

here's the args, bestie:

  • parent β€” specifies the parent widget ID. your widget needs a home πŸ’œ
  • name β€” specifies the name of the created widget.
  • ... β€” specifies the variable argument list to override the resource defaults. this is your moment to be extra ✨

and if you want the complete definition of ToggleButton plus all its associated resources, go read XmToggleButton(3). it's giving required reading πŸ“š


πŸ‘‘ RETURN πŸ‘‘

returns the ToggleButton widget ID. that's your little ticket, bestie, guard it with your life 🫢


the whole friend group:


okay that's the whole page πŸ’– this was XmVaCreateToggleButton(library call) β€” literally the title and the footer, same energy, main character of its own manpage πŸ‘‘ and it's filed under the library call manual, section 3. that's the whole vibe check, bestie β€” go make some toggle buttons, you got this πŸ’…βœ¨πŸŽ€