wxSetCursorEvent(3)
π 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/1wxWindow: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()whenThis :: wxSetCursorEvent(). returns a reference to the cursor specified by this event. that's your little cursor receipt right there. β¨getX(This) -> integer()whenThis :: wxSetCursorEvent(). returns the X coordinate of the mouse in client coordinates. the horizontal situation. πgetY(This) -> integer()whenThis :: wxSetCursorEvent(). returns the Y coordinate of the mouse in client coordinates. the vertical situation. πhasCursor(This) -> boolean()whenThis :: wxSetCursorEvent(). returnstrueif 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) -> okwhen
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
- 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