Re: Making drawable a rectangle.

Darren V Hart <[email protected]> Thu, 18 Sep 2003 07:08:54 -0600
Newsgroups gmane.comp.embedded.stk.gui.devel
Message-ID <1063890533.20632.5.camel@brain>
On Thu, 2003-09-18 at 06:00, Marc Strämke wrote:
> (Disclaimer: this isnt really(*g*) a flame)
> To make it short, i think that's wrong :)
> Not everything that can be drawn has a rect, look at application for 
> example, if list_item needs to be derived from rect, derive it, but dont 
> make drawable a rect! :))))

I had the same thoughts, but I wonder if the question is better directed
at what a "drawable" is.  As we mentioned earlier it has a surface()
routine (which has been suggested can be removed).  Notice that
application can't really be "drawn" either.  IMO a "drawable" implies an
area that can be drawn on, this requires access to a surface and an area
(hence surface() and rectangle).  Perhaps drawable is too high in the
hierarchy and should be place between component and widget, leaving
application to continue deriving from component.  On the other hand,
application does use redraw(), but I am not sure it needs to since it
uses it a little differently than other "drawables" (I know,
polymorphism...).

Some points to consider before we "fix" drawable.

Darren

> 
> 
> _______________________________________________
> Libstk mailing list
> [email protected]
> http://www.dvhart.com/cgi-bin/mailman/listinfo/libstk