wxNotifyEvent(3)

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

✨ NAME ✨

wxNotifyEvent β€” bestie, this one is the blueprint, not the main character. It's the base class for other event classes (like wxBookCtrlEvent), and it does not get used by the event handlers all by itself. It's giving "mom of the friend group" energy πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so when a control's state is actively being changed, it (or an object of a derived class, no cap) gets sent out β€” and it hands your program the power to veto/1 that change if it wants to stop it from happening at all. You have the authority. Use it wisely, queen πŸ‘‘

See also: wxBookCtrlEvent

This class is derived from β€” and can use functions from β€” these iconic ancestors:

  • wxCommandEvent
  • wxEvent

wxWidgets docs: wxNotifyEvent


🌸 DATA TYPES 🌸

wxNotifyEvent() :: wx:wx_object().

πŸ’– FUNCTIONS πŸ’–

allow(This) -> ok when This :: wxNotifyEvent()

This is literally the opposite of veto/1 β€” it explicitly says okay, go ahead, the event may be processed.

fr fr, for most events you don't even need to call this, because they're allowed by default anyhow. But some events are forbidden by default (and the corresponding event description will tell you when that's the case, iykyk).

isAllowed(This) -> boolean() when This :: wxNotifyEvent()

Returns true if the change is allowed β€” meaning veto/1 has <em>not</em> been called β€” or false otherwise (i.e. it was called). Simple as that, no thoughts, head empty ✨

veto(This) -> ok when This :: wxNotifyEvent()

Prevents the change announced by this event from happening. Straight-up no. Shut it down. πŸ™ˆ

Genuinely though, it's in general a good idea to tell the user why you're vetoing the change β€” because otherwise your application's behaviour (which just refuses to do what the user wants, out of nowhere 😭) might be quite surprising. Communicate, bestie. 🫢

Ericsson AB Β· wx 2.6 Β· wxNotifyEvent(3) β€” that's the whole page, babes! Go forth and veto responsibly, mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from