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

✨ XmListReplaceItemsPos ✨

okay bestie, welcome to XmListReplaceItemsPos from the XmList library family β€” it's a List function, and its whole job is swapping out specified elements in the list πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: XmListReplaceItemsPos takes the specified number of items in the List and replaces them with new items, starting at the specified position in the List. slay

and when those items get inserted into the list, they're compared with the current XmNselectedItems list β€” and if any of the new items matches an item on the selected list, it shows up selected. no cap, that's just how it works ✨

  • widget β€” the ID of the List widget. like, which list are we doing this to, bestie πŸ’–
  • new_items β€” the replacement items. the glow-up content itself πŸŽ€
  • item_count β€” the number of items in new_items AND the number of items in the list to replace. this number must be nonnegative β€” not me being dramatic, that's literally the rule πŸ™ˆ
  • position β€” 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, and so on πŸ‘‘

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 gets replaced with the first element of new_items
  • the item after position gets replaced with the second element of new_items
  • and so on, until item_count is reached πŸ’«

for a complete definition of List and its associated resources, go check out XmList(3) β€” it's giving reference material, iykyk πŸ“š



fr fr, that's the whole page β€” every option, every value, nothing skipped 🫢

and that's a wrap on this one, bestie! it's from the XmListReplaceItemsPos(library call) manual page, so shoutout to that source and its date stamp β€” go off, documentation πŸŒˆβ­πŸ’–