#include <gtk++/gtkaspectframes.hpp> #include <gtk++/gtkwindows.hpp> #include <gtk++/gtklabels.hpp> int main (int argc, char * argv[]) { lgtkpp::gtk_window* Fenetre; lgtkpp::gtk_aspect_frame* Cadre; lgtkpp::gtk_label* Label; /* Initialisation des bibliotheques */ ::gtk_init(&argc, &argv); /* La fenetre principale */ Fenetre = new lgtkpp::gtk_window (); Fenetre->SetBorderWidth(10); /* Connexion des signaux delete et destroy */ Fenetre->SignalConnect ("delete_event",(GtkSignalFunc)gtk_exit, NULL); Fenetre->SignalConnect ("destroy",(GtkSignalFunc)gtk_exit, NULL); /* Le cadre aspect frame */ Cadre = new lgtkpp::gtk_aspect_frame ("Aspect 1/3", 0.5, 0.5, 3.0, false); *Fenetre += *Cadre; /* Creation d'un label a l'interieur du cadre */ Label = new lgtkpp::gtk_label ("coucou"); *Cadre += *Label; /* On affiche le tout */ Fenetre->ShowAll(); /* La boucle principale */ ::gtk_main(); return 0; }