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

✨ XmTextReplaceWcs ✨

okay bestie, gather round, because this one is a Text widget function and it's literally about replacing part of a wide character string πŸ’… she lives in the library call manual, and she's here to swap out a chunk of your text like it's a glow-up. no cap.


🌸 SYNOPSIS 🌸

#include <Xm/Text.h>
void XmTextReplaceWcs(
Widget widget,
XmTextPosition from_pos,
XmTextPosition to_pos,
wchar_t *wcstring);

πŸ’– DESCRIPTION πŸ’–

XmTextReplaceWcs replaces part of the wide character string inside the Text widget. periodt. πŸŽ€

and listen, the character positions begin at zero and are numbered sequentially from the very beginning of the text. zero-indexed girlies, you know the drill ✨

here's a lil example so it clicks: say you wanna replace the second and third characters in the text string. to do that, from_pos has to be 1 and to_pos has to be 3. mathing πŸ’…

and if you just wanna insert a string after the fourth character? then both from_pos and to_pos must be 4. same number, no deletion, just vibes being inserted πŸ¦‹

now, the callback tea β˜• because this routine is social:

  • it calls the widget's XmNvalueChangedCallback and verification callbacks β€” either XmNmodifyVerifyCallback or XmNmodifyVerifyCallbackWcs, or both πŸ‘‘
  • 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. order matters, bestie, don't fight it πŸ’€
  • it also calls the widget's XmNmotionVerifyCallback callback when from_pos is less than or equal to the cursor position πŸ‘€

🫢 the parameters (aka the main characters) 🫢

  • widget β€” specifies the Text widget ID
  • from_pos β€” specifies the start position of the text to be replaced
  • to_pos β€” specifies the end position of the text to be replaced
  • wcstring β€” specifies the wide character string value to be added to the Text widget

for a complete definition of Text and its associated resources, see XmText(3). iykyk πŸ“–



and that's the whole page, bestie!! πŸŽ€ this icon came straight outta the XmTextReplaceWcs(library call) manual, so if you cite her, cite her right πŸ’– mwah, slay, go replace some wide characters πŸ¦‹βœ¨