[GUI] State, Attributes and Some basic widgets

Vincenzo Ciancia ciancia@cli.di.unipi.it
Sun, 13 Apr 2003 23:34:03 +0200


On Sun, 13 Apr 2003 23:11:51 +0200
Wolfgang Thaller <wolfgang.thaller@gmx.net> wrote:

> On Widget Names:
>  Then there is the Xt-style widget name, which would need to be 
>  specified on widget creation, and which would then be read-only.
>  Is it really necessary to have this on all platforms? I gather it is 
>  used for looking up customization from X resources - does this make 
>  sense if the widgets have been created programmatically using a 
>  cross-platform interface?

It does, even if you don't load UIL files, the names of the widgets can
be used for customization by the user. The user should not know if the
application uses or not an UIL, he just knows that with xeditres (s)he
can find and change the properties.

I wonder if a good automatic naming is possible. Maybe Glynn Clements
knows by experience that it's not a good idea.

>  People targeting other platforms first wouldn't know what to use the 
>  name for, and why it's a good idea to specify a proper name. 

This is a very good argument in favour of automatic naming. Naming given
by an user wich is not aware of their use would be worse than an
automatic one. Or at least automatic naming should be an option for the
user.

>  On linked states:
>  a) I think that linked states and general state-change notification
>  is outside the scope of the CGA.

Yes, but if you don't take the right measures, state-change notification
can be used in CGA by who cares only by simulation.

Consider a library, written in CGA but without state-change
notification. Nobody can compell it to notify its state changes without
changing the source code of the library, wich is a bad idea since this
kind of state handling seems very general and useful in GUI programs.

>  b) Allowing linked states would require every state change to go 
>  through the CGA; it would be more difficult to map to the underlying 
>  backend library, in case the backend library changes some state "on 
>  it's own".

I don't understand this point, can you give an example? It seems to me
that you are not going to watch states that don't interest you, and that
states that you don't watch are not going through the CGA.

Vincenzo