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

✨ XmTextFieldSetHighlight ✨

okay bestie, come sit with me, this one's from the library call section of the manual and it is so much less scary than it sounds πŸ’–

🌸 NAME 🌸

XmTextFieldSetHighlight β€” a TextField function that highlights text. that's it, that's the whole job. iconic πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <Xm/TextF.h>
void XmTextFieldSetHighlight(
Widget widget,
XmTextPosition left,
XmTextPosition right,
XmHighlightMode mode);

look at her. four little arguments, one void return, no drama 🌈


πŸ¦‹ DESCRIPTION πŸ¦‹

So XmTextFieldSetHighlight highlights the text between the two character positions you give it, and the mode parameter decides what kind of highlighting it is. periodt ✨

πŸ’€ IMPORTANT CAVEAT, NO CAP: highlighting text merely changes the visual appearance of the text. It does not set the selection. it's giving aesthetic only. don't be out here thinking you selected something just because it looks highlighted, because bestie you did not 🫢

here's the rundown on the args, one by one:

  • widget β€” specifies the TextField widget ID πŸ‘‘
  • left β€” specifies the position of the left boundary of the text to be highlighted. it's an integer number of characters from the beginning of the text buffer. the first character position is 0 (zero). zero-indexed girlies rise up 🌸
  • right β€” specifies the position of the right boundary of the text to be highlighted. also an integer number of characters from the beginning of the text buffer. also the first character position is 0 (zero). yes it's the same rules, no I'm not being lazy, that's literally what it says πŸ“
  • mode β€” specifies the type of highlighting to be done. and here are your three whole options:
    • a value of XmHIGHLIGHT_NORMAL removes highlighting. the un-highlight. the cleanup era. 🧹
    • a value of XmHIGHLIGHT_SELECTED highlights the text using reverse video. the way that it flips the colors… obsessed πŸ”₯
    • a value of XmHIGHLIGHT_SECONDARY_SELECTED highlights the text using underlining. subtle. demure. mindful. πŸŽ€

and if you want the complete definition of TextField and all its associated resources, that's a whole other page β€” go read XmTextField(3) πŸ“–



that's the whole page bestie, you ate that 🫢 this little beauty lives in the XmTextFieldSetHighlight(library call) corner of the manual β€” same title top and bottom, no date, no version drama, just vibes ⭐ bye pookie, go highlight something πŸ’–