Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] CSS DOM Binding


Hi Gorken,

Yes, I find it likely that some new SWT API will be required, although as Steve says, not sure yet what it would be.  

We'll want the styles to be applied to the widgets as part of widget creation so that callers don't need to do "setCSS" in their code after every widget is created.  However, I could imagine both explicit CSS like API as you suggested, or more general API like "widget is created" notification that a CSS engine could hook and thus apply the styles for any widget.  Controls could remember their styles, or it could be via setData, or via a lookup table in the engine or elsewhere.

So I see two basic directions:

1) CSS specific API added to SWT
2) General purpose API added to SWT that will enable CSS

I like (1) for its explicitness and as you note for some toolkits we may get native support.  But I like (2) for its flexibility by not marrying SWT to CSS (ie. allows some other declarative approach and keeps the layers separate).

With respect to your comment,
> One benefit of this approach
> would be the possibility to customize parts of the SWT Controls that
> are not accessible by the SWT APIs such as the progress chunk on
> ProgressBar or the drop down for Combo...


I'm not sure I like a solution which says I can style something via CSS declaration that I can't via API.  Rather, I think the API must exist and CSS just provides declarative access. That's true AFAIK of HTML and CSS -- CSS doesn't allow me to do anything I couldn't before.  I think though that one value in the CSS approach is an expectation of being able to style most any aspect, which would push on our APIs in a good way.

Regards,
Kevin



"Gorkem Ercan" <gercan@xxxxxxx>
Sent by: eclipse-incubator-e4-dev-bounces@xxxxxxxxxxx

06/05/2008 05:12 PM

Please respond to
E4 developer list <eclipse-incubator-e4-dev@xxxxxxxxxxx>

To
"E4 developer list" <eclipse-incubator-e4-dev@xxxxxxxxxxx>
cc
Subject
Re: [eclipse-incubator-e4-dev] CSS DOM Binding





Widget created is usefull but regardless of the API, I would like see
CSS supported by the SWT component. In some cases the toolkit that is
used for the SWT implementation can support CSS and it may actually be
possible to also utilize that.
--
Gorkem



On Thu, Jun 5, 2008 at 11:52 PM, Steve Northover
<Steve_Northover@xxxxxxxxxx> wrote:
>
> It's not clear what the API would be.  In any case, having a "widget was
> created" seems useful independent of CSS.
>
>
>
> Eric Moffatt/Ottawa/IBM@IBMCA
> Sent by: eclipse-incubator-e4-dev-bounces@xxxxxxxxxxx
>
> 06/05/2008 04:09 PM
>
> Please respond to
> E4 developer list <eclipse-incubator-e4-dev@xxxxxxxxxxx>
> To
> E4 developer list <eclipse-incubator-e4-dev@xxxxxxxxxxx>
> cc
> Subject
> Re: [eclipse-incubator-e4-dev] CSS DOM Binding
>
>
>
>
>
> Gorkem, if it were only the case of storing the various styling 'hints'
> (#class, attrs...) then we can already do this using the Widget#setData
> method ("myEdit.setData("CSSType", "Edit").... no need to 'bulk up' the SWT
> API. The various styling engines would, of course, have to agree on the
> 'tags' for the properties but they'd have to agree to use the new methods as
> well...
>
> Eric
>
>
> "Gorkem Ercan" <gercan@xxxxxxx>
> Sent by: eclipse-incubator-e4-dev-bounces@xxxxxxxxxxx
>
> 06/05/2008 04:01 PM
>
> Please respond to
> E4 developer list <eclipse-incubator-e4-dev@xxxxxxxxxxx>
>
> To
> "E4 developer list" <eclipse-incubator-e4-dev@xxxxxxxxxxx>
> cc
> Subject
> Re: [eclipse-incubator-e4-dev] CSS DOM Binding
>
>
>
>
>
>
> I was hoping that the CSS would be supported at SWT level. SWT would
> provide some simple to use APIs like Display.setCSS (String style)
> and Control.setCSS (String style). These APIs could in turn be
> utilized by the declarative UI engines. One benefit of this approach
> would be the possibility to customize parts of the SWT Controls that
> are not accessible by the SWT APIs such as the progress chunk on
> ProgressBar or the drop down for Combo...
> --
> Gorkem
>
>
>
>
> On Wed, May 28, 2008 at 8:15 PM, Steve Northover
> <Steve_Northover@xxxxxxxxxx> wrote:
>>
>> Yes, we need a "widget was created" listener.
>>
>>
>>
>> "Christopher Aniszczyk" <caniszczyk@xxxxxxxxx>
>> Sent by: eclipse-incubator-e4-dev-bounces@xxxxxxxxxxx
>>
>> 05/27/2008 09:36 PM
>>
>> Please respond to
>> E4 developer list <eclipse-incubator-e4-dev@xxxxxxxxxxx>
>> To
>> "E4 developer list" <eclipse-incubator-e4-dev@xxxxxxxxxxx>
>> cc
>> Subject
>> Re: [eclipse-incubator-e4-dev] CSS DOM Binding
>>
>>
>>
>>
>> Angelo, I quickly glanced over your technique of CSS/SWT. I noticed you
>> used
>> the method of adding a Display filter on SWT.Show events to do the
>> styling.
>> Is there a better way to do this? Do we need something from SWT to give a
>> better notification of lifecycle than what we have now? Maybe the
>> venerable
>> SWT team can answer this question.
>>
>> Maybe someone can get the various methods of styling out there currently
>> so
>> we can learn about them:
>> http://wiki.eclipse.org/E4/DeclarativeUI
>>
>> What do you think Angelo? Want to put your technique on the wiki so people
>> learn about it?
>>
>> On Tue, May 27, 2008 at 7:11 PM, Angelo zerr <angelo.zerr@xxxxxxxxx>
>> wrote:
>> Hi sorry
>>
>> for my new mail about TK-UI, but I have started TK-UI features
>> documentation
>> where I speak about DOM, CSS and Databinding into TK-UI.
>> Is it possible to add the TK-UI features link to the E4/Modeling?
>>
>> Don't hesitate to contact me if you have questions.
>>
>> Regards Angelo
>>
>> _______________________________________________
>> eclipse-incubator-e4-dev mailing list
>> eclipse-incubator-e4-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev
>>
>>
>>
>>
>> --
>> Cheers,
>>
>> ~ Chris Aniszczyk _______________________________________________
>> eclipse-incubator-e4-dev mailing list
>> eclipse-incubator-e4-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev
>>
>>
>> _______________________________________________
>> eclipse-incubator-e4-dev mailing list
>> eclipse-incubator-e4-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev
>>
>>
> _______________________________________________
> eclipse-incubator-e4-dev mailing list
> eclipse-incubator-e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev
> _______________________________________________
> eclipse-incubator-e4-dev mailing list
> eclipse-incubator-e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev
>
>
> _______________________________________________
> eclipse-incubator-e4-dev mailing list
> eclipse-incubator-e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev
>
>
_______________________________________________
eclipse-incubator-e4-dev mailing list
eclipse-incubator-e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev


Back to the top