I'm trying to embed some program into another using the plug and socket mechanism. From the examples which I have found on the Internet all the widgets of program A are placed into the plug and then the plug is connect into the socket of program B and then A appears inside B.
I'm trying to make the same as with A in Glade (program for designing gtk gui) so it would embed into some IDE, does it means I need to create a plug and move all of it's window's widgets into the plug?
[U]Here is the original code in Glade where I want to create the plug:[/U]
glade_window_init (GladeWindow *window)
GtkAction *undo_action, *redo_action;
window->priv = priv = GLADE_WINDOW_GET_PRIVATE (window);
priv->default_path = NULL;
priv->app = glade_app_new ();
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
So from the original code you can see that Vbox is created inside the Window and the
rest of the widgets are created inside the Vbox.
Now, I need to create a plug so I can embed this program to another.
[U]So I have looked on a few examples to do so and they all look similar to this:[/U]
[CODE] GtkWidget *plug;
plug = gtk_plug_new (sock);
gtk_container_add (GTK_CONTAINER (plug), vbox);
gtk_widget_show ( plug );[/CODE]
The Vbox is added inside the plug and all other widget are inside the Vbox.
this code is working great but I don't know how to modify Glade's code to work like this.
The problem is that in Glade's code there is a Window widget, all of Glade's code depends on it to be a Window, so I can't put the Vbox inside the plug.
Maybe some one could help me with this?
0 · ·