Skip to content

Instantly share code, notes, and snippets.

@zedtux
Created January 12, 2014 02:43
Show Gist options
  • Save zedtux/8380063 to your computer and use it in GitHub Desktop.
Save zedtux/8380063 to your computer and use it in GitHub Desktop.
Créer simplement une interface GTK en C++ - Mise a jour du main.cpp
//~ Créer un pointeur windowHello sur l’élément window1 du fichier glade
RefXmlGlade->get_widget_derived(“window1″, windowHello);
if( windowHello )
{
//~ Ici la fenêtre est dessiné par GTK, et fonctionnelle.
kit.run(*windowHello);
//~ La ligne précédente est bloquante. Le curseur d’execution arrive
//~ ici qu’une fois la fenêtre détruite par GTK.
//~ Donc on libère la mémoire
delete windowHello;
windowHello = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment