wxScrollWinEvent(3erl)

πŸ’… wxScrollWinEvent (3erl) β€” the Erlang module definition, bestie edition πŸŽ€

okay so real talk: this page is literally the wxScrollWinEvent module, straight out of the Erlang docs (and it's living in the 3erl manual, in case you were wondering πŸ‘‘). It's the whole "Functions for wxScrollWinEvent class" situation. Sit down, grab a strawberry πŸ“, let's go.


✨ DESCRIPTION ✨

A scroll event is basically a little messenger pigeon πŸ•ŠοΈ that shows up holding info about events sent from scrolling windows. That's it, that's the whole vibe.

lowkey important: you can use the EVT_SCROLLWIN* macros for intercepting scroll window events from the receiving window. iykyk πŸ’…

See also: wxScrollEvent, Overview events β€” go read those too, fr fr.

Also, this class is derived (and can use functions) from: wxEvent. Like, it inherited all the family drama and the family functions. 🫢

And for the extra curious: wxWidgets docs: wxScrollWinEvent.


🌈 EVENTS 🌈

Use wxEvtHandler:connect/3 with wxScrollWinEventType to subscribe to events of this type. That's the whole subscription arc β€” main character energy, no cap. ⭐


πŸ¦‹ DATA TYPES πŸ¦‹

  • wxScrollWinEvent() = wx:wx_object()
  • wxScrollWin() =
#wxScrollWin{type = wxScrollWinEvent:wxScrollWinEventType(),
             commandInt = integer(),
             extraLong = integer()}
  • wxScrollWinEventType() =
scrollwin_top | scrollwin_bottom | scrollwin_lineup |
scrollwin_linedown | scrollwin_pageup | scrollwin_pagedown |
scrollwin_thumbtrack | scrollwin_thumbrelease

look at that list. eight whole types. slay. πŸ’€βœ¨


πŸ”₯ EXPORTS πŸ”₯

getOrientation(This) -> integer()

Types:

This = wxScrollWinEvent()

Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar. literally just "which way does it go" β€” horizontal or vertical, pick one bestie 🧚

getPosition(This) -> integer()

Types:

This = wxScrollWinEvent()

Returns the position of the scrollbar for the thumb track and release events. πŸ‘‘

heads up though: this field can't be used for the other events β€” you need to query the window itself for the current position in that case. no shortcuts, go ask the window directly πŸ™ˆ

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

~ cute sign-off ~ this iconic lil doc was brought to you by the wxWidgets team, for version wx 2.2.2.1 β€” and yes, the page tag at the bottom is still wxScrollWinEvent(3erl), periodt. πŸŽ€πŸ’…

πŸ“¦ where this page comes from