tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[\¬Qc@sNddlZddlTddlZddlmZddlmZdZy%ejj    ejj
e ƒeƒZ Wne k
r†eZ nXejje ƒr¢e Zn%ejjeƒsÇedef‚ned„Zddd    „ƒYZd
dd „ƒYZd efd „ƒYZddd„ƒYZd„Zd„ZedkrJeƒndS(iÿÿÿÿN(t*(t
ZoomHeight(tidleConftIconsscan't find icon directory (%r)c    Cs8tƒ}ddl}|jtjj|dƒƒ}|jƒg}d}}xÛ|D]Ó}tjjtjj|ƒƒd}td|d|ƒ}    |j    |    ƒt
|d|    dd    d
d ƒ}
|
j d |d |ƒt
|d|ƒ}
|
j d |d    d |ƒ|d    }|dkrT|d}d}qTqTW||_ dS(s'Utility to display the available icons.iÿÿÿÿNs*.gifitfiletmastertimagetbditrelieftraisedtrowtcolumnttexti
i( tTktglobtostpathtjointsorttsplitexttbasenamet
PhotoImagetappendtLabeltgridtimages( ticondirtrootRtlistRR
R RtnameRtlabel((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyt    listicons$s&     
 
 " 
 
 tTreeNodecBs×eZd„Zd„Zd„Zdd„Zdd„Zd„Zd„Z    dd„Z
dd„Z dd    „Z d
„Z d „Zd „Zd „Zd„Zd„Zdd„Zdd„Zdd„Zdd„ZRS(cCsS||_||_||_d|_t|_g|_d|_|_    i|_
dS(Nt    collapsed( tcanvastparenttitemtstatetFalsetselectedtchildrentNonetxtyt
iconimages(tselfR"R#R$((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyt__init__=s                        cCs<x,|jD] }|jj|ƒ|jƒq Wd|_dS(N(R(tremovetdestroyR)R#(R-tc((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR0GscCs‰y|j|SWntk
r"nXtjj|ƒ\}}|pDd}tjjt||ƒ}td|jd|ƒ}||j|<|S(Ns.gifRR(    R,tKeyErrorRRRRtICONDIRRR"(R-RRtexttfullnameR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyt geticonimageMs   cCsK|jr dS|jƒt|_|jj|jƒ|jƒ|jƒdS(N(R't deselectalltTrueR"tdeletetimage_idtdrawicontdrawtext(R-tevent((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pytselectYs    
    
cCsA|js dSt|_|jj|jƒ|jƒ|jƒdS(N(R'R&R"R9R:R;R<(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pytdeselectbs         
cCs'|jr|jjƒn
|jƒdS(N(R#R7t deselecttree(R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR7js    cCs8|jr|jƒnx|jD]}|jƒq WdS(N(R'R?R(R@(R-tchild((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR@ps     cCs7|jdkr|jƒn
|jƒ|jjƒdS(Ntexpandedtbreak(R%tcollapsetexpandR$t OnDoubleClick(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pytflipvs
 
 cCsF|jjƒsdS|jdkrBd|_|jƒ|jƒndS(NRB(R$t _IsExpandableR%tupdatetview(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRE~s     
cCs)|jdkr%d|_|jƒndS(NR!(R%RI(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRD†s    c Csñ|jd}|jƒjd}||}|jjdƒ}|jjƒ}|jj|ƒ}||kry||krydS|jj|jdƒ\}}}    }
||krÇ||krÇ|||} n|} t| ƒ|
} |jj| ƒdS(Niiit scrollregion(R+tlastvisiblechildR"tcanvasyt winfo_heightt_getintstfloatt yview_moveto( R-ttoptbottomtheightt visible_toptvisible_heighttvisible_bottomtx0ty0tx1ty1tfraction((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRJ‹s 
%cCs1|jr)|jdkr)|jdjƒS|SdS(NRBiÿÿÿÿ(R(R%RL(R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRLœscCs®|jr|jjƒn‘|jd}d|jd<|jjƒ|jjtƒ|jddƒ|jjtƒ\}}}}|jjddd||fƒ||jd<dS(NtcursortwatchiiRKi(R#RIR"R9tALLtdrawtbboxt    configure(R-t    oldcursorRXRYRZR[((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRI¢s       c Csù|||_|_|jƒ|jƒ|jdkr>|dS|js |jjƒ}|sd|dSx9|D].}|j|j    ||ƒ}|jj
|ƒqkWn|d}|d}d}x÷|jD]ì}|}|j    j |d|d||dddƒ|j ||ƒ}|jj ƒrÄ|jdkr=d    }    |j}
nd
}    |j}
|j|    ƒ} |j    j|d|dd | ƒ} |j    j| d |
ƒ|j    j| d d„ƒqÄqÄW|j    j |d|d|d|dddƒ} |j    j| ƒ|S(NRBiiii    itfilltgray50t    minusnodetplusnodeRs<1>s
<Double-1>cSsdS(N(R)(R*((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyt<lambda>Ñsi
(R*R+R;R<R%R(R$t _GetSubListt    __class__R"Rt create_lineR`RHRDRER6t create_imagettag_bindt    tag_lower( R-R*R+tsublistR$RAtcxtcytcylastticonnametcallbackRtid((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR`¯sB
 
     
 
+     # (    c    Csº|jr0|jjƒp*|jjƒp*d}n|jjƒpBd}|j|ƒ}|jj|j|jddd|ƒ}||_    |jj
|d|j ƒ|jj
|d|j ƒdS(Nt
openfoldertfoldertanchortnwRs<1>s
<Double-1>( R'R$tGetSelectedIconNamet GetIconNameR6R"RlR*R+R:RmR>RG(R-t    imagenameRRu((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR;Øs        '    c Csù|jdd}|jd}|jjƒ}|rº|jj||ddd|ƒ}|jj|d|jƒ|jj|d|jƒ|jj    |ƒ\}}}}t
|dƒd    }n|jj ƒpÌd
}    y |j Wnt k
rín X|jƒy |j}
Wn;t k
rBt|jd|    d d d dddƒ|_nXtjdddƒ} |jr€|jjtj| dƒƒn|jjtj| dƒƒ|jj||ddd|jƒ}|jjd|jƒ|jjd|jƒ||_dS(NiiRxRyR s<1>s
<Double-1>iÈi
s    <no text>RitpadxitpadytmaintThemeRthilitetnormaltwindow(R*R+R$t GetLabelTextR"t create_textRmR>RGRatmaxtGetTexttentrytAttributeErrort edit_finishRRRt    GetOptionR'Rbt GetHighlightt create_windowtbindtselect_or_editttext_id( R-ttextxttextyt    labeltextRuRXRYRZR[R Rttheme((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR<ås:       
  .    cCs9|jr(|jjƒr(|j|ƒn |j|ƒdS(N(R'R$t
IsEditableteditR>(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRscCs¡t|jddddddƒ|_|jjd|jdƒ|jjdtƒ|jjddƒ|jjƒ|jjd    |j    ƒ|jjd
|j
ƒdS( NRithighlightthicknessitwidthR tipadxis<Return>s<Escape>( tEntryRRˆtinserttselection_rangetENDtpackt    focus_setRŽRŠt edit_cancel(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR– s$ cCs£y|j}|`Wntk
r'dSX|jƒ}|jƒ|rl||jjƒkrl|jj|ƒn|jjƒ}||jd<|jƒ|j    j
ƒdS(NR ( RˆR‰tgetR0R$R‡tSetTextRR<R"RŸ(R-R=RˆR ((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRŠs    
 
 
cCsMy|j}|`Wntk
r'dSX|jƒ|jƒ|jjƒdS(N(RˆR‰R0R<R"RŸ(R-R=Rˆ((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR %s    
 
 
N(t__name__t
__module__R.R0R6R)R>R?R7R@RGRERDRJRLRIR`R;R<RR–RŠR (((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR ;s(    
                                       )        "      tTreeItemcBs€eZdZd„Zd„Zd„Zd Zd„Zd„Z    d„Z
d„Z d„Z d    „Z d
„Zd „Zd „ZRS(s‚Abstract class representing tree items.
 
    Methods should typically be overridden, otherwise a default action
    is used.
 
    cCsdS(s)Constructor.  Do whatever you need to do.N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR.9scCsdS(sReturn text string to display.N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR‡<scCsdS(s>Return label text string to display in front of text (if any).N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR„?scCs(|jdkr!|jƒ|_n|jS(s%Do not override!  Called by TreeNode.N(t
expandableR)t IsExpandable(R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRHDscCsdS(s"Return whether there are subitems.i((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR§JscCs2|jƒsgS|jƒ}|s.d|_n|S(s%Do not override!  Called by TreeNode.i(R§t
GetSubListR¦(R-Ro((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRiNs    cCsdS(s-Return whether the item's text may be edited.N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR•WscCsdS(s+Change the item's text (if it is editable).N((R-R ((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR¢ZscCsdS(s-Return name of icon to be displayed normally.N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR{]scCsdS(s2Return name of icon to be displayed when selected.N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRz`scCsdS(s%Return list of items forming sublist.N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR¨cscCsdS(s%Called on a double-click on the item.N((R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRFfsN(R£R¤t__doc__R.R‡R„R)R¦RHR§RiR•R¢R{RzR¨RF(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR¥0s                                                t FileTreeItemcBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z    RS(s4Example TreeItem subclass -- browse the file system.cCs ||_dS(N(R(R-R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR.pscCstjj|jƒp|jS(N(RRR(R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR‡sscCstjj|jƒdkS(Nt(RRR(R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR•vscCstjj|jƒ}tjj||ƒ}tjj|ƒtjj|jƒkrUdSy tj|j|ƒ||_Wntjk
r‹nXdS(N(RRtdirnameRtrenameterror(R-R tnewpath((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR¢ys' cCs|jƒsdSdS(Ntpython(R§(R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR{„s cCstjj|jƒS(N(RRtisdir(R-((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR§ˆscCsŠytj|jƒ}Wntjk
r-gSX|jdtjjƒg}x9|D]1}ttjj|j|ƒƒ}|j|ƒqQW|S(Ntkey(    RtlistdirRR®RtnormcaseRªRR(R-tnamesRoRR$((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR¨‹s (
R£R¤R©R.R‡R•R¢R{R§R¨(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRªls                        tScrolledCanvascBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cKsÐd|krd|d<n||_t|ƒ|_|jjdddƒ|jjdddƒt|j||_|jjdddddd    ƒt|jd
d ƒ|_    |j    jdddddd ƒt|jd
d ddƒ|_
|j
jddddddƒ|j    j |jd<|jj |j    d<|j
j |jd<|jj |j
d<|jjd|jƒ|jjd|jƒ|jjd|jƒ|jjd|jƒ|jjd|jƒ|jjƒdS(NtyscrollincrementiitweightiR
R tstickytnsewRtvbartnsethbartorientt
horizontaltewstyscrollcommandtcommandtxscrollcommands <Key-Prior>s
<Key-Next>s<Key-Up>s
<Key-Down>s <Alt-Key-2>(RtFrametframet rowconfiguretcolumnconfiguretCanvasR"Rt    ScrollbarR»R½tsettyviewtxviewRŽtpage_upt    page_downtunit_upt    unit_downt zoom_heightRŸ(R-Rtopts((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR.›s,      cCs|jjddƒdS(NiÿÿÿÿtpageRC(R"t yview_scroll(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRͳscCs|jjddƒdS(NiRÓRC(R"RÔ(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRζscCs|jjddƒdS(NiÿÿÿÿtunitRC(R"RÔ(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRϹscCs|jjddƒdS(NiRÕRC(R"RÔ(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRмscCstj|jƒdS(NRC(RRÑR(R-R=((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyRÑ¿s(R£R¤R.RÍRÎRÏRÐRÑ(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyR¶šs                     cCs¥ddlm}t|jƒ}|jddddƒ|jƒt|ddddd    d
ƒ}|jjd d
d d ƒt    dƒ}t
|j d|ƒ}|j ƒdS(Niÿÿÿÿ(tPyShellRitbgtyellowtwhiteR—t    takefocusiRERdtbothsC:/windows/desktop(tidlelibRÖtToplevelRRbRŸR¶RÅRžRªR R"R)RE(RÖRtscR$tnode((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyttestÆs
 cCs€tƒ}|jddƒt|ddddƒ}|jdddd    ƒttjƒ}t|d|ƒ}|j    ƒ|j
ƒdS(
NRiR×RÙR—REiRdRÛ( R RbRÈRžRªRtcurdirR R)RIRŸ(RR"R$Rß((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyttest2Ñs    
t__main__((((RtTkintertimpRÜRtidlelib.configHandlerRR3RRR¬t__file__t_icondirt    NameErrorR±t RuntimeErrorRR R¥RªR¶RàRâR£(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/TreeWidget.pyt<module>s, 
 % 
     õ<.,