XMTABLIST(3)
π 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 π
π RELATED π
- refer to the Motif Programmer's Guide for more info about tabs and tab lists π
XmTabListCopy(3)XmTabListFree(3)XmTabListGetTab(3)XmTabListInsertTabs(3)XmTabListRemoveTabs(3)XmTabListReplacePositions(3)XmTabListTabCount(3)
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 β¨π¦πΈ
π¦ 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