Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Declarative UI


Yves YANG wrote:

What I still say---I discussed this yesterday with Kevin on IRC---is that
a 1:1 declarative UI definition works as long as you don't mix in CSS.  But
at this very moment 1:1 fails because one might be needed to create certain
effects to modify the Widget-DOM, e.g., nest a control in an artificial
composite to show a shadow border.

I cannot see any problem of 1:1 declarative UI with CSS. If you change the
Style, you can simply recreate the entire tree or view.
With an abstraction layer, you should have the same problem. In SWT, some
parameters must be provided during the creation. If you want to change it,
you have no way to do it on "live" (keep the same SWT Widget). The only
solution is "delete it and recreate it". It is what we do in eFace and XWT.
I cannot see any problem with this solution.

That's my experience, too. Changes to the model (EObject) invalidate objects and properties of the widget (Control) hierarchy. It's a matter of knowing what objects and properties are invalidated, and hence requires a refresh. When a control is moved or a style corresponding to a style bit is changed, you invalidate the whole control, while other changes only invalidates a specific property or the layout.

With this kind of logic, it isn't that difficult to have intermediate Composites without model counterparts, as long as you know where to add new children.


Back to the top