DTEDITORCOPYTOCLIPBOARD(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– DtEditorCopyToClipboard β€” library call πŸ’–

🌸 NAME 🌸

okay bestie, DtEditorCopyToClipboard is the copy the primary selection in a DtEditor widget to the clipboard function. It's literally in the name, and it's giving clipboard glow-up. 🫢

🌸 SYNOPSIS 🌸

#include &<Dt/Editor.h>
Boolean DtEditorCopyToClipboard(
Widget widget);

That's the whole signature: include the header, call the function, pass in a Widget. πŸ’…

πŸ’… DESCRIPTION πŸ’…

The DtEditorCopyToClipboard function copies to the clipboard the currently selected text in the DtEditor widget specified by the widget argument. So whatever text is selected in that editor widget gets copied to the clipboard. Iconic. ✨

The widget argument specifies the DtEditor widget ID.

Text can be selected and deselect programmatically with DtEditorSelectAll(3) and DtEditorDeselect(3). Those are your selection-state besties. πŸŽ€

For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). Lowkey required reading for the full widget lore. 🧚

πŸŽ€ RETURN VALUE πŸŽ€

Upon successful completion, DtEditorCopyToClipboard returns True. Slay! πŸ’–

Otherwise, it returns False if:

  • the primary selection is NULL, or
  • the widget does not own the primary selection, or
  • the function is unable to gain ownership of the clipboard selection.

No cap: those are the exact False cases. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

Go read these next, bestie:

That's the whole crew. πŸ‘‘


πŸ’– Source/version + date sign-off: the page footer is just DtEditorCopyToClipboard(library call) β€” no extra version or date line provided. Bye bestie! πŸ’–

πŸ“¦ where this page comes from