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

πŸ’– XmDataFieldCut πŸ’–

okay bestie, welcome to the XmDataFieldCut page β€” it's a library call, it lives in the DataField family, and it is genuinely so useful. sit with me, grab a lil snack πŸ“, and let's get into it.


✨ NAME ✨

XmDataFieldCut β€” a DataField function that copies the primary selection to the clipboard and deletes the selected text πŸŽ€


🌸 SYNOPSIS 🌸

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

πŸ’… DESCRIPTION πŸ’…

so here's the tea β˜•: XmDataFieldCut copies the primary selected text to the clipboard, and then β€” and this is the part people forget β€” it deletes the primary selected text. cut means cut, babe. βœ‚οΈ

This routine calls the widget's XmNvalueChangedCallback and verification callbacks, either XmNmodifyVerifyCallback or XmNmodifyVerifyCallbackWcs, or both. And if both verification callback lists are registered? Then the procedures of the XmNmodifyVerifyCallback list are executed first, and the resulting data is passed to the XmNmodifyVerifyCallbackWcs callbacks. order matters, iykyk 🫢

This routine also calls the XmNconvertCallback procedures, possibly multiple times, with the selection member of the XmConvertCallbackStruct set to CLIPBOARD and with the parm member set to XmMOVE. And if the transfer is successful, this routine then calls the XmNconvertCallback procedures for the CLIPBOARD selection and the DELETE target. slay. ✨

  • widget β€” Specifies the DataField widget ID. that's your girl, the widget in question πŸ’–
  • 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. like, the actual moment of the click, not vibes-based guessing ⏰

For a complete definition of DataField and its associated resources, see XmDataField(3). πŸ‘‘


πŸ¦‹ RETURN πŸ¦‹

This function returns False if any of these happen, and I need you to read them all, bestie, no skimming πŸ™ˆ:

  • the primary selection is NULL
  • the widget does not own the primary selection
  • the function is unable to gain ownership of the clipboard selection
  • no data is placed on the clipboard

Otherwise, it returns True. πŸ’š

fr fr, that False list is the whole vibe check. if any one of those four things goes sideways, you get False back and nothing cut. no cap.


okay that's the page!! πŸ’œ it was filed under XmDataFieldCut(library call), and that's the same signature on the sign-off too β€” so consider this your cute lil footer: XmDataFieldCut(library call), mwah, love u, go cut some text πŸ’…πŸŽ€πŸ¦‹