لمحترفي الويبPHP - معمو — الصفحة ٣٤٦

الفصل الثاني عشر 346 البرنامج النصي dialog.php $dialog = &new GtkDialog; 16. return true; 17. } 18. function confirm() { 19. global $window; 20. 21. } 22. 23. 24. 25. 26. 27. 28. $dialog->set_title("Are You Sure?"); $dialog->set_default_size('100', '100'); $dialog->set_modal (TRUE); $dialog->set_transient_for($window); $dialog->set_policy (0,0,0); $label = &new GtkLabel("Are You Sure You Want To Quit?"); $button_yes = &new GtkButton('OK'); $button_yes->connect('clicked', 'destroy'); $button_no = &new GtkButton('Cancel'); $button_no->connect('clicked' " 'close_dialog', $dialog); $vbox1 = $dialog->vbox; $dialog->action_area; $vbox1->pack_start ($label); $vbox2->pack_start ($button_yes); 29. 30. 31. 32. $vbox2 = 33. 34. 35. 36. 37. 38. 39. $window->connect('delete_event', $vbox2->pack_start ($button_no); $dialog->show_all(); $window= &new GtkWindow(); 40. $button = &new GtkButton('Quit'); 'delete_event ; $button->connect('clicked', 'confirm'); $window->add($button); 41. 42. 43. $window->show_all(); 44. Gtk; : main(); 45. ?>
ص٣٤٦

نص مستخرج آليًا من الصورة، وقد يقع فيه خطأ.