XMLISTPOSTOBOUNDS(3)
β¨ XmListPosToBounds β¨
okay bestie, gather round, because today we're talking about XmListPosToBounds β a List function that returns the bounding box of an item at a specified position in a list. it's giving "where exactly is this thing on screen" energy and honestly? obsessed. this is a <library call> from the Xm fam, so grab your #include and let's go π
πΈ SYNOPSIS πΈ
#include <Xm/List.h>
Boolean XmListPosToBounds(
Widget widget,
int position,
Position *x,
Position *y,
Dimension *width,
Dimension *height);
π DESCRIPTION π
so what does XmListPosToBounds actually do? it returns the coordinates of an item within a list plus the dimensions of its bounding box. like, it hands you back the x and y-coordinates of the upper left corner of the bounding box β and those coords are relative to the upper left corner of the List widget itself, okay? not the screen, not the window, the widget. it also gives you the width and the height of that box. the full glow-up: position in, rectangle out β¨
and here's the cute part: if you don't care about one of those values, you can just pass a NULL for the x, y, width, or height parameter to say "nah, not requesting that one." the caller gets to choose. main character energy π«Ά
widgetβ specifies the ID of the List widget. that's the one you're interrogating πpositionβ specifies the position of the specified item. a value of1means the first item in the list; a value of2means the second item; and so on, you get the pattern. a value of0(zero) specifies the last item in the list. yes, zero is the last one, not the first. iconic, slightly chaotic, but that's the rule π¦xβ specifies a pointer to the returned x-coordinate of the item.yβ specifies the pointer to the returned y-coordinate of the item.widthβ specifies the pointer to the returned width of the item.heightβ specifies the pointer to the returned height of the item.
for a complete definition of List and its associated resources, go check out XmList(3). it's the lore drop, fr fr π
β RETURN β
here's the vibe check:
- if the item at the specified position is not visible, this function returns
Falseβ and ngl, the returned values (if any) are undefined. like, do not trust them, bestie, they are not your friends π - otherwise, this function returns
True. slay π
π RELATED π
and that's the whole page, no cap. this lil masterpiece comes from the XmListPosToBounds(library call) source, and yes, the page header and footer both say XmListPosToBounds(library call) β consistency is a flex π stay hydrated, read your docs, and go find some bounding boxes. mwah πβ¨
π¦ 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