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

πŸ’– XmTabList β€” the data type for a tab list πŸ’–

okay bestie, so this one's XmTabList(library call) from the Motif library, and it's genuinely not that deep β€” but it IS the reason your text lines up all pretty instead of crashing into each other, so let's get into it πŸŽ€


✨ SYNOPSIS ✨

#include <Xm/Xm.h>
XmTabList

like. that's it. that's the whole synopsis. a type. slay πŸ’…


🌸 DESCRIPTION 🌸

okay so XmTabList is the data type for a tab list. a tab list is made up of tab stop list entries, which are called XmTabs πŸ¦‹

here's the part that actually matters, bestie: whenever a tab component gets encountered while an XmString is being rendered, where the next X draw starts depends on the next XmTab. and if a tab stop would make text overlap, the x position for that segment gets reset to follow immediately after the end of the previous segment. no overlapping, no chaos, we stay in our lane πŸ’–

πŸŽ€ how you actually write these in resource files

tab lists get specified in resource files with this syntax, verbatim:

resource_spec: tab WHITESPACE [, WHITESPACE tab ]*

so the resource value string is one or more tabs separated by commas. each tab tells you three things: the value of the tab, the unit type, and whether the offset is relative or absolute. like:

tab := float [ WHITESPACE units ]
float := [ sign ] [[ DIGIT]*. ]DIGIT+
sign := +

and here's the tea β˜• β€” the presence or absence of sign tells you whether it's a relative offset or an absolute offset, respectively. + means relative, no + means absolute. also, important, negative tab values are NOT allowed 🚫 no cap.

units is the unitType to use, and it's described over in the XmConvertUnits reference page. go look, iykyk 🧚

⭐ example time ⭐

this one specifies a tab list that's a one inch absolute tab followed by a one inch relative tab:

*tabList: 1in, +1in

see? 1in = absolute, +1in = relative. the + is doing all the work and it ate πŸ”₯

🫢 one more thing about units

for resources of type, dimension, or position, you can specify units as described in the XmNunitType resource of the XmGadget, XmManager, or XmPrimitive reference page. three places to check, pick your fighter πŸ’œ


that's the whole friend group right there, go say hi πŸ‘‘


k that's the page!! it's XmTabList(library call) β€” the library call section, no date stamp on this one, so this is the version you got, periodt πŸ’…πŸ’–

okay bye bestie, go align some text βœ¨πŸ¦‹πŸŒΈ