XMLISTADDITEM(3)
π XmListAddItem π
okay bestie, welcome to XmListAddItem β it's a List function (from the library call manual, iykyk) and it literally just adds an item to the list. that's it, that's the job. π
β¨ SYNOPSIS β¨
#include <Xm/List.h>
void XmListAddItem(
Widget widget,
XmString item,
int position);
yes the indentation is giving "I wrote this in 1994 and I'm not sorry" π but it's correct, don't touch it.
πΈ DESCRIPTION πΈ
XmListAddItem adds an item to the list at the given position. that's the whole vibe. β¨
but here's the part that's lowkey iconic: when the item gets inserted into the list, it is compared with the current XmNselectedItems list. and if the new item matches an item on the selected list, then bestieβ¦ it appears selected. it came pre-slaying. π
here's the cast of characters, one by one:
widgetβ specifies the ID of the List to which an item is added. like, which list are we feeding? π«Άitemβ specifies the item to be added to the list. the little guy going in. πΈpositionβ specifies the position of the new item in the list. okay so listen:- a value of
1makes the new item the first item in the list - a value of
2makes it the second item - and so on, you get it, the math is mathing π
- a value of
0(zero) makes the new item the last item in the list. zero means "put it at the end, idc, whatever" π
- a value of
for a complete definition of List and its associated resources, see XmList(3). not me sending you to another manpage but fr fr, go read it, that's where the lore lives. π
π RELATED π
and that's the whole page bestie!! no cap, you now know how to add an item to a list and make it show up pre-selected if it's already on the selected list. main character behaviour only. ππ¦
this has been XmListAddItem(library call) β same title, same manual, straight from the source and the date, signed, sealed, slayed. π πβ¨
π¦ 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