All pastes #261736 Raw Edit

mq

public php v1 · immutable
#261736 ·published 2006-11-29 20:47 UTC
rendered paste body
<?phperror_reporting(E_ALL);require_once('PhpGtkMenu.php');// define menu definition$menu_definition = array(    '_File' => array('_New|N', '_Open|O', '_Close|C', '---', '_Save|S', 'Save _As','---', 'E_xit'),    '_Edit' => array('Cu_t|X', '_Copy|C', '_Paste|V', '---', 'Select _All|A', '---', '_Undo|Z','_Redo|Y'),    '_Test' => array('Test_1|1', 'Test_2|2', 'Test_3|3', '---',                array('Selection 1', 'Selection 2', 'Selection 3'),                '---', 'Test_4|4'));$accel_group = new GtkAccelGroup();$menu = new PhpGtkMenu($menu_definition, $accel_group);$window = new GtkWindow();$window->set_size_request(400, 150);$window->connect_simple('destroy', array('Gtk','main_quit'));$window->add($vbox = new GtkVBox());$vbox->pack_start($menu, 0, 0);$accel_group = new GtkAccelGroup();$window->add_accel_group($accel_group);// display title$title = new GtkLabel("Menu and RadioMenuItem - Part 4");$title->modify_font(new PangoFontDescription("Times New Roman Italic 10"));$title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff"));$vbox->pack_start($title);$vbox->pack_start(new GtkLabel("To choose File New,"));$vbox->pack_start(new GtkLabel("the default php-gtk requires you to choose Alt-F followed by N."));$vbox->pack_start(new GtkLabel("Now Alt-F Alt-N also works!"));$window->show_all();Gtk::main();?>