
    .hh                     .   S r SrSr/ SQrSSKrSSKJrJrJrJr  SBS jr	SCS jr
S	 rSBS
 jrSBS jrSDS jrS rS rS rS rS rS rS rS rSES jr " S S\5      r " S S\R4                  5      r " S S\5      r " S S\5      r " S S\\R:                  5      r " S  S!\5      r " S" S#\5      r " S$ S%\5      r  " S& S'\5      r!\!r" " S( S)\5      r# " S* S+\5      r$ " S, S-\\RJ                  5      r&\&r% " S. S/\5      r' " S0 S1\5      r( " S2 S3\\RR                  5      r) " S4 S5\\RT                  5      r* " S6 S7\5      r+ " S8 S9\5      r, " S: S;\5      r- " S< S=\\R\                  \R^                  5      r0 " S> S?\5      r1 " S@ SA\#5      r2g)Fa  Ttk wrapper.

This module provides classes to allow using Tk themed widget set.

Ttk is based on a revised and enhanced version of
TIP #48 (http://tip.tcl.tk/48) specified style engine.

Its basic idea is to separate, to the extent possible, the code
implementing a widget's behavior from the code implementing its
appearance. Widget class bindings are primarily responsible for
maintaining the widget state and invoking callbacks, all aspects
of the widgets appearance lies at Themes.
z0.3.1z!Guilherme Polo <ggpolo@gmail.com>)ButtonCheckbuttonComboboxEntryFrameLabel
Labelframe
LabelFrame
MenubuttonNotebookPanedwindowPanedWindowProgressbarRadiobuttonScale	Scrollbar	SeparatorSizegripSpinboxStyleTreeviewLabeledScale
OptionMenutclobjs_to_pysetup_master    N)_flatten_join
_stringify
_splitdictc                 z    U(       a  [        U 5      n U $ [        U [        [        45      (       a  [	        U 5      n U $ )zInternal function.)r   
isinstancelisttupler   )valuescripts     4/opt/python-3.13.8/usr/lib/python3.13/tkinter/ttk.py_format_optvaluer'       s9     5! L 
ED%=	)	)eL    c                     / nU R                  5        HF  u  pEU(       a  XB;  d  M  UR                  SU-  5        Uc  M,  UR                  [        XQ5      5        MH     [        U5      $ )zFormats optdict to a tuple to pass it to tk.call.

E.g. (script=False):
  {'foreground': 'blue', 'padding': [1, 2, 3, 4]} returns:
  ('-foreground', 'blue', '-padding', '1 2 3 4')-%s)itemsappendr'   r   )optdictr%   ignoreoptsoptr$   s         r&   _format_optdictr1   *   sW     Dmmo
*KK$ ,U;<	 & D>r(   c                     / nU  H[  Gt p#[        U5      S:X  a  US   =(       d    SnOSR                  U5      nUR                  U5        Uc  MJ  UR                  U5        M]     U$ )N   r     )lenjoinr,   )r+   opt_valstatevals       r&   _mapdict_valuesr;   :   sb     Gu:? !HNE HHUOEu?NN3  Nr(   c           	          / nU R                  5        H.  u  p4UR                  SU-  [        [        U5      U5      45        M0     [	        U5      $ )zFormats mapdict to pass it to tk.call.

E.g. (script=False):
  {'expand': [('active', 'selected', 'grey'), ('focus', [1, 2, 3, 4])]}

  returns:

  ('-expand', '{active selected} grey focus {1, 2, 3, 4}')r*   )r+   extendr'   r;   r   )mapdictr%   r/   r0   r$   s        r&   _format_mapdictr?   O   sO     Dmmo
US[%oe&<fEG 	H & D>r(   c                    SnSnU S:X  a9  US   nU/[        USS 5      Q7nU(       a  U4nO[        U5      4n[        X15      nU S:X  a=  [        U5      S:  a  Uu  pSn
OUu  pn
X[	        [        U
5      5      4n[        X15      nO+U S	:X  a%  US   4n[        U5      S:  a  [        US   U5      4nU(       a  [        U5      nS
R                  U5      nXE4$ / UQUP7$ )zAFormats args and kw according to the given element factory etype. imager   r3   Nvsapi   ))rA   r3   fromr5   )r;   r   r1   r6   r#   r'   r7   )etyper%   argskwspecsr/   iname	imagespec
class_namepart_idstatemaps              r&   _format_elemcreaterO   `   s   EDQ 7_T!"X67	LE9%'Er*
 t9q="&J!H,0)JeOH,E&FGr*	& a
t9q=$T!Wf57Dexx~{|t|r(   c                    / nU  H  nUu  pVU=(       d    0 nSR                  [        USS5      5      nSU-  < U< U(       a  SU-  OS< 3nSU;   aX  UR                  US-   5        X-  n[        US   UU5      u  pUR                  U	5        X-  nUR                  SSU-  -  5        M  UR                  U5        M     S	R                  U5      U4$ )
a  Formats a layout list so we can pass the result to ttk::style
layout and ttk::style settings. Note that the layout doesn't have to
be a list necessarily.

E.g.:
  [("Menubutton.background", None),
   ("Menubutton.button", {"children":
       [("Menubutton.focus", {"children":
           [("Menubutton.padding", {"children":
            [("Menubutton.label", {"side": "left", "expand": 1})]
           })]
       })]
   }),
   ("Menubutton.indicator", {"side": "right"})
  ]

  returns:

  Menubutton.background
  Menubutton.button -children {
    Menubutton.focus -children {
      Menubutton.padding -children {
        Menubutton.label -side left -expand 1
      }
    }
  }
  Menubutton.indicator -side rightr5   T)childrenz %sr4   rQ   z -children {z%s}
)r7   r1   r,   _format_layoutlist)
layoutindentindent_sizer%   layout_elemelemr/   foptshead	newscripts
             r&   rS   rS      s    8 F 
zrt]CD<%R/OPMM$/0!F 24
3CV!IMM)$!FMM%3<01MM$ " 99Vf$$r(   c                    / nU R                  5        GH  u  p#UR                  S5      (       a8  SR                  [        US   S5      5      nUR	                  SU< SU< S35        UR                  S5      (       a8  SR                  [        US   S5      5      nUR	                  SU< SU< S35        SU;   a7  US   (       d  S	nO[        US   5      u  pEUR	                  S
U< SU< S35        UR                  S5      (       d  M  US   nUS   nSnU[        U5      :  a<  [        Xh   S5      (       d)  US-  nU[        U5      :  a  [        Xh   S5      (       d  M)  USU n	U[        U5      :  a  Xh   (       a  Xh   O0 n
[        US/U	Q70 U
D6u  pUR	                  SU< SU< SU< SU< 35        GM     SR                  U5      $ )zReturns an appropriate script, based on settings, according to
theme_settings definition to be used by theme_settings and
theme_create.	configurer5   Tzttk::style configure ;mapzttk::style map rT   nullzttk::style layout z {
z
}zelement creater   r3   r+   zttk::style element create rR   )
r+   getr7   r1   r,   r?   rS   r6   hasattrrO   )settingsr%   namer/   s_eoptsrF   argcelemargselemkwrI   s               r&   _script_from_settingsrk      s    F nn&
88K  k):DABAMM4CD88E??ed;<AMMT1=>t>)$x.9MMT1EF88$%%)*E!HE DU#GEK,I,I	 U#GEK,I,I Qt}H$(3u:$5%+U[2F-eTOHOOLEMMeUE+ ,= 'B 99Vr(   c                    [        U [        5      (       a  U $ / n[        U 5      n[        X"5       H  u  p4[	        US5      (       a  [        U5      R                  5       nOD[        U[        5      (       a  UR                  5       nO[        U[        [        45      (       d  U4n[	        US5      (       a  [        U5      nUR                  / UQUP75        M     U$ )zpConstruct a list from the given statespec tuple according to the
accepted statespec accepted by _format_mapdict.typename)	r!   striterziprb   splitr#   r"   r,   )stupleresultitr9   r:   s        r&   _list_from_statespecru      s     &#F	fB"k
5*%%J$$&Es##KKMEEE4=11HE3
##c(Cmmsm$ " Mr(   c                 h   U R                  U5      n/ nSnU[        U5      :  a  X   n0 nUR                  XE45        US-  nU[        U5      :  aP  XUS-    u  pgUR                  S5      (       d  O0USS nUS-  nUS:X  a  [	        X5      nXuU'   U[        U5      :  a  MP  U[        U5      :  a  M  U$ )zlConstruct a list from the tuple returned by ttk::layout, this is
somewhat the reverse of _format_layoutlist.r   r3      -NrQ   )	splitlistr6   r,   
startswith_list_from_layouttuple)tkltupleresindxrd   r/   r0   r:   s           r&   r{   r{      s     \\&!F
CD
V
|

D< 	S[ 4!8,HC>>#&&ab'CAIDj ,R5I S[  V
& Jr(   c                     [        U5      nU R                  " X!-   6 n[        U5      S-  (       a  U$ [        X[        S9$ )aT  Format options then call Tk command with args and options and return
the appropriate result.

If no option is specified, a dict is returned. If an option is
specified with the None value, the value for that option is returned.
Otherwise, the function just sets the passed options and the caller
shouldn't be expecting a return value anyway.rw   )conv)r1   callr6   r   _tclobj_to_py)r|   optionsrG   r~   s       r&   _val_or_dictr     s<     g&G
''DN
$C
7|a
bM22r(   c                 b    [        U 5      n  [        U 5      n U $ ! [        [        4 a     U $ f = f)zAConverts a value to, hopefully, a more appropriate Python object.)rn   int
ValueError	TypeError)r$   s    r&   _convert_stringvalr   '  s>    JEE
 L 	" Ls    ..c                 l    [        U [        5      (       a  SU ;   a  [        U 5      n U $ [        U 5      n U $ )N.)r!   rn   floatr   )xs    r&   
_to_numberr   1  s6    !S!8aA H AAHr(   c                    U (       ac  [        U S5      (       aR  [        U [        5      (       d=  [        U S   SS5      S:X  a  [	        U 5      n U $ [        [        [        U 5      5      n  U $ [        U S5      (       a  [        U 5      n U $ )z8Return value converted from Tcl object to Python object.__len__r   rm   N	StateSpec)rb   r!   rn   getattrru   r"   r_   r   )r:   s    r&   r   r   9  s|    
wsI&&z#s/C/C3q6:t,;&s+C J s-s34C
 J 
j	!	! %Jr(   c                 R    U R                  5        H  u  p[        U5      X'   M     U $ )zKReturns adict with its values converted from Tcl objects to Python
objects.)r+   r   )adictr0   r:   s      r&   r   r   F  s)     KKM"3'
 " Lr(   c                 6    U c  [         R                  " 5       n U $ )zIf master is not None, itself is returned. If master is None,
the default master is returned if there is one, otherwise a new
master is created and returned.

If it is not allowed to use the default root and master is None,
RuntimeError is raised.)tkinter_get_default_root)masters    r&   r   r   N  s     ~**,Mr(   c                       \ rS rSrSrSrSS jrSS jrSS jrSS jr	SS	 jr
S
 rS rS rSS jrS rS rSS jrSrg)r   iZ  zManipulate style database.z
ttk::styleNc                 \    [        U5      nXl        U R                  R                  U l        g N)r   r   r|   )selfr   s     r&   __init__Style.__init___  s     f%++..r(   c                 v    Ub  SX2'   [        U R                  X0R                  SU5      nU(       d  U(       a  U$ g)zQuery or sets the default value of the specified option(s) in
style.

Each key in kw is an option and each value is either a string or
a sequence identifying the value for that option.Nr]   )r   r|   _name)r   style	query_optrH   rs   s        r&   r]   Style.configuree  s8       BMdggr::{EJYM r(   c           
         UbO  U R                   R                  U R                  SUSU-  5      n[        U R                   R	                  U5      5      $ U R                   R                  " U R                  SU/[        U5      Q76 n[        U R                   U5      R                  5        VVs0 s H*  u  pVU[        U R                   R	                  U5      5      _M,     snn$ s  snnf )a+  Query or sets dynamic values of the specified option(s) in
style.

Each key in kw is an option and each value should be a list or a
tuple (usually) containing statespecs grouped in tuples, or list,
or something else of your preference. A statespec is compound of
one or more states and then a value.r_   r*   )r|   r   r   ru   ry   r?   r   r+   )r   r   r   rH   rs   kvs          r&   r_   	Style.mapr  s      WW\\$**eUEI<MNF'(9(9&(ABBdjj%M9LM&tww7==?A?DA '(9(9!(<==?A 	A As   ,1C!c                     U(       a  SR                  U5      OSnU R                  R                  U R                  SUSU-  X45      $ )zReturns the value specified for option in style.

If state is specified it is expected to be a sequence of one
or more states. If the default argument is set, it is used as
a fallback value in case no specification for option is found.r5   r4   lookupr*   )r7   r|   r   r   )r   r   optionr9   defaults        r&   r   Style.lookup  s=     $)bww||DJJ% 	r(   c           	          SnU(       a  [        U5      S   nOUb  Sn[        U R                  U R                  R                  U R                  SX5      5      $ )a  Define the widget layout for given style. If layoutspec is
omitted, return the layout specification for given style.

layoutspec is expected to be a list or an object different than
None that evaluates to False if you want to "turn off" that style.
If it is a list (or tuple, or something else), each item should be
a tuple where the first item is the layout name and the second item
should have the format described below:

LAYOUTS

    A layout can contain the value None, if takes no options, or
    a dict of options specifying how to arrange the element.
    The layout mechanism uses a simplified version of the pack
    geometry manager: given an initial cavity, each element is
    allocated a parcel. Valid options/values are:

        side: whichside
            Specifies which side of the cavity to place the
            element; one of top, right, bottom or left. If
            omitted, the element occupies the entire cavity.

        sticky: nswe
            Specifies where the element is placed inside its
            allocated parcel.

        children: [sublayout... ]
            Specifies a list of elements to place inside the
            element. Each element is a tuple (or other sequence)
            where the first item is the layout name, and the other
            is a LAYOUT.Nr   r`   rT   )rS   r{   r|   r   r   )r   r   
layoutspeclspecs       r&   rT   Style.layout  sT    @ &z215E#E &dggGGLLXu<> 	>r(   c                     [        US/UQ70 UD6Gt pVU R                  R                  " U R                  SSX/UQUQ76   g)z9Create a new element in the current theme of given etype.FelementcreateN)rO   r|   r   r   )r   elementnamerF   rG   rH   rI   r/   s          r&   element_createStyle.element_create  sF    )%DDDTZZHk 			r(   c           
          [        S U R                  R                  U R                  R                  U R                  SS5      5       5       5      $ )z:Returns the list of elements defined in the current theme.c              3   B   #    U  H  oR                  S 5      v   M     g7frx   Nlstrip).0ns     r&   	<genexpr>&Style.element_names.<locals>.<genexpr>  s       ; -:qXXc]] -:   r   namesr#   r|   ry   r   r   r   s    r&   element_namesStyle.element_names  sB     ;DGG,=,=GGLLY8-: ; ; 	;r(   c                     [        S U R                  R                  U R                  R                  U R                  SSU5      5       5       5      $ )z)Return the list of elementname's options.c              3   B   #    U  H  oR                  S 5      v   M     g7fr   r   )r   os     r&   r   (Style.element_options.<locals>.<genexpr>  s#      J -IqXXc]] -Ir   r   r   r   )r   r   s     r&   element_optionsStyle.element_options  sI     JDGG,=,=GGLLY	;G-I J J 	Jr(   c           
          U(       a  [        U5      OSnU(       a-  U R                  R                  U R                  SSUSUSU5        gU R                  R                  U R                  SSUSU5        g)a  Creates a new theme.

It is an error if themename already exists. If parent is
specified, the new theme will inherit styles, elements and
layouts from the specified parent theme. If settings are present,
they are expected to have the same syntax used for theme_settings.r4   themer   z-parentz	-settingsNrk   r|   r   r   )r   	themenameparentrc   r%   s        r&   theme_createStyle.theme_create  s^     5=&x0"GGLLWh	6;8 GGLLWh	V%r(   c                 j    [        U5      nU R                  R                  U R                  SSX5        g)ag  Temporarily sets the current theme to themename, apply specified
settings and then restore the previous theme.

Each key in settings is a style and each value may contain the
keys 'configure', 'map', 'layout' and 'element create' and they
are expected to have the same format as specified by the methods
configure, map, layout and element_create respectively.r   rc   Nr   )r   r   rc   r%   s       r&   theme_settingsStyle.theme_settings  s(     'x0TZZ*iHr(   c                     U R                   R                  U R                   R                  U R                  SS5      5      $ )z#Returns a list of all known themes.r   r   )r|   ry   r   r   r   s    r&   theme_namesStyle.theme_names  s,    ww  djj'7!KLLr(   c                 x    Uc  U R                   R                  S5      $ U R                   R                  SU5        g)zIf themename is None, returns the theme in use, otherwise, set
the current theme to themename, refreshes all widgets and emits
a <<ThemeChanged>> event.Nzreturn $ttk::currentThemezttk::setTheme)r|   evalr   )r   r   s     r&   	theme_useStyle.theme_use  s4      77<< ;<<
 	_i0r(   )r   r|   r   NN)__name__
__module____qualname____firstlineno____doc__r   r   r]   r_   r   rT   r   r   r   r   r   r   r   __static_attributes__rA   r(   r&   r   r   Z  sK    $E!
A"	(>V;J%"	IM
1r(   r   c                   <    \ rS rSrSrS	S jrS rS	S jrS	S jrSr	g)
Widgeti  z!Base class for Tk themed widgets.Nc                 V    [        U5      n[        R                  R                  XX#S9  g)ad  Constructs a Ttk Widget with the parent master.

STANDARD OPTIONS

    class, cursor, takefocus, style

SCROLLABLE WIDGET OPTIONS

    xscrollcommand, yscrollcommand

LABEL WIDGET OPTIONS

    text, textvariable, underline, image, compound, width

WIDGET STATES

    active, disabled, focus, pressed, selected, background,
    readonly, alternate, invalid
)rH   N)r   r   r   r   )r   r   
widgetnamerH   s       r&   r   Widget.__init__  s%    ( f%j@r(   c                 P    U R                   R                  U R                  SX5      $ )zReturns the name of the element at position x, y, or the empty
string if the point does not lie within any element.

x and y are pixel coordinates relative to the widget.identifyr|   r   _wr   r   ys      r&   r   Widget.identify  s    
 ww||DGGZ66r(   c           	          U R                   R                  U R                   R                  U R                  SSR	                  U5      5      5      nU(       a  Ub  U" U0 UD6$ U$ )a  Test the widget's state.

If callback is not specified, returns True if the widget state
matches statespec and False otherwise. If callback is specified,
then it will be invoked with *args, **kw if the widget state
matches statespec. statespec is expected to be a sequence.instater5   )r|   
getbooleanr   r   r7   )r   	statespeccallbackrG   rH   rets         r&   r   Widget.instate!  sW     gg  TWWi)1DEG8'T(R((
r(   c           	          Ub  SR                  U5      nU R                  R                  [        U R                  R	                  U R
                  SU5      5      5      $ )zModify or inquire widget state.

Widget state is returned if statespec is None, otherwise it is
set according to the statespec flags and then a new state spec
is returned indicating which flags were changed. statespec is
expected to be a sequence.r5   r9   )r7   r|   ry   rn   r   r   )r   r   s     r&   r9   Widget.state0  sG      +Iww  TWW\\$''7I%N!OPPr(   rA   r   )
r   r   r   r   r   r   r   r   r9   r   rA   r(   r&   r   r     s    +A07
Qr(   r   c                   (    \ rS rSrSrSS jrS rSrg)r   i=  z_Ttk Button widget, displays a textual label and/or image, and
evaluates a command when pressed.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Button widget with the parent master.

STANDARD OPTIONS

    class, compound, cursor, image, state, style, takefocus,
    text, textvariable, underline, width

WIDGET-SPECIFIC OPTIONS

    command, default, width
zttk::buttonNr   r   r   r   rH   s      r&   r   Button.__init__A  s     	mR8r(   c                 N    U R                   R                  U R                  S5      $ )z/Invokes the command associated with the button.invoker   r   s    r&   r   Button.invokeP  s    ww||DGGX..r(   rA   r   r   r   r   r   r   r   r   r   rA   r(   r&   r   r   =  s    )9/r(   r   c                   (    \ rS rSrSrSS jrS rSrg)r   iU  z;Ttk Checkbutton widget which is either in on- or off-state.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Checkbutton widget with the parent master.

STANDARD OPTIONS

    class, compound, cursor, image, state, style, takefocus,
    text, textvariable, underline, width

WIDGET-SPECIFIC OPTIONS

    command, offvalue, onvalue, variable
zttk::checkbuttonNr   r   s      r&   r   Checkbutton.__init__X       	&8"=r(   c                 N    U R                   R                  U R                  S5      $ )a/  Toggles between the selected and deselected states and
invokes the associated command. If the widget is currently
selected, sets the option variable to the offvalue option
and deselects the widget; otherwise, sets the option variable
to the option onvalue.

Returns the result of the associated command.r   r   r   s    r&   r   Checkbutton.invokeg  s     ww||DGGX..r(   rA   r   r  rA   r(   r&   r   r   U  s    E>/r(   r   c                   4    \ rS rSrSrS	S jrS rS rS rSr	g)
r   ir  zaTtk Entry widget displays a one-line text string and allows that
string to be edited by the user.Nc                 D    [         R                  XU=(       d    SU5        g)aE  Constructs a Ttk Entry widget with the parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus, xscrollcommand

WIDGET-SPECIFIC OPTIONS

    exportselection, invalidcommand, justify, show, state,
    textvariable, validate, validatecommand, width

VALIDATION MODES

    none, key, focus, focusin, focusout, all
z
ttk::entryNr   )r   r   widgetrH   s       r&   r   Entry.__init__v  s      	f&<bAr(   c                 n    U R                  U R                  R                  U R                  SU5      5      $ )ziReturn a tuple of (x, y, width, height) which describes the
bounding box of the character given by index.bbox_getintsr|   r   r   )r   indexs     r&   r  
Entry.bbox  s(     }}TWW\\$''65ABBr(   c                 P    U R                   R                  U R                  SX5      $ )zpReturns the name of the element at position x, y, or the
empty string if the coordinates are outside the window.r   r   r   s      r&   r   Entry.identify       ww||DGGZ66r(   c                     U R                   R                  U R                   R                  U R                  S5      5      $ )zForce revalidation, independent of the conditions specified
by the validate option. Returns False if validation fails, True
if it succeeds. Sets or clears the invalid state accordingly.validater|   r   r   r   r   s    r&   r  Entry.validate  s,     ww!!$'',,tww
"CDDr(   rA   r   )
r   r   r   r   r   r   r  r   r  r   rA   r(   r&   r   r   r  s    (B&C7Er(   r   c                   2    \ rS rSrSrSS jrSS jrS rSrg)	r   i  zITtk Combobox widget combines a text field with a pop-down list of
values.Nc                 4    [         R                  " XS40 UD6  g)zConstruct a Ttk Combobox widget with the parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    exportselection, justify, height, postcommand, state,
    textvariable, values, width
zttk::comboboxNr   r   r   s      r&   r   Combobox.__init__  s     	t_;;r(   c                     UcH  U R                   R                  U R                  S5      nUS:X  a  gU R                   R                  U5      $ U R                   R                  U R                  SU5      $ )zIf newindex is supplied, sets the combobox value to the
element at position newindex in the list of values. Otherwise,
returns the index of the current value in the list of values
or -1 if the current value does not appear in the list.currentr4   )r|   r   r   getint)r   newindexr~   s      r&   r  Combobox.current  sZ    
 '',,tww	2Cby77>>#&&ww||DGGY99r(   c                 R    U R                   R                  U R                  SU5        g)z(Sets the value of the combobox to value.setNr   r   r$   s     r&   r%  Combobox.set      TWWeU+r(   rA   r   )	r   r   r   r   r   r   r  r%  r   rA   r(   r&   r   r     s    <
:,r(   r   c                   "    \ rS rSrSrSS jrSrg)r   i  zFTtk Frame widget is a container, used to group other widgets
together.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Frame with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    borderwidth, relief, padding, width, height
z
ttk::frameNr   r   s      r&   r   Frame.__init__       	lB7r(   rA   r   r   r   r   r   r   r   r   rA   r(   r&   r   r     s    8r(   r   c                   "    \ rS rSrSrSS jrSrg)r   i  z7Ttk Label widget displays a textual label and/or image.Nc                 2    [         R                  XSU5        g)a  Construct a Ttk Label with parent master.

STANDARD OPTIONS

    class, compound, cursor, image, style, takefocus, text,
    textvariable, underline, width

WIDGET-SPECIFIC OPTIONS

    anchor, background, font, foreground, justify, padding,
    relief, text, wraplength
z
ttk::labelNr   r   s      r&   r   Label.__init__  s     	lB7r(   rA   r   r-  rA   r(   r&   r   r     s
    A8r(   r   c                   "    \ rS rSrSrSS jrSrg)r   i  zTtk Labelframe widget is a container used to group other widgets
together. It has an optional label, which may be a plain text string
or another widget.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Labelframe with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS
    labelanchor, text, underline, padding, labelwidget, width,
    height
zttk::labelframeNr   r   s      r&   r   Labelframe.__init__  s     	&7<r(   rA   r   r-  rA   r(   r&   r   r     s    =r(   r   c                   "    \ rS rSrSrSS jrSrg)r
   i  z^Ttk Menubutton widget displays a textual label and/or image, and
displays a menu when pressed.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Menubutton with parent master.

STANDARD OPTIONS

    class, compound, cursor, image, state, style, takefocus,
    text, textvariable, underline, width

WIDGET-SPECIFIC OPTIONS

    direction, menu
zttk::menubuttonNr   r   s      r&   r   Menubutton.__init__  s     	&7<r(   rA   r   r-  rA   r(   r&   r
   r
     s    %=r(   r
   c                   f    \ rS rSrSrSS jrS rS rS rS r	S	 r
S
 rSS jrSS jrS rS rSrg)r   i  zTtk Notebook widget manages a collection of windows and displays
a single one at a time. Each child window is associated with a tab,
which the user may select to change the currently-displayed window.Nc                 2    [         R                  XSU5        g)a  Construct a Ttk Notebook with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    height, padding, width

TAB OPTIONS

    state, sticky, padding, text, image, compound, underline

TAB IDENTIFIERS (tab_id)

    The tab_id argument found in several methods may take any of
    the following forms:

        * An integer between zero and the number of tabs
        * The name of a child window
        * A positional specification of the form "@x,y", which
          defines the tab
        * The string "current", which identifies the
          currently-selected tab
        * The string "end", which returns the number of tabs (only
          valid for method index)
zttk::notebookNr   r   s      r&   r   Notebook.__init__  s    : 	or:r(   c                 h    U R                   R                  " U R                  SU/[        U5      Q76   g)zAdds a new tab to the notebook.

If window is currently managed by the notebook but hidden, it is
restored to its previous position.addNr|   r   r   r1   )r   childrH   s      r&   r;  Notebook.add3  s&    
 	TWWeUCob.ACr(   c                 R    U R                   R                  U R                  SU5        g)zPRemoves the tab specified by tab_id, unmaps and unmanages the
associated window.forgetNr   r   tab_ids     r&   r@  Notebook.forget;  s     	TWWh/r(   c                 R    U R                   R                  U R                  SU5        g)zHides the tab specified by tab_id.

The tab will not be displayed, but the associated window remains
managed by the notebook and its configuration remembered. Hidden
tabs may be restored with the add command.hideNr   rA  s     r&   rE  Notebook.hideA  s     	TWWff-r(   c                 P    U R                   R                  U R                  SX5      $ )zRReturns the name of the tab element at position x, y, or the
empty string if none.r   r   r   s      r&   r   Notebook.identifyJ  r  r(   c                     U R                   R                  U R                   R                  U R                  SU5      5      $ )ztReturns the numeric index of the tab specified by tab_id, or
the total number of tabs if tab_id is the string "end".r  r|   r!  r   r   rA  s     r&   r  Notebook.indexP  s,     ww~~dggll477GVDEEr(   c                 h    U R                   R                  " U R                  SX/[        U5      Q76   g)zInserts a pane at the specified position.

pos is either the string end, an integer index, or the name of
a managed child. If child is already managed by the notebook,
moves it to the specified position.insertNr<  r   posr=  rH   s       r&   rM  Notebook.insertV  &     	TWWhKob6IKr(   c                 P    U R                   R                  U R                  SU5      $ )zSelects the specified tab.

The associated child window will be displayed, and the
previously-selected window (if different) is unmapped. If tab_id
is omitted, returns the widget name of the currently selected
pane.selectr   rA  s     r&   rS  Notebook.select_  s     ww||DGGXv66r(   c                 T    Ub  SX2'   [        U R                  X0R                  SU5      $ )zQuery or modify the options of the specific tab_id.

If kw is not given, returns a dict of the tab option values. If option
is specified, returns the value of that option. Otherwise, sets the
options to the corresponding values.Ntabr   r|   r   )r   rB  r   rH   s       r&   rV  Notebook.tabi  s*     BJDGGR%@@r(   c                     U R                   R                  U R                   R                  U R                  S5      =(       d    S5      $ )z2Returns a list of windows managed by the notebook.tabsrA   r|   ry   r   r   r   s    r&   rZ  Notebook.tabst  s/    ww  dggv!>!D"EEr(   c                 P    U R                   R                  SU R                  5        g)a  Enable keyboard traversal for a toplevel window containing
this notebook.

This will extend the bindings for the toplevel window containing
this notebook as follows:

    Control-Tab: selects the tab following the currently selected
                 one

    Shift-Control-Tab: selects the tab preceding the currently
                       selected one

    Alt-K: where K is the mnemonic (underlined) character of any
           tab, will select that tab.

Multiple notebooks in a single toplevel may be enabled for
traversal, including nested notebooks. However, notebook traversal
only works properly if all panes are direct children of the
notebook.zttk::notebook::enableTraversalNr   r   s    r&   enable_traversalNotebook.enable_traversaly  s    . 	5tww?r(   rA   r   )r   r   r   r   r   r   r;  r@  rE  r   r  rM  rS  rV  rZ  r^  r   rA   r(   r&   r   r     sF    K;@D0.7FL7AF
@r(   r   c                   h    \ rS rSrSrS	S jr\R                  R                  rS r	S	S jr
S	S jrSrg)
r   i  zbTtk Panedwindow widget displays a number of subwindows, stacked
either vertically or horizontally.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Panedwindow with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    orient, width, height

PANE OPTIONS

    weight
zttk::panedwindowNr   r   s      r&   r   Panedwindow.__init__  s     	&8"=r(   c                 h    U R                   R                  " U R                  SX/[        U5      Q76   g)zInserts a pane at the specified positions.

pos is either the string end, and integer index, or the name
of a child. If child is already managed by the paned window,
moves it to the specified position.rM  Nr<  rN  s       r&   rM  Panedwindow.insert  rQ  r(   c                 T    Ub  SX2'   [        U R                  X0R                  SU5      $ )a1  Query or modify the options of the specified pane.

pane is either an integer index or the name of a managed subwindow.
If kw is not given, returns a dict of the pane option values. If
option is specified then the value for that option is returned.
Otherwise, sets the options to the corresponding values.NpanerW  )r   rf  r   rH   s       r&   rf  Panedwindow.pane  *     BJDGGR&$??r(   c                     U R                   R                  U R                   R                  U R                  SX5      5      $ )a,  If newpos is specified, sets the position of sash number index.

May adjust the positions of adjacent sashes to ensure that
positions are monotonically increasing. Sash positions are further
constrained to be between 0 and the total size of the widget.

Returns the new position of sash number index.sashposrJ  )r   r  newposs      r&   rj  Panedwindow.sashpos  s,     ww~~dggll477IuMNNr(   rA   r   )r   r   r   r   r   r   r   r   r@  rM  rf  rj  r   rA   r(   r&   r   r     s1    *>$   ''FL	@Or(   r   c                   <    \ rS rSrSrS	S jrS	S jrS	S jrS rSr	g)
r   i  a&  Ttk Progressbar widget shows the status of a long-running
operation. They can operate in two modes: determinate mode shows the
amount completed relative to the total amount of work to be done, and
indeterminate mode provides an animated display to let the user know
that something is happening.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Progressbar with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    orient, length, mode, maximum, value, variable, phase
zttk::progressbarNr   r   s      r&   r   Progressbar.__init__  s     	&8"=r(   c                 R    U R                   R                  U R                  SU5        g)zBegin autoincrement mode: schedules a recurring timer event
that calls method step every interval milliseconds.

interval defaults to 50 milliseconds (20 steps/second) if omitted.startNr   )r   intervals     r&   rq  Progressbar.start  s    
 	TWWgx0r(   c                 R    U R                   R                  U R                  SU5        g)zJIncrements the value option by amount.

amount defaults to 1.0 if omitted.stepNr   )r   amounts     r&   ru  Progressbar.step  s     	TWWff-r(   c                 P    U R                   R                  U R                  S5        g)zNStop autoincrement mode: cancels any recurring timer event
initiated by start.stopNr   r   s    r&   ry  Progressbar.stop  s     	TWWf%r(   rA   r   )
r   r   r   r   r   r   rq  ru  ry  r   rA   r(   r&   r   r     s    $>1.&r(   r   c                   (    \ rS rSrSrSS jrS rSrg)r   i  zaTtk Radiobutton widgets are used in groups to show or change a
set of mutually-exclusive options.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Radiobutton with parent master.

STANDARD OPTIONS

    class, compound, cursor, image, state, style, takefocus,
    text, textvariable, underline, width

WIDGET-SPECIFIC OPTIONS

    command, value, variable
zttk::radiobuttonNr   r   s      r&   r   Radiobutton.__init__  r  r(   c                 N    U R                   R                  U R                  S5      $ )zSets the option variable to the option value, selects the
widget, and invokes the associated command.

Returns the result of the command, or an empty string if
no command is specified.r   r   r   s    r&   r   Radiobutton.invoke  s     ww||DGGX..r(   rA   r   r  rA   r(   r&   r   r     s    *>/r(   r   c                   6    \ rS rSrSrSS jrSS jrS	S jrSrg)
r   i  z{Ttk Scale widget is typically used to control the numeric value of
a linked variable that varies uniformly over some range.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Scale with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    command, from, length, orient, to, value, variable
z
ttk::scaleNr   r   s      r&   r   Scale.__init__  r,  r(   c                     [         R                  " X40 UD6n[        U[        S5      [        45      (       d  UR                  U5        [        SU;   SU;   SU;   /5      (       a  U R                  S5        U$ )zModify or query scale options.

Setting a value for any of the "from", "from_" or "to" options
generates a <<RangeChanged>> event.NrE   from_to<<RangeChanged>>)r   r]   r!   typern   updateanyevent_generate)r   cnfrH   retvals       r&   r]   Scale.configure&  sl    
 !!$2r2#T
C011IIcN"gmTRZ899 23r(   c                 P    U R                   R                  U R                  SX5      $ )zGet the current value of the value option, or the value
corresponding to the coordinates x, y if they are specified.

x and y are pixel coordinates relative to the scale widget
origin.ra   r   r   s      r&   ra   	Scale.get3  s     ww||DGGUA11r(   rA   r   r   )	r   r   r   r   r   r   r]   ra   r   rA   r(   r&   r   r     s    @8
2r(   r   c                   "    \ rS rSrSrSS jrSrg)r   i<  z;Ttk Scrollbar controls the viewport of a scrollable widget.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Scrollbar with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    command, orient
zttk::scrollbarNr   r   s      r&   r   Scrollbar.__init__?       	&6;r(   rA   r   r-  rA   r(   r&   r   r   <  s
    E<r(   r   c                   "    \ rS rSrSrSS jrSrg)r   iM  zETtk Separator widget displays a horizontal or vertical separator
bar.Nc                 2    [         R                  XSU5        g)zConstruct a Ttk Separator with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus

WIDGET-SPECIFIC OPTIONS

    orient
zttk::separatorNr   r   s      r&   r   Separator.__init__Q  r  r(   rA   r   r-  rA   r(   r&   r   r   M  s    <r(   r   c                   "    \ rS rSrSrSS jrSrg)r   i_  zhTtk Sizegrip allows the user to resize the containing toplevel
window by pressing and dragging the grip.Nc                 2    [         R                  XSU5        g)zkConstruct a Ttk Sizegrip with parent master.

STANDARD OPTIONS

    class, cursor, state, style, takefocus
zttk::sizegripNr   r   s      r&   r   Sizegrip.__init__c  s     	or:r(   rA   r   r-  rA   r(   r&   r   r   _  s    1;r(   r   c                   (    \ rS rSrSrSS jrS rSrg)r   im  zTtk Spinbox is an Entry with increment and decrement arrows

It is commonly used for number entry or to select from a list of
string values.
Nc                 4    [         R                  " XS40 UD6  g)zConstruct a Ttk Spinbox widget with the parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus, validate,
    validatecommand, xscrollcommand, invalidcommand

WIDGET-SPECIFIC OPTIONS

    to, from_, increment, values, wrap, format, command
zttk::spinboxNr  r   s      r&   r   Spinbox.__init__t  s     	t^:r:r(   c                 R    U R                   R                  U R                  SU5        g)z'Sets the value of the Spinbox to value.r%  Nr   r&  s     r&   r%  Spinbox.set  r(  r(   rA   r   )r   r   r   r   r   r   r%  r   rA   r(   r&   r   r   m  s    ;,r(   r   c                      \ rS rSrSrS&S jrS&S jrS&S jrS rS&S jr	S	 r
S
 rS rS&S jrS&S jrS rS rS rS rS rS rS&S jrS&S jrS r\rS rS rS rS rS rS rS rS r S r!S  r"S'S! jr#S'S" jr$S&S# jr%S&S$ jr&S%r'g)(r   i  zTtk Treeview widget displays a hierarchical collection of items.

Each item has a textual label, an optional image, and an optional list
of data values. The data values are displayed in successive columns
after the tree label.Nc                 2    [         R                  XSU5        g)aJ  Construct a Ttk Treeview with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus, xscrollcommand,
    yscrollcommand

WIDGET-SPECIFIC OPTIONS

    columns, displaycolumns, height, padding, selectmode, show

ITEM OPTIONS

    text, image, values, open, tags

TAG OPTIONS

    foreground, background, font, image
zttk::treeviewNr   r   s      r&   r   Treeview.__init__  s    ( 	or:r(   c                     U R                  U R                  R                  U R                  SX5      5      =(       d    S$ )a4  Returns the bounding box (relative to the treeview widget's
window) of the specified item in the form x y width height.

If column is specified, returns the bounding box of that cell.
If the item is not visible (i.e., if it is a descendant of a
closed item or is scrolled offscreen), returns an empty string.r  r4   r  )r   itemcolumns      r&   r  Treeview.bbox  s-     }}TWW\\$''64HIOROr(   c                     U R                   R                  U R                   R                  U R                  SU=(       d    S5      =(       d    S5      $ )z`Returns a tuple of children belonging to item.

If item is not specified, returns root children.rQ   r4   rA   r[  r   r  s     r&   get_childrenTreeview.get_children  s>     ww  TWWj$*"=CE 	Er(   c                 R    U R                   R                  U R                  SX5        g)zReplaces item's child with newchildren.

Children present in item that are not present in newchildren
are detached from tree. No items in newchildren may be an
ancestor of item.rQ   Nr   )r   r  newchildrens      r&   set_childrenTreeview.set_children  s     	TWWj$<r(   c                 T    Ub  SX2'   [        U R                  X0R                  SU5      $ )zQuery or modify the options for the specified column.

If kw is not given, returns a dict of the column option values. If
option is specified then the value for that option is returned.
Otherwise, sets the options to the corresponding values.Nr  rW  )r   r  r   rH   s       r&   r  Treeview.column  s*     BJDGGR(FCCr(   c                 R    U R                   R                  U R                  SU5        g)zWDelete all specified items and all their descendants. The root
item may not be deleted.deleteNr   r   r+   s     r&   r  Treeview.delete  s     	TWWh.r(   c                 R    U R                   R                  U R                  SU5        g)zUnlinks all of the specified items from the tree.

The items and all of their descendants are still present, and may
be reinserted at another point in the tree, but will not be
displayed. The root item may not be detached.detachNr   r  s     r&   r  Treeview.detach  s     	TWWh.r(   c                     U R                   R                  U R                   R                  U R                  SU5      5      $ )zKReturns True if the specified item is present in the tree,
False otherwise.existsr  r  s     r&   r  Treeview.exists  s.     ww!!$'',,tww$"GHHr(   c                 P    U R                   R                  U R                  SU5      $ )zuIf item is specified, sets the focus item to item. Otherwise,
returns the current focus item, or '' if there is none.focusr   r  s     r&   r  Treeview.focus  s     ww||DGGWd33r(   c                     UR                  S5      nU(       a=  [        U[        5      (       d(  U R                  R	                  X@R
                  5      US'   Ub  SX2'   [        U R                  X0R                  SU5      $ )a  Query or modify the heading options for the specified column.

If kw is not given, returns a dict of the heading option values. If
option is specified then the value for that option is returned.
Otherwise, sets the options to the corresponding values.

Valid options/values are:
    text: text
        The text to display in the column heading
    image: image_name
        Specifies an image to display to the right of the column
        heading
    anchor: anchor
        Specifies how the heading text should be aligned. One of
        the standard Tk anchor values
    command: callback
        A callback to be invoked when the heading label is
        pressed.

To configure the tree column heading, call this with column = "#0" commandNheading)	ra   r!   rn   r   register_substituter   r|   r   )r   r  r   rH   cmds        r&   r  Treeview.heading  se    * ffYz#s++ KK006F6FGByMBJDGGR)VDDr(   c                 R    U R                   R                  U R                  SXU5      $ )zReturns a description of the specified component under the
point given by x and y, or the empty string if no such component
is present at that position.r   r   )r   	componentr   r   s       r&   r   Treeview.identify  s!     ww||DGGZqAAr(   c                 (    U R                  SSU5      $ )z.Returns the item ID of the item at position y.rowr   r   )r   r   s     r&   identify_rowTreeview.identify_row  s    }}UAq))r(   c                 (    U R                  SUS5      $ )zYReturns the data column identifier of the cell at position x.

The tree column has ID #0.r  r   r  )r   r   s     r&   identify_columnTreeview.identify_column  s     }}Xq!,,r(   c                 &    U R                  SX5      $ )zReturns one of:

heading: Tree heading area.
separator: Space between two columns headings;
tree: The tree area.
cell: A data cell.

* Availability: Tk 8.6regionr  r   s      r&   identify_regionTreeview.identify_region  s     }}Xq,,r(   c                 &    U R                  SX5      $ )z=Returns the element at position x, y.

* Availability: Tk 8.6r   r  r   s      r&   identify_elementTreeview.identify_element&  s     }}Y--r(   c                     U R                   R                  U R                   R                  U R                  SU5      5      $ )zGReturns the integer index of item within its parent's list
of children.r  rJ  r  s     r&   r  Treeview.index-  s,     ww~~dggll477GTBCCr(   c                     [        U5      nUb-  U R                  R                  " U R                  SXSU/UQ76 nU$ U R                  R                  " U R                  SX/UQ76 nU$ )a`  Creates a new item and return the item identifier of the newly
created item.

parent is the item ID of the parent item, or the empty string
to create a new top-level item. index is an integer, or the value
end, specifying where in the list of parent's children to insert
the new item. If index is less than or equal to zero, the new node
is inserted at the beginning, if index is greater than or equal to
the current number of children, it is inserted at the end. If iid
is specified, it is used as the item identifier, iid must not
already exist in the tree. Otherwise, a new unique identifier
is generated.rM  z-id)r1   r|   r   r   )r   r   r  iidrH   r/   r~   s          r&   rM  Treeview.insert3  si     r"?'',,tww&s#!#C
 
 '',,tww&G$GC
r(   c                 T    Ub  SX2'   [        U R                  X0R                  SU5      $ )a  Query or modify the options for the specified item.

If no options are given, a dict with options/values for the item
is returned. If option is specified then the value for that option
is returned. Otherwise, sets the options to the corresponding
values as given by kw.Nr  rW  )r   r  r   rH   s       r&   r  Treeview.itemJ  rh  r(   c                 T    U R                   R                  U R                  SXU5        g)a2  Moves item to position index in parent's list of children.

It is illegal to move an item under one of its descendants. If
index is less than or equal to zero, item is moved to the
beginning, if greater than or equal to the number of children,
it is moved to the end. If item was detached it is reattached.moveNr   )r   r  r   r  s       r&   r  Treeview.moveV  s     	TWWfdE:r(   c                 P    U R                   R                  U R                  SU5      $ )z]Returns the identifier of item's next sibling, or '' if item
is the last child of its parent.nextr   r  s     r&   r  Treeview.nextb       ww||DGGVT22r(   c                 P    U R                   R                  U R                  SU5      $ )zYReturns the ID of the parent of item, or '' if item is at the
top level of the hierarchy.r   r   r  s     r&   r   Treeview.parenth  s     ww||DGGXt44r(   c                 P    U R                   R                  U R                  SU5      $ )zbReturns the identifier of item's previous sibling, or '' if
item is the first child of its parent.prevr   r  s     r&   r  Treeview.prevn  r  r(   c                 R    U R                   R                  U R                  SU5        g)zEnsure that item is visible.

Sets all of item's ancestors open option to True, and scrolls
the widget if necessary so that item is within the visible
portion of the tree.seeNr   r  s     r&   r  Treeview.seet  s     	TWWeT*r(   c                     U R                   R                  U R                   R                  U R                  S5      5      $ )z$Returns the tuple of selected items.	selectionr[  r   s    r&   r  Treeview.selection}  s*    ww  dgg{!CDDr(   c                     [        U5      S:X  a#  [        US   [        [        45      (       a  US   nU R                  R                  U R                  SX5        g )Nr3   r   r  )r6   r!   r#   r"   r|   r   r   )r   selopr+   s      r&   
_selectionTreeview._selection  sB    u:?z%(UDMBB!HETWWk58r(   c                 (    U R                  SU5        g)z.The specified items becomes the new selection.r%  Nr  r  s     r&   selection_setTreeview.selection_set      u%r(   c                 (    U R                  SU5        g)z0Add all of the specified items to the selection.r;  Nr  r  s     r&   selection_addTreeview.selection_add  r  r(   c                 (    U R                  SU5        g)z5Remove all of the specified items from the selection.removeNr  r  s     r&   selection_removeTreeview.selection_remove      %(r(   c                 (    U R                  SU5        g)z2Toggle the selection state of each specified item.toggleNr  r  s     r&   selection_toggleTreeview.selection_toggle  r  r(   c                     U R                   R                  U R                  SXU5      nUc  Uc  [        U R                   US[        S9$ U$ )a  Query or set the value of given item.

With one argument, return a dictionary of column/value pairs
for the specified item. With two arguments, return the current
value of the specified column. With three arguments, set the
value of given column in given item to the specified value.r%  F)	cut_minusr   )r|   r   r   r   r   )r   r  r  r$   r~   s        r&   r%  Treeview.set  sL     ggll477E4?>emdggs(-MC C Jr(   c                 B    U R                  U R                  SSU4X#SS9  g)zBind a callback for the given event sequence to the tag tagname.
When an event is delivered to an item, the callbacks for each
of the item's tags option are called.tagbindr   )r;  N)_bindr   )r   tagnamesequencer   s       r&   tag_bindTreeview.tag_bind  s#     	

DGGUFG4ha
Pr(   c                 V    Ub  SX2'   [        U R                  X0R                  SSU5      $ )a"  Query or modify the options for the specified tagname.

If kw is not given, returns a dict of the option settings for tagname.
If option is specified, returns the value for that option for the
specified tagname. Otherwise, sets the options to the corresponding
values for the given tagname.Nr  r]   rW  )r   r  r   rH   s       r&   tag_configureTreeview.tag_configure  s1     BJDGGR% 	r(   c           	         UcA  U R                   R                  U R                   R                  U R                  SSU5      5      $ U R                   R	                  U R                   R                  U R                  SSX5      5      $ )zIf item is specified, returns 1 or 0 depending on whether the
specified item has the given tagname. Otherwise, returns a list of
all items which have the specified tag.

* Availability: Tk 8.6r  has)r|   ry   r   r   r   )r   r  r  s      r&   tag_hasTreeview.tag_has  so     <77$$TWWeUG<> > 77%%TWWeUGBD Dr(   rA   r   r   )(r   r   r   r   r   r   r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  rM  r  r  reattachr  r   r  r  r  r  r  r  r  r  r%  r  r  r  r   rA   r(   r&   r   r     s    ;.PE=D//I4E@B*
-	-.D.	@; H353+E
9&
&
)
)
Q
Dr(   r   c                   p   ^  \ rS rSrSrS	S jrU 4S jrS r\S 5       r	\	R                  S 5       r	SrU =r$ )
r   i  zA Ttk Scale widget with a Ttk Label widget indicating its
current value.

The Ttk Scale can be accessed through instance.scale, and Ttk Label
can be accessed through instance.labelc                 \   UR                  SS5      S:H  U l        [        R                  " X40 UD6  U=(       d    [        R
                  " U5      U l        U R                  R                  U5        X0l        [        U 5      U l
        [        X R                  X4S9U l        U R                  R                  SU R                  5        U R                  (       a  SOSnUS:X  a  SOSnU R                  R                  USS9  [        U 5      nUR                  US9  UR!                  5         U R                  R#                  US:X  a  S	OS
S9  U R                  R%                  SU R                  5      U l        U R                  SU R                  5        U R                  SU R                  5        g)aO  Construct a horizontal LabeledScale with parent master, a
variable to be associated with the Ttk Scale widget and its range.
If variable is not specified, a tkinter.IntVar is created.

WIDGET-SPECIFIC OPTIONS

    compound: 'top' or 'bottom'
        Specifies how to display the label relative to the scale.
        Defaults to 'top'.
compoundtop)variabler  r  r  bottomr   )sidefill)r  r   re   )anchorwritez<Configure>z<Map>N)pop
_label_topr   r   r   IntVar	_variabler%  _last_validr   labelr   scaler	  _adjustpacklowerplace	trace_add_LabeledScale__tracecb)	r   r   r  r  r  rH   
scale_side
label_sidedummys	            r&   r   LabeledScale.__init__  s>    &&U3u<t*r*!;W^^F%;5! 4[
4..M


*DLL9 "&Xe
(H4U(


Zc2d



#

zU':D 11'4<<H		-.		'4<<(r(   c                    >  U R                   R                  SU R                  5        U ? [        TU ]  5         SU l        SU l        g! [         a     N)f = f)z9Destroy this widget and possibly its associated variable.r   N)r$  trace_remover-  AttributeErrorsuperdestroyr&  r'  r   	__class__s    r&   r6  LabeledScale.destroy  sS    	NN''@ 

  		s   &A 
AAc                 B  ^  U 4S jn[        T R                  S   5      n[        T R                  S   5      nXC:  a  XCpCT R                  R                  5       nX5s=::  a  U::  d  O  T R                  T l        gUT l        UT R                  S'   T R                  U5        g)z1Adjust the label position according to the scale.c                    > TR                  5         TR                  R                  5       u  pTR                  (       a6  TR                  R	                  5       TR
                  R                  5       -
  nO5TR                  R                  5       TR
                  R                  5       -   nTR
                  R                  XS9  g )N)r   r   )update_idletasksr'  coordsr"  winfo_yr&  winfo_reqheightplace_configure)r   r   r   s     r&   adjust_label*LabeledScale._adjust.<locals>.adjust_label  s    !!#::$$&DAJJ&&(4::+E+E+GGJJ..04::3M3M3OOJJ&&&0r(   rE   r  Ntext)r   r'  r$  ra   r%  r$   r&  
after_idle)r   rG   rA  r  r  newvals   `     r&   r(  LabeledScale._adjust
  s    		1 4::f-.

4():2##%$"$))DJ!#

6%r(   c                 6    U R                   R                  5       $ )zReturn current scale value.)r$  ra   r   s    r&   r$   LabeledScale.value%  s     ~~!!##r(   c                 :    U R                   R                  U5        g)zSet new scale value.N)r$  r%  )r   r:   s     r&   r$   rH  *  s     	3r(   )	__tracecbr"  r%  r$  r&  r'  r$   )NNr   
   )r   r   r   r   r   r   r6  r(  propertyr$   setterr   __classcell__r8  s   @r&   r   r     sD    .#)L
&6 $ $ \\   r(   r   c                   F   ^  \ rS rSrSrSS jrS rSS jrU 4S jrSr	U =r
$ )	r   i0  ziThemed OptionMenu, based after tkinter's OptionMenu, which allows
the user to select a value from a menu.c           	         X%R                  SS5      UR                  SS5      S.n[        R                  " X40 UD6  [        R                  " U SS9U S'   X l        UR                  SS5      U l        U(       a9  [        R                  " S	[        [        UR                  5       5      5      -  5      eU R                  " U/UQ76   g)
a  Construct a themed OptionMenu widget with master as the parent,
the option textvariable set to variable, the initially selected
value specified by the default parameter, the menu values given by
*values and additional keywords.

WIDGET-SPECIFIC OPTIONS

    style: stylename
        Menubutton style.
    direction: 'above', 'below', 'left', 'right', or 'flush'
        Menubutton direction.
    command: callback
        A callback that will be invoked after selecting an item.
r   N	direction)textvariabler   rR  F)tearoffmenur  zunknown option -%s)r!  r
   r   r   Menur$  	_callbackTclErrorr  ro   keysset_menu)r   r   r  r   valueskwargsrH   s          r&   r   OptionMenu.__init__4  s     'GT1J!::k48:D/B/||D%8V!It4""#7T&++-()$+ , , 	g''r(   c                     US:X  a$  U R                  [        R                  X5      5      $ [        R                  X5      $ )NrU  )nametowidgetr
   __getitem__r  s     r&   r`  OptionMenu.__getitem__Q  s6    6>$$Z%;%;D%GHH%%d11r(   c                    ^  T S   nUR                  SS5        U H4  nUR                  UT R                  c  SOU4U 4S jjT R                  S9  M6     U(       a  T R                  R	                  U5        gg)zMBuild a new menu of radiobuttons with *values and optionally
a default value.rU  r   endNc                 &   > TR                  U 5      $ r   )rW  )r:   r   s    r&   <lambda>%OptionMenu.set_menu.<locals>.<lambda>a  s    )<r(   )r&  r  r  )r  add_radiobuttonrW  r$  r%  )r   r   r[  rU  r:   s   `    r&   rZ  OptionMenu.set_menuX  sp     F|AuC  s NN2D$'< ! )  NNw' r(   c                 H   >  U ? [        TU ]  5         g! [         a     Nf = f)z0Destroy this widget and its associated variable.N)r$  r4  r5  r6  r7  s    r&   r6  OptionMenu.destroyi  s-    	 	  		s    
!!)rW  r$  r   )r   r   r   r   r   r   r`  rZ  r6  r   rN  rO  s   @r&   r   r   0  s!    /(:2(" r(   r   )F)FN)r   rw   r   )3r   __version__
__author____all__r   r   r   r   r   r'   r1   r;   r?   rO   rS   rk   ru   r{   r   r   r   r   r   r   objectr   r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   XViewYViewr   r   r   rA   r(   r&   <module>rq     s   0
,  ; ; *")X/%b(T(83 	a1F a1H<QW^^ <Q~/V /0/& /:'EFGMM 'ET",u ",J8F 8$8F 8&= =$ 
= =&B@v B@J6O&'-- 6Op '&& '&T/& /8%2FGMM %2P<)) <"< <$;v ;,e ,6CDvw}}gmm CDP
] 5 ] @? ?r(   