�
zfc @ s� d Z d d l Td e f d � � YZ d e f d � � YZ d e f d � � YZ d � Z d
e f d � � YZ d � Z d
e f d � � YZ d � Z
e d k r� e � Z
e
j � e d d d d �GHe d d d d d d �GHe
d d � GHn d S( 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 *t Dialogc B s_ e Z d Z d d � Z d � Z d � Z d � Z d d � Z d d � Z d � Z
d � Z RS(
sZ Class to open dialogs.
This class is intended as a base class for custom dialogs
c C s= t j | | � | j � | j � r6 | j | � n | rL | j | � n | | _ d | _ t | � } | j
| � | _ | j d d d d � | j
� | j s� | | _ n | j d | j � | j d k r| j d | j � d | j � d f � n | j � | j j � | j � | j � | j | � d S( s� Initialize a dialog.
Arguments:
parent -- a parent window (the application window)
title -- the dialog title
t padxi t padyt WM_DELETE_WINDOWs +%d+%di2 N( t Toplevelt __init__t withdrawt winfo_viewablet transientt titlet parentt Nonet resultt Framet bodyt
initial_focust packt buttonboxt protocolt cancelt geometryt winfo_rootxt winfo_rootyt deiconifyt focus_sett wait_visibilityt grab_sett wait_window( t selfR R
R ( ( s- /usr/lib64/python2.7/lib-tk/tkSimpleDialog.pyR % s.
c C s d | _ t j | � d S( s Destroy the windowN( R R R t destroy( R ( ( s- /usr/lib64/python2.7/lib-tk/tkSimpleDialog.pyR X s c C s d S( s� create dialog body.
return widget that should have initial focus.
This method should be overridden, and is called
by the __init__ method.
N( ( R t master( ( s- /usr/lib64/python2.7/lib-tk/tkSimpleDialog.pyR ` s c
C s� t | � } t | d d d d d | j d t �} | j d t d d d
d � t | d d d d d | j �} | j d t d d d
d � | j d | j � | j d
| j � | j � d S( s[ add standard button box.
override if you do not want the standard buttons
t textt OKt widthi
t commandt defaultt sideR i R t Cancels