[comp.windows.x] Can widget have transparent window?

cb@bwilab3.UUCP (CB Genrich) (08/31/90)

In O'Reilly "X Toolkit Intrinsics: Programming Manual (Volume Four),
section 5.3.8 (page 156 in my copy), the authors state:

  Background     can be a solid color, pattern, or transparent.

I have tried to get a transparent widget, using code similar to example
5-13, but it is not transparent.

I have looked at the following sections:

  Volume 5: XtCreateWindow reference page
  Volume 1: 4.3.1 The Window Background
  Volume 2: XCreateWindow reference page

Is it possible that the tookit is using XCreateSimpleWindow?

Any ideas? Please elaborate.

-CB- {gatech!galbp!bwilab3!cb} (404) 396-4292

marbru@auto-trol.UUCP (Martin Brunecky) (09/02/90)

In article <115@bwilab3.UUCP> cb@bwilab3.UUCP (CB Genrich) writes:
>In O'Reilly "X Toolkit Intrinsics: Programming Manual (Volume Four),
>section 5.3.8 (page 156 in my copy), the authors state:
>
>  Background     can be a solid color, pattern, or transparent.
>
>I have tried to get a transparent widget, using code similar to example
>5-13, but it is not transparent.
>
>Any ideas? Please elaborate.
>
   .... lots has been said so far.
   Yes, you can change any widget's window to be transparent; you just
   mus realize it, get the window ID (XtWindow(w)), and then change
   window attributes as you wish. Yes, it is NOT kosher to do it to
   a poor widget, but unless you mix it with XtSetValues, you may get
   what you want.
   Now what you want is a different story. By "transparent" X means
   that window will retain parent's pixels. This is a little strange
   definition of transparency, but be it. In addition, any exposure
   events will be signalled on your "transparent" window, since it
   obscures (yes, transparent window obscures) the window underneath
   it.
   Another special window is an input-only window. This is what it says
   to be - nothing on the screen, but it can capture any input.


-- 
=*= Opinions presented here are solely of my own and not those of Auto-trol =*=
Martin Brunecky                   marbru@auto-trol.COM
(303) 252-2499                    {...}ncar!ico!auto-trol!marbru
Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404 

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (09/07/90)

	By "transparent" X means
       that window will retain parent's pixels. This is a little strange
       definition of transparency, but be it.

It is indeed strange, which is why the (R4 at least) standard Protocol,
Xlib, and Xt manuals do not use this word in this context.

terence@hkov04.dec.com (Terence Lee @HKO, Digital Equipment Corporation) (09/07/90)

In article <805@auto-trol.UUCP>, marbru@auto-trol.UUCP (Martin Brunecky) writes...
#In article <115@bwilab3.UUCP> cb@bwilab3.UUCP (CB Genrich) writes:
#>In O'Reilly "X Toolkit Intrinsics: Programming Manual (Volume Four),
#>section 5.3.8 (page 156 in my copy), the authors state:
#>
#>  Background     can be a solid color, pattern, or transparent.
#>
#>I have tried to get a transparent widget, using code similar to example
#>5-13, but it is not transparent.
#>
#>Any ideas? Please elaborate.
#>
#   .... lots has been said so far.
#   Yes, you can change any widget's window to be transparent; you just
#   mus realize it, get the window ID (XtWindow(w)), and then change
#   window attributes as you wish. Yes, it is NOT kosher to do it to
#   a poor widget, but unless you mix it with XtSetValues, you may get
#   what you want.
#   Now what you want is a different story. By "transparent" X means
#   that window will retain parent's pixels. This is a little strange
#   definition of transparency, but be it. In addition, any exposure
#   events will be signalled on your "transparent" window, since it
#   obscures (yes, transparent window obscures) the window underneath
#   it.
#   Another special window is an input-only window. This is what it says
#   to be - nothing on the screen, but it can capture any input.
# 
# 
#-- 
#=*= Opinions presented here are solely of my own and not those of Auto-trol =*=
#Martin Brunecky                   marbru@auto-trol.COM
#(303) 252-2499                    {...}ncar!ico!auto-trol!marbru
#Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404 

    Why people want to have a transparent window? Are they trying to use it
    to produce the rubberband effect?

================================================================================
Terence Lee          | terence%hkov04.dec@decwrl.dec.com
                     | root%hkvs04.dec@decwrl.dec.com
=====================+==========================================================
From Middlesex, UWO  | Just forget what I've said. I don't know it neither.
================================================================================

pdsoft@dutnak2.tudelft.nl (public domain software) (09/10/90)

In <1901@mountn.dec.com> terence@hkov04.dec.com (Terence Lee @HKO, Digital Equipment Corporation) writes:

>    Why people want to have a transparent window? Are they trying to use it
>    to produce the rubberband effect?

>From Middlesex, UWO  | Just forget what I've said. I don't know it neither.
>===========================================================================

Well, for instance, to use transparent labels on windows with color-coded
data.