wxClipboardTextEvent(3)
π wxClipboardTextEvent π
okay bestie, this is the Erlang side of wxClipboardTextEvent β yes, the clipboard drama module. get comfy π«Ά
β¨ NAME β¨
wxClipboardTextEvent β the class that reps the events a control throws when its content gets copied or cut to, or pasted from, the clipboard. normally it's a wxTextCtrl doing this, but other windows can generate these events too, so don't come for them π
πΈ DESCRIPTION πΈ
so there are three types of these events, and they are:
wxEVT_TEXT_COPYwxEVT_TEXT_CUTwxEVT_TEXT_PASTE
here's the tea π: if an event handler processes one of these (and doesn't skip it), then the corresponding operation just doesn't happen. lowkey iconic, because that means you can stop text from ever being copied from or pasted to a control. gatekeeping the clipboard, fr fr.
and the PASTE event handler is where it gets fun β you can actually peek at the clipboard contents there and transform them however you want before they're inserted into the control. changing its case? removing invalid characters? slay. do your thing.
also, important detail for the girlies who hate doing extra work: a CUT event is always preceded by the COPY event. so if you genuinely do not care whether the text was copied or cut, you can just handle COPY and call it a day. efficiency queen π
note: these events are currently only generated bywxTextCtrlin wxGTK and wxOSX, but they're also generated bywxComboBoxwithout thewxCB_READONLYstyle in wxMSW. check your platform, bestie.
see: wxClipboard
this class is derived from, and can use functions from:
wxCommandEventwxEvent
wxWidgets docs: wxClipboardTextEvent
π¦ Events π¦
use wxEvtHandler:connect/3 with wxClipboardTextEventType to subscribe to events of this type. that's the whole vibe check π
π DATA TYPES π
wxClipboardText() :: #wxClipboardText{}.wxClipboardTextEvent() :: wx:wx_object().wxClipboardTextEventType() :: command_text_copy | command_text_cut | command_text_paste.
β FUNCTIONS β
(nothing listed here, bestie β this section is giving empty plate at the function buffet π)
and that's the whole page, no cap. brought to you by Ericsson AB, version wx 2.6 β thanks for coming to my ted talk, mwah πβ¨π
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms