For the theme idea, I allways have in mind the structure used in VisualWorks which is to have decorator wrappers (and a few specifics like scrollbars) for each theme, and the core GUI stays the same.

Morphs aren't designed that way (except for scrollbars) so it looks harder. But maybe composing would work (a morph may have a border and delegates some behavior to the border: drawing, bounds, etc... Changing the theme would mean changing the border class. In a few cases, it would mean changing the morph class completely (i.e. scrollbars)).

Designing and testing that sounds like long, hard work :(

For the UIManager theme thing, I would couple that to Smalltalk, something as simple as :

Smalltalk ui (command line or gui)

and:

Smalltalk ui theme (if someone want to write an ascii-art Morphic theme :)) (I used to write dialog boxes and menu bars in ascii for a VT100 terminal a long, long time ago).

Thierry

Le 26/09/2013 22:14, Stéphane Ducasse a écrit :
If you remember a while ago I was thinking that the theme could be managed like 
settings (ie encapsulated in the widgets and that the widgets could encapsulate 
their default for theme), but sadly I was wrong because a theme oftn requires 
specific computation. So probably
we should have a widget and some object that represents the theme strategy.
Ideally I would like to get rid of the UIManager theme idea but this is 
difficult and it requires a bit of prototyping.
So if one of you want to try to see on a typical case how a design could work. 
It would be really great.

Setf


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply via email to