[comp.windows.x] HP

wolf@cbnewsh.ATT.COM (thomas.wolf) (11/21/89)

I have two questions that I hope someone will be able to help me with:
	1. Can you have "transparent" windows in X11?  What I mean is
	can you have a window that can be drawn to using a foreground
	color, but has as its background whatever window is "below" it?
	Note:  I tried setting the backgroundpixmap of my window to 'None',
	but that only created a window with its background set to a static
	copy of the parent (i.e. when the new window was moved, its background
	didn't change.)

	2. Is there a way to tell the HP TextEdit widget to use XDrawString()
	instead of XDrawImageString() (i.e. to tell the widget NOT to
	fill the bounding box of each character with the background color?)

The reason I am asking these two questions is this:  I am writing a program
in which I would like to enter text (with the keyboard) and draw pictures
(using the mouse) into what appears to be the same "window."  Because I want
to avoid having to write my own "editor" text handling, I thought I could
either overlay a "transparent" window over a TextEdit widget - and use that
for drawing - and have, at the same time text written to the TextEdit widget
be visible "underneath" OR draw directly to the TextEdit Widget window.  I
tried the latter and it seems to work...as long as you don't enter any text.
As soon as any text is entered, any drawings made get erased.  I think this
is due, partially, to the widget filling the bounding box of all character
positions in the window with the background color...


Any help would be appreciated,

Tom

-- 
+---Disclaimer:-Any-opinions-expressed-in----+ I don't know what I'm talking
| Tom Wolf      | Phone:  (201) 949-2079     | about.  If it were otherwise, I
| Bell Labs, NJ | E-mail: wolf@howdy.att.com | wouldn't be talking about things
+---this-article-may-not-be-those-of-AT&T.---+ I don't know anything about.