XMSTRINGDRAW(3)
π XmStringDraw β the tea on drawing compound strings π
okay bestie, welcome to XmStringDraw(3), a lil library call from the Xm family π (yes, that's the manual name, it's giving XmStringDraw(library call) energy and we're obsessed).
β¨ NAME β¨
XmStringDraw β a compound string function that draws a compound string in an X window π¦
β¨ SYNOPSIS β¨
#include <Xm/Xm.h>
void XmStringDraw(
Display * d,
Window w,
XmRenderTable rendertable,
XmString string,
GC gc,
Position x,
Position y,
Dimension width,
unsigned char alignment,
unsigned char layout_direction,
XRectangle * clip);
β¨ DESCRIPTION β¨
So XmStringDraw draws a compound string in an X Window. Iconic. But listen, there's a plot twist π β if a compound string segment uses a rendition that contains a font set, the graphic context passed to this routine will have the GC font member left in an undefined state. The underlying XmbStringDraw function called by this routine modifies the font ID field of the GC passed into it and does not attempt to restore the font ID to the incoming value. So yeah, it does what it wants, no apology, main character energy π
If the compound string segment is not drawn using a font set, the graphic context must contain a valid font member. no cap.
β οΈ Graphic contexts created byXtGetGCare not valid for this routine β instead, useXtAllocateGCto create a graphic context. fr fr, don't skip this one bestie π
dβ Specifies the display. π₯οΈwβ Specifies the window. πͺrendertableβ Specifies the render table. πstringβ Specifies the string. β¨gcβ Specifies the graphics context to use. π¨xβ Specifies a coordinate of the rectangle that will contain the displayed compound string. πyβ Specifies a coordinate of the rectangle that will contain the displayed compound string. π (yes, twin, it's the other coordinate π)widthβ Specifies the width of the rectangle that will contain the displayed compound string. πalignmentβ Specifies how the string will be aligned within the specified rectangle. It is eitherXmALIGNMENT_BEGINNING,XmALIGNMENT_CENTER, orXmALIGNMENT_END. π«Άlayout_directionβ Controls the direction in which the segments of the compound string will be laid out. It also determines the meaning of thealignmentparameter. π§clipβ Allows the application to restrict the area into which the compound string will be drawn. If the value isNULL, clipping will be determined by the GC. βοΈ
β¨ RELATED β¨
XmStringCreate(3)β go read that one too, it's lowkey the prequel π
and that's the whole vibe, bestie!! ππ this page is literally XmStringDraw(library call) β yeah that's the footer energy, the manual name and the whole thing in one, slay πβ¨
periodt. now go allocate your GC properly. π
π¦ 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