|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21585/root/usr/lib64/pygtk/2.0/demos/ |
Upload File : |
mò
e‡8Hc @ so d Z d k Z d k Z d e i f d „ ƒ YZ d e i f d „ ƒ YZ d „ Z e d j o e ƒ n d S( s› Tree View/Generic Tree Model
This test is designed to demonstrate creating a new type of tree model
in python for use with the new tree widget in gtk 2.0.Nt MyTreeModelc B s t Z d Z d Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z d „ Z
d „ Z d
„ Z d „ Z d „ Z RS( s1 This class represents the model of a tree. The iterators used
to represent positions are converted to python objects when passed
to the on_* methods. This means you can use any python object to
represent a node in the tree. The None object represents a NULL
iterator.
In this tree, we use simple tuples to represent nodes, which also
happen to be the tree paths for those nodes. This model is a tree
of depth 3 with 5 nodes at each level of the tree. The values in
the tree are just the string representations of the nodes.i i c C s t i i | ƒ d S( sK constructor for the model. Make sure you call
PyTreeModel.__init__N( t gtkt GenericTreeModelt __init__t self( R ( ( t' /usr/lib64/pygtk/2.0/demos/treemodel.pyR s c C s d S( s? returns the GtkTreeModelFlags for this particular type of modeli N( ( R ( ( R t on_get_flags s c C s d S( s* returns the number of columns in the modeli N( ( R ( ( R t on_get_n_columns# s c C s t i S( s) returns the type of a column in the modelN( t gobjectt TYPE_STRING( R t index( ( R t on_get_column_type&