Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » SWT Ribbon
SWT Ribbon [message #38241] Sun, 12 August 2007 20:17 Go to next message
Emil Crumhorn is currently offline Emil Crumhorn
Messages: 169
Registered: July 2009
Senior Member
In my spare time, which has been a little more than usual lately, I've
gotten a "see if it would be possible to do" SWT Ribbon control a little
further than I had originally planned, and since it's gotten so far I
figured I might as well ask and see what people would like to see in it to
make it more useful. As I have not released any code yet (and I would like
to see it in Nebula if it passes IP review and Trademark checks and
what-not - hence me posting in the Nebula group).

I would like some feedback on what from the "Office Ribbon" people would
like to see and what makes the Office Ribbon great that could be
implemented. It seems it's a pretty popular creation from Microsoft's side
as far as those things go.

I do want to point out that this does not use any native API whatsoever, all
is pure SWT. There are native Ribbon API hooks, which of course would be
ideal, but they're not cross-platform. Microsoft's ribbon API is open
otherwise and quite impressive feature-wise as well.

To make things a little easier, I created a page with some feature details
and a bunch of screenshots showing various things, located here:

http://www.hexapixel.com/ribbon/

So, any feedback will be good feedback, if you feel up for it.
Thanks!

Emil
Re: SWT Ribbon [message #38274 is a reply to message #38241] Mon, 13 August 2007 06:07 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Quite impressive. One more cool nebula addon :-)

Tom

Emil Crumhorn schrieb:
> In my spare time, which has been a little more than usual lately, I've
> gotten a "see if it would be possible to do" SWT Ribbon control a little
> further than I had originally planned, and since it's gotten so far I
> figured I might as well ask and see what people would like to see in it to
> make it more useful. As I have not released any code yet (and I would like
> to see it in Nebula if it passes IP review and Trademark checks and
> what-not - hence me posting in the Nebula group).
>
> I would like some feedback on what from the "Office Ribbon" people would
> like to see and what makes the Office Ribbon great that could be
> implemented. It seems it's a pretty popular creation from Microsoft's side
> as far as those things go.
>
> I do want to point out that this does not use any native API whatsoever, all
> is pure SWT. There are native Ribbon API hooks, which of course would be
> ideal, but they're not cross-platform. Microsoft's ribbon API is open
> otherwise and quite impressive feature-wise as well.
>
> To make things a little easier, I created a page with some feature details
> and a bunch of screenshots showing various things, located here:
>
> http://www.hexapixel.com/ribbon/
>
> So, any feedback will be good feedback, if you feel up for it.
> Thanks!
>
> Emil
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: SWT Ribbon [message #38306 is a reply to message #38241] Mon, 13 August 2007 15:16 Go to previous messageGo to next message
Eclipse User
Originally posted by: zx.us.ibm.com

Awesome stuff, I definately for seeing this type of work done within Nebula.

Looks great!

Cheers,

~ Chris
Re: SWT Ribbon [message #38339 is a reply to message #38241] Tue, 14 August 2007 08:48 Go to previous messageGo to next message
Eclipse User
Originally posted by: diego.guidi.inwind.it

only a word... wow!!!

"Emil Crumhorn" <emil.crumhorn@gmail.com> ha scritto nel messaggio
news:f9npsn$mqv$1@build.eclipse.org...
> In my spare time, which has been a little more than usual lately, I've
> gotten a "see if it would be possible to do" SWT Ribbon control a little
> further than I had originally planned, and since it's gotten so far I
> figured I might as well ask and see what people would like to see in it to
> make it more useful. As I have not released any code yet (and I would like
> to see it in Nebula if it passes IP review and Trademark checks and
> what-not - hence me posting in the Nebula group).
>
> I would like some feedback on what from the "Office Ribbon" people would
> like to see and what makes the Office Ribbon great that could be
> implemented. It seems it's a pretty popular creation from Microsoft's side
> as far as those things go.
>
> I do want to point out that this does not use any native API whatsoever,
> all is pure SWT. There are native Ribbon API hooks, which of course would
> be ideal, but they're not cross-platform. Microsoft's ribbon API is open
> otherwise and quite impressive feature-wise as well.
>
> To make things a little easier, I created a page with some feature details
> and a bunch of screenshots showing various things, located here:
>
> http://www.hexapixel.com/ribbon/
>
> So, any feedback will be good feedback, if you feel up for it.
> Thanks!
>
> Emil
>
>
Re: SWT Ribbon [message #38372 is a reply to message #38241] Tue, 14 August 2007 14:54 Go to previous messageGo to next message
Chris Gross is currently offline Chris Gross
Messages: 253
Registered: July 2009
Senior Member
Hi Emil,

As I said in email... this is really awesome. My one suggestion might
be to break down the widget into smaller pieces that could be reused
individually. For example, the tab part of the ribbon could be used on
its own. I might want to use individual buttons somewhere outside of a
full ribbon, especially considering the extra features a ribbon button
can have (the way it can be layed out, drop downs, etc). This may or
may not be easy depending on how you've designed the widget. So its
only a suggestion.

Regards,
-Chris

Emil Crumhorn wrote:
> In my spare time, which has been a little more than usual lately, I've
> gotten a "see if it would be possible to do" SWT Ribbon control a little
> further than I had originally planned, and since it's gotten so far I
> figured I might as well ask and see what people would like to see in it to
> make it more useful. As I have not released any code yet (and I would like
> to see it in Nebula if it passes IP review and Trademark checks and
> what-not - hence me posting in the Nebula group).
>
> I would like some feedback on what from the "Office Ribbon" people would
> like to see and what makes the Office Ribbon great that could be
> implemented. It seems it's a pretty popular creation from Microsoft's side
> as far as those things go.
>
> I do want to point out that this does not use any native API whatsoever, all
> is pure SWT. There are native Ribbon API hooks, which of course would be
> ideal, but they're not cross-platform. Microsoft's ribbon API is open
> otherwise and quite impressive feature-wise as well.
>
> To make things a little easier, I created a page with some feature details
> and a bunch of screenshots showing various things, located here:
>
> http://www.hexapixel.com/ribbon/
>
> So, any feedback will be good feedback, if you feel up for it.
> Thanks!
>
> Emil
>
>
Re: SWT Ribbon [message #38405 is a reply to message #38241] Tue, 14 August 2007 16:45 Go to previous messageGo to next message
Eclipse User
Originally posted by: msarathy.gmail.com

Awesome maan. Really rocks
Re: SWT Ribbon [message #38437 is a reply to message #38241] Tue, 14 August 2007 19:29 Go to previous messageGo to next message
Peter Centgraf is currently offline Peter Centgraf
Messages: 52
Registered: July 2009
Member
Very cool! I can't wait to play with this myself.

Now the torrent of questions...

Have you tried running this on any other platforms? How does it feel to
use this under GTK or OS X? How does it determine what colors to
render? How do the colors look when they're displayed along with the
Forms toolkit and CTabFolder gradients? How about when using the PShelf
presentation?

Have you thought about how this might fit into a typical RCP workbench?
Visually, it could replace the current CoolBar/ToolBar setup. Is the
IContributionManager API sufficient? It already supports the concept of
named groups, but the names are not intended for display. If the
implementation is extended to support I18n, the current names could be
used as keys. We would also need something akin to ICoolBarManager to
manage the top row of tabs. Does the Ribbon manage the layout of items
within each group, or does the client code? Perhaps
IContributionItem.fill(Composite) will be sufficient. Do the concepts
of "group marker" and "separator" still make sense for a Ribbon?

Also, how does the tooltip API compare to the new custom tooltips in
JFace for 3.3? CellLabelProvider seems to expose an API based on
CLabel, which does not support styled text. Do we need yet another
tooltip API for Ribbon?

Thanks again for showing us this work in progress. It has definitely
gotten me thinking....

--
Peter
Re: SWT Ribbon [message #38530 is a reply to message #38241] Tue, 14 August 2007 20:58 Go to previous messageGo to next message
Mark McLaren is currently offline Mark McLaren
Messages: 45
Registered: July 2009
Member
The screenshots looks very polished. Impressive.
Re: SWT Ribbon [message #38563 is a reply to message #38372] Wed, 15 August 2007 01:12 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew Hall
Messages: 368
Registered: July 2009
Senior Member
I second Chris's suggestion. It would be sweet to have all these
controls and be able to use them individually for finer-grained situations.

Matthew

Chris Gross wrote:
> Hi Emil,
>
> As I said in email... this is really awesome. My one suggestion might
> be to break down the widget into smaller pieces that could be reused
> individually. For example, the tab part of the ribbon could be used on
> its own. I might want to use individual buttons somewhere outside of a
> full ribbon, especially considering the extra features a ribbon button
> can have (the way it can be layed out, drop downs, etc). This may or
> may not be easy depending on how you've designed the widget. So its
> only a suggestion.
>
> Regards,
> -Chris
>
> Emil Crumhorn wrote:
>> In my spare time, which has been a little more than usual lately, I've
>> gotten a "see if it would be possible to do" SWT Ribbon control a
>> little further than I had originally planned, and since it's gotten so
>> far I figured I might as well ask and see what people would like to
>> see in it to make it more useful. As I have not released any code yet
>> (and I would like to see it in Nebula if it passes IP review and
>> Trademark checks and what-not - hence me posting in the Nebula group).
>>
>> I would like some feedback on what from the "Office Ribbon" people
>> would like to see and what makes the Office Ribbon great that could be
>> implemented. It seems it's a pretty popular creation from Microsoft's
>> side as far as those things go.
>>
>> I do want to point out that this does not use any native API
>> whatsoever, all is pure SWT. There are native Ribbon API hooks, which
>> of course would be ideal, but they're not cross-platform. Microsoft's
>> ribbon API is open otherwise and quite impressive feature-wise as well.
>>
>> To make things a little easier, I created a page with some feature
>> details and a bunch of screenshots showing various things, located here:
>>
>> http://www.hexapixel.com/ribbon/
>>
>> So, any feedback will be good feedback, if you feel up for it.
>> Thanks!
>>
>> Emil
>>
Re: SWT Ribbon [message #38596 is a reply to message #38437] Wed, 15 August 2007 10:37 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Peter Centgraf schrieb:
> Very cool! I can't wait to play with this myself.
>
[...]

> Also, how does the tooltip API compare to the new custom tooltips in
> JFace for 3.3? CellLabelProvider seems to expose an API based on
> CLabel, which does not support styled text. Do we need yet another

What do you mean by that? That we don't provide an API function that let
you return text-styles? The only thing we would need to do is to make
the CellLabelProvider and Object element accessible in
ColumnViewerToolTipSupport (which they are already currently although
this is not API because they are restored in
setData(String)/getData(String)) and then one can downcast to a subclass
of CellLabelProvider and use this ToolTip. The question is if the
ToolTip-API provided by Emil is compatible to our JFace-ToolTip is
structured as you already said.

The thing is it has to integrate itself as a child in
ToolTip#createToolTipContentArea()? There are requests to control more
of the ToolTip like e.g. controling the shape of the SWT-Shell :-). If
there are any short comings in the ToolTip-API which doesn't allow
Emil's work to get a customer of the ToolTip I'm open to discuss which
API would be needed to not duplicate the effort.

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: SWT Ribbon [message #38678 is a reply to message #38563] Wed, 15 August 2007 20:29 Go to previous messageGo to next message
Emil Crumhorn is currently offline Emil Crumhorn
Messages: 169
Registered: July 2009
Senior Member
Hmm, well, let me think.

Off the top of my head, it would right now be able to use the TabFolder
seperately. The buttons currently require a "RibbonGroup" parent, due to the
nature of the ribbon, but the parent is not a composite, in fact, the top
composite for any button, checkbox or sub-component below the TabFolder is a
private class that extends a plain composite that then draws a gradient
background on itself, and has a layout to properly layout the groups (it's
quite a simple class). So, in essence, even groups and buttons are fairly
standalone as they do go onto a parent.

However, these buttons are not controls! So if you were hoping to simply
instantate them like a Combo onto a Composite, that would definitely need
some re-working.

The draw class is a seperate (abstract) class to allow extending and method
overloading (as most of my widgets - if the user so wishes).

In any case, certainly an interesting proposal and suggestion, and I agree,
although I'm not sure how well the non-native look and feel (which is true
for Office as well) would look next to your typical native widget?


"Matthew Hall" <matthall@woodcraftmill.com> wrote in message
news:f9tjul$oet$1@build.eclipse.org...
>I second Chris's suggestion. It would be sweet to have all these controls
>and be able to use them individually for finer-grained situations.
>
> Matthew
>
> Chris Gross wrote:
>> Hi Emil,
>>
>> As I said in email... this is really awesome. My one suggestion might be
>> to break down the widget into smaller pieces that could be reused
>> individually. For example, the tab part of the ribbon could be used on
>> its own. I might want to use individual buttons somewhere outside of a
>> full ribbon, especially considering the extra features a ribbon button
>> can have (the way it can be layed out, drop downs, etc). This may or may
>> not be easy depending on how you've designed the widget. So its only a
>> suggestion.
>>
>> Regards,
>> -Chris
>>
>> Emil Crumhorn wrote:
>>> In my spare time, which has been a little more than usual lately, I've
>>> gotten a "see if it would be possible to do" SWT Ribbon control a little
>>> further than I had originally planned, and since it's gotten so far I
>>> figured I might as well ask and see what people would like to see in it
>>> to make it more useful. As I have not released any code yet (and I would
>>> like to see it in Nebula if it passes IP review and Trademark checks and
>>> what-not - hence me posting in the Nebula group).
>>>
>>> I would like some feedback on what from the "Office Ribbon" people would
>>> like to see and what makes the Office Ribbon great that could be
>>> implemented. It seems it's a pretty popular creation from Microsoft's
>>> side as far as those things go.
>>>
>>> I do want to point out that this does not use any native API whatsoever,
>>> all is pure SWT. There are native Ribbon API hooks, which of course
>>> would be ideal, but they're not cross-platform. Microsoft's ribbon API
>>> is open otherwise and quite impressive feature-wise as well.
>>>
>>> To make things a little easier, I created a page with some feature
>>> details and a bunch of screenshots showing various things, located here:
>>>
>>> http://www.hexapixel.com/ribbon/
>>>
>>> So, any feedback will be good feedback, if you feel up for it.
>>> Thanks!
>>>
>>> Emil
>>>
Re: SWT Ribbon [message #38706 is a reply to message #38437] Wed, 15 August 2007 20:55 Go to previous messageGo to next message
Emil Crumhorn is currently offline Emil Crumhorn
Messages: 169
Registered: July 2009
Senior Member
A few questions there =) Let's see, I'll reply question by question. And
just to point out, most of these aren't actual answers, I do ask a few more
questions as well and I'm more or less thinking aloud.

> Have you tried running this on any other platforms?
Nope. I'm currently on the road with nothing but a (Windows XP) laptop to
work on, so I due to no-access-to-other-machines I have not tried it.
However, in my experience GC draws more or less the same on the 3 main
platforms, so a hopeful guess would be that it should be fine. But that
needs testing of course. Also, as someone pointed out, it would be quite
funny to see the Ribbon on GTK, so that's an incentive on my end to make
sure it looks fine :)

>How does it determine what colors to render?
It doesn't. My test version uses the Blue theme based on the same colors.
Office 2007 comes with three themes. Blue, Silver and Black. Now, the amount
of colors used to draw the ribbon is quite staggering, but that doesn't mean
it can't be themed, it's just a question of "does any user feel like
changing 200 colors to create a new theme?". That said, if there was a
surefire way of pulling an OS color and picking the correct gradients for
all the other colors, that would make life easier and I would welcome it. I
tried it for my other widgets and it wasn't possible at the time. Another
thing here is that even if you switch from Blue to Black, some colors remain
the same (selections are still orange-yellow-gradient) etc. It's a bit of a
thinker for sure. In my other widgets, I implemented the three main themes
and had the widget do an educated guess from picking a basic OS color to see
which theme was active. However, Office 2007 default is blue even if your OS
theme is Olive... And what about custom themes, custom colors, etc?

>How do the colors look when they're displayed along with the Forms toolkit
>and CTabFolder gradients? (and PShelf)
No idea right now, they would probably look strange. Which I guess is one
reason why Microsoft did not stick all-native (or any native) controls into
its ribbon or others around it. I think the idea of the ribbon is to be used
as a menu system, and to basically replace it, hence, it's not really built
to mix well with other tabfolders and such. This is also a bit of a
"theming" question as colors do play a part here as well. Perhaps there
could be a way to dumb-down the ribbon to look more native, and hence let it
blend better, I'm not sure. Seems like it's pushing into a realm where it
doesn't really want to live.

>Have you thought about how this might fit into a typical RCP workbench?
I have given that a thought, and it's basically the same as the previous
question. I think it would look odd, personally, depending on how it was
used.

>Does the Ribbon manage the layout of items within each group, or does the
>client code?
The chain of "command" is as follows. RibbonTabFolder (extends Composite) ->
RibbonTab -> RibbonTabComposite (private, created on tab creation, exends
Composite) -> RibbonGroup -> various AbstractRibbonItem(s). The
RibbonTabComposite handles the layout of the groups, and the RibbonTabFolder
handles the layout of the Tabs. So the answer is, the Ribbon has its own
layouts to control how things are shown and where they are drawn.

Perhaps IContributionItem.fill(Composite) will be sufficient. Do the
concepts of "group marker" and "separator" still make sense for a Ribbon?
Hmm, well, not sure here. Perhaps it would be. I think it would make sense,
but I need to think some more here, I haven't taken it that far in my head
yet. I think it's a real question of "what is the Ribbon replacing?"...

>Also, how does the tooltip API compare to the new custom tooltips in JFace
>for 3.3?
Well, using JFace is a bit non-Nebula, no? I can't say I'm sure what the
deal there truly is, but from what I gather, Nebula widgets need to be SWT
only. Right now, the tooltip API is completely custom and has nothing to do
with what the JFace 3.3 API has to offer. I haven't gotten to fully play
with the new 3.3 Tooltip API either, but if we're sticking to SWT only I'm
not sure I can even use it.

Phew, ok, hope that answered some stuff at least. Hoping to have some sample
package up soon so people can give it a go. Feel free to leave more feedback
of course =)

Emil

"Peter Centgraf" <peter@centgraf.net> wrote in message
news:f9svqn$f2b$1@build.eclipse.org...
> Very cool! I can't wait to play with this myself.
>
> Now the torrent of questions...
>
> Have you tried running this on any other platforms? How does it feel to
> use this under GTK or OS X? How does it determine what colors to render?
> How do the colors look when they're displayed along with the Forms toolkit
> and CTabFolder gradients? How about when using the PShelf presentation?
>
> Have you thought about how this might fit into a typical RCP workbench?
> Visually, it could replace the current CoolBar/ToolBar setup. Is the
> IContributionManager API sufficient? It already supports the concept of
> named groups, but the names are not intended for display. If the
> implementation is extended to support I18n, the current names could be
> used as keys. We would also need something akin to ICoolBarManager to
> manage the top row of tabs. Does the Ribbon manage the layout of items
> within each group, or does the client code? Perhaps
> IContributionItem.fill(Composite) will be sufficient. Do the concepts of
> "group marker" and "separator" still make sense for a Ribbon?
>
> Also, how does the tooltip API compare to the new custom tooltips in JFace
> for 3.3? CellLabelProvider seems to expose an API based on CLabel, which
> does not support styled text. Do we need yet another tooltip API for
> Ribbon?
>
> Thanks again for showing us this work in progress. It has definitely
> gotten me thinking....
>
> --
> Peter
Re: SWT Ribbon [message #38821 is a reply to message #38706] Thu, 16 August 2007 20:12 Go to previous message
Peter Centgraf is currently offline Peter Centgraf
Messages: 52
Registered: July 2009
Member
So, to sum up your responses (please correct me if necessary):

By nature, the ribbon is a strange component that does lots of custom
graphical rendering, and Microsoft has apparently made no effort to
integrate it with other widgets. This makes the whole question of
"native" L&F quite difficult, since Microsoft itself is totally
inconsistent in its visual language. (Why am I not surprised?)

On a detail level, the colors for the ribbon are specified individually
-- not generated from some few base colors by an algorithm. In order to
match it to a platform's color scheme, you need to specify 200 colors
one-by-one. This is so difficult in practice that not even Microsoft
bothered to try -- they just supply 3 pre-configured themes. You've
implemented the default one for your ribbon.

If I would like the ribbon to look visually consistent with the rest of
my application, I would need to spend a lot of time tweaking individual
color settings. In the best case, it would either look good in my
application but inconsistent with MS Office, or consistent with Office
but not the rest of my application.

I think it would be useful to keep the colors externalized from the
code, so if someone gets really ambitious, they could create their own
theme. Perhaps I'll do this myself, or perhaps we could convince one of
the Eclipse designers to take a crack at it. You could perhaps keep the
colors in a Java properties file and contribute themes via plugin
fragments, similar to the way L10n works in Eclipse.

I was thinking that the ribbon could easily replace the function of a
coolbar in an RCP app, but it would really need to replace both menu and
coolbar. It would be quite strange to have a menu and a ribbon right
next to each other. That's not a problem for new RCP apps, but it does
make a conversion from previous apps more difficult. For example, it
would probably look terrible if the crowded Eclipse IDE menus were
translated into separate buttons on the ribbon, but the coolbars are
sparsely populated and incomplete.

I don't think there's a hard-and-fast rule about not depending on JFace.
I think the idea is to keep the JFace stuff separate from the SWT
stuff, so that clients can work at either level. You make a good point,
though. The rollover popups are a pretty fundamental part of the
widget, so it doesn't make sense for it to be dependent on JFace.
Perhaps it would still be worth the time to make the APIs consistent
with each other, even if they aren't directly compatible.

One last issue: A major feature of the Office ribbon is to provide
visual feedback of changes when you roll over an option, rather than
waiting to do/undo/try again. Do the buttons on your ribbon provide
ArmEvents so an application could implement this live preview behavior?

--
Peter
Re: SWT Ribbon [message #583895 is a reply to message #38241] Mon, 13 August 2007 06:07 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Quite impressive. One more cool nebula addon :-)

Tom

Emil Crumhorn schrieb:
> In my spare time, which has been a little more than usual lately, I've
> gotten a "see if it would be possible to do" SWT Ribbon control a little
> further than I had originally planned, and since it's gotten so far I
> figured I might as well ask and see what people would like to see in it to
> make it more useful. As I have not released any code yet (and I would like
> to see it in Nebula if it passes IP review and Trademark checks and
> what-not - hence me posting in the Nebula group).
>
> I would like some feedback on what from the "Office Ribbon" people would
> like to see and what makes the Office Ribbon great that could be
> implemented. It seems it's a pretty popular creation from Microsoft's side
> as far as those things go.
>
> I do want to point out that this does not use any native API whatsoever, all
> is pure SWT. There are native Ribbon API hooks, which of course would be
> ideal, but they're not cross-platform. Microsoft's ribbon API is open
> otherwise and quite impressive feature-wise as well.
>
> To make things a little easier, I created a page with some feature details
> and a bunch of screenshots showing various things, located here:
>
> http://www.hexapixel.com/ribbon/
>
> So, any feedback will be good feedback, if you feel up for it.
> Thanks!
>
> Emil
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: SWT Ribbon [message #583912 is a reply to message #38241] Mon, 13 August 2007 15:16 Go to previous message
Chris Aniszczyk is currently offline Chris Aniszczyk
Messages: 674
Registered: July 2009
Senior Member
Awesome stuff, I definately for seeing this type of work done within Nebula.

Looks great!

Cheers,

~ Chris
Re: SWT Ribbon [message #583927 is a reply to message #38241] Tue, 14 August 2007 08:48 Go to previous message
Diego Guidi is currently offline Diego Guidi
Messages: 20
Registered: July 2009
Junior Member
only a word... wow!!!

"Emil Crumhorn" <emil.crumhorn@gmail.com> ha scritto nel messaggio
news:f9npsn$mqv$1@build.eclipse.org...
> In my spare time, which has been a little more than usual lately, I've
> gotten a "see if it would be possible to do" SWT Ribbon control a little
> further than I had originally planned, and since it's gotten so far I
> figured I might as well ask and see what people would like to see in it to
> make it more useful. As I have not released any code yet (and I would like
> to see it in Nebula if it passes IP review and Trademark checks and
> what-not - hence me posting in the Nebula group).
>
> I would like some feedback on what from the "Office Ribbon" people would
> like to see and what makes the Office Ribbon great that could be
> implemented. It seems it's a pretty popular creation from Microsoft's side
> as far as those things go.
>
> I do want to point out that this does not use any native API whatsoever,
> all is pure SWT. There are native Ribbon API hooks, which of course would
> be ideal, but they're not cross-platform. Microsoft's ribbon API is open
> otherwise and quite impressive feature-wise as well.
>
> To make things a little easier, I created a page with some feature details
> and a bunch of screenshots showing various things, located here:
>
> http://www.hexapixel.com/ribbon/
>
> So, any feedback will be good feedback, if you feel up for it.
> Thanks!
>
> Emil
>
>
Re: SWT Ribbon [message #583945 is a reply to message #38241] Tue, 14 August 2007 14:54 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 471
Registered: July 2009
Senior Member
Hi Emil,

As I said in email... this is really awesome. My one suggestion might
be to break down the widget into smaller pieces that could be reused
individually. For example, the tab part of the ribbon could be used on
its own. I might want to use individual buttons somewhere outside of a
full ribbon, especially considering the extra features a ribbon button
can have (the way it can be layed out, drop downs, etc). This may or
may not be easy depending on how you've designed the widget. So its
only a suggestion.

Regards,
-Chris

Emil Crumhorn wrote:
> In my spare time, which has been a little more than usual lately, I've
> gotten a "see if it would be possible to do" SWT Ribbon control a little
> further than I had originally planned, and since it's gotten so far I
> figured I might as well ask and see what people would like to see in it to
> make it more useful. As I have not released any code yet (and I would like
> to see it in Nebula if it passes IP review and Trademark checks and
> what-not - hence me posting in the Nebula group).
>
> I would like some feedback on what from the "Office Ribbon" people would
> like to see and what makes the Office Ribbon great that could be
> implemented. It seems it's a pretty popular creation from Microsoft's side
> as far as those things go.
>
> I do want to point out that this does not use any native API whatsoever, all
> is pure SWT. There are native Ribbon API hooks, which of course would be
> ideal, but they're not cross-platform. Microsoft's ribbon API is open
> otherwise and quite impressive feature-wise as well.
>
> To make things a little easier, I created a page with some feature details
> and a bunch of screenshots showing various things, located here:
>
> http://www.hexapixel.com/ribbon/
>
> So, any feedback will be good feedback, if you feel up for it.
> Thanks!
>
> Emil
>
>
Re: SWT Ribbon [message #583964 is a reply to message #38241] Tue, 14 August 2007 16:45 Go to previous message
Eclipse User
Originally posted by: msarathy.gmail.com

Awesome maan. Really rocks
Re: SWT Ribbon [message #583973 is a reply to message #38241] Tue, 14 August 2007 19:29 Go to previous message
Peter Centgraf is currently offline Peter Centgraf
Messages: 52
Registered: July 2009
Member
Very cool! I can't wait to play with this myself.

Now the torrent of questions...

Have you tried running this on any other platforms? How does it feel to
use this under GTK or OS X? How does it determine what colors to
render? How do the colors look when they're displayed along with the
Forms toolkit and CTabFolder gradients? How about when using the PShelf
presentation?

Have you thought about how this might fit into a typical RCP workbench?
Visually, it could replace the current CoolBar/ToolBar setup. Is the
IContributionManager API sufficient? It already supports the concept of
named groups, but the names are not intended for display. If the
implementation is extended to support I18n, the current names could be
used as keys. We would also need something akin to ICoolBarManager to
manage the top row of tabs. Does the Ribbon manage the layout of items
within each group, or does the client code? Perhaps
IContributionItem.fill(Composite) will be sufficient. Do the concepts
of "group marker" and "separator" still make sense for a Ribbon?

Also, how does the tooltip API compare to the new custom tooltips in
JFace for 3.3? CellLabelProvider seems to expose an API based on
CLabel, which does not support styled text. Do we need yet another
tooltip API for Ribbon?

Thanks again for showing us this work in progress. It has definitely
gotten me thinking....

--
Peter
Re: SWT Ribbon [message #584022 is a reply to message #38241] Tue, 14 August 2007 20:58 Go to previous message
Mark McLaren is currently offline Mark McLaren
Messages: 45
Registered: July 2009
Member
The screenshots looks very polished. Impressive.
Re: SWT Ribbon [message #584040 is a reply to message #38372] Wed, 15 August 2007 01:12 Go to previous message
Matthew Hall is currently offline Matthew Hall
Messages: 368
Registered: July 2009
Senior Member
I second Chris's suggestion. It would be sweet to have all these
controls and be able to use them individually for finer-grained situations.

Matthew

Chris Gross wrote:
> Hi Emil,
>
> As I said in email... this is really awesome. My one suggestion might
> be to break down the widget into smaller pieces that could be reused
> individually. For example, the tab part of the ribbon could be used on
> its own. I might want to use individual buttons somewhere outside of a
> full ribbon, especially considering the extra features a ribbon button
> can have (the way it can be layed out, drop downs, etc). This may or
> may not be easy depending on how you've designed the widget. So its
> only a suggestion.
>
> Regards,
> -Chris
>
> Emil Crumhorn wrote:
>> In my spare time, which has been a little more than usual lately, I've
>> gotten a "see if it would be possible to do" SWT Ribbon control a
>> little further than I had originally planned, and since it's gotten so
>> far I figured I might as well ask and see what people would like to
>> see in it to make it more useful. As I have not released any code yet
>> (and I would like to see it in Nebula if it passes IP review and
>> Trademark checks and what-not - hence me posting in the Nebula group).
>>
>> I would like some feedback on what from the "Office Ribbon" people
>> would like to see and what makes the Office Ribbon great that could be
>> implemented. It seems it's a pretty popular creation from Microsoft's
>> side as far as those things go.
>>
>> I do want to point out that this does not use any native API
>> whatsoever, all is pure SWT. There are native Ribbon API hooks, which
>> of course would be ideal, but they're not cross-platform. Microsoft's
>> ribbon API is open otherwise and quite impressive feature-wise as well.
>>
>> To make things a little easier, I created a page with some feature
>> details and a bunch of screenshots showing various things, located here:
>>
>> http://www.hexapixel.com/ribbon/
>>
>> So, any feedback will be good feedback, if you feel up for it.
>> Thanks!
>>
>> Emil
>>
Re: SWT Ribbon [message #584050 is a reply to message #38437] Wed, 15 August 2007 10:37 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
Peter Centgraf schrieb:
> Very cool! I can't wait to play with this myself.
>
[...]

> Also, how does the tooltip API compare to the new custom tooltips in
> JFace for 3.3? CellLabelProvider seems to expose an API based on
> CLabel, which does not support styled text. Do we need yet another

What do you mean by that? That we don't provide an API function that let
you return text-styles? The only thing we would need to do is to make
the CellLabelProvider and Object element accessible in
ColumnViewerToolTipSupport (which they are already currently although
this is not API because they are restored in
setData(String)/getData(String)) and then one can downcast to a subclass
of CellLabelProvider and use this ToolTip. The question is if the
ToolTip-API provided by Emil is compatible to our JFace-ToolTip is
structured as you already said.

The thing is it has to integrate itself as a child in
ToolTip#createToolTipContentArea()? There are requests to control more
of the ToolTip like e.g. controling the shape of the SWT-Shell :-). If
there are any short comings in the ToolTip-API which doesn't allow
Emil's work to get a customer of the ToolTip I'm open to discuss which
API would be needed to not duplicate the effort.

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: SWT Ribbon [message #584075 is a reply to message #38563] Wed, 15 August 2007 20:29 Go to previous message
Emil Crumhorn is currently offline Emil Crumhorn
Messages: 169
Registered: July 2009
Senior Member
Hmm, well, let me think.

Off the top of my head, it would right now be able to use the TabFolder
seperately. The buttons currently require a "RibbonGroup" parent, due to the
nature of the ribbon, but the parent is not a composite, in fact, the top
composite for any button, checkbox or sub-component below the TabFolder is a
private class that extends a plain composite that then draws a gradient
background on itself, and has a layout to properly layout the groups (it's
quite a simple class). So, in essence, even groups and buttons are fairly
standalone as they do go onto a parent.

However, these buttons are not controls! So if you were hoping to simply
instantate them like a Combo onto a Composite, that would definitely need
some re-working.

The draw class is a seperate (abstract) class to allow extending and method
overloading (as most of my widgets - if the user so wishes).

In any case, certainly an interesting proposal and suggestion, and I agree,
although I'm not sure how well the non-native look and feel (which is true
for Office as well) would look next to your typical native widget?


"Matthew Hall" <matthall@woodcraftmill.com> wrote in message
news:f9tjul$oet$1@build.eclipse.org...
>I second Chris's suggestion. It would be sweet to have all these controls
>and be able to use them individually for finer-grained situations.
>
> Matthew
>
> Chris Gross wrote:
>> Hi Emil,
>>
>> As I said in email... this is really awesome. My one suggestion might be
>> to break down the widget into smaller pieces that could be reused
>> individually. For example, the tab part of the ribbon could be used on
>> its own. I might want to use individual buttons somewhere outside of a
>> full ribbon, especially considering the extra features a ribbon button
>> can have (the way it can be layed out, drop downs, etc). This may or may
>> not be easy depending on how you've designed the widget. So its only a
>> suggestion.
>>
>> Regards,
>> -Chris
>>
>> Emil Crumhorn wrote:
>>> In my spare time, which has been a little more than usual lately, I've
>>> gotten a "see if it would be possible to do" SWT Ribbon control a little
>>> further than I had originally planned, and since it's gotten so far I
>>> figured I might as well ask and see what people would like to see in it
>>> to make it more useful. As I have not released any code yet (and I would
>>> like to see it in Nebula if it passes IP review and Trademark checks and
>>> what-not - hence me posting in the Nebula group).
>>>
>>> I would like some feedback on what from the "Office Ribbon" people would
>>> like to see and what makes the Office Ribbon great that could be
>>> implemented. It seems it's a pretty popular creation from Microsoft's
>>> side as far as those things go.
>>>
>>> I do want to point out that this does not use any native API whatsoever,
>>> all is pure SWT. There are native Ribbon API hooks, which of course
>>> would be ideal, but they're not cross-platform. Microsoft's ribbon API
>>> is open otherwise and quite impressive feature-wise as well.
>>>
>>> To make things a little easier, I created a page with some feature
>>> details and a bunch of screenshots showing various things, located here:
>>>
>>> http://www.hexapixel.com/ribbon/
>>>
>>> So, any feedback will be good feedback, if you feel up for it.
>>> Thanks!
>>>
>>> Emil
>>>
Re: SWT Ribbon [message #584095 is a reply to message #38437] Wed, 15 August 2007 20:55 Go to previous message
Emil Crumhorn is currently offline Emil Crumhorn
Messages: 169
Registered: July 2009
Senior Member
A few questions there =) Let's see, I'll reply question by question. And
just to point out, most of these aren't actual answers, I do ask a few more
questions as well and I'm more or less thinking aloud.

> Have you tried running this on any other platforms?
Nope. I'm currently on the road with nothing but a (Windows XP) laptop to
work on, so I due to no-access-to-other-machines I have not tried it.
However, in my experience GC draws more or less the same on the 3 main
platforms, so a hopeful guess would be that it should be fine. But that
needs testing of course. Also, as someone pointed out, it would be quite
funny to see the Ribbon on GTK, so that's an incentive on my end to make
sure it looks fine :)

>How does it determine what colors to render?
It doesn't. My test version uses the Blue theme based on the same colors.
Office 2007 comes with three themes. Blue, Silver and Black. Now, the amount
of colors used to draw the ribbon is quite staggering, but that doesn't mean
it can't be themed, it's just a question of "does any user feel like
changing 200 colors to create a new theme?". That said, if there was a
surefire way of pulling an OS color and picking the correct gradients for
all the other colors, that would make life easier and I would welcome it. I
tried it for my other widgets and it wasn't possible at the time. Another
thing here is that even if you switch from Blue to Black, some colors remain
the same (selections are still orange-yellow-gradient) etc. It's a bit of a
thinker for sure. In my other widgets, I implemented the three main themes
and had the widget do an educated guess from picking a basic OS color to see
which theme was active. However, Office 2007 default is blue even if your OS
theme is Olive... And what about custom themes, custom colors, etc?

>How do the colors look when they're displayed along with the Forms toolkit
>and CTabFolder gradients? (and PShelf)
No idea right now, they would probably look strange. Which I guess is one
reason why Microsoft did not stick all-native (or any native) controls into
its ribbon or others around it. I think the idea of the ribbon is to be used
as a menu system, and to basically replace it, hence, it's not really built
to mix well with other tabfolders and such. This is also a bit of a
"theming" question as colors do play a part here as well. Perhaps there
could be a way to dumb-down the ribbon to look more native, and hence let it
blend better, I'm not sure. Seems like it's pushing into a realm where it
doesn't really want to live.

>Have you thought about how this might fit into a typical RCP workbench?
I have given that a thought, and it's basically the same as the previous
question. I think it would look odd, personally, depending on how it was
used.

>Does the Ribbon manage the layout of items within each group, or does the
>client code?
The chain of "command" is as follows. RibbonTabFolder (extends Composite) ->
RibbonTab -> RibbonTabComposite (private, created on tab creation, exends
Composite) -> RibbonGroup -> various AbstractRibbonItem(s). The
RibbonTabComposite handles the layout of the groups, and the RibbonTabFolder
handles the layout of the Tabs. So the answer is, the Ribbon has its own
layouts to control how things are shown and where they are drawn.

Perhaps IContributionItem.fill(Composite) will be sufficient. Do the
concepts of "group marker" and "separator" still make sense for a Ribbon?
Hmm, well, not sure here. Perhaps it would be. I think it would make sense,
but I need to think some more here, I haven't taken it that far in my head
yet. I think it's a real question of "what is the Ribbon replacing?"...

>Also, how does the tooltip API compare to the new custom tooltips in JFace
>for 3.3?
Well, using JFace is a bit non-Nebula, no? I can't say I'm sure what the
deal there truly is, but from what I gather, Nebula widgets need to be SWT
only. Right now, the tooltip API is completely custom and has nothing to do
with what the JFace 3.3 API has to offer. I haven't gotten to fully play
with the new 3.3 Tooltip API either, but if we're sticking to SWT only I'm
not sure I can even use it.

Phew, ok, hope that answered some stuff at least. Hoping to have some sample
package up soon so people can give it a go. Feel free to leave more feedback
of course =)

Emil

"Peter Centgraf" <peter@centgraf.net> wrote in message
news:f9svqn$f2b$1@build.eclipse.org...
> Very cool! I can't wait to play with this myself.
>
> Now the torrent of questions...
>
> Have you tried running this on any other platforms? How does it feel to
> use this under GTK or OS X? How does it determine what colors to render?
> How do the colors look when they're displayed along with the Forms toolkit
> and CTabFolder gradients? How about when using the PShelf presentation?
>
> Have you thought about how this might fit into a typical RCP workbench?
> Visually, it could replace the current CoolBar/ToolBar setup. Is the
> IContributionManager API sufficient? It already supports the concept of
> named groups, but the names are not intended for display. If the
> implementation is extended to support I18n, the current names could be
> used as keys. We would also need something akin to ICoolBarManager to
> manage the top row of tabs. Does the Ribbon manage the layout of items
> within each group, or does the client code? Perhaps
> IContributionItem.fill(Composite) will be sufficient. Do the concepts of
> "group marker" and "separator" still make sense for a Ribbon?
>
> Also, how does the tooltip API compare to the new custom tooltips in JFace
> for 3.3? CellLabelProvider seems to expose an API based on CLabel, which
> does not support styled text. Do we need yet another tooltip API for
> Ribbon?
>
> Thanks again for showing us this work in progress. It has definitely
> gotten me thinking....
>
> --
> Peter
Re: SWT Ribbon [message #584153 is a reply to message #38706] Thu, 16 August 2007 20:12 Go to previous message
Peter Centgraf is currently offline Peter Centgraf
Messages: 52
Registered: July 2009
Member
So, to sum up your responses (please correct me if necessary):

By nature, the ribbon is a strange component that does lots of custom
graphical rendering, and Microsoft has apparently made no effort to
integrate it with other widgets. This makes the whole question of
"native" L&F quite difficult, since Microsoft itself is totally
inconsistent in its visual language. (Why am I not surprised?)

On a detail level, the colors for the ribbon are specified individually
-- not generated from some few base colors by an algorithm. In order to
match it to a platform's color scheme, you need to specify 200 colors
one-by-one. This is so difficult in practice that not even Microsoft
bothered to try -- they just supply 3 pre-configured themes. You've
implemented the default one for your ribbon.

If I would like the ribbon to look visually consistent with the rest of
my application, I would need to spend a lot of time tweaking individual
color settings. In the best case, it would either look good in my
application but inconsistent with MS Office, or consistent with Office
but not the rest of my application.

I think it would be useful to keep the colors externalized from the
code, so if someone gets really ambitious, they could create their own
theme. Perhaps I'll do this myself, or perhaps we could convince one of
the Eclipse designers to take a crack at it. You could perhaps keep the
colors in a Java properties file and contribute themes via plugin
fragments, similar to the way L10n works in Eclipse.

I was thinking that the ribbon could easily replace the function of a
coolbar in an RCP app, but it would really need to replace both menu and
coolbar. It would be quite strange to have a menu and a ribbon right
next to each other. That's not a problem for new RCP apps, but it does
make a conversion from previous apps more difficult. For example, it
would probably look terrible if the crowded Eclipse IDE menus were
translated into separate buttons on the ribbon, but the coolbars are
sparsely populated and incomplete.

I don't think there's a hard-and-fast rule about not depending on JFace.
I think the idea is to keep the JFace stuff separate from the SWT
stuff, so that clients can work at either level. You make a good point,
though. The rollover popups are a pretty fundamental part of the
widget, so it doesn't make sense for it to be dependent on JFace.
Perhaps it would still be worth the time to make the APIs consistent
with each other, even if they aren't directly compatible.

One last issue: A major feature of the Office ribbon is to provide
visual feedback of changes when you roll over an option, rather than
waiting to do/undo/try again. Do the buttons on your ribbon provide
ArmEvents so an application could implement this live preview behavior?

--
Peter
Previous Topic:Gallery JAR failure?
Next Topic:CDateTime bugs and hints
Goto Forum:
  


Current Time: Fri Sep 19 23:56:37 GMT 2014

Powered by FUDForum. Page generated in 0.02492 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software