usr/lib64/python2.7/lib-tk/ttk.pyo000064400000172244147204754450012610 0ustar00 zfc@sYdZdZdZddddddd d d d d dddddddddddddgZddlZddlmZmZmZmZej dkre ne Z dZ e d Ze ed!Zd"Ze d#Ze d$Zd%d&d'Zd(Zd)Zd*Zd+Zd,Zd-Zd.Zd/Zed0Zdefd1YZd2ej fd3YZ de fd4YZ!de fd5YZ"de ej#fd6YZ#de#fd7YZ$de fd8YZ%de fd9YZ&d e fd:YZ'e'Z(d e fd;YZ)d e fd<YZ*d e ej+fd=YZ,e,Z+de fd>YZ-de fd?YZ.de ej/fd@YZ/de ej0fdAYZ0de fdBYZ1de fdCYZ2de ej3ej4fdDYZ5de%efdEYZ6de)fdFYZ7dS(GsTtk 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. s0.3.1s!Guilherme Polo tButtont CheckbuttontComboboxtEntrytFrametLabelt Labelframet LabelFramet MenubuttontNotebookt Panedwindowt PanedWindowt Progressbart RadiobuttontScalet Scrollbart SeparatortSizegriptStyletTreeviewt LabeledScalet OptionMenut tclobjs_to_pyt setup_masteriN(t_flattent_joint _stringifyt _splitdictg!@cCsatr]ddl}|jjd}|rA|jjd|n|jjdt|_ndS(Nit TILE_LIBRARYs(global auto_path; lappend auto_path {%s}spackage require tile(t _REQUIRE_TILEtostenvirontgetttktevaltTruet _tile_loaded(tmasterRttilelib((s"/usr/lib64/python2.7/lib-tk/ttk.pyt _load_tile"s   cCs=|rt|}n$t|ttfr9t|}n|S(sInternal function.(Rt isinstancetlistttupleR(tvaluetscript((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_format_optvalue1s cCsyg}xf|jD]X\}}| s2||kr|jd||dk rk|jt||qkqqWt|S(sFormats 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-%sN(t iteritemstappendtNoneR-R(toptdictR,tignoretoptstoptR+((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_format_optdict;s  cCsg}x|D]}|d }|d}|dt|dkrT|dpNd}ndj|}|j||dk r |j|q q W|S(Niiitt (tlentjoinR/R0(titemstopt_valtitemtstatetval((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_mapdict_valuesKs     cCsSg}x@|jD]2\}}|jd|tt||fqWt|S(sFormats 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}')s-%s(R.textendR-R?R(tmapdictR,R3R4R+((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_format_mapdictds  c Osd }d }|d kr|dkrW|d}tt|d}d||f}n9|d \}} tt|d} d|| | f}t||}nD|dkr|d}t|dkrt|d|f}qn|rd |}d j|}n||fS(sAFormats args and kw according to the given element factory etype.timagetvsapiiis%s %sis%s %s %stfroms{%s}R7N((RCRD(R0RR?R5R8R-R9( tetypeR,targstkwtspecR3tinamet imagespect class_nametpart_idtstatemap((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_format_elemcreateus&      iic Csg}x|D]}|\}}|p(i}djt|td }dd|||rcd|ndf}d|kr|j|d||7}t|d||\} }|j| ||8}|jdd|q |j|q Wdj||fS( s$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 rightR7tchildrens%s%s%ss %sR6s -children {s%s}s (RP(R9R5R#R/t_format_layoutlist( tlayouttindentt indent_sizeR,t layout_elemtelemR3tfoptstheadt newscript((s"/usr/lib64/python2.7/lib-tk/ttk.pyRQs    '     c Csg}x|jD]\}}|jdrddjt|dt}|jd||fn|jdrdjt|dt}|jd||fnd|kr|dsd}nt|d\}}|jd||fn|jd r|d }|d }d }x4|t|krWt ||d  rW|d 7}q$W|d |!} |t|kr||r||ni} t |t| | \} }|jd ||| |fqqWdj|S(sReturns an appropriate script, based on settings, according to theme_settings definition to be used by theme_settings and theme_create.t configureR7sttk::style configure %s %s;tmapsttk::style map %s %s;RRtnullsttk::style layout %s { %s }selement createiiR.s%ttk::style element create %s %s %s %ss ( R.R R9R5R#R/RBRQR8thasattrRO( tsettingsR,tnameR3tst_teoptsRFtargctelemargstelemkwRI((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_script_from_settingss2     ) , cCsg}xp|D]h}t|dd}|dkrA|j|q t|}|dkrh|j}n|j|q Wt|}gt||D]}t|^qS(stConstruct a list from the given statespec tuple according to the accepted statespec accepted by _format_mapdict.ttypenamet StateSpecN(tgetattrR0R/tstrtsplittitertzipR(tstupletnvalR>RgtitRI((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_list_from_statespecs     cCs|j|}g}d}x|t|kr||}i}|j||f|d7}x||t|kr|||d!\}}|jdsPn|d}|d7}|dkrt||}n|||((s"/usr/lib64/python2.7/lib-tk/ttk.pyRus$     cGsFt|}|j||}t|dr3|St||dtS(shFormat 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.itconv(R5tcallR8Rt _tclobj_to_py(R!toptionsRGRw((s"/usr/lib64/python2.7/lib-tk/ttk.pyt _val_or_dict"s  cCs:t|}yt|}Wnttfk r5nX|S(sAConverts a value to, hopefully, a more appropriate Python object.(tunicodetintt ValueErrort TypeError(R+((s"/usr/lib64/python2.7/lib-tk/ttk.pyt_convert_stringval2s  cCs=t|tr9d|kr*t|}q9t|}n|S(Nt.(R(RjtfloatR(tx((s"/usr/lib64/python2.7/lib-tk/ttk.pyt _to_number<s  cCs|rbt|drbt|t rbt|ddddkrPt|}qtt|}nt|drt|}n|S(s8Return value converted from Tcl object to Python object.t__len__iRgRhN(R]R(t basestringRiR0RqR[R(R>((s"/usr/lib64/python2.7/lib-tk/ttk.pyR{Ds%cCs1x*|jD]\}}t|||((s"/usr/lib64/python2.7/lib-tk/ttk.pyRQscCs@|dkr<tjr-tjp'tj}q<tdn|S(sIf 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.sINo master specified and Tkinter is configured to not support default rootN(R0tTkintert_support_default_roott _default_roottTkt RuntimeError(R%((s"/usr/lib64/python2.7/lib-tk/ttk.pyRYs    cBseZdZdZddZddZddZdddZddZ dZ dZ d Z ddd Z d Zd Zdd ZRS(sManipulate style database.s ttk::stylecCsGt|}t|dts+t|n||_|jj|_dS(NR$(RRitFalseR'R%R!(tselfR%((s"/usr/lib64/python2.7/lib-tk/ttk.pyt__init__os    cKs5|dk rd||t|jj|jj|jd|d|St|j|jj|jd|t|dtS(sSQuery 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[s-%sRyN( R0RqR!RsRzRRRBR{(RRRRH((s"/usr/lib64/python2.7/lib-tk/ttk.pyR[s  &$cCsA|rdj|nd}|jj|jd|d|||S(sReturns 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.R7R6tlookups-%s(R9R!RzR(RRtoptionR=tdefault((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscCs\d}|rt|d}n|dk r4d}nt|j|jj|jd||S(sDefine 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.iR\RRN(R0RQRuR!RzR(RRt layoutspectlspec((s"/usr/lib64/python2.7/lib-tk/ttk.pyRRs    cOsDt|t||\}}|jj|jdd||||dS(s9Create a new element in the current theme of given etype.telementtcreateN(RORR!RzR(Rt elementnameRFRGRHRIR3((s"/usr/lib64/python2.7/lib-tk/ttk.pytelement_createscCs%|jj|jj|jddS(s:Returns the list of elements defined in the current theme.Rtnames(R!RsRzR(R((s"/usr/lib64/python2.7/lib-tk/ttk.pyt element_namesscCs(|jj|jj|jdd|S(s)Return the list of elementname's options.RR|(R!RsRzR(RR((s"/usr/lib64/python2.7/lib-tk/ttk.pytelement_optionssc Cso|rt|nd}|rI|jj|jdd|d|d|n"|jj|jdd|d|dS(s.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.R6tthemeRs-parents -settingsN(RfR!RzR(Rt themenametparentR^R,((s"/usr/lib64/python2.7/lib-tk/ttk.pyt theme_creates cCs/t|}|jj|jdd||dS(sTemporarily 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.RR^N(RfR!RzR(RRR^R,((s"/usr/lib64/python2.7/lib-tk/ttk.pyttheme_settingss cCs%|jj|jj|jddS(s#Returns a list of all known themes.RR(R!RsRzR(R((s"/usr/lib64/python2.7/lib-tk/ttk.pyt theme_namesscCs3|dkr|jjdS|jjd|dS(sIf themename is None, returns the theme in use, otherwise, set the current theme to themename, refreshes all widgets and emits a <> event.sreturn $ttk::currentThemes ttk::setThemeN(R0R!R"Rz(RR((s"/usr/lib64/python2.7/lib-tk/ttk.pyt theme_uses N(t__name__t __module__t__doc__RR0RRZR[RRRRRRRRRR(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRjs  +    tWidgetcBs;eZdZddZdZddZddZRS(s!Base class for Tk themed widgets.cCsKt|}t|dts+t|ntjj|||d|dS(sConstructs 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 R$RHN(RRiRR'RRR(RR%t widgetnameRH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs  cCs|jj|jd||S(sReturns 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.tidentify(R!Rzt_w(RRty((s"/usr/lib64/python2.7/lib-tk/ttk.pyR.scOsM|jj|jj|jddj|}|rI|rI|||S|S(s1Test 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.tinstateR7(R!t getbooleanRzRR9(Rt statespectcallbackRGRHtret((s"/usr/lib64/python2.7/lib-tk/ttk.pyR6s  '  cCsI|dk rdj|}n|jjt|jj|jd|S(sModify 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.R7R=N(R0R9R!RsRjRzR(RR((s"/usr/lib64/python2.7/lib-tk/ttk.pyR=Es N(RRRR0RRRR=(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs    cBs#eZdZddZdZRS(scTtk Button widget, displays a textual label and/or image, and evaluates a command when pressed.cKstj||d|dS(sConstruct 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 s ttk::buttonN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRVs cCs|jj|jdS(s/Invokes the command associated with the button.tinvoke(R!RzR(R((s"/usr/lib64/python2.7/lib-tk/ttk.pyResN(RRRR0RR(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRRs cBs#eZdZddZdZRS(s;Ttk Checkbutton widget which is either in on- or off-state.cKstj||d|dS(s'Construct 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 sttk::checkbuttonN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRms cCs|jj|jdS(sWToggles 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!RzR(R((s"/usr/lib64/python2.7/lib-tk/ttk.pyR|sN(RRRR0RR(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRjs cBs8eZdZdddZdZdZdZRS(seTtk Entry widget displays a one-line text string and allows that string to be edited by the user.cKs tj|||pd|dS(sConstructs 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 s ttk::entryN(RR(RR%twidgetRH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscCs"|j|jj|jd|S(sqReturn a tuple of (x, y, width, height) which describes the bounding box of the character given by index.tbbox(t_getintsR!RzR(Rtindex((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscCs|jj|jd||S(sxReturns the name of the element at position x, y, or the empty string if the coordinates are outside the window.R(R!RzR(RRR((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscCs"|jj|jj|jdS(sForce 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.tvalidate(R!RRzR(R((s"/usr/lib64/python2.7/lib-tk/ttk.pyRsN(RRRR0RRRR(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs   cBs/eZdZddZddZdZRS(sMTtk Combobox widget combines a text field with a pop-down list of values.cKstj||d|dS(sConstruct 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 s ttk::comboboxN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs cCsG|dkr.|jj|jj|jdS|jj|jd|S(sIf 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.tcurrentN(R0R!tgetintRzR(Rtnewindex((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs "cCs|jj|jd|dS(s(Sets the value of the combobox to value.tsetN(R!RzR(RR+((s"/usr/lib64/python2.7/lib-tk/ttk.pyRsN(RRRR0RRR(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs  cBseZdZddZRS(sJTtk Frame widget is a container, used to group other widgets together.cKstj||d|dS(sConstruct a Ttk Frame with parent master. STANDARD OPTIONS class, cursor, style, takefocus WIDGET-SPECIFIC OPTIONS borderwidth, relief, padding, width, height s ttk::frameN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs N(RRRR0R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscBseZdZddZRS(s7Ttk Label widget displays a textual label and/or image.cKstj||d|dS(sGConstruct 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 s ttk::labelN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs N(RRRR0R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscBseZdZddZRS(sTtk 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.cKstj||d|dS(sConstruct a Ttk Labelframe with parent master. STANDARD OPTIONS class, cursor, style, takefocus WIDGET-SPECIFIC OPTIONS labelanchor, text, underline, padding, labelwidget, width, height sttk::labelframeN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs N(RRRR0R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscBseZdZddZRS(sbTtk Menubutton widget displays a textual label and/or image, and displays a menu when pressed.cKstj||d|dS(sConstruct a Ttk Menubutton with parent master. STANDARD OPTIONS class, compound, cursor, image, state, style, takefocus, text, textvariable, underline, width WIDGET-SPECIFIC OPTIONS direction, menu sttk::menubuttonN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs N(RRRR0R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyR scBszeZdZd dZdZdZdZdZdZ dZ d dZ d d Z d Z d ZRS( sTtk 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.cKstj||d|dS(s\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) s ttk::notebookN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyR%scKs&|jj|jd|t|dS(sAdds a new tab to the notebook. If window is currently managed by the notebook but hidden, it is restored to its previous position.taddN(R!RzRR5(RtchildRH((s"/usr/lib64/python2.7/lib-tk/ttk.pyREscCs|jj|jd|dS(sXRemoves the tab specified by tab_id, unmaps and unmanages the associated window.tforgetN(R!RzR(Rttab_id((s"/usr/lib64/python2.7/lib-tk/ttk.pyRMscCs|jj|jd|dS(sHides 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.thideN(R!RzR(RR((s"/usr/lib64/python2.7/lib-tk/ttk.pyRSscCs|jj|jd||S(sZReturns the name of the tab element at position x, y, or the empty string if none.R(R!RzR(RRR((s"/usr/lib64/python2.7/lib-tk/ttk.pyR\scCs%|jj|jj|jd|S(s|Returns 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!RRzR(RR((s"/usr/lib64/python2.7/lib-tk/ttk.pyRbscKs)|jj|jd||t|dS(sInserts 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.tinsertN(R!RzRR5(RtposRRH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRhscCs|jj|jd|S(sSelects 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.tselect(R!RzR(RR((s"/usr/lib64/python2.7/lib-tk/ttk.pyRqscKs5|dk rd||> event.REtfrom_ttos<>N(tupdateRRZtanytevent_generate(RtcnfRH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRZ8s 'cCs|jj|jd||S(sGet 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.R (R!RzR(RRR((s"/usr/lib64/python2.7/lib-tk/ttk.pyR DsN(RRRR0RRZR (((s"/usr/lib64/python2.7/lib-tk/ttk.pyR&s  cBseZdZddZRS(s;Ttk Scrollbar controls the viewport of a scrollable widget.cKstj||d|dS(sConstruct a Ttk Scrollbar with parent master. STANDARD OPTIONS class, cursor, style, takefocus WIDGET-SPECIFIC OPTIONS command, orient sttk::scrollbarN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRPs N(RRRR0R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRMscBseZdZddZRS(sITtk Separator widget displays a horizontal or vertical separator bar.cKstj||d|dS(sConstruct a Ttk Separator with parent master. STANDARD OPTIONS class, cursor, style, takefocus WIDGET-SPECIFIC OPTIONS orient sttk::separatorN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRbs N(RRRR0R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyR^scBseZdZddZRS(slTtk Sizegrip allows the user to resize the containing toplevel window by pressing and dragging the grip.cKstj||d|dS(sConstruct a Ttk Sizegrip with parent master. STANDARD OPTIONS class, cursor, state, style, takefocus s ttk::sizegripN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRtsN(RRRR0R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRpscBsdeZdZd!dZd!dZd!dZdZd!dZdZ dZ dZ d!d Z d!d Z d Zd Zd ZdZdZdZd!dZd!dZdZeZdZdZdZdZd!d!dZdZdZdZdZ d!d!dZ!d!d!dZ"d!dZ#d!d Z$RS("sTtk 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.cKstj||d|dS(sConstruct 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 s ttk::treeviewN(RR(RR%RH((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscCs+|j|jj|jd||p*dS(sTReturns 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.RR6(RR!RzR(RR<tcolumn((s"/usr/lib64/python2.7/lib-tk/ttk.pyRscCs1|jj|jj|jd|p$dp-dS(shReturns a tuple of children belonging to item. If item is not specified, returns root children.RPR6((R!RsRzR(RR<((s"/usr/lib64/python2.7/lib-tk/ttk.pyt get_childrens cGs |jj|jd||dS(sReplaces 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.RPN(R!RzR(RR<t newchildren((s"/usr/lib64/python2.7/lib-tk/ttk.pyt set_childrenscKs5|dk rd||>tbottomtsidetfillRtanchortnR`tws sN(tpopt _label_topRRRtIntVart _variableRt _last_validRtlabelRtscaleRt_adjusttpacktplacettrace_variablet_LabeledScale__tracecb( RR%RRRRHt scale_sidet label_sidettmp((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs  $%cCsWy|jjd|jWntk r-nX|`tj|d|_d|_dS(s9Destroy this widget and possibly its associated variable.R N( Rt trace_vdeleteRtAttributeErrorRtdestroyR0RR(R((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs   csfd}tjd}tjd}||krQ||}}njj}||kow|knsj_dS|_|jd<j|dS(s1Adjust the label position according to the scale.csjjj\}}jrGjjjj}njjjj}jjd|d|dS(NRR(tupdate_idletasksRtcoordsRtwinfo_yRtwinfo_reqheighttplace_configure(RR(R(s"/usr/lib64/python2.7/lib-tk/ttk.pyt adjust_labels   RERNttext(RRRR RR+Rt after_idle(RRGR$RRtnewval((Rs"/usr/lib64/python2.7/lib-tk/ttk.pyRs     cCs |jjS(sReturn current scale value.(RR (R((s"/usr/lib64/python2.7/lib-tk/ttk.pyt _get_valuescCs|jj|dS(sSet new scale value.N(RR(RR>((s"/usr/lib64/python2.7/lib-tk/ttk.pyt _set_valuesN( RRRR0RRRR(R)tpropertyR+(((s"/usr/lib64/python2.7/lib-tk/ttk.pyRs#    cBs8eZdZddZdZddZdZRS(smThemed OptionMenu, based after Tkinter's OptionMenu, which allows the user to select a value from a menu.cOsi|d6|jddd6|jddd6}tj|||tj|dt|d<||_|jdd|_|rtj d|j j n|j ||dS( s9Construct a themed OptionMenu widget with master as the parent, the resource 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. t textvariableRt directionttearofftmenuRsunknown option -%sN( R R0RRRtMenuRRt _callbacktTclErrortiterkeysRtset_menu(RR%RRtvaluestkwargsRH((s"/usr/lib64/python2.7/lib-tk/ttk.pyR&s  cCs5|dkr%|jtj||Stj||S(NR.(t nametowidgetRt __getitem__(RR<((s"/usr/lib64/python2.7/lib-tk/ttk.pyR7Cs c Gs||d}|jddxB|D]:}|jd|dtj|j||jd|jq!W|rx|jj|ndS(sUBuild a new menu of radiobuttons with *values and optionally a default value.R.itendRRRN(Rtadd_radiobuttonRt_setitRR0R(RRR4R.R>((s"/usr/lib64/python2.7/lib-tk/ttk.pyR3Js  cCs/y |`Wntk rnXtj|dS(s0Destroy this widget and its associated variable.N(RRRR(R((s"/usr/lib64/python2.7/lib-tk/ttk.pyRXs   N(RRRR0RR7R3R(((s"/usr/lib64/python2.7/lib-tk/ttk.pyR"s    (8Rt __version__t __author__t__all__RRRRRt TkVersionR#RRR'R-R0R5R?RBRORQRfRqRuR}RRR{RRtobjectRRRRRRRRRRRR R R R R RRRRtXViewtYViewRRR(((s"/usr/lib64/python2.7/lib-tk/ttk.pyt sf   "     %1 *      B*"8*'"Da