Re: [gtk-list] Dumb question about GTK--



Square Avenue <dfinton@d.umn.edu> writes:
> 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).

There were some *_event's that need to be enabled before they can occur.
This is done (I think) with Gtk_Widget::set_events() method.
(see gdktypes.h and event masks from there GdkEventMask structure...)

Hmm, this is odd, why isnt gtk's set_events using GdkEventMask structure
in set_events() argument instead of the current integer?? It would
make this typesafe, unlike what it is currently... (maybe that should
be fixed?) Using the enum would let people know from the interface how
to use it - currently its kinda odd...

I think one thing that should be done is to check all integer arguments
in gtk and check that there isnt anything that could be enums or other
more restricted types! Integers in public interface where they dont
represent integer value are really bad..

or then, maybe there's something I've missed :)

but again to your question, you prolly need a
mywidget->set_events(GDK_EXPOSURE_MASK); call somewhere to start getting
exposure events. (see gtk tutorial about writing your own widgets, there's
some information about this..)

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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