<?php
// Definition of widgets
$scrolled_win = new GtkScrolledWindow();
$textview = new GtkTextview();
$buffer = new GtkTextBuffer();
$win = new GtkWindow();
// Modify widgets
$scrolled_win->set_policy(1,1);
$textview->modify_font(new PangoFontDescription('Courier New 14'));
$win->maximize();
$win->connect_simple('destroy', array('Gtk', 'main_quit'));
// Pack widgets
$scrolled_win->add($textview);
$textview->set_buffer($buffer);
$win->add($scrolled_win);
/*** Get tags table ***/
$tag_table = $buffer->get_tag_table();
/*** Create and add tag ***/
// underline
This script displays a 2D array inside a textview. All elements on the same row and coloumn are underlined and colored blue.
The CommandWidget is nearly like a
terminal and allows the user to issue commands to a shell
and view the result in a GtkTextView widget.
The previous page defined the geo-nick API of the PHP-GTK.eu site. Here is a small example of how to use it from a client application, using either the CURL library, or native PHP coding to send the request and retrieve the XML-RPC results from the site.
Poslední komentáře
před 47 týdnů 3 dny
před 48 týdnů 2 dny
před 48 týdnů 6 dnů
před 51 týdnů 2 dny
před 1 rok 19 týdnů
před 1 rok 23 týdnů
před 1 rok 27 týdnů
před 1 rok 27 týdnů
před 1 rok 27 týdnů
před 1 rok 44 týdnů