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
105
106
N\¬Qc@sûdZddlTdefd„ƒYZdefd„ƒYZdefd„ƒYZd    „Zd
efd „ƒYZd „Zd efd„ƒYZ    d„Z
e dkr÷e ƒZ e jƒeddddƒGHeddddddƒGHe
ddƒGHndS(súDialog boxes
 
This module handles dialog boxes. It contains the following
public symbols:
 
Dialog -- a base class for dialogs
 
askinteger -- get an integer from the user
 
askfloat -- get a float from the user
 
askstring -- get a string from the user
iÿÿÿÿ(t*tDialogcBs_eZdZd    d„Zd„Zd„Zd„Zd    d„Zd    d„Z    d„Z
d„Z RS(
sZClass to open dialogs.
 
    This class is intended as a base class for custom dialogs
    cCs=tj||ƒ|jƒ|jƒr6|j|ƒn|rL|j|ƒn||_d|_t    |ƒ}|j
|ƒ|_ |j ddddƒ|j ƒ|j s±||_ n|jd|jƒ|jdk    r|jd|jƒd|jƒdfƒn|jƒ|j jƒ|jƒ|jƒ|j|ƒdS(s˜Initialize a dialog.
 
        Arguments:
 
            parent -- a parent window (the application window)
 
            title -- the dialog title
        tpadxitpadytWM_DELETE_WINDOWs+%d+%di2N(tToplevelt__init__twithdrawtwinfo_viewablet    transientttitletparenttNonetresulttFrametbodyt initial_focustpackt    buttonboxtprotocoltcanceltgeometryt winfo_rootxt winfo_rootyt    deiconifyt    focus_settwait_visibilitytgrab_sett wait_window(tselfR R
R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR%s.
 
          
     
 
 
cCsd|_tj|ƒdS(sDestroy the windowN(R RRtdestroy(R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRXs    cCsdS(s«create dialog body.
 
        return widget that should have initial focus.
        This method should be overridden, and is called
        by the __init__ method.
        N((Rtmaster((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR`sc
CsÀt|ƒ}t|ddddd|jdtƒ}|jdtdd    d
d    ƒt|dd ddd|jƒ}|jdtdd    d
d    ƒ|jd |jƒ|jd |jƒ|jƒdS(s[add standard button box.
 
        override if you do not want the standard buttons
        ttexttOKtwidthi
tcommandtdefaulttsideRiRtCancels<Return>s<Escape>N(RtButtontoktACTIVERtLEFTRtbind(Rtboxtw((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRis '!cCsQ|jƒs|jjƒdS|jƒ|jƒz|jƒWd|jƒXdS(N(tvalidateRRRtupdate_idletaskstapplyR(Rtevent((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR(~s  
 
cCs-|jdk    r|jjƒn|jƒdS(N(R R RR(RR1((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRŒscCsdS(s¨validate the data
 
        This method is called automatically to validate the data before the
        dialog is destroyed. By default, it always validates OK.
        i((R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR.–scCsdS(s¡process the data
 
        This method is called automatically to process the data, *after*
        the dialog is destroyed. By default, it does nothing.
        N((R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR0ŸsN( t__name__t
__module__t__doc__R RRRRR(RR.R0(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRs 3                 
       t _QueryDialogcBs8eZddddd„Zd„Zd„Zd„ZRS(cCsY|sddl}|j}n||_||_||_||_tj|||ƒdS(Niÿÿÿÿ(tTkintert _default_roottprompttminvaluetmaxvaluet initialvalueRR(RR
R8R;R9R:R R6((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR®s                  cCsd|_tj|ƒdS(N(R tentryRR(R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR¿s    cCs±t|d|jdtƒ}|jdddddtƒt|dd    ƒ|_|jjdd
dddttƒ|jdk    rª|jj
d|jƒ|jj dt ƒn|jS( NR tjustifytrowiRitstickytnameR<i( tLabelR8R*tgridtWtEntryR<tER;R tinsertt select_rangetEND(RRR-((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRÃs#cCsÙddl}y|jƒ}Wn/tk
rM|jd|jdd|ƒdSX|jdk    r||jkr|jdd|jd|ƒdS|jdk    rÌ||jkrÌ|jdd    |jd|ƒdS||_d
S( Niÿÿÿÿs Illegal values
Please try againR is    Too smalls2The allowed minimum value is %s. Please try again.s    Too larges2The allowed maximum value is %s. Please try again.i(    t tkMessageBoxt    getresultt
ValueErrort showwarningt errormessageR9R R:R (RRIR ((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR.Ñs2   
 
    N(R2R3R RRRR.(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR5¬s          t _QueryIntegercBseZdZd„ZRS(sNot an integer.cCst|jjƒƒS(N(tintR<tget(R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRJøs(R2R3RMRJ(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRNöscKst|||}|jS(s¼get an integer from the user
 
    Arguments:
 
        title -- the dialog title
        prompt -- the label text
        **kw -- see SimpleDialog class
 
    Return value is an integer
    (RNR (R
R8tkwtd((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyt
askintegerûs t _QueryFloatcBseZdZd„ZRS(sNot a floating point value.cCst|jjƒƒS(N(tfloatR<RP(R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRJ s(R2R3RMRJ(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRT    scKst|||}|jS(s¶get a float from the user
 
    Arguments:
 
        title -- the dialog title
        prompt -- the label text
        **kw -- see SimpleDialog class
 
    Return value is a float
    (RTR (R
R8RQRR((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pytaskfloats t _QueryStringcBs#eZd„Zd„Zd„ZRS(cOsCd|kr#|d|_|d=n    d|_tj|||ŽdS(Ntshow(t_QueryString__showR R5R(RtargsRQ((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRs
 
    cCs;tj||ƒ}|jdk    r7|jd|jƒn|S(NRX(R5RRYR t    configure(RRR<((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyR%scCs |jjƒS(N(R<RP(R((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRJ+s(R2R3RRRJ(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyRWs        cKst|||}|jS(s¸get a string from the user
 
    Arguments:
 
        title -- the dialog title
        prompt -- the label text
        **kw -- see SimpleDialog class
 
    Return value is a string
    (RWR (R
R8RQRR((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyt    askstring.s t__main__tSpams    Egg countR;i sEgg weight
(in tons)R9iR:ids    Egg labelNi(R4R6RRR5RNRSRTRVRWR\R2tTktroottupdate(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/lib-tk/tkSimpleDialog.pyt<module>s
ŽJ