Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Menubar background images?
Menubar background images? [message #454463] Thu, 21 April 2005 12:22 Go to next message
Craig Setera is currently offline Craig SeteraFriend
Messages: 54
Registered: July 2009
Member
Hello,

I'm not even really sure what these things are called. If you look at
the control panel in the screenshot at
http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg you
will see that there are background images in the menu bar. Stardock
refers to those as "Shell Styles", although I'm not sure that is really
the term Microsoft uses. My company is building an RCP application and
wondering if there is a way to place our own branding image in that same
way using SWT? If so, can anyone point me to any snippets?

Thanks,
Craig
Re: Menubar background images? [message #454481 is a reply to message #454463] Fri, 22 April 2005 05:26 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">I hate to say this, but for that task you'll have to
go to - (gulp) -&nbsp; Swing.&nbsp; Because SWT uses native peer widgets, it
can't really support a feature <i>inside</i> an existing native widget
without all platforms supporting it.&nbsp; That's why features in the new
Spinner widget, for example, which are available on Windows, are not
available in SWT because they aren't available in GTK or Motif.&nbsp; SWT
may emulate unsupported widgets, but it's still
least-common-denominator as far as single widget features go.&nbsp; Well,
I'll have to amend that.&nbsp; There are instances where SWT emulates the
widget to support a single feature in one instance and then uses a peer
in another.&nbsp; But this isn't one of those times.&nbsp; No platform (to my
knowledge) supports menu background images natively.&nbsp; Thus, it wasn't
even considered for SWT.&nbsp; I do have to warn you though before you start
dipping into custom Swing code.&nbsp; To do it in Swing, you're probably
going to have to end up rewriting your own LAF even for a single menu.&nbsp;
Even with Synth (that's assuming full 5.0 support in your app), you'll
still have a rough time of it.<br>
<br>
Daniel<br>
</font><br>
Craig Setera wrote:
<blockquote cite="midd4860o$1nd$1@news.eclipse.org" type="cite">Hello,
<br>
<br>
I'm not even really sure what these things are called.&nbsp; If you look at
the control panel in the screenshot at
<a class="moz-txt-link-freetext" href=" http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg"> http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg</a>
you will see that there are background images in the menu bar.&nbsp;
Stardock refers to those as "Shell Styles", although I'm not sure that
is really the term Microsoft uses.&nbsp; My company is building an RCP
application and wondering if there is a way to place our own branding
image in that same way using SWT?&nbsp; If so, can anyone point me to any
snippets?
<br>
<br>
Thanks,
<br>
Craig
<br>
</blockquote>
</body>
</html>
Re: Menubar background images? [message #454485 is a reply to message #454481] Fri, 22 April 2005 12:09 Go to previous messageGo to next message
Craig Setera is currently offline Craig SeteraFriend
Messages: 54
Registered: July 2009
Member
Thanks for the response. In our case, we are well down the Eclipse RCP
path, so Swing was never really an option. A couple of follow-up
questions though...

1) Does anyone know how this is done on Windows? I suppose if I were
crazy enough, I could use the underlying Windows-specific SWT code and
try to recreate this function for our application. I'm not convinced it
is worth that much effort for a bit of branding, but it would be nice to
at least get a feel for the possibilities.

2) Is it possible using standard SWT to create a menu bar that doesn't
span the entire width of the application? If that were the case, this
could probably be "faked up".

Thanks,
Craig

Daniel Spiewak wrote:
> I hate to say this, but for that task you'll have to go to - (gulp) -
> Swing. Because SWT uses native peer widgets, it can't really support a
> feature /inside/ an existing native widget without all platforms
> supporting it. That's why features in the new Spinner widget, for
> example, which are available on Windows, are not available in SWT
> because they aren't available in GTK or Motif. SWT may emulate
> unsupported widgets, but it's still least-common-denominator as far as
> single widget features go. Well, I'll have to amend that. There are
> instances where SWT emulates the widget to support a single feature in
> one instance and then uses a peer in another. But this isn't one of
> those times. No platform (to my knowledge) supports menu background
> images natively. Thus, it wasn't even considered for SWT. I do have to
> warn you though before you start dipping into custom Swing code. To do
> it in Swing, you're probably going to have to end up rewriting your own
> LAF even for a single menu. Even with Synth (that's assuming full 5.0
> support in your app), you'll still have a rough time of it.
>
> Daniel
>
> Craig Setera wrote:
>
>> Hello,
>>
>> I'm not even really sure what these things are called. If you look at
>> the control panel in the screenshot at
>> http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg
>> you will see that there are background images in the menu bar.
>> Stardock refers to those as "Shell Styles", although I'm not sure that
>> is really the term Microsoft uses. My company is building an RCP
>> application and wondering if there is a way to place our own branding
>> image in that same way using SWT? If so, can anyone point me to any
>> snippets?
>>
>> Thanks,
>> Craig
>
Re: Menubar background images? [message #454486 is a reply to message #454481] Fri, 22 April 2005 12:09 Go to previous messageGo to next message
Craig Setera is currently offline Craig SeteraFriend
Messages: 54
Registered: July 2009
Member
Thanks for the response. In our case, we are well down the Eclipse RCP
path, so Swing was never really an option. A couple of follow-up
questions though...

1) Does anyone know how this is done on Windows? I suppose if I were
crazy enough, I could use the underlying Windows-specific SWT code and
try to recreate this function for our application. I'm not convinced it
is worth that much effort for a bit of branding, but it would be nice to
at least get a feel for the possibilities.

2) Is it possible using standard SWT to create a menu bar that doesn't
span the entire width of the application? If that were the case, this
could probably be "faked up".

Thanks,
Craig

Daniel Spiewak wrote:
> I hate to say this, but for that task you'll have to go to - (gulp) -
> Swing. Because SWT uses native peer widgets, it can't really support a
> feature /inside/ an existing native widget without all platforms
> supporting it. That's why features in the new Spinner widget, for
> example, which are available on Windows, are not available in SWT
> because they aren't available in GTK or Motif. SWT may emulate
> unsupported widgets, but it's still least-common-denominator as far as
> single widget features go. Well, I'll have to amend that. There are
> instances where SWT emulates the widget to support a single feature in
> one instance and then uses a peer in another. But this isn't one of
> those times. No platform (to my knowledge) supports menu background
> images natively. Thus, it wasn't even considered for SWT. I do have to
> warn you though before you start dipping into custom Swing code. To do
> it in Swing, you're probably going to have to end up rewriting your own
> LAF even for a single menu. Even with Synth (that's assuming full 5.0
> support in your app), you'll still have a rough time of it.
>
> Daniel
>
> Craig Setera wrote:
>
>> Hello,
>>
>> I'm not even really sure what these things are called. If you look at
>> the control panel in the screenshot at
>> http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg
>> you will see that there are background images in the menu bar.
>> Stardock refers to those as "Shell Styles", although I'm not sure that
>> is really the term Microsoft uses. My company is building an RCP
>> application and wondering if there is a way to place our own branding
>> image in that same way using SWT? If so, can anyone point me to any
>> snippets?
>>
>> Thanks,
>> Craig
>
Re: Menubar background images? [message #454496 is a reply to message #454486] Fri, 22 April 2005 21:51 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">In Windows, it would appear to be a theming thing.&nbsp;
As far as I can see anyway.&nbsp; I don't claim to be a Windows GUI toolkit
expert.&nbsp; As far as the SWT hack...<br>
<br>
A lot can be done to 'fake' your way through something.&nbsp; No, there
isn't a way to have a native menu bar not span the entire window (or
the entire screen on Mac).&nbsp; However, you could try emulating one.&nbsp;
Since SWT doesn't support transparent or layered Composite(s), you'd
have to create a new Shell of style SWT.ON_TOP | SWT.NO_TRIM and draw
your menu in that for every menu you create.&nbsp; It would be a lot of
emulative work and probably would be fairly processor intensive to
display and dispose.&nbsp; However, you could do just about anything with it
as far as embedded images or even custom menu items (such as
ProgressBar(s) or embedded Tree(s)).<br>
<br>
Daniel<br>
</font><br>
Craig Setera wrote:
<blockquote cite="midd4apk9$421$2@news.eclipse.org" type="cite">Thanks
for the response.&nbsp; In our case, we are well down the Eclipse RCP path,
so Swing was never really an option.&nbsp; A couple of follow-up questions
though...
<br>
<br>
1) Does anyone know how this is done on Windows?&nbsp; I suppose if I were
crazy enough, I could use the underlying Windows-specific SWT code and
try to recreate this function for our application.&nbsp; I'm not convinced
it is worth that much effort for a bit of branding, but it would be
nice to &nbsp;at least get a feel for the possibilities.
<br>
<br>
2) Is it possible using standard SWT to create a menu bar that doesn't
span the entire width of the application?&nbsp; If that were the case, this
could probably be "faked up".
<br>
<br>
Thanks,
<br>
Craig
<br>
<br>
Daniel Spiewak wrote:
<br>
<blockquote type="cite">I hate to say this, but for that task you'll
have to go to - (gulp) -&nbsp; Swing.&nbsp; Because SWT uses native peer widgets,
it can't really support a feature /inside/ an existing native widget
without all platforms supporting it.&nbsp; That's why features in the new
Spinner widget, for example, which are available on Windows, are not
available in SWT because they aren't available in GTK or Motif.&nbsp; SWT
may emulate unsupported widgets, but it's still
least-common-denominator as far as single widget features go.&nbsp; Well,
I'll have to amend that.&nbsp; There are instances where SWT emulates the
widget to support a single feature in one instance and then uses a peer
in another.&nbsp; But this isn't one of those times.&nbsp; No platform (to my
knowledge) supports menu background images natively.&nbsp; Thus, it wasn't
even considered for SWT.&nbsp; I do have to warn you though before you start
dipping into custom Swing code.&nbsp; To do it in Swing, you're probably
going to have to end up rewriting your own LAF even for a single menu.&nbsp;
Even with Synth (that's assuming full 5.0 support in your app), you'll
still have a rough time of it.
<br>
<br>
Daniel
<br>
<br>
Craig Setera wrote:
<br>
<br>
<blockquote type="cite">Hello,
<br>
<br>
I'm not even really sure what these things are called.&nbsp; If you look at
the control panel in the screenshot at
<a class="moz-txt-link-freetext" href=" http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg"> http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg</a>
you will see that there are background images in the menu bar.&nbsp;
Stardock refers to those as "Shell Styles", although I'm not sure that
is really the term Microsoft uses.&nbsp; My company is building an RCP
application and wondering if there is a way to place our own branding
image in that same way using SWT?&nbsp; If so, can anyone point me to any
snippets?
<br>
<br>
Thanks,
<br>
Craig
<br>
</blockquote>
<br>
</blockquote>
</blockquote>
</body>
</html>
Re: Menubar background images? [message #454498 is a reply to message #454486] Fri, 22 April 2005 21:53 Go to previous message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">In Windows, it would appear to be a theming thing.&nbsp;
As far as I can see anyway.&nbsp; I don't claim to be a Windows GUI toolkit
expert.&nbsp; As far as the SWT hack...<br>
<br>
A lot can be done to 'fake' your way through something.&nbsp; No, there
isn't a way to have a native menu bar not span the entire window (or
the entire screen on Mac).&nbsp; However, you could try emulating one.&nbsp;
Since SWT doesn't support transparent or layered Composite(s), you'd
have to create a new Shell of style SWT.ON_TOP | SWT.NO_TRIM and draw
your menu in that for every menu you create.&nbsp; It would be a lot of
emulative work and probably would be fairly processor intensive to
display and dispose.&nbsp; However, you could do just about anything with it
as far as embedded images or even custom menu items (such as
ProgressBar(s) or embedded Tree(s)).<br>
<br>
Daniel<br>
</font><br>
Craig Setera wrote:
<blockquote cite="midd4apk9$421$2@news.eclipse.org" type="cite">Thanks
for the response.&nbsp; In our case, we are well down the Eclipse RCP path,
so Swing was never really an option.&nbsp; A couple of follow-up questions
though...
<br>
<br>
1) Does anyone know how this is done on Windows?&nbsp; I suppose if I were
crazy enough, I could use the underlying Windows-specific SWT code and
try to recreate this function for our application.&nbsp; I'm not convinced
it is worth that much effort for a bit of branding, but it would be
nice to &nbsp;at least get a feel for the possibilities.
<br>
<br>
2) Is it possible using standard SWT to create a menu bar that doesn't
span the entire width of the application?&nbsp; If that were the case, this
could probably be "faked up".
<br>
<br>
Thanks,
<br>
Craig
<br>
<br>
Daniel Spiewak wrote:
<br>
<blockquote type="cite">I hate to say this, but for that task you'll
have to go to - (gulp) -&nbsp; Swing.&nbsp; Because SWT uses native peer widgets,
it can't really support a feature /inside/ an existing native widget
without all platforms supporting it.&nbsp; That's why features in the new
Spinner widget, for example, which are available on Windows, are not
available in SWT because they aren't available in GTK or Motif.&nbsp; SWT
may emulate unsupported widgets, but it's still
least-common-denominator as far as single widget features go.&nbsp; Well,
I'll have to amend that.&nbsp; There are instances where SWT emulates the
widget to support a single feature in one instance and then uses a peer
in another.&nbsp; But this isn't one of those times.&nbsp; No platform (to my
knowledge) supports menu background images natively.&nbsp; Thus, it wasn't
even considered for SWT.&nbsp; I do have to warn you though before you start
dipping into custom Swing code.&nbsp; To do it in Swing, you're probably
going to have to end up rewriting your own LAF even for a single menu.&nbsp;
Even with Synth (that's assuming full 5.0 support in your app), you'll
still have a rough time of it.
<br>
<br>
Daniel
<br>
<br>
Craig Setera wrote:
<br>
<br>
<blockquote type="cite">Hello,
<br>
<br>
I'm not even really sure what these things are called.&nbsp; If you look at
the control panel in the screenshot at
<a class="moz-txt-link-freetext" href=" http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg"> http://www.wincustomize.com/Preview.aspx?Source=Pixtudio/wb/ 4257.jpg</a>
you will see that there are background images in the menu bar.&nbsp;
Stardock refers to those as "Shell Styles", although I'm not sure that
is really the term Microsoft uses.&nbsp; My company is building an RCP
application and wondering if there is a way to place our own branding
image in that same way using SWT?&nbsp; If so, can anyone point me to any
snippets?
<br>
<br>
Thanks,
<br>
Craig
<br>
</blockquote>
<br>
</blockquote>
</blockquote>
</body>
</html>
Previous Topic:Changing colour of items in a List control?
Next Topic:stable eclipse 3.1M6 for AMD64
Goto Forum:
  


Current Time: Fri Apr 26 03:30:18 GMT 2024

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

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

Back to the top