|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /usr/lib/pygtk/2.0/demos/ |
Upload File : |
mò
R&—Ec @ 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/lib/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&