On Tuesday 29 March 2005 10:26, Murray Cumming wrote: > On Fri, 2005-03-25 at 10:45 +0000, Chris Vine wrote: > > On Friday 25 March 2005 06:03, John Taber wrote: > > > so trying to apply what you indicate here I come up with this: > > > gtkhtml *cview; > > > Gtk::Frame *mmview = Glib::wrap(cview); > > > mmview->...... // whatever gtkhtml method > > > > > > does this look right ? I just picked out Frame - not sure how to pick a > > > gtkmm object to wrap into. Also, I wonder if I first have to > > > instantiate the gtkmm object like: > > > Gtk::Frame *mmview = new Gtk::Frame(); > > > mmview = Glib::wrap(cview); > > > > > > thks John > > > > John, > > > > This will not work. You can only wrap a GTK+ object to provide the > > corresponding gtkmm object. Thus a GtkFrame object wraps to a Gtk::Frame > > object, a GtkLable object wraps to a Gtk::Label object, and so on, so > > your code above won't work (it should fail to compile). > > It would compile, but it would obviously forget the first mmview > instance. That should be obvious C++.
It obviously won't work, but are you saying that: gtkhtml *cview; Gtk::Frame *mmview = Glib::wrap(cview); will compile? Wouldn't a gtkhtml object need to be derived from a GtkFrame object to do that? Chris _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
