GtkObject

Explore Cairo your self without a manual or tutorial

There are some very good tutorials for doing some basic or a bit more advanced things in php gtk cairo. However it is logical that they do not cover everything.

But luckily one can go further in using cairo by him self, I provide a single and very simple example script that allows you to discover all by your self things like:

Getting a descendant (child) widget by name

This script gets a descedant (child) widget by name using recursion. A name should be defined for the child previously, if not as a name is considered the class name.

The name is passed as a variable by reference, when the target is found it is stored in this variable.
This will change the variable type from string to object, this very information is used as a condition to stop further recursion.

Colored Table, Row and Column Headers In Textview.

<?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

Apply style to Textview: Underline and Blue Color on specific parts of the text.

This script displays a 2D array inside a textview. All elements on the same row and coloumn are underlined and colored blue.

code check, please!

hello friends!, well this is my code

Canvas in PHP-GTK ? Or other method ?

Hi everybody,

I have been toying around with PHP-GTK for the past few days and have been pleasantly surprised at the possibilities offered. Being able to use (and re-use) PHP for GUI apps is a big breakthrough against bulkier Java and C++.

I am looking for a specific widget or behaviour though, and have not been able to find explicit documentation relating to it.

Syndiquer le contenu