/*
* Paulo Pinto (pjmlp_pt@yahoo.com) (c) 2001
* A very simple hello world to
* show basic Gtk-- usage.
*/
#include <gtk--/main.h>
#include <gtk--/window.h>
// Please note that in ANSI C++ the
// return is optional
int main (int argc, char *argv [])
{
// Initialize the framework
Gtk::Main kit (argc, argv);
Gtk::Window win;
// Set the main window title
win.set_title ("Hello World");
// Connect the signal that is generated when the
// user tries to close the window, to the
// quit slot. This way the user will be able to
// close the window by clicking on the 'X' mark.
win.destroy.connect (Gtk::Main::quit.slot ());
// Make the window appear
win.show ();
// Enter into the event loop
kit.run ();
}
End of Listing