PHP-GTK
Saturday, October 25, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkWidget::child_notify
GtkWidget::create_pango_contextnext

Last updated: Sun, 12 May 2013
view this page in English

GtkWidget::class_path

Returns the path of the widget through the packaging hierarchy, from the root parent to the widget itself. The single class names are separated by dots.

It is the same as path() , just that always the class names, not widget names are used.

Example 151. Getting a widget's path

<?php
//Create our widgets
$wnd   = new GtkWindow();
$box   = new GtkVBox();
$frame = new GtkFrame('Frame');
$btn   = new GtkButton('Button');
 
//Pack them into each other
$wnd  ->add($box);
$box  ->add($frame);
$frame->add($btn);
 
//Give some a custom name
$wnd->set_name('My window');
$btn->set_name('demo button');
 
//And now echo the class path of the button,
// and the normal path
echo 'class_path: "' . $btn->class_path() . "\"\n";
echo 'path:       "' . $btn->path() . "\"\n";
 
/* Returns:
class_path: "GtkWindow.GtkVBox.GtkFrame.GtkButton"
path:       "My window.GtkVBox.GtkFrame.demo button"
*/
?>

See also: path()


User Contributed Notes
gtk.gtkwidget.method.class_path.php
add a note about notes
There are no user contributed notes for this page.


previousGtkWidget::child_notify
GtkWidget::create_pango_contextnext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:51:01 2013 CEST