XMTABLISTREMOVETABS(3)
π XmTabListRemoveTabs π
okay bestie, so this one lives in the <Xm/Xm.h> header and it's a library call β it's XmTabListRemoveTabs, and it is literally the friend who comes over and helps you declutter your tab list. noncontiguous tabs? gone. slay. π
β¨ SYNOPSIS β¨
#include <Xm/Xm.h>
XmTabList XmTabListRemoveTabs(
XmTabList oldlist,
Cardinal *position_list,
Cardinal position_count);
like, that's the whole vibe right there. three args, one glow-up. π
πΈ DESCRIPTION πΈ
So here's the tea: XmTabListRemoveTabs removes noncontiguous tabs from a tab list. It doesn't mess with your original in place β no no. It builds a brand new tab list by copying the contents of oldlist and then yeeting every tab whose corresponding position shows up in the position_list array. new list, who dis. β¨
β οΈ and if one of the positions you asked for is invalid β like, say, a value that's a number greater than the number of tabs in the tab list β it'll show a warning message. so you will know. no silent failures here, bestie. π
tablistβ Specifies the tab list. Heads up though, the function deallocatesoldlistand all the tabs it contains after it's done extracting the info it needs. so likeβ¦ it took what it needed and it left. π (note: the synopsis calls this oneoldlist, same energy, don't @ me.)position_listβ Specifies an array of the tab positions to be removed. And the indexing is giving very much programmer brain: the position of the first tab in the list is 0 (zero, periodt), the position of the second tab is 1, and so on. counting from zero is iconic behavior honestly. πposition_countβ Specifies the number of elements in theposition_list. that's it, that's the whole job. π«Ά
π RETURN π
okay so here's the rules, no cap:
- If
oldlistorposition_listisNULL, or ifposition_countis 0 (zero) β it just returnsoldlist. nothing happened, we stayed home. π - Otherwise? it returns the new tab list. π
and now the part you actually need to remember: the function allocates space to hold the returned tab list, and you β yes, you, the application β are responsible for managing that allocated space. π
You can recover the allocated space by calling XmTabListFree. do not forget to free. that's the whole moral of the story, fr fr. π§
π RELATED π
go read those too, they're lowkey part of the lore. π
and that's a wrap on this one, bestie!! this page came straight out of the XmTabListRemoveTabs(library call) manual β that's the title and the footer both, so you know exactly where it lives. now go free your tab lists and your memory. mwah. π
π¦β¨
π¦ 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