XMWIDGETGETDISPLAYRECT(3)
π XmWidgetGetDisplayRect π
okay bestie, gather round, because today we're talking about XmWidgetGetDisplayRect β a library call from the Xm fam (yes, that's the Motif toolkit, we love her) and she is here to spill the tea on where your widget's display rectangle actually lives. π
β¨ NAME β¨
XmWidgetGetDisplayRect β retrieves display rectangle information for a widget π¦
πΈ SYNOPSIS πΈ
#include <Xm/Xm.h>
Boolean XmWidgetGetDisplayRect(
Widget widget,
XRectangle *displayrect);
π DESCRIPTION π
so like. XmWidgetGetDisplayRect hands you back the width, the height, and the x and y-coordinates of the upper left corner of the display rectangle of whatever widget you point it at. and what IS a display rectangle, you ask? it's the smallest rectangle that encloses either a string or a pixmap. that's it. that's the whole vibe. it's giving bounding box energy, fr fr. π¦β¨
now here's the part where it gets specific, because she contains multitudes:
- if the widget contains a string, the return values give you the x and y-coordinates of the upper left corner of the display rectangle, measured relative to the origin of the widget, plus the width and height in pixels. π§
- in the case of a pixmap, the return values give you the x and y-coordinates of the upper left corner of the pixmap relative to the origin, and the width and height of the pixmap in pixels. πΌοΈ
and here are the args, bestie, no skips:
widgetβ specifies the widget ID. the little guy you're asking about. πdisplayrectβ specifies a pointer to anXRectanglestructure, and this is where the x and y-coordinates, width and height of the display rectangle get returned. it's the lil container you're handing her to fill up. π«Ά
β RETURN β
returns True if the specified widget has an associated display rectangle. otherwise? returns False. π that's the whole deal. no notes.
ngl if you're not checking this return value you're doing it wrong, bestie. vibe check your booleans. β
π RELATED π
XmWidgetGetBaselines(3). go read her too, she's iconic. π
and that's the whole page, no cap. this lil legend lives in the library call section of the manual, filed right under her own name β XmWidgetGetDisplayRect(library call), the one and only. periodt. π
β¨π¦
anyway ily, go forth and enclose some rectangles. ππΈ
π¦ 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