RE: [AD] src/gui.c hotkey and hidden widgets patch

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


Title: RE: [AD] src/gui.c hotkey and hidden widgets patch

Chris La Mantia writes:
> Historically, only D_HIDDEN was available, so it was at one time the only
> way to disable a control;  D_DISABLED wasn't added until version 2.2.  This
> explains why the controls behave the way they do.
>
> Now that I've listened to what you say, I agree that this is odd and perhaps
> broken

I'm not convinced. In every GUI toolkit that I've used (not just the Atari :-) hiding objects is used to make them inactive, for instance when you build a dialog that has many options but some of them are not applicable to the current situation, so you hide them to get them out of the way (compared to disabling them, which is more for things that are currently unavailable but could be in the near future, so you just grey them out but leave them visible to the user).

It doesn't make logical sense to me for an object to be hidden but still process input. If it is meant to be an active part of the interface, surely what you want is just for the object to be of a type which has action behaviours but no display code associated with it? That's a very different thing from an object which could be displayed but currently isn't, the implication of a hidden flag being that you could unhide it later on and would then expect it to draw itself in some useful way. For objects that have display code, it seems odd for them to go on processing input while they are not displayed, while for objects that are not displayed, there's no need to hide them since they don't have any draw function anyway.


        Shawn.



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