XMTABLISTREPLACEPOSITIONS(3)
β¨ XmTabListReplacePositions β¨
okay bestie, welcome to the XmTabListReplacePositions glow-up π
this one lives in the library call section of the manual, and it's genuinely one of the most useful little functions in Xm/Xm.h β it's giving "swap out some tabs and get a whole new list" energy π
πΈ NAME πΈ
XmTabListReplacePositions β a convenience function that creates a new tab list with replacement tabs π¦
π SYNOPSIS π
#include <Xm/Xm.h>
XmTabList XmTabListReplacePositions(
XmTabList oldlist,
Cardinal *position_list,
XmTab *tabs,
Cardinal tab_count);
π DESCRIPTION π
so basically, XmTabListReplacePositions creates a brand new tab list that contains the contents of oldlist, except the tabs sitting at the positions in position_list get replaced with copies of the corresponding tabs in tabs. it's a glow-up, not a makeover from scratch β everything else stays exactly as it was π
and listen, if a specified position is invalid, a warning message is displayed π like, for example, if the value is a number greater than the number of tabs in the tab list. she will literally tell you. not me catching strays for your off-by-one π
heads up: this function deallocates the original tab list after extracting the required information. gone. bye. periodt. π
also, it is the caller's responsibility to free the tabs in tabs by using the XmTabFree function. that's your job, bestie, not hers π«Ά
oldlistβ Specifies the tab list. The function deallocates the tab list after extracting the required information. (yes, for real, it's freeing it β don't touch it after β)position_listβ Specifies an array of positions of the tabs to be replaced. The position of the first tab is0(zero), the position of the second tab is1, and so on. classic zero-indexing, no cap π§tabsβ Specifies an array of the replacement tabs. these are the new main characters πtab_countβ Specifies the number of elements inposition_listandtabs. one number for both arrays, she keeps them in sync, that's the vibe β
π RETURN π
okay so the returns are lowkey conditional and you need to know both paths:
- If
tabs,oldlist, orposition_listisNULL, ortab_countis0(zero), it returnsoldlist. (basically "nothing to do here, here's your list back" π) - Otherwise, this function returns the new tab list β¨
and important: the function allocates space to hold the returned tab list. The application is responsible for managing the allocated space. The application can recover the allocated space by calling XmTabListFree. so like, she allocated it, you free it. teamwork, babes π€
π¦ RELATED π¦
and that's the whole page, fr fr π this was XmTabListReplacePositions(library call) β that's the source/version tag and the little footer signature, both rolled into one, so consider this your cute sign-off π«Ά slay, go replace some tabs, and don't forget XmTabFree ππΈ
π¦ 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