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

πŸ’– XmTextFieldCut β€” the library call that's basically "cut" but make it iconic πŸ’–

Okay bestie, gather round, because today we're talking about XmTextFieldCut, a <rainbow>library call</rainbow> from the Xm TextField family. It's the cut function. Yes, that cut β€” the one your fingers do on autopilot. Let's get into it. πŸŽ€


✨ NAME ✨

XmTextFieldCut β€” a TextField function that copies the primary selection to the clipboard and deletes the selected text. Copy, then yeet. Two jobs, one function, main character energy fr fr. πŸ’…


🌸 SYNOPSIS 🌸

#include <Xm/TextF.h>
Boolean XmTextFieldCut(
Widget widget,
Time time);

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie: XmTextFieldCut copies the primary selected text to the clipboard, and then deletes the primary selected text. Copy first, delete second β€” in that order, no cap. 🫢

This routine calls the widget's XmNvalueChangedCallback and verification callbacks β€” either XmNmodifyVerifyCallback or XmNmodifyVerifyCallbackWcs, or both. And the ordering matters, so listen up: if both verification callback lists are registered, the procedures of the XmNmodifyVerifyCallback list are executed first, and the resulting data is passed to the XmNmodifyVerifyCallbackWcs callbacks. So Wcs gets whatever modifyVerify cooked up. That's the pipeline. 🧚

It also calls the XmNconvertCallback procedures, and possibly multiple times β€” with the selection member of the XmConvertCallbackStruct set to CLIPBOARD and with the parm member set to XmMOVE. Then, if the transfer is successful, this routine calls the XmNconvertCallback procedures for the CLIPBOARD selection and the DELETE target. Like, it does the whole ritual, and only if it works does it do the second half. Very "trust the process". ⭐

πŸ’œ Arguments, bestie πŸ’œ

  • widget β€” Specifies the TextField widget ID. That's your TextField, your baby, your main character. πŸ‘‘
  • time β€” Specifies the time at which the selection value is to be modified. This should be the time of the event that triggered this request. Basically: tell it when this whole thing went down. ⏰
Heads up! For a complete definition of TextField and its associated resources, see XmTextField(3). That's the deep lore page, and you will be reading it. πŸ“–

πŸ’€ RETURN πŸ’€

This function returns False if the primary selection is NULL, if the widget does not own the primary selection, if the function is unable to gain ownership of the clipboard selection, or if no data is placed on the clipboard.

Otherwise? It returns True. Slay. βœ…

So like, four different ways to get a False β€” that's the vibe check failing in four distinct flavours, and honestly, valid. 😭



And that's the page, bestie! This was XmTextFieldCut(library call) β€” signed, sealed, and delivered from the library call section of the manual, dated whenever the footer says, and honestly it ate. πŸŽ€βœ¨πŸ’