[Y-devel] Re-implement how to draw shapes?

drizzt321 at phpfreaks.com drizzt321 at phpfreaks.com
Wed Feb 25 13:44:57 GMT 2004


In a moment of debatable insight, I came up with the thought that perhaps we 
should come up with a simplified interface for drawing shapes to the screen. 
How I see it right now(mark, others, please, PLEASE correct me if I get this 
wrong), the widget asks the theme to paint itself. this happens in theme.c. 
this then goes over to the current theme, which curently is basic. in basic, 
draw.c basicDrawWidget looks to see which widget it is trying to paint, and if 
it identifies that, it goes into an interal function such as 
basicDrawWidget_Button to paint a button. so this means that the burden of 
deciding how to paint, and calling the painterDraw functions gets put onto the 
theme, correct? so in order to get things prainted to the screen, first the 
widget type must be defined and named(button.[ch] for example), and then each 
_theme_ actually knows how to draw this. so the actual work of painting goes 
into the theme, correct?

ok, I know I said I had a debateable insight, but that was before I did all the 
research into how things get painted. Now, its more I have a question. Would it 
be better to have all the work be put on the theme? or should we have an 
additional layer that accepts input from a theme, and then paints. I was just 
thinking it would be easier to write themes, when you don't have to worry about 
how do i paint a button, in the theme all you have to do is say, i want a 
button here, with this font, with this text, and with these 
colors/fontsize/etc. Thats just my thought for now, anybody else?

Aaron

----------------------------------------------------------------------
This mail sent through Toaster-Horde (https://qmailtoaster.clikka.com/)



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved