diff --git a/.gitignore b/.gitignore index 6e16385..f010513 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,2 @@ -#For codeblocks project: -/*.depend -/*.layout -/*.cbp -/*.cbTemp -/bin -/obj -/Doxyfile -/Doxygen -*.untracked - +#I have an Untraked folder +Untracked diff --git a/main.cpp b/main.cpp index c392103..b2f344f 100644 --- a/main.cpp +++ b/main.cpp @@ -25,7 +25,7 @@ #include "Website.hpp" - +#include /** @@ -39,29 +39,41 @@ int main(int argc, char *argv[]){ - //TEST PARSER FAKE ARGUMENT - FileManParser xmlParser(""); - std::vector *siteWeb=xmlParser.getWebsites(); - - siteWeb->erase(siteWeb->begin()+1); - - xmlParser.updateParser(); + /* Initialisation de GTK+ */ + gtk_init(&argc, &argv); - //Save modification in file + GtkWidget* MainWindow=NULL; - FileManIOFile save("Doxygen/bob.bin"); + MainWindow=gtk_window_new(GTK_WINDOW_TOPLEVEL); - save.write("loic", xmlParser.getDocument()); + g_signal_connect(G_OBJECT(MainWindow), "delete-event", G_CALLBACK(gtk_main_quit), NULL); - //Print - std::cout << xmlParser.getDocument(); + + GtkWidget* bouton; + + bouton=gtk_button_new_with_label("Hello Bro :"); + gtk_container_add(GTK_CONTAINER(MainWindow), bouton); + + g_signal_connect(G_OBJECT(bouton), "leave", G_CALLBACK(gtk_main_quit), NULL); + + gtk_window_set_title(GTK_WINDOW(MainWindow), "forgetIt"); + gtk_window_set_default_size(GTK_WINDOW(MainWindow), 500,500); + + gtk_window_set_position(GTK_WINDOW(MainWindow), GTK_WIN_POS_CENTER); + gtk_widget_show_all(MainWindow); + + + gtk_main(); + + + + return EXIT_SUCCESS; - return 0; }