wxAuiManagerEvent(3erl)

πŸ’… wxAuiManagerEvent

okay so real talk: this is the Erlang Module Definition page for wxAuiManagerEvent, straight out of the wxWidgets docs, and it's genuinely kind of iconic once you get past the manpage font. it's all about the event object that gets passed around when wxAuiManager does stuff. bestie, let's get into it 🫢


✨ NAME ✨

wxAuiManagerEvent β€” literally just the functions for the wxAuiManagerEvent class. that's the whole name. slay.

🌸 DESCRIPTION 🌸

so this class is the event used to indicate various actions taken with wxAuiManager. think of it as the little messenger that shows up like "hey, something happened to a pane πŸ‘€".

wanna know which event types exist? go look at wxAuiManager. that's where they live.

See: wxAuiManager, wxAuiPaneInfo

this class is derived (and can use functions) from: wxEvent β€” so yeah, it's got the whole wxEvent family tree behind it, main character energy fr fr πŸ’…

wxWidgets docs: wxAuiManagerEvent

πŸ¦‹ EVENTS πŸ¦‹

to subscribe to events of this type, use wxEvtHandler:connect/3 with wxAuiManagerEventType. that's the vibe check you gotta pass. no cap. ⭐

πŸŽ€ DATA TYPES πŸŽ€

okay so here's the shape of everything. read these carefully, they're the whole personality of the module:

wxAuiManagerEvent() = wx:wx_object()

wxAuiManager() =
    #wxAuiManager{type =
                      wxAuiManagerEvent:wxAuiManagerEventType(),
                  manager = wxAuiManager:wxAuiManager(),
                  pane = wxAuiPaneInfo:wxAuiPaneInfo(),
                  button = integer(),
                  veto_flag = boolean(),
                  canveto_flag = boolean(),
                  dc = wxDC:wxDC()}

wxAuiManagerEventType() =
    aui_pane_button | aui_pane_close | aui_pane_maximize |
    aui_pane_restore | aui_pane_activated | aui_render |
    aui_find_manager

look at that record. seven whole event types in the union, all lowercase with underscores, all giving "i was there" energy. 🌈

πŸ‘‘ EXPORTS πŸ‘‘

here's everybody. one bullet each, no skipping, we don't do that here. πŸ’–

🫢 setManager/2

setManager(This, Manager) -> ok

Types:

  • This = wxAuiManagerEvent()
  • Manager = wxAuiManager:wxAuiManager()

sets the wxAuiManager this event is associated with. like assigning the event its manager bestie. πŸ’•

🫢 getManager/1

getManager(This) -> wxAuiManager:wxAuiManager()

Types:

  • This = wxAuiManagerEvent()

Return: the wxAuiManager this event is associated with.

read-only peek at who the manager is. very demure. ✨

🫢 setPane/2

setPane(This, Pane) -> ok

Types:

  • This = wxAuiManagerEvent()
  • Pane = wxAuiPaneInfo:wxAuiPaneInfo()

sets the pane this event is associated with. now the event knows which pane it's about πŸŽ€

🫢 getPane/1

getPane(This) -> wxAuiPaneInfo:wxAuiPaneInfo()

Types:

  • This = wxAuiManagerEvent()

Return: the pane this event is associated with.

the pane in question. the one. the only. 🌸

🫢 setButton/2

setButton(This, Button) -> ok

Types:

  • This = wxAuiManagerEvent()
  • Button = integer()

sets the ID of the button clicked that triggered this event. so when a button caused all this, its ID lands here. πŸ’…

🫢 getButton/1

getButton(This) -> integer()

Types:

  • This = wxAuiManagerEvent()

Return: the ID of the button that was clicked.

a whole integer. the button's whole identity. 😭

🫢 setDC/2

setDC(This, Pdc) -> ok

Types:

  • This = wxAuiManagerEvent()
  • Pdc = wxDC:wxDC()

disclaimer bestie: the original page gives this one no description at all, so i'm not about to make one up out of thin air. it exists, it takes a wxDC:wxDC(), that's what we know. πŸ™ˆ

🫢 getDC/1

getDC(This) -> wxDC:wxDC()

Types:

  • This = wxAuiManagerEvent()

same deal β€” no description on the original page for this one either. it returns a wxDC:wxDC(). that's the tea, and that's all of it. πŸ“

🫢 veto/1

veto(This) -> ok

Types:

  • This = wxAuiManagerEvent()

the one-argument version. see veto/2 for the version that actually spells out the cancelling behaviour. 🧚

🫢 veto/2

veto(This, Options :: [Option]) -> ok

Types:

  • This = wxAuiManagerEvent()
  • Option = {veto, boolean()}

cancels the action indicated by this event if canVeto/1 is true. like hitting undo on reality, but only if the event says you're allowed. > if canVeto/1 is not true, then yeah β€” the action does not get cancelled, so don't count on this working everywhere. πŸ”₯

🫢 getVeto/1

getVeto(This) -> boolean()

Types:

  • This = wxAuiManagerEvent()

Return: true if this event was vetoed.

See: veto/2

the vibes check on whether the veto actually went through. πŸ’€

🫢 setCanVeto/2

setCanVeto(This, Can_veto) -> ok

Types:

  • This = wxAuiManagerEvent()
  • Can_veto = boolean()

sets whether or not this event can be vetoed. flip it on to allow vetoing, off to lock it down. πŸ‘‘

🫢 canVeto/1

canVeto(This) -> boolean()

Types:

  • This = wxAuiManagerEvent()

Return: true if this event can be vetoed.

See: veto/2

asks permission before you start vetoing things. polite queen behaviour honestly. 🌟


🌸 lowkey reminder: wxAuiManagerEventType() gives you exactly these and only these β€” aui_pane_button, aui_pane_close, aui_pane_maximize, aui_pane_restore, aui_pane_activated, aui_render, aui_find_manager. memorize them, they're the whole cast. iykyk. πŸ’œ

and that's the page, bestie! shoutout to the wxWidgets team β€” this one's from wx 2.2.2.1, page wxAuiManagerEvent(3erl). go forth and veto responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from