Custom container with multiple GdkWindows. Adding widgets don't show.




Hi a had multiple problems building this widget but I always knew where to look and I fixed them. But now I 
have a problem that I am truly clueless on how to solve it. Let me explain. I am trying to develop a program 
which uses Gstreamer, so I needed a video widget.
This widget should do the following:
1.Use 1 GdkWindow for Gstreamer to draw the video frames.
2.Use another GdkWindow behind the one above which is painted black. So I will resize the first GdkWindow to 
the ratio of the video and the remaining space will be filled black by the other GdkWindow.
3.Be able to show buttons on top of these 2 GdkWindows.(ie play/pause/stop).

I have managed to do the first 2 things. The last one is problematic. I derive my custom widget from 
Gtk::Fixed(yes C++, but plz all you C guys help me). So when I add() something it shows well on the 
"background" GdkWindow but it is covered by the "foreground" GdkWindow. So in order not to confuse you I will 
include a test program. Let me explain what you see in the program:
1.the red GdkWindow is the background(should be filled black later)
2.the green GdkWindow is the foreground(used later by Gst to draw frames)
3.The "test button" when clicked removes itself from the current container and adds itself in the 
video_widget. But it is partially covered by the green GdkWindow.

So my main question is, how do I show widgets on top of the green GdkWindow? Do I have to draw them myself? 
Is there something simpler?

Thank you in advance, I truly don't have an idea what to do.

Ps. the idea for the video widget  I took it from the sources of totem. But I couldn't understand/find how it 
displays widgets above the 2 GdkWindows it creates for the "bacon widget".

_________________________________________________________________
Κάντε κλικ για να παίξετε Fishticuffs με τους φίλους σας, τώρα!
http://www.livemessenger-emoticons.com/fishticuffs/el-gr/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]