Re: custom_widget example not working
- From: Immanuel Scheerer <scheerei in tum de>
- To: simon bath ac uk
- Cc: gtkmm-list gnome org
- Subject: Re: custom_widget example not working
- Date: Thu, 02 Dec 2004 14:37:12 +0100
>>More precisely I want to create a SDL widget. So i have to draw it
>>myself.
>>
>>Thanks for your answer, Murray.
>
>
> I asked about creating a gtkmmsdl widget not so long ago, so I thought I
> would post you my attempt. Its available at
> http://www.bath.ac.uk/~ma2snm/gtksdl_example/ and it does what I want it
> to do. The widget should be fairly easy to use, and also works on
> windows. You have to create a timeout signal to draw to the surface
> every so often, as otherwise the sdl surface gets drawn over by gtk (how
> I understand it anyway). Something like this is fine,
>
> Glib::signal_timeout().connect(sigc::mem_fun(*this,
> &MainWindow::renderView),100 );
>
Your SDL-widget is derived from Gtk::DrawingArea and not from Gtk::Widget. That
means that all function calls (except the one to the overriden on_expose_event)
are handed on to the underlying GtkDrawingArea. That's why the SDL competes
against the GtkDrawingArea. This is also a performance issue.
It would be desirable to not have an underlying GtkWidget which draws itself.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]