View Single Post
Old 08-26-2008, 08:32 AM   #35 (permalink)
zendkush
The Visitor
 
Join Date: Aug 2008
Posts: 3
Thanks: 0
zendkush is on a distinguished road
Default

Use a java bridge!
Code:
// action handler to fill button
function clicked($sender, $e) {
   $win = new Mono("Gtk.Window", "phpinfo()");
   $win->set_DefaultWidth(640);
   $win->set_DefaultHeight(400);
   $pane = new Mono("Gtk.ScrolledWindow");
   $view = new Mono("Gtk.TextView");
   $buffer = new Mono("Gtk.TextBuffer", new Mono("Gtk.TextTagTable"));
   ob_start();
   phpinfo();
   $buffer->set_Text(ob_get_contents());
   ob_end_clean();
   $view->set_Buffer($buffer);
   $pane->add($view);
   $win->add($pane);
   $win->ShowAll();
 }
 $btn = new Mono("Gtk.Button", "Show output from phpinfo()");
 $btn->add_Clicked(new Mono(
 			       "System.EventHandler",
 			       mono_closure($this, "clicked")));
// then send button to window.
zendkush is offline  
Reply With Quote