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

πŸ’– XmTextSetSelection β€” a Text function that sets the primary selection of the text πŸ’–

okay bestie, so this is XmTextSetSelection from the <Xm/Text.h> library, aka a library call, and it's lowkey one of those little Text widget functions that just does the thing and dips. no return value, no drama, just vibes. let's get into it ✨


✨ SYNOPSIS ✨

#include <Xm/Text.h>
void XmTextSetSelection(
Widget widget,
XmTextPosition first,
XmTextPosition last,
Time time);

🌸 DESCRIPTION 🌸

XmTextSetSelection sets the primary selection of the text inside the widget. that's the main character move here.

but wait, there's more πŸ’… β€” it also:

  • moves the insertion cursor to the last position of the selection (cursor said "I'm going where the selection ends, periodt")
  • calls the widget's XmNmotionVerifyCallback callbacks

here's the tea on each argument:

  • widget β€” specifies the Text widget ID. it's the widget you're doing this to, obvs 🫢
  • first β€” marks the first character position of the text to be selected. the starting line, if you will πŸ‘‘
  • last β€” marks the last position of the text to be selected. the finish line, no cap ✨
  • time β€” specifies the time at which the selection value is desired. it should be the same as the time of the event that triggered this request. one source of a valid time stamp is the function XtLastTimestampProcessed πŸ• (iykyk β€” that's your timestamp plug)
for a complete definition of Text and its associated resources, see XmText(3). don't skip it, bestie, it's giving essential πŸ“–


and that's the whole page!! this was XmTextSetSelection(library call), like, the entire manpage, we ate fr fr πŸ“πŸ¦‹ thanks for reading bestie, go set some selections and slay πŸ’…πŸ’œ