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

πŸ’– XmListReplaceItemsUnselected πŸ’–

okay bestie, gather round, because this one is from the (library call) corner of the manual and it's lowkey iconic 🫢


✨ NAME ✨

XmListReplaceItemsUnselected β€” a List function that swaps items out in a list, no cap πŸ’…


🌸 SYNOPSIS 🌸

#include <Xm/List.h>
void XmListReplaceItemsUnselected(
Widget widget,
XmString *old_items,
int item_count,
XmString *new_items);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, XmListReplaceItemsUnselected takes each item you point at and replaces it with a matching new item. and here's the main character detail: the replacement items stay unselected β€” even if they're literally sitting in the XmNselectedItems list right now. yeah. they're unselected. periodt. πŸŽ€

  • widget β€” the ID of the List widget you're doing the replacing in. the one and only. πŸ‘‘
  • old_items β€” a pointer to the list items that are getting replaced. the ones saying bye πŸ‘‹
  • item_count β€” how many elements are chillin' in old_items and new_items. and bestie, this number must be nonnegative. negative is not the vibe, don't do it. ⚠️
  • new_items β€” a pointer to the replacement items. here's the lore: every occurrence of each element of old_items gets replaced with the corresponding element from new_items. matching in order, fr fr β€” first element of old_items ↔ first element of new_items, second ↔ second, and so on until item_count is reached. and if an element in old_items doesn't exist in the list at all? then its matching entry in new_items just gets skipped. nothing happens. it's giving ghosted 😭

for the complete definition of List and all its associated resources, go peek at XmList(3). πŸ“–



and that's the whole page, bestie β€” a (library call) moment through and through, and yeah the footer is literally just the same title again like a little echo XmListRepla...sUnselected(library call) πŸ’€ stay unselected, stay iconic βœ¨πŸ’–