Dumb question about GTK--




Before I ask my question, GIMP runs beautifully on Solaris 2.5.1 now :)

Anyways I'm using GTK-- (the C++ version of GTK) to create a widget,
inherited from Gtk_DrawingArea.  It's a simple square widget (to be used
in more complex widgets) that is filled up with only one color.  I have a
virtual function configure_event_impl that does the simple coloring in of
the widget when it is called and when it is resized.  That works fine.

My problem is, what virtual function (analogous to configure_event_impl)
is called when part of the widget is uncovered or exposed?  I thought it
was expose_event_impl, but that function doesn't even get called when the
widget gets uncovered or un-minimized (I did a simple test to figure this
out).

Here is the code:

gint ColorBox::expose_event_impl (GdkEventExpose *e) {

  cout << "Hello!!!" << endl;  // The "simple test" I was talking about :)

  gdk_draw_rectangle (GTK_WIDGET(gtkobject)->window,
                      attrib,  // A private GdkGC* variable in my class
                      TRUE,
                      e->area.x, e->area.y, 
                      e->area.width, e->area.height);

  return (Gtk_DrawingArea::expose_event_impl(e));

}

                                      - Dave

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Name:  David Finton                  | "All free software is in Beta.  If
 Email:  dfinton@d.umn.edu             |  there is a free software package
   Web:  http://www.d.umn.edu/~dfinton |  bearing the version number 1.0 or
                                       |  greater, it is obsolete and must
                                       |  be replaced immediately by a
                                       |  newer, better Beta version."
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




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