Sorry, I supposed this list modifies the Reply-to header.
-------- Original-Nachricht --------
Betreff: Re: Derived widget in libglademm
Datum: Sat, 01 Sep 2007 23:43:56 +0200
Von: Philipp Klaus Krause <[EMAIL PROTECTED]>
An: Murray Cumming <[EMAIL PROTECTED]>
Referenzen: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
Murray Cumming schrieb:
> Can we see the implementation of the constructor. I wonder if it calls
> the base constructor with the da parameter.
>
Display::Display(BaseObjectType *da, Glib::RefPtr<Gnome::Glade::Xml>&
refGlade)// : Gtk::DrawingArea(da) causes runtime error.
{
std::cout << "Constructor called.";
std::cout.flush();
Glib::RefPtr<Gdk::GL::Config> glconfig;
glconfig = Gdk::GL::Config::create(Gdk::GL::MODE_RGB |
Gdk::GL::MODE_DOUBLE);
if(!glconfig)
{
Gtk::MessageDialog e("Couldn't find OpenGL visual.\nPlease
ensure that
OpenGL drivers are installed correctly.", Gtk::MESSAGE_ERROR);
e.run();
}
if(!set_gl_capability(glconfig) || !is_gl_capable())
{
Gtk::MessageDialog e("Couldn't set OpenGL capability.\nPlease
ensure
that OpenGL drivers are installed correctly.", Gtk::MESSAGE_ERROR);
e.run();
}
}
When I try to call the base constructor I get the following runtime error:
(ttedit:12863): GtkGLExt-CRITICAL **: gtk_widget_set_gl_capability:
assertion `!GTK_WIDGET_REALIZED (widget)' failed
and on_realize() isn't called.
It seems the derived widget is not used at all: When I change
Display *display = 0;
refXml->get_widget_derived("display", display);
Gtk::Window* main_win = 0;
refXml->get_widget("main_window", main_win);
if (main_win)
{
kit.run(*main_win);
}
return 0;
}
to
Gtk::Window* main_win = 0;
refXml->get_widget("main_window", main_win);
if (main_win)
{
kit.run(*main_win);
}
return 0;
}
in main the result looks the same. So it seems the get_widget_derived()
just creates a widget, but I haven't found out yet how to make
glademm/gtkmm/libglademm/whatever use it.
Philipp
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list