[cairo] Some questions...
Kalle Vahlman
kalle.vahlman at gmail.com
Sun Jul 15 01:19:58 PDT 2007
2007/7/14, Loïc Faure-Lacroix <loicfl at gmail.com>:
> I'm working with gtkmm + cairomm
>
> I don't know if its a bug or not.
No bugs here, see below.
> I do override the expose-event function of my window.
> But now anything added over my window isn't rendered except drawing area
> that their on_expose_event is overrided too.
>
> it's like if the window was rendering over everything.
No, it's rendering below everything. It's just that you are not
telling the children of the window to draw themselves (the drawing
area has it's own Gdk window so I guess that's why it is drawn).
You need to use Gtk::Container::propagate_expose() for each child to
make them draw themselves.
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Container.html#c0f1b9c56c98ad73495c96efecb581fd
Since Windows only have one child, addin this line should suffice:
propagate_expose(get_child(), event);
Note that you'll want to do this after you have drawn the window,
otherwise you'll likely be drawing over the children.
--
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
More information about the cairo
mailing list