2015 ソフトウェア設計及び演習用の班Wiki
15::gr11::リザルト4
画像の表示
{ GtkWidget *hbox, *hbox2, *hbox3, *vbox, *button; vbox = gtk_vbox_new (TRUE, 4);//縦 /* 縦にウィジェットを配置するボックスの作成 */ hbox = gtk_hbox_new (FALSE, 5); hbox2 = gtk_hbox_new (FALSE, 5); hbox3 = gtk_hbox_new (FALSE, 5); /* ボックスをウィンドウに配置 */ gtk_container_add (GTK_CONTAINER (window), vbox); { GtkWidget *image0, *image1, *image2, *image3, *image4, *image5, *image10, *image11, *image12, *image13, *image14, *image15, *image20, *image21, *image22, *image23, *image24, *image25; image0 = gtk_image_new_from_file ("1位.png"); gtk_box_pack_start (GTK_BOX (hbox), image0, FALSE, FALSE, 0); image1 = gtk_image_new_from_file (cp[0].gouhi); gtk_box_pack_start (GTK_BOX (hbox), image1, FALSE, FALSE, 0); image2 = gtk_image_new_from_file (cp[0].pfilename); gtk_box_pack_start (GTK_BOX (hbox), image2, FALSE, FALSE, 0); image3 = gtk_image_new_from_file ("単位数.png"); gtk_box_pack_start (GTK_BOX (hbox), image3, FALSE, FALSE, 0); image4 = gtk_image_new_from_file (cp[0].credit_10); gtk_box_pack_start (GTK_BOX (hbox), image4, FALSE, FALSE, 0); image5 = gtk_image_new_from_file (cp[0].credit_1); gtk_box_pack_start (GTK_BOX (hbox), image5, FALSE, FALSE, 0); image10 = gtk_image_new_from_file ("2位.png"); gtk_box_pack_start (GTK_BOX (hbox2), image10, FALSE, FALSE, 0); image11 = gtk_image_new_from_file (cp[1].gouhi); gtk_box_pack_start (GTK_BOX (hbox2), image11, FALSE, FALSE, 0); image12 = gtk_image_new_from_file (cp[1].pfilename); gtk_box_pack_start (GTK_BOX (hbox2), image12, FALSE, FALSE, 0); image13 = gtk_image_new_from_file ("単位数.png"); gtk_box_pack_start (GTK_BOX (hbox2), image13, FALSE, FALSE, 0); image14 = gtk_image_new_from_file (cp[1].credit_10); gtk_box_pack_start (GTK_BOX (hbox2), image14, FALSE, FALSE, 0); image15 = gtk_image_new_from_file (cp[1].credit_1); gtk_box_pack_start (GTK_BOX (hbox2), image15, FALSE, FALSE, 0); image20 = gtk_image_new_from_file ("3位.png"); gtk_box_pack_start (GTK_BOX (hbox3), image20, FALSE, FALSE, 0); image21 = gtk_image_new_from_file (cp[2].gouhi); gtk_box_pack_start (GTK_BOX (hbox3), image21, FALSE, FALSE, 0); image22 = gtk_image_new_from_file (cp[2].pfilename); gtk_box_pack_start (GTK_BOX (hbox3), image22, FALSE, FALSE, 0); image23 = gtk_image_new_from_file ("単位数.png"); gtk_box_pack_start (GTK_BOX (hbox3), image23, FALSE, FALSE, 0); image24 = gtk_image_new_from_file (cp[2].credit_10); gtk_box_pack_start (GTK_BOX (hbox3), image24, FALSE, FALSE, 0); image25 = gtk_image_new_from_file (cp[2].credit_1); gtk_box_pack_start (GTK_BOX (hbox3), image25, FALSE, FALSE, 0); } gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox2, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox3, TRUE, TRUE, 0); /* ボタンの作成 */ button = gtk_button_new_with_label ("Quit"); /* 中に入る文字 */ /* ボタンをボックスに配置 */ gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); /* ボタンがクリックされた時に呼び出される関数の設定 */ g_signal_connect (G_OBJECT (button), "clicked", /* buttonがクリックされたらCALLBACK関数が呼び出される */ G_CALLBACK (gtk_main_quit), NULL); }
>>Top
最終更新日:2015/07/17 15:43:40