0
votes

I have a dialogue which contains a drawing area. I wish to redraw the contents of the drawing area if the dialogue is enlarged or shrunk or buried and exposed, as is normal and natural with drawing areas. To this end, I created a method

bool on_expose_event (GdkEventExpose *event);

in the class. But the presence of this event stops all the other widgets on the dialogue from being drawn correctly; presumably it is also being invoked when they are exposed. How do I create a function to refresh the drawing area only, and leave all the other widgets to take care of themselves?

1
Is this method a member of the drawing area or of the dialogue?Beta
It is part of the dialogue. I can see how to attach calls to functions to signals for particular widgets, but not expose events.Brian Hooper
"bool on_expose_event (GdkEventExpose *event);" Don't you mean GtkEventExpose?Greg Treleaven
That bit is cut'n'pasted out of the code, so it's definitely what I have. Whether it's what I ought to have is another matter.Brian Hooper
GdkEventExpose is correct, not Gtk.jonner

1 Answers

1
votes

You should really sub-class the Gtk::DrawingArea class and implement the on_expose_event() function from that class.