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

XmListReplaceItemsPosUnselected β€” bestie, it's a List function that swaps out items in a list without selecting the replacements πŸŽ€

Like, it does exactly what it says on the tin. No sneaky selection side effects. Iconic behavior honestly πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ’– DESCRIPTION πŸ’–

Okay so here's the vibe: XmListReplaceItemsPosUnselected replaces the specified number of items in the list with new items, starting at the given position. The replacement items stay unselected β€” even if they currently appear in the XmNselectedItems list. No cap. They just chill there, unselected, living their truth πŸ¦‹

Now let's meet the cast 🫢

  • widget β€” Specifies the ID of the List widget to replace items in. This is your main character, the list you're messing with ✨
  • new_items β€” Specifies a pointer to the replacement items. The glow-up material πŸ’–
  • item_count β€” Specifies the number of elements in new_items and the number of items in the list to replace. Heads up bestie: this number must be nonnegative. Negative? Not today, not ever πŸ™ˆ
  • position β€” Specifies the position of the first item in the list to be replaced. A value of 1 means the first item replaced is the first item in the list; a value of 2 means it's the second item; and so on, forever and always ⭐

So, beginning with the item specified in position, item_count items in the list are replaced with the corresponding elements from new_items. That is:

  • the item at position is replaced with the first element of new_items πŸ₯‡
  • the item after position is replaced with the second element of new_items πŸ₯ˆ
  • and so on, until item_count is reached ✨

It's giving perfectly matched pairs. Like a group chat where everyone gets a plus-one and nobody is left out πŸ’•

For a complete definition of List and its associated resources, see XmList(3). Go read it, it's the lore πŸ“–


And that's the whole page, bestie! This little baddie lives in the library call section β€” it's the XmListRepl...sUnselected(library call) entry, so go forth and replace items responsibly πŸ‘‘πŸ’œ