Pango Classes
| From: | Scott Mattocks | Date: | Mon, 10 Apr 2006 15:04:41 +0000 |
| Subject: | Pango Classes | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-2740@lists.php.net to get a copy of this message | ||
Hello,
I am fiddling with GtkLabel::set_attributes() and it requires a PangoAttrList. The contents of PangoAttrList should be a bunch of PangoAttr* classes like PangoAttrInt or PangoAttrString, but I can't seem to create them. Here is the script I am trying to run:
<?php
$label = new GtkLabel('Label');
$list = new PangoAttrList();
$attr = new PangoAttrInt(Pango::ATTR_WEIGHT, Pango::WEIGHT_BOLD);
$list->insert($attr);
$label->set_attributes($list);
var_dump($label->get_attributes());
?>
I am getting fatal errors about trying to construct a non-existent class, PangoAttrInt. Am I doing something wrong or are these classes just not implemented yet? All of the list stuff works fine. It is just creating the attribute that causes trouble.
Thanks,
--
Scott Mattocks
Author of the soon to be published: Pro PHP-GTK
http://www.crisscott.com