wxSplitterEvent(3erl)
π wxSplitterEvent β like, the whole Erlang module definition, bestie
okay so this page is the wxSplitterEvent page from the Erlang manual (module definition vibes), and I'm gonna walk you through every single bit of it, no skips, no cap. grab a snack. π
β¨ NAME β¨
wxSplitterEvent β literally just the functions for the wxSplitterEvent class. that's the whole name. iconic, brief, we love her. π
πΈ DESCRIPTION πΈ
so this class represents the events generated by a splitter control. that's it. that's the gig. π
and here's the tea: there's only one event class, but the data associated with the different events is not the same β so not all accessor functions may be called for each event. the docs will tell you which kind of event(s) each accessor function actually makes sense for. call it for a different type of event and you get an assert failure (in debug mode) and meaningless results back. π like bestie that's not a vibe.
lowkey important: debug-mode assert failure + meaningless return values if you use an accessor on the wrong event type. don't do it. π
See: wxSplitterWindow, Overview events
This class is derived (and can use functions) from: wxNotifyEvent wxCommandEvent wxEvent
wxWidgets docs: wxSplitterEvent
π¦ EVENTS π¦
Use wxEvtHandler:connect/3 with wxSplitterEventType to subscribe to events of this type. that's the whole move. subscribe and slay. β¨
π DATA TYPES π
here's where it gets a lil type-theory-y, stay with me:
wxSplitterEvent() = wx:wx_object()
wxSplitter() = #wxSplitter{type = wxSplitterEvent:wxSplitterEventType()}
wxSplitterEventType() =
command_splitter_sash_pos_changed |
command_splitter_sash_pos_changing |
command_splitter_doubleclicked | command_splitter_unsplit
four event types, one record, zero notes. π
π EXPORTS π
π getSashPosition(This) -> integer()
Types:
This = wxSplitterEvent()
returns the new sash position. that's it, that's the function.
may only be called while processing wxEVT_SPLITTER_SASH_POS_CHANGING and wxEVT_SPLITTER_SASH_POS_CHANGED events. any other time? assert failure city. π
π getX(This) -> integer()
Types:
This = wxSplitterEvent()
returns the x coordinate of the double-click point. the horizontal one, bestie.
may only be called while processing wxEVT_SPLITTER_DOUBLECLICKED events. π±οΈ
π getY(This) -> integer()
Types:
This = wxSplitterEvent()
returns the y coordinate of the double-click point. the vertical one. her sister. π«Ά
may only be called while processing wxEVT_SPLITTER_DOUBLECLICKED events.
π getWindowBeingRemoved(This) -> wxWindow:wxWindow()
Types:
This = wxSplitterEvent()
returns a pointer to the window being removed when a splitter window is unsplit. bye-bye window π«‘
may only be called while processing wxEVT_SPLITTER_UNSPLIT events.
π setSashPosition(This, Pos) -> ok
Types:
This = wxSplitterEvent()
Pos = integer()
okay so this one's got layers, pay attention:
- in the case of
wxEVT_SPLITTER_SASH_POS_CHANGEDevents, it sets the new sash position. - in the case of
wxEVT_SPLITTER_SASH_POS_CHANGINGevents, it sets the new tracking bar position so that the visual feedback during dragging will actually represent the change that will actually take place. set it to-1from the event handler code to prevent repositioning. π«
may only be called while processing wxEVT_SPLITTER_SASH_POS_CHANGING and wxEVT_SPLITTER_SASH_POS_CHANGED events.
and that's the whole page, bestie. every single function, every single caveat, nothing dropped. π β¨
sign-off szn: this lil masterpiece was brought to you by the wxWidgets team π, for wx 2.2.2.1, and this page is wxSplitterEvent(3erl) β manual name folded in near the top like we promised, periodt. πππ¦
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms