This explanation says to me that transparent
canvases should work, in the sense that whatever is drawn behind them in the
same window should show through. But they don't. Is this because the drawing
area of the canvas is "subtracted" from that of the widgets before them in the
drawing order, so they are not drawn?
I need a drawing surface that "draws over" widgets
behind it. How can this be accomplished? Thanks.
Bob
Object Factory Inc.
----- Original Message -----
Sent: Friday, April 05, 2002 11:04
AM
Subject: Re: [platform-swt-dev] no
background on GTK
SWT.NO_BACKGROUND stops the
control from automatically being filled with the background color. The idea is that application
code can get rid of flashing by
painting the whole window once instead of erasing and then painting.
On Windows, we makeWM_ERASEBKGND do nothing. On X, we convince the server not to fill the X
window.
On GTK ... we call
gdk_window_set_back_pixmap()which
is spec'd to behave the same as X but
this doesn't seem to work.
Steve
| "Bob Foster"
<bob@xxxxxxxxxx> Sent
by: platform-swt-dev-admin@xxxxxxxxxxx
04/04/02 05:53 PM Please respond to platform-swt-dev
| To:
<platform-swt-dev@xxxxxxxxxxx> cc:
Subject: Re: [platform-swt-dev]
no background on GTK |
This raises the question: What is SWT.NO_BACKGROUND
is supposed to do? Let's say you set up a Canvas with no background that is
"in front of" another widget (drawn last). Shouldn't the other widget show
through the canvas? Instead, it appears that the widget in back is not
drawn at all, which means that nothing is drawn and the desktop shows
through the window.
I need a transparent canvas for my application. Why
doesn't SWT.NO_BACKGROUND give me that?
Bob Object Factory
Inc.
----- Original Message ----- From:
<Silenio_Quarti@xxxxxxx> To:
<platform-swt-dev@xxxxxxxxxxx> Sent: Thursday, April 04, 2002 3:24
PM Subject: [platform-swt-dev] no background on GTK
>
Havoc, > > We are trying to implement the SWT.NO_BACKGROUND style.
This > style determines with a widget will fill the background
when > an expose event happens. > > On X, it is possible to
do this by setting the background > pixmap of a Window to
None. > > On GTK, the equivalent API is
gdk_window_set_back_pixmap(). > > If you run the test below, you
will see that the shell > will fill its background even though the test
is setting > the back pixmap to NULL. > > It seems that the
background is not filled by X, but it is > been filled by GTK. Havoc is
there a away of avoiding this? > > Silenio > > >
Here is some code that shows the problem: > > public class
NoBackgroundTest { > > public static void main (String [] args)
throws Exception { > OS.gtk_init_check (new
int [] {0}, null); > > int shellHandle
= OS.gtk_window_new (OS.GTK_WINDOW_TOPLEVEL); > >
OS.gtk_widget_realize(shellHandle); > >
int window = OS.GTK_WIDGET_WINDOW(shellHandle); >
OS.gdk_window_set_back_pixmap(window, 0,
false); > >
OS.gtk_widget_show(shellHandle); > >
while (OS.gtk_main_iteration() != 0); > } > } >
_______________________________________________ > platform-swt-dev
mailing list > platform-swt-dev@xxxxxxxxxxx >
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev >
_______________________________________________ platform-swt-dev
mailing
list platform-swt-dev@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
|