Re: scribble-simple in C++, need help
- From: Owen Taylor <owt1 cornell edu>
- To: gtk-list redhat com
- Subject: Re: scribble-simple in C++, need help
- Date: 15 Feb 1998 14:37:06 -0500
Alois Camenzind <camenzind@cyberlink.ch> writes:
> Hi,
>
> I'm trying to rewrite the scribble-simple example from the gtk tutorial
> (http://www.levien.com/~slow/gtk/tutorial/gtk_tut-20.html ) in C++
> using gtk--. But I'm having problems with calls to gdk_xxxx.
> I thought that after the call to gdk_draw_rectangle() I should see
> the white drawing area, but nothing happens and the drawing area
> stays grey. The Window itself and the quit button are shown.
> What's wrong with my code or is it something missing?
Yep. You're missing the expose event handler. If you haven't
taken a look at the complete C source
(at http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial/)
Then you probably should.
> // don't know if this is neccessary
> drawing_area->set_events(GDK_EXPOSURE_MASK
> | GDK_LEAVE_NOTIFY_MASK
> | GDK_BUTTON_PRESS_MASK
> | GDK_POINTER_MOTION_MASK
> | GDK_POINTER_MOTION_HINT_MASK);
Yep, it is.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]