+
     Bi-                         R t ^ RI5 ^ RIHtHt ^ RIHt  ! R R4      t ! R R]4      tRR	 ltR
 t	 ! R R]4      t
 ! R R]
4      tR t ! R R]
4      tR t ! R R]
4      tR t]R8X  d   R t]! 4        R# R# )a&  This modules handles dialog boxes.

It contains the following public symbols:

SimpleDialog -- A simple but flexible modal dialog box

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
)*)_get_temp_root_destroy_temp_root)
messageboxc                   N   a  ] tR t^t o R. RRRR3R ltR tR tR tR tRt	V t
R# )	SimpleDialog Nc                   V'       d   \        WR 7      V n        M\        V4      V n        V'       d7   V P                  P                  V4       V P                  P                  V4       \	        V P                  4       \        V P                  VRR7      V n        V P                  P                  ^\        R7       \        V P                  4      V n
        V P                  P                  4        W@n        WPn        W@n        V P                  P                  RV P                  4       \!        \#        V4      4       F`  pW8,          p	\%        V P                  V	W3R lR7      p
W8X  d   V
P'                  \(        ^R7       V
P                  \*        \        ^R7       Kb  	  V P                  P-                  R	V P.                  4       V P                  P1                  V4       \3        V P                  V4       R
# ))class_i  )textaspect)expandfill<Return>c                 $    V P                  V4      # N)doneselfnums   &&+/usr/lib/python3.14/tkinter/simpledialog.py<lambda>'SimpleDialog.__init__.<locals>.<lambda>9   s    499S>    r   command)reliefborderwidth)sider   r   WM_DELETE_WINDOWN)Toplevelroottitleiconname_setup_dialogMessagemessagepackBOTHFrameframer   canceldefaultbindreturn_eventrangelenButtonconfigRIDGELEFTprotocolwm_delete_window	transient_place_window)r   masterr   buttonsr,   r+   r"   r
   r   sbs   &&&&&&&&   r   __init__SimpleDialog.__init__!   sW     7DI (DIIIOOE"IIu%dii tyytC@.499%


		z4#4#45W&CAtzz,0 ILA~15FF4F2 ' 			-t/D/DE		F#dii(r   c                    V P                   P                  4        V P                   P                  4        V P                   P                  4        V P                   P	                  4        V P
                  # r   )r!   wait_visibilitygrab_setmainloopdestroyr   r   s   &r   goSimpleDialog.goA   sK    		!!#						xxr   c                    V P                   f   V P                  P                  4        R # V P                  V P                   4       R # r   )r,   r!   bellr   r   events   &&r   r.   SimpleDialog.return_eventH   s*    <<IINNIIdll#r   c                    V P                   f   V P                  P                  4        R # V P                  V P                   4       R # r   )r+   r!   rH   r   rD   s   &r   r6   SimpleDialog.wm_delete_windowN   s*    ;;IINNIIdkk"r   c                F    Wn         V P                  P                  4        R # r   )r   r!   quitr   s   &&r   r   SimpleDialog.doneT   s    		r   )r+   r,   r*   r&   r   r!   )__name__
__module____qualname____firstlineno__r=   rE   r.   r6   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s4      "d4D)@$# r   r   c                   `   a  ] tR t^Yt o RtRR ltR tR tR tRR lt	RR lt
R	 tR
 tRtV tR# )DialogzRClass to open dialogs.

This class is intended as a base class for custom dialogs
Nc                   TpVf   \        4       p\        P                  W4       V P                  4        Ve(   VP	                  4       '       d   V P                  V4       V'       d   V P                  V4       \        V 4       Wn        RV n	        \        V 4      pV P                  V4      V n        VP                  ^^R7       V P                  4        V P                  f   W n        V P                  RV P                   4       \#        W4       V P                  P%                  4        V P'                  4        V P)                  4        V P+                  V 4       R# )zxInitialize a dialog.

Arguments:

    parent -- a parent window (the application window)

    title -- the dialog title
N)padxpadyr   )r   r    r=   withdrawwinfo_viewabler7   r"   r$   parentresultr)   bodyinitial_focusr'   	buttonboxr5   r+   r8   	focus_setr@   rA   wait_window)r   r`   r"   r9   rb   s   &&&  r   r=   Dialog.__init__`   s	    >#%F$' &"7"7"9"9NN6"JJudT{!YYt_		qq	!%!%($++6d#$$& 	r   c                h    RV n         \        P                  V 4       \        V P                  4       R# )zDestroy the windowN)rc   r    rC   r   r9   rD   s   &r   rC   Dialog.destroy   s$    !4;;'r   c                    R# )zcreate dialog body.

return widget that should have initial focus.
This method should be overridden, and is called
by the __init__ method.
N )r   r9   s   &&r   rb   Dialog.body        	r   c                z   \        V 4      p\        VR^
V P                  \        R7      pVP	                  \
        ^^R7       \        VR^
V P                  R7      pVP	                  \
        ^^R7       V P                  RV P                  4       V P                  RV P                  4       VP	                  4        R# )	zKadd standard button box.

override if you do not want the standard buttons
OK)r   widthr   r,   )r   r\   r]   Cancel)r   rp   r   r   z<Escape>N)r)   r1   okACTIVEr'   r4   r+   r-   )r   boxws   &  r   rd   Dialog.buttonbox   s     Dk3TTWWfM	Dqq)3XRE	Dqq)		*dgg&		*dkk*
r   c                   V P                  4       '       g   V P                  P                  4        R # V P                  4        V P	                  4         V P                  4        V P                  4        R #   T P                  4        i ; ir   )validaterc   re   r^   update_idletasksapplyr+   rI   s   &&r   rr   	Dialog.ok   sX    }}((*	JJLKKMDKKMs   A6 6Bc                v    V P                   e   V P                   P                  4        V P                  4        R # r   )r`   re   rC   rI   s   &&r   r+   Dialog.cancel   s'     ;;"KK!!#r   c                    ^# )zvalidate the data

This method is called automatically to validate the data before the
dialog is destroyed. By default, it always validates OK.
rk   rD   s   &r   rx   Dialog.validate   s     r   c                    R# )zprocess the data

This method is called automatically to process the data, *after*
the dialog is destroyed. By default, it does nothing.
Nrk   rD   s   &r   rz   Dialog.apply   rm   r   )rc   r`   ra   r   )rQ   rR   rS   rT   __doc__r=   rC   rb   rd   rr   r+   rx   rz   rU   rV   rW   s   @r   rZ   rZ   Y   s8     
1f(* r   rZ   Nc                    V P                  4        V P                  4        V P                  4       pV P                  4       pV P	                  4       pV P                  4       pVEe   VP                  4       '       d   VP                  4       VP                  4       V,
          ^,          ,           pVP                  4       VP                  4       V,
          ^,          ,           pV P                  4       pV P                  4       p	\        WhV,           V,
          4      p\        Wh4      p\        WyV,           V,
          4      p\        Wy4      pV P                  R8X  d   \        V^4      pM<V P!                  4       V,
          ^,          pV P#                  4       V,
          ^,          pV P%                  WE4       V P'                  RWg3,          4       V P)                  4        R # )Naquaz+%d+%d)wm_withdrawry   winfo_reqwidthwinfo_reqheightwinfo_vrootwidthwinfo_vrootheightwinfo_ismappedwinfo_rootxwinfo_widthwinfo_rootywinfo_heightwinfo_vrootxwinfo_vrootyminmax_windowingsystemwinfo_screenwidthwinfo_screenheight
wm_maxsizewm_geometrywm_deiconify)
ru   r`   minwidth	minheightmaxwidth	maxheightxyvrootxvrootys
   &&        r   r8   r8      st   MMO!H!!#I!!#H##%If3355 F$6$6$88$C#II F$7$7$9I$E!#KK!!H$x/0NI%	12N'Ar
A  "X-!3!!#i/A5LL%MM(aV#$NNr   c                     V P                   R 8X  d"   V P                  P                  RRV RR4       R# V P                   R8X  d   V P                  RR7       R# R# )	r   z!::tk::unsupported::MacWindowStylestylemoveableModalr   x11dialog)typeN)r   tkcallwm_attributes)ru   s   &r   r$   r$     sM    V#			5w_b	*	
		u	$	X& 
%r   c                   <   a  ] tR tRt o RR ltR tR tR tRtV t	R# )	_QueryDialogi  Nc                b    W n         W@n        WPn        W0n        \        P                  WV4       R # r   )promptminvaluemaxvalueinitialvaluerZ   r=   )r   r"   r   r   r   r   r`   s   &&&&&&&r   r=   _QueryDialog.__init__  s'    
   (e,r   c                >    R V n         \        P                  V 4       R # r   )entryrZ   rC   rD   s   &r   rC   _QueryDialog.destroy  s    
tr   c                   \        WP                  \        R 7      pVP                  ^ ^\        R7       \        VRR7      V n        V P                  P                  ^^\        \        ,           R7       V P                  eG   V P                  P                  ^ V P                  4       V P                  P                  ^ \        4       V P                  # ))r   justify)rowr\   stickyr   )name)Labelr   r4   gridWEntryr   Er   insertselect_rangeEND)r   r9   ru   s   && r   rb   _QueryDialog.body!  s    &{{D9	11Q'60


AAac2(JJa!2!23JJ##As+zzr   c                    V P                  4       pT P
                  e=   YP
                  8  d-   \        P                  ! RRT P
                  ,          T R7       ^ # T P                  e=   YP                  8  d-   \        P                  ! RRT P                  ,          T R7       ^ # Yn        ^#   \         d/    \        P                  ! R T P                  R,           T R7        ^ # i ; i)zIllegal valuez
Please try again)r`   z	Too smallz2The allowed minimum value is %s. Please try again.z	Too largez2The allowed maximum value is %s. Please try again.)	getresult
ValueErrorr   showwarningerrormessager   r   ra   )r   ra   s   & r   rx   _QueryDialog.validate/  s    	^^%F ==$--)?""$&*mm4	 ==$--)?""$&*mm4	 9  	""!!$88
 	s   B. .5C'&C')r   r   r   r   r   ra   )NNNN)
rQ   rR   rS   rT   r=   rC   rb   rx   rU   rV   rW   s   @r   r   r     s     - r   r   c                   *   a  ] tR tRt o RtR tRtV tR# )_QueryIntegeriQ  zNot an integer.c                T    V P                  V P                  P                  4       4      # r   )getintr   getrD   s   &r   r   _QueryInteger.getresultT  s    {{4::>>+,,r   rk   NrQ   rR   rS   rT   r   r   rU   rV   rW   s   @r   r   r   Q  s     $L- -r   r   c                2    \        W3/ VB pVP                  # )zget an integer from the user

Arguments:

    title -- the dialog title
    prompt -- the label text
    **kw -- see SimpleDialog class

Return value is an integer
)r   ra   r"   r   kwds   &&, r   
askintegerr   X  s     	e*r*A88Or   c                   *   a  ] tR tRt o RtR tRtV tR# )_QueryFloatig  zNot a floating-point value.c                T    V P                  V P                  P                  4       4      # r   )	getdoubler   r   rD   s   &r   r   _QueryFloat.getresultj  s    ~~djjnn.//r   rk   Nr   rW   s   @r   r   r   g  s     0L0 0r   r   c                2    \        W3/ VB pVP                  # )zget a float from the user

Arguments:

    title -- the dialog title
    prompt -- the label text
    **kw -- see SimpleDialog class

Return value is a float
)r   ra   r   s   &&, r   askfloatr   n  s     	E(R(A88Or   c                   2   a  ] tR tRt o R tR tR tRtV tR# )_QueryStringi}  c                z    R V9   d   VR ,          V n         VR  MRV n         \        P                  ! V .VO5/ VB  R# )showN)_QueryString__showr   r=   )r   argsr   s   &*,r   r=   _QueryString.__init__~  s:    R<V*DK6
DKd0T0R0r   c                    \         P                  W4      pV P                  e   VP                  V P                  R7       V# )N)r   )r   rb   r   	configure)r   r9   r   s   && r   rb   _QueryString.body  s3    !!$/;;"OOO-r   c                6    V P                   P                  4       # r   )r   r   rD   s   &r   r   _QueryString.getresult  s    zz~~r   )__showN)	rQ   rR   rS   rT   r=   rb   r   rU   rV   rW   s   @r   r   r   }  s     1   r   r   c                2    \        W3/ VB pVP                  # )zget a string from the user

Arguments:

    title -- the dialog title
    prompt -- the label text
    **kw -- see SimpleDialog class

Return value is a string
)r   ra   r   s   &&, r   	askstringr     s     	U)b)A88Or   __main__c                      \        4       p V 3R  lp\        V RVR7      pVP                  4        \        V RVP                  R7      pVP                  4        VP	                  4        R# )c           	          \        V R . R
O^ ^RR7      p\        VP                  4       4       \        \        RR^R7      4       \        \	        RR^^dR7      4       \        \        RR4      4       R	# )zThis is a test dialog.  Would this have been an actual dialog, the buttons below would have been glowing in soft pink light.
Do you believe this?zTest Dialog)r   r:   r,   r+   r"   Spamz	Egg count)r   zEgg weight
(in tons))r   r   z	Egg labelN)YesNorq   )r   printrE   r   r   r   )r!   r   s   & r   doittest.<locals>.doit  si    T5
 "9!" !,	.A !$$&M*V[uEF(6#:Q$') *)FK01r   Testr   QuitN)Tkr1   r'   rO   rB   )r!   r   tqs       r   testr     sN    t 	2  4fd3	4faff5		

r   r   )r   tkinterr   r   r   r   r    rZ   r8   r$   r   r   r   r   r   r   r   rQ   r   rk   r   r   <module>r      s     6 7 7tIX I\:'@6 @F-L -0, 0 <  & z0 	F5 r   