wxSplitterEvent(3)
π NAME π
ok so wxSplitterEvent β this class is literally the events that a splitter control generates. that's the whole vibe. it's the Erlang module definition for it btw, in case the file name wxSplitterEvent(3) didn't give it away π¦
πΈ DESCRIPTION πΈ
bestie listen. there's only one event class here, but the data attached to the different events is not the same. so no, you cannot just call every accessor function on every event. that's not the move. π βοΈ
the docs will tell you which kind of event(s) a given accessor function actually makes sense for. and if you call it for a different type of event? assert failure (in debug mode, so it's LOUD about it) and it'll hand you back meaningless results. not a cute look. π
See also:
wxSplitterWindow- Overview events
this class is derived from β and can use functions from β these:
wxNotifyEventwxCommandEventwxEvent
wxWidgets docs: wxSplitterEvent
π Events π
use wxEvtHandler:connect/3 with wxSplitterEventType to subscribe to events of this type. that's the plug. π
β¨ DATA TYPES β¨
wxSplitter() :: #wxSplitter{}.wxSplitterEvent() :: wx:wx_object().wxSplitterEventType() ::
command_splitter_sash_pos_changed |
command_splitter_sash_pos_changing |
command_splitter_doubleclicked | command_splitter_unsplit.
π FUNCTIONS π
getSashPosition(This) -> integer() when This :: wxSplitterEvent().
returns the new sash position. iconic.
β οΈ may only be called while processingwxEVT_SPLITTER_SASH_POS_CHANGINGandwxEVT_SPLITTER_SASH_POS_CHANGEDevents. any other time and it's giving chaos.
getWindowBeingRemoved(This) -> wxWindow:wxWindow() when This :: wxSplitterEvent().
returns a pointer to the window being removed when a splitter window is unsplit. it's the farewell tour. π
β οΈ may only be called while processing wxEVT_SPLITTER_UNSPLIT events.
getX(This) -> integer() when This :: wxSplitterEvent().
returns the x coordinate of the double-click point. where the double-click happened, horizontally. π
β οΈ may only be called while processing wxEVT_SPLITTER_DOUBLECLICKED events.
getY(This) -> integer() when This :: wxSplitterEvent().
returns the y coordinate of the double-click point. same energy, but vertical. π
β οΈ may only be called while processing wxEVT_SPLITTER_DOUBLECLICKED events.
setSashPosition(This, Pos) -> ok when This :: wxSplitterEvent(), Pos :: integer().
ok so this one's doing a lil double duty depending on the event, keep up:
- in the case of
wxEVT_SPLITTER_SASH_POS_CHANGEDevents, it sets the new sash position. simple. ate. - in the case of
wxEVT_SPLITTER_SASH_POS_CHANGINGevents, it sets the new tracking bar position so the visual feedback during dragging actually represents the change that will really take place. yes queen, show them what they're gonna get. β¨ - set it to
-1from the event handler code to prevent repositioning. that's your escape hatch if you don't want the move to go through. π
β οΈ may only be called while processingwxEVT_SPLITTER_SASH_POS_CHANGINGandwxEVT_SPLITTER_SASH_POS_CHANGEDevents.
Ericsson AB Β· wx 2.6 β that's the source and version and date right there at the footer bestie, mwah, signing off, go read wxSplitterWindow(3) next, ily, bye π«Άπβ¨
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms