Re: scrolling and child widgets

Kasper Peeters wrote:

> > As you may know, GTK does not work this way (widgets sometimes don't
> > have any windows, or several of them) and all my attempts so far
> > produce zillions of unnecessary expose and draw events.
> I'm not sure where exactly you get the additional expose and redraw
> events (for the background or for the windows `on top' of it?)

Actually both, but I'm mostly concerned about the windows on top,
which normally shouldn't get any redraw event (they are just moved,
after all) unless they were partially obscured before.

I actually have thought about one solution, but that will look
incredibly ugly in the code: I might add a specialized GtkWidget
that has an X window between the main window and the each child.
This would have this effect, that every child widget would have
its own X window (also windowless widgets) and I could simply
move the X window directly.

> for the Mnemonic browser, we have been reasonably successful using a
> Gtk_Layout widget with a background pixmap attached to it.

Do you have the X window limit or not? I assume you have, so that
very long pages won't get displayed correctly. Also, do you mean
you use a pixmap for double buffering (which I don't want to do)?

> the source throuh

I'll have a look.

BTW, does someone know, if the GnomeCanvas has the X window limitation?

> By the way, if your web browser example was not just an example but
> actually describes your project, I'd be interested to know more

It was an example only, although a "real" example as the code actually
exists and works decently with only a few child widgets. But the code
won't be interesting for you as it uses the wxWindows library and is
used for its help system (and thus uses a completely different API),


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