drawingarea widget




Hi,

I am in the need for a widget that can be drawn on (both pixmaps and text)
and also contain other widgets (container widget). I could not find a
standard widget that did this for me, so I decided to create my own.
Basically what I did was to modify the gtkdrawingarea to inherit from the
container class please see attached files. This almost works. The problem is
that when I use the widget by having a pixmap drawn on the drawing area and
a
input text box in the middle. This widget is used as a pop up window
(implemented by using hide and show. Sometimes (not all the time) when the
window comes into view the drawing area come up gray. after hiding and
showing the window a couple of times the pixmap on the drawing window comes
back. I copy the pixmap buffer to the drawing area both in the config and
expose event. I can see that both of config and expose have been called, but

the drawing area is still gray. If I take another window and put it over
my drawing window and then remove it, the expose event is called and the
pixmap becomes visible. Obviously I have done something wrong, I just can't 
figure out what it is.

Thanks,

Andreas.

Note: I am using Gtk 1.2.

Attachment: gtkictvdrawingarea.c
Description: Binary data

Attachment: gtkictvdrawingarea.h
Description: Binary data



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