Re: How do expose_events work?
- From: "Maher Awamy" <muhri muhri net>
- To: gtk-app-devel-list gnome org
- Subject: Re: How do expose_events work?
- Date: 31 Oct 2000 14:04:45 CST
On Tue, 31 Oct 2000 21:08:24 +0100 (CET), Jeans said:
> after doing that, did you do a gtk_signal_connect(GTK_OBJECT(yourdrawingarea),
> "expose_event", somefunction, data) ??
Yes. I wish it was that simple...
static gint PGCanvasExposeEvent(GtkWidget *widget, GdkEventExpose *event,
gpointer data) {
printf("Canvas expose event\n");
return FALSE;
}
void PGCanvas::addToWindow(PGWindow* parent) {
// Create new drawing area
m_hWidget = (GtkWidget*)gtk_drawing_area_new();
gtk_drawing_area_size(GTK_DRAWING_AREA(m_hWidget), 300, 300);
// Connect signal handler
gtk_signal_connect(GTK_OBJECT(m_hWidget), "expose_event",
GTK_SIGNAL_FUNC(PGCanvasExposeEvent), (gpointer)this);
gtk_widget_set_events(m_hWidget, GDK_EXPOSURE_MASK);
I maybe wrong, but I dont know - I think you need the set events before the
signal connect?
Maher
// Add to layobox (my own container)
pg_gtk_layobox_append(GTK_CONTAINER(parent->m_hPGContainer),
m_hWidget);
...
}
It's probably something with the container I've written
pg_gtk_layobox. Is that possible? Anybody a pointer where
I can start debugging?
Jeans.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
muhri muhri net -- http://www.muhri.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]