wxMouseC...LostEvent(3erl)

πŸ’– wxMouseC...LostEvent (3erl) β€” the Erlang module definition, bestie edition πŸ’–

okay so this is the Erlang module definition for wxMouseCaptureLostEvent, and yes the manual name is giving truncated-filename energy but we move ✨

🌸 NAME 🌸

wxMouseCaptureLostEvent β€” literally just the functions for the wxMouseCaptureLostEvent class. that's the whole vibe πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

so picture this: a window had obtained mouse capture, right? and then it like... lost it 😭 not because of anything it did, but because of an "external" event β€” for example, when a dialog box shows up, or if another application captures the mouse. rude of them honestly.

when that happens, this event gets sent to all the windows on the capture stack β€” meaning every window that called CaptureMouse but didn't call ReleaseMouse yet. like the whole group chat gets the notification, not just one person 🫢

πŸ’€ important caveat incoming: the event is not sent if the capture changes because of a call to CaptureMouse or ReleaseMouse. so if the change was consensual, no drama notification. periodt.

also this event is currently emitted under Windows only. that's it. that's the platform. ngl that's a big mood.

  • Only for: wxmsw

See also: wxMouseCaptureChangedEvent, Overview events, wxWindow:captureMouse/1, wxWindow:releaseMouse/1, wxWindow:getCapture/0

this class is derived (and can use functions) from: wxEvent β€” so it's got the whole family tree, iykyk πŸ‘‘

wxWidgets docs: wxMouseCaptureLostEvent β€” go look if you want the source material, icon behaviour.


⭐ EVENTS ⭐

use wxEvtHandler:connect/3 with wxMouseCaptureLostEventType to subscribe to events of this type. that's your subscription link, bestie β€” click subscribe and turn on notifications πŸ””

πŸ’… DATA TYPES πŸ’…

wxMouseCaptureLostEvent() = wx:wx_object()
wxMouseCaptureLost() =
    #wxMouseCaptureLost{type =
                            wxMouseCaptureLostEvent:wxMouseCaptureLostEventType()}
wxMouseCaptureLostEventType() = mouse_capture_lost

and that's the whole data type situation β€” mouse_capture_lost is the one and only atom there, and honestly? main character energy 🌈


πŸŽ€ okay bye bestie, this page was brought to you by the wxWidgets team, version wx 2.2.2.1, and it's the wxMouseC...LostEvent(3erl) page β€” go forth and not lose capture πŸ’œβœ¨

πŸ“¦ where this page comes from