]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blob - Client/src/main.cpp
b9fe6301d3d05534149c7db9b4ef796a92918ec3
[z.facultad/75.42/plaqui.git] / Client / src / main.cpp
1
2 #include <gtkmm.h>
3 #include <libglademm.h>
4 #include <iostream>
5 #include "mnu_file_exit.h"
6 #include "mnu_help_about.h"
7
8 int main (int argc, char **argv)
9 {
10         Gtk::Main client(argc, argv);
11
12         //Load the Glade file and instiate its widgets:
13         Glib::RefPtr<Gnome::Glade::Xml> refXml;
14         try {
15                 refXml = Gnome::Glade::Xml::create("client.glade", "Principal");
16         }
17         catch(const Gnome::Glade::XmlError& ex) {
18                 std::cerr << "(main.cpp:18) : ";
19                 std::cerr << ex.what() << std::endl;
20                 return 1;
21         }
22
23         Gtk::Window* pWindow = 0;
24         MnuFileExit *mnu_file_exit = 0;
25         MnuHelpAbout *mnu_help_about = 0;
26         Gtk::Button *bar_exit;
27         Gtk::Fixed *work_place;
28
29         refXml->get_widget("Principal", pWindow);
30         refXml->get_widget_derived("mnu_file_exit", mnu_file_exit);
31         refXml->get_widget_derived("mnu_help_about", mnu_help_about);
32         refXml->get_widget("bar_exit", bar_exit);
33         refXml->get_widget("work_place", work_place);
34         work_place->set_size_request(10000, 10000);
35         bar_exit->signal_clicked().connect( SigC::slot(Gtk::Main::quit) );
36         client.run(*pWindow);
37
38         return 0;
39 }
40