KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
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 :  /usr/lib64/pygtk/2.0/demos/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/pygtk/2.0/demos/treemodel.pyo
mò
e‡8Hc@sodZdkZdkZdeifd„ƒYZdeifd„ƒYZd„ZedjoeƒndS(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.NtMyTreeModelcBstZdZdZdZd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„ZRS(s1This 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.iicCstii|ƒdS(sKconstructor for the model.  Make sure you call
        PyTreeModel.__init__N(tgtktGenericTreeModelt__init__tself(R((t'/usr/lib64/pygtk/2.0/demos/treemodel.pyRscCsdS(s?returns the GtkTreeModelFlags for this particular type of modeliN((R((Rton_get_flags scCsdS(s*returns the number of columns in the modeliN((R((Rton_get_n_columns#scCstiS(s)returns the type of a column in the modelN(tgobjecttTYPE_STRING(Rtindex((Rton_get_column_type&scCs|S(s^returns the tree path(a tuple of indices at the various
        levels) for a particular node.N(tnode(RR((Rton_get_path)scCs|S(s\returns the node corresponding to the given path.  In our
        case, the node is the pathN(tpath(RR((Rton_get_iter-scCs|
S(s<returns the value stored in a particular column for the nodeN(R(RRtcolumn((Rton_get_value1scCsL|djo;|d|idjodSn|d |ddfSndS(s/returns the next node at this level of the treeiÿÿÿÿiN(RtNoneRt
TREE_SIBLINGS(RR((Rton_iter_next5s

cCs;|djodSnt|ƒ|ijodSn|dS(s$returns the first child of this nodeiN(i(i(RRtlenRt
TREE_DEPTH(RR((Rton_iter_children;s
cCs |djpt|ƒ|ijS(s&returns true if this node has childrenN(RRRRR(RR((Rton_iter_has_childBscCs6|djpt|ƒ|ijo|iSndSdS(s+returns the number of children of this nodeiN(RRRRRR(RR((Rton_iter_n_childrenEs#cCsU|djo|fSnt|ƒ|ijo||ijo||fSndSdS(s"returns the nth child of this nodeN(RRtnRRRR(RRR((Rton_iter_nth_childKs
&cCs't|ƒdjodSn	|d SdS(sreturns the parent of this nodeiiÿÿÿÿN(RRR(RR((Rton_iter_parentSs
(t__name__t
__module__t__doc__RRRRRRR
RRRRRRRR(((RRs 
												tGenericTreeModelDemocBstZdd„ZRS(NcCstii|ƒy|i|iƒƒWn&tj
o|idd„ƒnX|i	|i
iƒtiƒ}|ititiƒ|i|ƒtƒ}|iƒ}ti|ƒ}tiƒ}tid|ddƒ}|i|ƒ|i|ƒ|iƒdS(NtdestroycGs
tiƒS(N(Rt	main_quit(tw((Rt<lambda>asttuplesttexti(RtWindowRRt
set_screentparentt
get_screentAttributeErrortconnectt	set_titlet	__class__RtScrolledWindowtscrolled_windowt
set_policytPOLICY_AUTOMATICtaddRtmodelt
filter_newtTreeViewt	tree_viewtCellRendererTexttcelltTreeViewColumnRt
append_columntshow_all(RR)R9RR0R7R4((RR\s"
	

(RRRR(((RR [scCstƒtiƒdS(N(R Rtmain(((RR=sst__main__(	RRRRRR'R R=R(R RRRR=((Rt?s		O	


Anon7 - 2021