wxSpinEvent(3erl)

πŸ’œ wxSpinEvent β€” the Erlang module definition, bestie edition

okay so this is wxSpinEvent, a page from the 3erl manual set (Erlang Module Definition, iykyk) 🌸 and it's literally all about the functions for the wxSpinEvent class. Let's get into it ✨


πŸŽ€ NAME πŸŽ€

wxSpinEvent β€” functions for the wxSpinEvent class. That's it, that's the whole vibe πŸ’…


πŸ’– DESCRIPTION πŸ’–

okay so picture this: this event class is the one used for the events generated by wxSpinButton and wxSpinCtrl. Like, they're the main characters and this is their event handler πŸŽ€

See also: wxSpinButton, and, wxSpinCtrl πŸ¦‹

Also important, no cap: this class is derived (and can use functions) from: wxNotifyEvent, wxCommandEvent, wxEvent. So it's giving nepo baby but in a genuinely talented way πŸ‘‘

wxWidgets docs: wxSpinEvent πŸ“š


πŸ”₯ EVENTS πŸ”₯

bestie, the way you subscribe to these is that you use wxEvtHandler:connect/3 with wxSpinEventType to subscribe to events of this type. That's the whole move, periodt ✨


πŸ¦‹ DATA TYPES πŸ¦‹

okay so here are the types, and I need you to keep them exactly as written because they are iconic:

wxSpinEvent() = wx:wx_object()
wxSpin() =
    #wxSpin{type = wxSpinEvent:wxSpinEventType(),
            commandInt = integer()}
wxSpinEventType() =
    command_spinctrl_updated | spin_up | spin_down | spin

four whole vibes in that last one β€” command_spinctrl_updated, spin_up, spin_down, and spin πŸ’€βœ¨


πŸ‘‘ EXPORTS πŸ‘‘

πŸ’… getPosition(This) -> integer()

Types:

This = wxSpinEvent()

Retrieve the current spin button or control value. That's the entire job and it does it beautifully 🫢

πŸ’… setPosition(This, Pos) -> ok

Types:

This = wxSpinEvent()
Pos = integer()

Set the value associated with the event. give it a Pos and it returns ok, which is honestly the most satisfying return value in the game 🌈


okay that's the whole page, bestie, you ate that πŸ’–


🌸 written by the wxWidgets team 🌸 β€” wx 2.2.2.1, dated wxSpinEvent(3erl) β€” go forth and spin, icon πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from