wxMouseCap...angedEvent(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– NAME πŸ’–

wxMouseCaptureChangedEvent β€” it's the event that gets sent to a window when that window loses its mouse capture. like, the mouse said "we're done here" and bounced. πŸ™ˆ


✨ DESCRIPTION ✨

okay so bestie, listen. this event fires even if your own application code called wxWindow:releaseMouse/1. yes, even when you did it on purpose. 🫢

and why do we care? because handling this event lets your app deal with unexpected capture releases β€” the ones that would otherwise make your mouse handling code go absolutely feral and confused. she's a safety net. she's iconic. πŸ’…

Only for: wxmsw β€” so if you're not on Windows, this is not your moment, bestie.

See also:

  • wxMouseCaptureLostEvent
  • Overview events
  • wxWindow:captureMouse/1
  • wxWindow:releaseMouse/1
  • wxWindow:getCapture/0

This class is derived, and can use functions, from:

  • wxEvent

wxWidgets docs: wxMouseCaptureChangedEvent

🌈 Events 🌈

use wxEvtHandler:connect/3 with wxMouseCaptureChangedEventType to subscribe to events of this type. that's the whole vibe check right there, no cap.


πŸŽ€ DATA TYPES πŸŽ€

  • wxMouseCaptureChanged() :: #wxMouseCaptureChanged{}.
  • wxMouseCaptureChangedEvent() :: wx:wx_object().
  • wxMouseCaptureChangedEventType() :: mouse_capture_changed.

⭐ FUNCTIONS ⭐

  • getCapturedWindow(This) -> wxWindow:wxWindow() when This :: wxMouseCaptureChangedEvent().

returns the window that gained the capture... or NULL if it was a non-wxWidgets window. yep, sometimes it's just NULL, and that's a whole thing. 😭

getCapturedWindow(This) -> wxWindow:wxWindow()
                              when This :: wxMouseCaptureChangedEvent().

kisses, bestie πŸ’– this page came from Ericsson AB and it's rockin' wx 2.6 β€” now go forth and subscribe to those events, main character πŸ¦‹βœ¨

πŸ“¦ where this page comes from