Re: Displaying simple HTML in gtkmm app
- From: Chris Vine <chris cvine freeserve co uk>
- To: gtkmm-list gnome org
- Cc: Ole Laursen <olau hardworking dk>
- Subject: Re: Displaying simple HTML in gtkmm app
- Date: Sat, 26 Mar 2005 23:01:47 +0000
On Saturday 26 March 2005 18:29, Ole Laursen wrote:
[snip]
> My GTK+ it getting rusty, but what about using gobj() like this:
>
> gtkhtml *cview = ...;
> Gtk::Frame *my_frame = ...; //
>
> // get the underlying C instance of frame and add cview to it with GTK+
> gtk_container_add(GTK_CONTAINER(my_frame.gobj()), GTK_WIDGET(cview));
>
> Then you can do whatever you want with my_frame using the gtkmm
> interface, and similarly do whatever you want with cview using its C
> interface.
The equivalent following my suggestion would be:
gtkhml* cview = ...;
GtkWidget* frame = gtk_frame_new(0);
gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(cview));
Gtk::Frame* my_frame = Glib::wrap(GTK_FRAME(frame));
...;
Either of these would seem to give the same result. In both cases the user is
coding gtkhtml in the native interface, so apart from that I think it is a
matter of taste. (I think I slightly prefer your version.)
Chris.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]