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

πŸ’– XmListGetSelectedPos πŸ’–

okay bestie, welcome to the XmListGetSelectedPos page β€” that's a library call, and she's here to spill the tea on how to find out which items in your List are actually selected. πŸŽ€


✨ NAME ✨

XmListGetSelectedPos β€” a List function that returns the position of every selected item in the list. literally her whole personality. πŸ’…


🌸 SYNOPSIS 🌸

#include <Xm/List.h>
Boolean XmListGetSelectedPos(
Widget widget,
int **position_list,
int *position_count);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing, and I need you to hear me on this: this routine is obsolete. she's giving legacy, she's giving deprecated era, and she has been replaced by calling XtGetValues for the List resources XmNselectedPositions and XmNselectedPositionCount. so like… she still works, but she's not the moment anymore, iykyk. πŸ™ˆ

XmListGetSelectedPos is a Boolean function that returns an array of the positions of the selected items in a List.

  • widget β€” specifies the ID of the List widget. that's the one you're snooping on bestie πŸ‘‘
  • position_list β€” returns an array of the positions of the selected items in the List. and the counting is not zero-indexed, bestie, it starts at 1: the position of the first item in the list is 1; the position of the second item is 2; and so on. when the return value is True, XmListGetSelectedPos allocates memory for this array. the caller is responsible for freeing this memory. no cap, that's on you. the caller can recover the allocated memory by calling XtFree. free her or she will haunt your process fr fr πŸ’€
  • position_count β€” returns the number of elements in the position_list. the receipts count. 🧾

for a complete definition of List and its associated resources, see XmList(3).


⭐ RETURN ⭐

returns True if the list has any selected items, and False if it does not. that's it. that's the whole vibe check. βœ…



XmListGetSelectedPos(library call) β€” that's the manual name up top, and yeah, the footer just says it again, so consider this the cute sign-off: same name, library call, and if you see a date and source/version down there, that's just her little timestamp moment. slay, you read the whole page, I'm obsessed with you πŸŒˆβœ¨πŸ’œ