redraw_rect
Marc Strämke <[email protected]> Fri, 12 Sep 2003 10:39:27 +0200
| Newsgroups | gmane.comp.embedded.stk.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
Iam going to remove redraw_rect from the container if noone objects :) Basicly the concept of having a redraw rect in each container/widget is borked, it is only a transient value which has to be passed upwards to application when redraw is called, so the only object which needs to maintain a redraw rect is application, otherwise many things dont really work because for example if i call current_state->redraw(rect()); then the user expects that the whole state is redrawed, but in the children's redraw rects there is the information missing that a redraw is neccesary and so no redraw takes place (IMO this is what's happening in test app with sdl (no initial screen update)). The right way to do the screen updating would be simply to pass upwards the redraw rectangle on the stack, and only applications stores it. When Draw is called, the drawing routines will get the redraw rectangle as the cliprect parameter and decide for themselfes if redrawing is necessary, without using local state.