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

🌸 XmTextGetBaseline β€” the vibe check for your Text widget's baseline πŸ’…

okay bestie, welcome to XmTextGetBaseline, a library call straight out of the XmText family ✨ it's a Text function that accesses the y position of the baseline, and honestly? it's giving very precise, very demure, very mindful. πŸŽ€


✨ SYNOPSIS ✨

#include <Xm/Text.h>
int XmTextGetBaseline(
Widget widget);

πŸ¦‹ DESCRIPTION πŸ¦‹

So XmTextGetBaseline accesses the y position of the baseline in the Text widget, and that position is relative to the y position of the top of the widget. no cap, that's the whole flex. πŸ’–

🚨 okay listen up, vertical mode girlies: when the XmNlayoutDirection resource is XmTOP_TO_BOTTOM, this function returns 0 and your program should go use XmTextGetCenterline instead. that's the assignment, fr fr. 😭
  • widget β€” Specifies the Text widget ID 🫢

For a complete definition of Text and its associated resources, see XmText(3). πŸ‘‘


⭐ RETURN ⭐

It returns an integer value that indicates the y position of the baseline in the Text widget 🌈

And the way it calculates that?? obsessed. it takes into account:

  • the margin height
  • the shadow thickness
  • the highlight thickness
  • and the font ascent of the first font (set) in the fontlist used for drawing text

In this calculation, the y position of the top of the widget is 0 (zero). periodt. πŸ’…



and that's the whole page, bestie πŸŽ€ this lil cutie lives in the library call section of the manual, so go forth and measure those baselines with main character energy πŸ‘‘πŸ’– iykyk ✨