Re: [AD] Overriding GUI menu look

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 20 May 2001, m.versteegh@xxxxxxxxxx <m.versteegh@xxxxxxxxxx> wrote:
...
> the standard dialogs (alert, file_slect etc) would still use the
> old system Why not follow GTK+'s approach and replace all the
> standard d_*_proc functiosn by function pointers?

Good idea, but you're behind by a couple of WIPs :-) I already added
gui_*_proc for overriding the look of standard dialogs (there were
reasons for not making the d_*_procs themselves into pointers).

> maybe something along the line of
> 
> struct GUI_STYLE
> {
>    int (*button_draw)(DIALOG *d, int c),
>    int (*checkbox_draw)(DIALOG *d, int c),
>    int (*menuitem_draw)(DIALOG *d, int c),
> } GUI_STYLE;
> 
> with a default style containing the current drawing code.

This is interesting (switch themes with one assignment!), but will
break old code if we ever add another proc.

> This might need some more thinking for menus ( never got menus to
> work properly in wham either, except by rewrinting the entire set of
> menu functions)

If someone wants to rewrite the menu code inside Allegro to be more
flexible, *and* backwards compatible, go right ahead :-)

-- 
tjaden@xxxxxxxxxx - http://www.alphalink.com.au/~tjaden/
AEROPALMICS (ayr o PALM iks), n.  The study of wind resistance conducted
by holding a cupped hand out the car window.  -- Rich Hall, "Sniglets"



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/