Angelo,

A few questions about extending tk-ui:

1) I was wondering if you could explain the steps involved for adding a 
new widget type to the system, say the lovely Gallery widget from Nebula? 
It has all sorts of additional stylable properties like label text, 
highlight color and radius of the selected element (which, for added fun, 
is managed via a separate object, a subclass of 
AbstractGalleryItemRenderer).

2) How do we add new pseudo classes for say widgets from Nebula?  A 
problem I see is that pseudo class casing happens within the property 
handlers.  For example, CSSPropertyTextSWTHandler checks

                        if (control instanceof CTabFolder && "selected"
.equals(pseudo)) {
                                ((CTabFolder) 
control).setSelectionForeground(newColor);
                        } else {
                                control.setForeground(newColor);
                        }

This suggests that if I add a new widget type that supports some other 
pseudo class (say, GalleryItem:expanded) then I'd need to add it as 
another case in that method, which obviously I can't do in an extendable 
way. 

Thanks,
Kevin
_______________________________________________
eclipse-incubator-e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev

Reply via email to