Drawing Review / RFCs

Darren V Hart <[email protected]> Mon, 15 Sep 2003 17:49:47 -0600
Newsgroups gmane.comp.embedded.stk.gui.devel
Message-ID <1063669786.16617.11.camel@brain>
Team,

First, my code review of Marc's updated drawing mechanism:

1) updating surface::offset in component::draw_child is nice, it
simplifies the individual widget draw routines, very nice.  I am not
sure why we added draw_child as a separate routine since container::draw
is now a one liner?

2) container::draw_child line 87 (after CVS update)
    clip rect is in world coords, child's rect is local coords so the 
    child->intersection call will not behave as expected for nested
    containers (I believe, Marc?).

3) All in all I thought the flow of the drawing mechanism is much
improved and very elegant.  Nice work Marc.



Second, some design issues I would like to get everyone's thoughts on:

1) All widgets have a rect, but it is tiresome to do
widget.rect().rect_method().  We currently wrap the rect methods in
widget, but that is burdensome and a pain to maintain when the rectangle
class changes.  Would anyone object terribly if widget derived from
rectangle?

2) Do the widget draw routines really need to receive the surface as a
parameter since they all derive from drawable and hence have a surface()
method?

3) Should state be focusable? (it isn't atm)

4) Where should events go if there is no focused widget?