Re: gtkmm-list Digest, Vol 96, Issue 6



I suppose you have already seen other replies to your question on gtkmm-list, with a reference to the gtkmm tutorial
http://developer.gnome.org/gtkmm-tutorial/stable/chapter-builder.html.en
It contains the example http://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/builder/basic?h=gtkmm-3-2

I don't think I can help much more than that. I haven't used Glade and Gtk::Builder much.
I think there is one restriction, though, when you use a Glade file with Gtk::Builder: You should not define signal handlers in the Glade file. When you connect signal handlers to your widgets, you must do it the usual way with
   pWidget->signal_xxx().connect(.......);
where pWidget is a widget pointer you get from Gtk::Builder::get_widget().

Kjell

2012-04-13 07:08, nalin4linux77 linux skrev:
Sir
 
i am sorry for for posting that qustion. i have jumped to gtk+ for glade connection. and is it possible in gtkmm also ?
How to write this program with gtkmm ?? I mean i want know how to connect glade.ui file with my program 
 

#include <iostream>
#include <gtk/gtk.h>
using namespace std;
void exit()
{
   gtk_main_quit();
}
int main(int argc, char ** argv)
{
   gtk_init(&argc, &argv);
   GtkBuilder* l_BuilderInterface = gtk_builder_new();
   gtk_builder_add_from_file(l_BuilderInterface, "ui.glade", NULL);
   GtkWidget* window = GTK_WIDGET(gtk_builder_get_object(l_BuilderInterface, "window"));


   // Not works gtk_builder_connect_signals(l_BuilderInterface,"exit",exit());

   gtk_widget_show(window);
   gtk_main();
}

 

Hopefully Nalin X Linux



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]