This is a multi-question post; I apologize in advance if this format is inappropriate for this forum. If so, please let me know and I will avoid doing it in the future.
I'm continuing to learn wxWidgets, through the tutorials and other helps, but I'm not really clear on wxWidget's concept of backgrounds:
1. From the online docs,
andAn erase event is sent when a window's background needs to be repainted.
From this, my question is what is meant by "background", and what is meant by "contents"? Do the contents include the background? If not, how are they differentiated?A paint event is sent when a window's contents needs to be repainted.
2. If my mental model of what a background is is correct, then the background would have to be drawn first, then followed by the contents so that they appear "on top" of the background. So then, does the erase event handler always get called before the paint event handler?
3. Do region iterators have any meaning outside of paint events? For example, can I use them within the erase event handler to redraw only the dirty background regions?
4. Apparently, device contexts have their own background? (via ::SetBackground()) What is the difference between context backgrounds and window backgrounds? (e.g. SetBackground() for contexts and SetBackgroundColour() for windows)