XMTEXTGETTOPCHARACTER(3)
π XmTextGetTopCharacter β the library call β¨
okay bestie, so this one is XmTextGetTopCharacter, and it lives in the <pink>library call</pink> section of the manual β like, it's a Text function, and what it does is peek at the position of the very first character that's actually showing up on screen. π¦
πΈ NAME πΈ
XmTextGetTopCharacter β a Text function that gets you the position of the first character displayed. that's it, that's the whole vibe. π
β¨ SYNOPSIS β¨
#include <Xm/Text.h>
XmTextPosition XmTextGetTopCharacter(
Widget widget);
π DESCRIPTION π
so, XmTextGetTopCharacter accesses the position of the text at the top of the Text widget. like, the top-top. the first thing your eyeballs see. π
and here's the plot twist: if there's no text in the Text widget β in other words, if XmNvalue contains an empty string β then XmTextGetTopCharacter just returns 0. no drama, no crash, just zero. π«Ά
now, imagine this: the XmNtopCharacter resource has been set to a value greater than the number of characters in the text widget. kinda unhinged of it, but okay. in that case, XmTextGetTopCharacter returns an XmTextPosition value identifying the position of the first character in the last line of text in a multiline case; otherwise, it identifies the position of the last character in the line. iykyk. π
widgetβ specifies the Text widget ID. you gotta hand it the widget, bestie, it doesn't know which one you mean otherwise. π
for a complete definition of Text and its associated resources, go look at XmText(3). it's giving required reading fr fr. π
β RETURN β
returns an XmTextPosition value that indicates the state of the XmNtopCharacter resource. it's an integer number of characters from the beginning of the text buffer. and listen β the first character position is 0 (zero). not 1. zero. periodt. πβ¨
π RELATED π
and that's the whole page, bestie!! ππ¦ it's from the <pink>XmTextGetTopCharacter(library call)</pink> manual page β same title up top, same title down bottom, no extra lore, no secret date, just the library call energy. slay ππΈπ«Ά
π¦ 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