Re: Making drawable a rectangle.
Marc Strämke <[email protected]> Thu, 18 Sep 2003 17:36:16 +0200
| Newsgroups | gmane.comp.embedded.stk.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
Darren V Hart wrote: > 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...). My understanding of the word drawable were different: Drawable is an object which can be drawn onto something, so surface for example isnt needed because the object that CAN be drawn, doesnt need to know where it is drawn by someone else. Application is a drawable for user's api purposes, you want to draw the whole application, not just one state etc. imo drawable is right, if we remove the rect and the surface routine. > > Some points to consider before we "fix" drawable. > > Darren > > >> >>_______________________________________________ >>Libstk mailing list >>[email protected] >>http://www.dvhart.com/cgi-bin/mailman/listinfo/libstk >