wxEraseEvent(3)
π wxEraseEvent
okay so bestie, this is the Erlang module definition for wxEraseEvent, straight outta the wx world β¨
πΈ NAME πΈ
wxEraseEvent β an erase event gets sent when a window's background needs to be repainted. that's it, that's the vibe π¨
π¦ DESCRIPTION π¦
so here's the tea, and it's important tea: on some platforms β GTK+ being the main character here π β this event is simulated. like, it's just generated right before the paint event, and it may cause flicker π
so the recommendation is: set the text background colour explicitly to prevent that flicker. no cap. also, the default background colour under GTK+ is grey. remember that. π©Ά
to intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table definition. periodt.
β οΈ read this twice, bestie: you must use the device context returned bygetDC/1to draw on. do not create awxPaintDCin the event handler. like, don't. i'm serious. π
see: Overview events
this class is derived from β and can use functions from β this absolute legend:
wxEventπ«Ά
wxWidgets docs: wxEraseEvent
β¨ Events β¨
use wxEvtHandler:connect/3 with wxEraseEventType to subscribe to events of this type. slay, you're subscribed π
π DATA TYPES π
wxErase()::#wxErase{}.wxEraseEvent()::wx:wx_object().wxEraseEventType()::erase_background.
π FUNCTIONS π
getDC(This) -> wxDC:wxDC() when This :: wxEraseEvent().β returns the device context associated with the erase event, so you can draw on it. ποΈ
the returned pointer is never NULL. iconic behaviour, honestly. β¨
Ericsson AB Β· wx 2.6 β mwah, that's the whole page bestie, go forth and erase those backgrounds responsibly π¦π π
π¦ 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