1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| /* Creation fenetre */
creerFenetre(&pData.pFenetre,"MessInst",400,400);
g_signal_connect(G_OBJECT(pData.pFenetre), "destroy", G_CALLBACK(gtk_main_quit), NULL);
/* Ajout de la table dans la fenetre */
gtk_container_add(GTK_CONTAINER(pData.pFenetre),GTK_WIDGET(pTable));
/* Creations et ajouts des labels */
creerAjouterLabel(&pData.pLbIp,"Entrez IP du serveur",pTable,0,1,0,1);
creerAjouterLabel(&pData.pLbPort,"Entrez le port du serveur",pTable,0,1,2,3);
creerAjouterLabel(&pData.pLbLogin,"Entrez votre login",pTable,1,2,0,1);
creerAjouterLabel(&pData.pLbMdp,"Entrez votre mot de passe",pTable,1,2,2,3);
creerAjouterLabel(&pData.pLbDest,"Entrez le destinataire",pTable,1,2,4,5);
creerAjouterLabel(&pData.pLbMsg,"Entrez votre message",pTable,2,3,0,1);
/* Creations et ajouts des zones de saisie */
creerAjouterZoneSaisie(&pData.pZsIp,IP_SIZE_MAX,pTable,0,1,1,2);
creerAjouterZoneSaisie(&pData.pZsPort,PORT_SIZE_MAX,pTable,0,1,3,4);
creerAjouterZoneSaisie(&pData.pZsLogin,LOGIN_SIZE_MAX,pTable,1,2,1,2);
creerAjouterZoneSaisie(&pData.pZsMdp,MDP_SIZE_MAX,pTable,1,2,3,4);
creerAjouterZoneSaisie(&pData.pZsDest,LOGIN_SIZE_MAX,pTable,1,2,5,6);
creerAjouterZoneSaisie(&pData.pZsMsg,MSG_SIZE_MAX,pTable,2,3,1,2);
/* Creations et ajouts des boutons */
creerAjouterBouton(&pData.pBtConnect,"Se connecter",pTable,0,1,4,5);
creerAjouterBouton(&pData.pBtQuit,"Quitter",pTable,0,1,5,6);
creerAjouterBouton(&pData.pBtSend,"Envoyer",pTable,2,3,2,3);
/* Creation et ajout de la zone de texte */
creerAjouterZoneText(&pData.pZtInfos,pTable,2,3,3,6); |
Partager