wxSetCursorEvent(3)

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

πŸ’… wxSetCursorEvent β€” the Erlang module definition, bestie edition

okay so this is wxSetCursorEvent(3), an Erlang module definition, and it's genuinely so useful once it clicks. no cap. πŸ¦‹

✨ NAME ✨

wxSetCursorEvent β€” a wxSetCursorEvent gets generated from wxWindow when the mouse cursor is about to be set as a result of mouse motion. that's the whole vibe. πŸ‘‘

πŸŽ€ DESCRIPTION πŸŽ€

so here's the tea: this event hands your application the chance to do its own specific mouse cursor processing, based on where the mouse currently is inside the window. it's literally giving you the aux cord for your cursor. 🎧

wanna pick which cursor shows up? use setCursor/2 to specify the cursor you want to be displayed. that's it, that's the move. πŸ’…

See also, bestie:

  • wx_misc:setCursor/1
  • wxWindow:setCursor/2

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

  • wxEvent

wxWidgets docs: wxSetCursorEvent

🌸 Events 🌸

use wxEvtHandler:connect/3 with wxSetCursorEventType to subscribe to events of this type. that's how you get on the list, fr fr. 🫢


πŸ“¦ DATA TYPES πŸ“¦

wxSetCursor() :: #wxSetCursor{}.

wxSetCursorEvent() :: wx:wx_object().

wxSetCursorEventType() :: set_cursor.

πŸ”₯ FUNCTIONS πŸ”₯

  • getCursor(This) -> wxCursor:wxCursor() when This :: wxSetCursorEvent(). returns a reference to the cursor specified by this event. that's your little cursor receipt right there. ✨
  • getX(This) -> integer() when This :: wxSetCursorEvent(). returns the X coordinate of the mouse in client coordinates. the horizontal situation. πŸ“
  • getY(This) -> integer() when This :: wxSetCursorEvent(). returns the Y coordinate of the mouse in client coordinates. the vertical situation. πŸ“
  • hasCursor(This) -> boolean() when This :: wxSetCursorEvent(). returns true if the cursor specified by this event is a valid cursor.
Remark: you cannot specify wxNullCursor with this event, because it is not considered a valid cursor. so don't try it, bestie, it's giving invalid. πŸ’€
  • setCursor(This, Cursor) -> ok when
This :: wxSetCursorEvent(),
Cursor :: wxCursor:wxCursor().

sets the cursor associated with this event. this is the one that actually does the thing you came here for. iconic. πŸ’–


and that's the whole page, no notes. 🧚 this was wxSetCursorEvent(3) brought to you by Ericsson AB, living in wx 2.6 era β€” yeah, she's vintage but she still ate. 🌈⭐ stay hydrated, set your cursors responsibly, mwah πŸ’œ

πŸ“¦ where this page comes from