wxNotifyEvent(3erl)

✨ wxNotifyEvent πŸ’…

okay bestie, so this is the Erlang module definition for wxNotifyEvent β€” part of the whole Erlang/wx situation β€” and we're gonna get you fully caught up, no cap.


🌸 NAME 🌸

wxNotifyEvent β€” functions for the wxNotifyEvent class. literally that's the whole vibe πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so this class is not used by the event handlers by itself β€” think of it as the base class energy for other event classes (like wxBookCtrlEvent, iykyk). it's giving "supporting character who is actually the blueprint" πŸ‘‘

it (or an object of a derived class) gets sent when the control's state is being changed, and it lets the program veto/1 that change if it wants to stop it from happening. dramatic? maybe. useful? absolutely πŸ’…

See: wxBookCtrlEvent

this class is derived (and can use functions) from:

  • wxCommandEvent
  • wxEvent

wxWidgets docs: wxNotifyEvent ✨


🧚 DATA TYPES 🧚

wxNotifyEvent() = wx:wx_object()

that's the one and only type, bestie 🫢


πŸ”₯ EXPORTS πŸ”₯

⭐ allow(This) -> ok

Types:

This = wxNotifyEvent()

this is the opposite of veto/1 β€” it explicitly allows the event to be processed. slay πŸ’–

for most events it is not necessary to call this method, because the events are allowed anyhow β€” but some are forbidden by default (and that will be mentioned in the corresponding event description, so read those, bestie πŸ™ˆ).


⭐ isAllowed(This) -> boolean()

Types:

This = wxNotifyEvent()

returns true if the change is allowed (veto/1 hasn't been called), or false otherwise (if it was called). a little vibe check for your event 😭


⭐ veto(This) -> ok

Types:

This = wxNotifyEvent()

prevents the change announced by this event from happening. not me blocking the change πŸ”₯

it is in general a good idea to notify the user about the reasons for vetoing the change, because otherwise the application's behaviour (which just refuses to do what the user wants) might be quite surprising. like, imagine being told no with zero explanation πŸ’€ be kind, explain the veto.


okay so that's the whole page β€” every function, every type, every warning, all present and accounted for πŸ’œ

and that's a wrap, bestie! brought to you by the wxWidgets team, version wx 2.2.2.1 β€” mwah, stan them for me πŸŒˆπŸ’…βœ¨

πŸ“¦ where this page comes from