python (3.12.0)

(root)/
lib/
python3.12/
idlelib/
__pycache__/
configdialog.cpython-312.opt-1.pyc

̑edZddlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z ddl!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.ddlm/Z/ddl0m1Z2ddlm3Z3ddl4m5Z5m6Z6ddl7m8Z8dd	l9m:Z:dd
l;m<Z<ddl=m>Z>m?Z?ddl@mAZAdd
lBmCZCddlDmEZEddlFmGZGddlHmIZIddlJmKZKddl@mLZLe6ZMeCeEeGeIeKfZNGddeZOdaPGdde"ZQGdde"ZRGdde"ZSGdde"ZTGdde"ZUGd d!e"ZVGd"d#e#ZWGd$d%ZXeXZYd&ZZd'd(d)d*d+d,Z[d-Z\Gd.d/e"Z]e^d0k(r dd1l_m`Z`e`d2d3d45dd6lambZbebeOyy)7aIDLE Configuration Dialog: support user customization of IDLE by GUI

Customize font faces, sizes, and colorization attributes.  Set indentation
defaults.  Customize keybindings.  Colorization and keybindings can be
saved as user defined sets.  Select startup options including shell/editor
and default window size.  Define additional help sources.

Note that tab width in IDLE is currently fixed at eight due to Tk issues.
Refer to comments in EditorWindow autoindent code for details.

N)ToplevelListboxCanvas	StringVar
BooleanVarIntVarTRUEFALSETOPBOTTOMRIGHTLEFTSOLIDGROOVENONEBOTHXYWEEWNSNSEWNW
HORIZONTALVERTICALANCHORACTIVEENDTclError)
Frame
LabelFrameButtonCheckbuttonEntryLabel
OptionMenuNotebookRadiobutton	ScrollbarStyleSpinboxCombobox)colorchooser)
messagebox)idleConf
ConfigChanges)
GetKeysWindow)
DynOptionMenu)macosx)SectionName
HelpSource)	view_text)AutoComplete)CodeContext)
ParenMatch)FormatParagraph)Squeezer)ScrollableTextFramecbeZdZdZdddddZdZdZdZdZd	Z	fd
Z
dZdZd
Z
xZS)ConfigDialogzConfig dialog for IDLE.
    F)_htest_utestctj||||_|ri|_|s|j	|j|xsd|j
dz}|j|sdndz}|jd|d||j|jtt|j||jd|j|jj j#t$j'|s1|j)|j+|j-yy)	aShow the tabbed dialog for user configuration.

        Args:
            parent - parent of this dialog
            title - string which is the title of this popup dialog
            _htest - bool, change box location when running htest
            _utest - bool, don't wait_window when running unittest

        Note: Focus set on font page fontlist.

        Methods:
            create_widgets
            cancel: Bound to DELETE_WINDOW protocol.
        zIDLE Preferences+heightwidthWM_DELETE_WINDOWN)r__init__parent
instance_dictwithdrawtitlewinfo_rootxwinfo_rootygeometrycreate_widgets	resizabler
	transientprotocolcancelfontpagefontlist	focus_settracersattachgrab_setwm_deiconifywait_window)selfrLrOr@rAxys       H/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/idlelib/configdialog.pyrKzConfigDialog.__init__1s	$'#%F MMO

5../ 2% fB#>

!AaSk"	
e51v

($++6

((*	MMOct|dx|_}|jjdt|x|_}t||_t||j|_t||j|_
t||j|_t||_t||_|j#|jd|j#|jd|j#|jd|j#|jd	|j#|j d
|j#|jd|j%|j't(t*t,|j/j't0
y)aCreate and place widgets for tabbed dialog.

        Widgets Bound to self:
            frame: encloses all other widgets
            note: Notebook
            highpage: HighPage
            fontpage: FontPage
            keyspage: KeysPage
            winpage: WinPage
            shedpage: ShedPage
            extpage: ExtPage

        Methods:
            create_action_buttons
            load_configs: Load pages except for extensions.
            activate_config_changes: Tell editors to reload.
        5pxpaddingnwes)stickyz Fonts text
Highlightsz Keys z	 Windows z
 Shell/Ed 
ExtensionssideexpandfillrpN)r!framegridr(noteExtPageextpageHighPagehighpageFontPagerXKeysPagekeyspageWinPagewinpageShedPageshedpageaddenable_traversalpackrr	rcreate_action_buttonsr)r`rtrvs   rcrSzConfigDialog.create_widgets`s@$#477
U

v&#E?*	Dt} t||4
 t}}5
 t||4
t} 
Y/\2X.K0\2L1		s4d	3""$))v)6rdctjri}nddi}t|jd}t|d}i|_d|j
fd|jfd|jfd|jffD]J\}}t|f||td	||j|<|j|jtd
Lt|dd
jt|jt|S)aReturn frame of action buttons for dialog.

        Methods:
            ok
            apply
            cancel
            help

        Widget Structure:
            outer: Frame
                buttons: Frame
                    (no assignment): Button (ok)
                    (no assignment): Button (apply)
                    (no assignment): Button (cancel)
                    (no assignment): Button (help)
                (no assignment): Frame
        rh)rgOkApplyCancelHelp)rlcommand	takefocus)rppadxr)rHborderwidthrs)r4isAquaTkr!rtbuttonsokapplyrWhelpr#r
rrrr)r`padding_argsouter
buttons_frametxtcmds      rcrz"ConfigDialog.create_action_buttonss$??L%v.Ldjj!,eQ/

477O
djj!
t{{#
TYY	!	6HC
!'}!83!&!8*6!8DLLLL""1"5	6	eA1-222<'rdcD|j|jy)z*Apply config changes, then dismiss dialog.N)rdestroyr`s rcrzConfigDialog.oks

rdc|jtj|jj	|jy)z+Apply config changes and leave dialog open.N)deactivate_current_configchangessave_allrxsave_all_changed_extensionsactivate_config_changesrs rcrzConfigDialog.applys6&&(002$$&rdcLtj|jy)zPDismiss config dialog.

        Methods:
            destroy: inherited
        N)rclearrrs rcrWzConfigDialog.cancels	

rdc|jjjdda|j	t
|y)N1.0end)rXfont_samplegetfont_sample_textgrab_releasesuperr)r`	__class__s rcrzConfigDialog.destroys6==4488F
rdc	|jj|jjdj}t	|dt
tj|dzy)zCreate textview for config dialog help.

        Attributes accessed:
            note
        Methods:
            view_text: Method from textview module.
        rl)optionzHelp for IDLE preferences)rOcontentsN)rvtabselectstripr7help_common
help_pagesr)r`pages  rcrzConfigDialog.helpsQyy}}TYY--/}?EEG$9&z~~dB'??	Ardcz|jjj}|D]}|jy)zRemove current key bindings.
        Iterate over window instances defined in parent and remove
        the keybindings.
        N)rLrMkeysRemoveKeybindings)r`
win_instancesinstances   rcrz&ConfigDialog.deactivate_current_configs711668
%	)H&&(	)rdcP|jjj}|D]b}|j|j	|j|j
|j|jdtD]}|jy)zApply configuration changes to current windows.

        Dynamically update the current parent window instances
        with some of the configuration changes.
        N)rLrMrResetColorizer	ResetFontset_notabs_indentwidthApplyKeybindingsreset_help_menu_entriesupdate_cursor_blinkreloadablesreload)r`rrklasss    rcrz$ConfigDialog.activate_config_changess11668
%	+H##% ++-%%',,.((*
	+!	ELLN	rd)r)__name__
__module____qualname____doc__rKrSrrrrWrrrr
__classcell__rs@rcr?r?-sG-5-^$7L&P
'
A	)rdr?u^<ASCII/Latin1>
AaBbCcDdEeFfGgHhIiJj
1234567890#:+=(){}[]
¢£¥§©«®¶½ĞÀÁÂÃÄÅÇÐØß

<IPA,Greek,Cyrillic>
ɐɕɘɞɟɤɫɮɰɷɻʁʃʆʎʞʢʫʭʯ
ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκ
БбДдЖжПпФфЧчЪъЭэѠѤѬӜ

<Hebrew, Arabic>
אבגדהוזחטיךכלםמןנסעף
ابجدهوزحطي٠١٢٣٤٥٦٧٨٩

<Devanagari, Tamil>
०१२३४५६७८९अआइईउऊएऐओऔ
௦௧௨௩௪௫௬௭௮௯அஇஉஎ

<East Asian>
〇一二三四五六七八九
汉字漢字人木火土金水
가냐더려모뵤수유즈치
あいうえおアイウエオ
c>eZdZfdZdZdZdZdZddZxZ	S)r{ct|||j|_|j|j	yN)rrKhighlight_samplecreate_page_font
load_font_cfg)r`masterrzrs   rcrKzFontPage.__init__"s6
  ( 9 9rdctjt||j|_tjt||j|_tjt
||j|_t|dtd}t|dtd}t|}t|}t|td}t|ddt	|_|jj!d
|j"|jj!d|j"|jj!d|j"t%|}|j'|jj(
|jj'|j*t|d}t-||j
d|_t1||jddd|_t5|}|j6|_|j8j't:dd|j8j=t>t@|jCdd|jEdd|jGdddd|jGdddddd|jItJddtL|jItJddtL|jItJtN|jjIttPtL|jIttR |jIttN|j.jIttN|j2jIttNd!"|jItPtT#y)$aRReturn frame of widgets for Font tab.

        Fonts: Enable users to provisionally change font face, size, or
        boldness and to see the consequence of proposed choices.  Each
        action set 3 options in changes structuree and changes the
        corresponding aspect of the font sample on this page and
        highlight sample on highlight page.

        Function load_font_cfg initializes font vars and widgets from
        idleConf entries and tk.

        Fontlist: mouse button 1 click or up or down key invoke
        on_fontlist_select(), which sets var font_name.

        Sizelist: clicking the menubutton opens the dropdown menu. A
        mouse button 1 click or return key sets var font_size.

        Bold_toggle: clicking the box toggles var font_bold.

        Changing any of the font vars invokes var_changed_font, which
        adds all 3 font options to changes and calls set_samples.
        Set_samples applies a new font constructed from the font vars to
        font_sample and to highlight_sample on the highlight page.

        Widgets for FontPage(Frame):  (*) widgets bound to self
            frame_font: LabelFrame
                frame_font_name: Frame
                    font_name_title: Label
                    (*)fontlist: ListBox - font_name
                    scroll_font: Scrollbar
                frame_font_param: Frame
                    font_size_title: Label
                    (*)sizelist: DynOptionMenu - font_size
                    (*)bold_toggle: Checkbutton - font_bold
            frame_sample: LabelFrame
                (*)font_sample: Label
        rz Shell/Editor Font rreliefrlz Font Sample (Editable) zFont Face :)justifyrlTrHrexportselection<ButtonRelease-1>z<KeyRelease-Up>z<KeyRelease-Down>r)yscrollcommandzSize :rkNrBold)variableonvalueoffvaluerl)wraprIrHweightr)rowcolumnrpadyrnsew)rrrowspanrrrjrprrrrrpanchorro)rprrrCrprr)rqrr)+r[rrvar_changed_font	font_name	font_sizer	font_boldr"rr!r&rrr
rYbindon_fontlist_selectr*configyviewsetr3sizelistr$bold_toggler=rlrrinsertrrcolumnconfigurerowconfigurerurrrrr	rr)	r`
frame_fontframe_sampleframe_font_nameframe_font_paramfont_name_titlescroll_fontfont_size_titlefont_sample_frames	         rcrzFontPage.create_page_font(sL!Yt_d6K6KL Yt_d6K6KL Z%5t7L7LM !F%:<
!$Af'AC 
+ ,MC*.G


.0G0GH

,d.E.EF

.0G0GH04==#6#67

KOO< 0x@%&6M
& 4>>AF40=,11T1=%56	
Qq)!A&Aaaa8a111!'		)	#AAA>3QQQ?#a0

T:d+$q1

Q/4;d6rdc0tj|dd}|dj}|d}|ddk(}tt	tj|}|D]"}|jjt|$|jj	||Dcgc]}|j}}	|j|}	|jj|	|jj|	|jj|	|jj|	|j"j%d||j&j	||j)ycc}w#t $rYXwxYw)	aLoad current configuration settings for the font options.

        Retrieve current font with idleConf.GetFont and font families
        from tk. Setup fontlist and set font_name.  Setup sizelist,
        which sets font_size.  Set font_bold.  Call set_samples.
        mainEditorWindowrrrbold)78910111213141618202225293440N)r0GetFontlowersortedrtkfontfamiliesrYrrrindexsee
select_set
select_anchoractivate
ValueErrorrSetMenurset_samples)
r`configured_fontrrrfontsfontslc_fontscurrent_font_indexs
          rcrzFontPage.load_font_cfgsb#**4H#A&,,.	#A&	$Q'/	s6??4012	,DMM  d+	,9%',-!AGGI--	!)	!:MM01MM$$%78MM''(:;MM""#56	


O'	)	
9%.		s%F?A=F			FFcP|jj}tjddd||jj}tjddd||j
j}tjddd||j
y)zStore changes to font attributes.

        When one font attribute changes, save them all, as they are
        not independent from each other. In particular, when we are
        overriding the default font, we need to write out everything.
        r	r
r+z	font-sizez	font-boldN)rrr
add_optionrrr(r`paramsvalues   rcrzFontPage.var_changed_fonts""$6>65A""$6>;F""$6>;Frdc|jj|jjdk(rtnt
}|jj|jy)zHandle selecting a font from the list.

        Event can result from either mouse click or Up or Down key.
        Set font_name and example displays to selection.
        
KeyReleaseN)	rYrtypenamerrrrr)r`eventr+s   rcrzFontPage.on_fontlist_selectsE}}  **//\9vG4::<(rdc"|jj}|jjrtjntj
}||jj|f}||jd<||jd<y)zUpdate update both screen samples with the font settings.

        Called on font initialization and change events.
        Accesses font_name, font_size, and font_bold Variables.
        Updates font_sample and highlight page highlight_sample.
        r+N)	rrrrBOLDNORMALrrr)r`r8rfont_weightnew_fonts     rcr(zFontPage.set_samplessmNN&&(	%)^^%7%7%9fkkv}}t~~113[A#+ (0f%rdr)
rrrrKrrrrr(rrs@rcr{r{ s$W7r D
)1rdr{ceZdZfdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZxZS)ryct||||_|j|_t||_|j|jyr)	rrKrxwinfo_toplevelcdr+stylecreate_page_highlightload_theme_cfgr`rrxrs   rcrKzHighPage.__init__sJ
 '')6]
""$rdc

iddddddddd	d
ddd
ddddddddddddddddddd _tjtj_tjtj_t_	tjtj_tjtj_
tjtj_t!d!t"d"#}t!d!t"d$#}t%|t&d%&}|j(x}_|j-d'd(d%d%t.d)t0*|j3d+d,|j3d-d.d/}|D]\}}|j5t6||t9|j;d0t6j=}t?d%|D]1}	|j5|	d1|	t9tA|d2d3d43jD],}
|
ffd5	}|jCj|
d)d6|.d7|d8<jDj-d9d%d:;tG|d9<_$tG|}tKjHd=jL>_'tQjHjd?d)@_)tU|jd%dAjVB_,tU|jd)dCjVB_-jj]d%tK|dDj^>_0tc|dEF}
tU|jd%jddGH_3tU|jd)jddIH_4tQ|j
d?d?J_5tQ|jd?d?J_6tK|dKjn>_8tc|d!L_9|jutvdMdMtxtzN|jut|dMdMt~OjHjut|dMdMt~O|jut|dMd)P|jut|dMdMtxtzNjNjut|txt~dQdRSjRjut|txt~dQdTSjXjutvtUjZjuttUj`jutt~dMdMV|
jut|tdMdMWjfjut|tdMXjhjut|tdMd!Wjjjut|t~dMdMVjljut|t~tdMdMYjpjut|t~dMdMVjrjut|t~dMZy?)[aReturn frame of widgets for Highlights tab.

        Enable users to provisionally change foreground and background
        colors applied to textual tags.  Color mappings are stored in
        complete listings called themes.  Built-in themes in
        idlelib/config-highlight.def are fixed as far as the dialog is
        concerned. Any theme can be used as the base for a new custom
        theme, stored in .idlerc/config-highlight.cfg.

        Function load_theme_cfg() initializes tk variables and theme
        lists and calls paint_theme_sample() and set_highlight_target()
        for the current theme.  Radiobuttons builtin_theme_on and
        custom_theme_on toggle var theme_source, which controls if the
        current set of colors are from a builtin or custom theme.
        DynOptionMenus builtinlist and customlist contain lists of the
        builtin and custom themes, respectively, and the current item
        from each list is stored in vars builtin_name and custom_name.

        Function paint_theme_sample() applies the colors from the theme
        to the tags in text widget highlight_sample and then invokes
        set_color_sample().  Function set_highlight_target() sets the state
        of the radiobuttons fg_on and bg_on based on the tag and it also
        invokes set_color_sample().

        Function set_color_sample() sets the background color for the frame
        holding the color selector.  This provides a larger visual of the
        color for the current tag and plane (foreground/background).

        Note: set_color_sample() is called from many places and is often
        called more than once when a change is made.  It is invoked when
        foreground or background is selected (radiobuttons), from
        paint_theme_sample() (theme is changed or load_cfg is called), and
        from set_highlight_target() (target tag is changed or load_cfg called).

        Button delete_custom invokes delete_custom() to delete
        a custom theme from idleConf.userCfg['highlight'] and changes.
        Button save_custom invokes save_as_new_theme() which calls
        get_new_theme_name() and create_new() to save a custom theme
        and its colors to idleConf.userCfg['highlight'].

        Radiobuttons fg_on and bg_on toggle var fg_bg_toggle to control
        if the current selected color for a tag is for the foreground or
        background.

        DynOptionMenu targetlist contains a readable description of the
        tags applied to Python source within IDLE.  Selecting one of the
        tags from this list populates highlight_target, which has a callback
        function set_highlight_target().

        Text widget highlight_sample displays a block of text (which is
        mock Python code) in which is embedded the defined tags and reflects
        the color attributes of the current theme and changes for those tags.
        Mouse button 1 allows for selection of a tag and updates
        highlight_target with that tag value.

        Note: The font in highlight_sample is set through the config in
        the fonts tab.

        In other words, a tag can be selected either from targetlist or
        by clicking on the sample text within highlight_sample.  The
        plane (foreground/background) is selected via the radiobutton.
        Together, these two (tag and plane) control what color is
        shown in set_color_sample() for the current theme.  Button set_color
        invokes get_color() which displays a ColorChooser to change the
        color for the selected tag/plane.  If a new color is picked,
        it will be saved to changes and the highlight_sample and
        frame background will be updated.

        Tk Variables:
            color: Color of selected target.
            builtin_name: Menu variable for built-in theme.
            custom_name: Menu variable for custom theme.
            fg_bg_toggle: Toggle for foreground/background color.
                Note: this has no callback.
            theme_source: Selector for built-in or custom theme.
            highlight_target: Menu variable for the highlight tag target.

        Instance Data Attributes:
            theme_elements: Dictionary of tags for text highlighting.
                The key is the display name and the value is a tuple of
                (tag name, display sort order).

        Methods [attachment]:
            load_theme_cfg: Load current highlight colors.
            get_color: Invoke colorchooser [button_set_color].
            set_color_sample_binding: Call set_color_sample [fg_bg_toggle].
            set_highlight_target: set fg_bg_toggle, set_color_sample().
            set_color_sample: Set frame background to target.
            on_new_color_set: Set new color and add option.
            paint_theme_sample: Recolor sample.
            get_new_theme_name: Get from popup.
            create_new: Combine theme with changes and save.
            save_as_new_theme: Save [button_save_custom].
            set_theme_type: Command for [theme_source].
            delete_custom: Activate default [button_delete_custom].
            save_new: Save to userCfg['theme'] (is function).

        Widgets of highlights page frame:  (*) widgets bound to self
            frame_custom: LabelFrame
                (*)highlight_sample: Text
                (*)frame_color_set: Frame
                    (*)button_set_color: Button
                    (*)targetlist: DynOptionMenu - highlight_target
                frame_fg_bg_toggle: Frame
                    (*)fg_on: Radiobutton - fg_bg_toggle
                    (*)bg_on: Radiobutton - fg_bg_toggle
                (*)button_save_custom: Button
            frame_theme: LabelFrame
                theme_type_title: Label
                (*)builtin_theme_on: Radiobutton - theme_source
                (*)custom_theme_on: Radiobutton - theme_source
                (*)builtinlist: DynOptionMenu - builtin_name
                (*)customlist: DynOptionMenu - custom_name
                (*)button_delete_custom: Button
                (*)theme_message: Label
        zNormal Code or Text)normal00zCode Context)context01zPython Keywords)keyword02zPython Definitions)
definition03zPython Builtins)builtin04zPython Comments)comment05zPython Strings)string06z
Selected Text)hilite07z
Found Text)hit08Cursor)cursor09zEditor Breakpoint)breakrzShell Prompt)consolerz
Error Text)errorrzShell User Output)stdoutrzShell User Exception)stderrrzLine Number)
linenumberrrz Custom Highlighting rz Highlighting Theme r)rr)courierrhand2r)r+rZrIrHrhighlightthicknessrz<Double-Button-1>cyNr\es rc<lambda>z0HighPage.create_page_highlight.<locals>.<lambda>urdz<B1-Motion>cyrgrhris rcrkz0HighPage.create_page_highlight.<locals>.<lambda>vrlrd)")z# Click selects item.rQ
rG)zcode context sectionrIrn)z| cursorrZrn)defrK) rG)funcrM)z(param):
  rG)z"Return None."rS)z

  var0 = rG)z'string'rS)z

  var1 = rG)z
'selected'rU)z

  var2 = rG)z'found'rW)z

  var3 = rG)listrO)(rG)NonerK)z)
rG)z  breakpoint("line")r\)z

rGz>>>r])z	 3.14**2
rG)z9.8596r_rnrv)z pri rG)nr^)zt(
rG)SyntaxErrorr`rnrz.0drqrac<jj|yr)highlight_targetr)r8elemr`s  rctemz+HighPage.create_page_highlight.<locals>.tems%%))$/rdz<ButtonPress-1>disabledstateframe_color_set.TFramesolid)rr)rBzChoose Color for :rlrN)re
Foreground)rr3rlr
BackgroundzSave as New Custom Themez	Select : rkza Built-in Themerr3rrlza Custom ThemerzDelete Custom Themerrrprrrqrrrrprr)rprqrrrrrrrprrrrrprrrr)rprrrrr)rprrr)Dtheme_elementsr[rrvar_changed_builtin_namebuiltin_namevar_changed_custom_namecustom_namerfg_bg_togglevar_changed_colorcolorvar_changed_theme_sourcetheme_sourcevar_changed_highlight_targetr{r"rr=rrlr	configurer
rrrrlenr
splitlinesrangestrtag_bindrBr!frame_color_setr#	get_colorbutton_set_colorr3
targetlistr)set_color_sample_bindingfg_onbg_onrsave_as_new_themebutton_save_customr&set_theme_typebuiltin_theme_oncustom_theme_onbuiltinlist
customlist
delete_custombutton_delete_custom
theme_messagerrr	rrrrr
rr)r`frame_customframe_themesample_framerlstring_tagsrStagn_lineslinenoelementr}frame_fg_bg_toggletheme_type_titles`             rcrCzHighPage.create_page_highlightsj!#3-
0
!"6	

0
0

.
-
-
&
 
-
/
 !1
#$4 
/!$$KK$!>!>@";;$!=!=?&t,[[$!7!79
#KK4 $"?"?A '$!B!B!D
"$Af'>@ 1V&<>+U;'3'8'88t$(!AD		B	
		%'89		-!239$'	*KFCKKVS)	*dhhuc*5578Aw'	&FKK6("
!3s7|#4"5Q!67q9$
&	&**	MG '
0
MM''035F
M		M#W


51$+		-$\9QR"<0 &$$+?!(($$d&;&;T#$&!"T->->a!4+H+HJ
!"T->->a!4+H+HJ
	
a "(#=..#0!;? +d&7&7q++2D!F +d&7&7q++2B D)T..dD'T--tTC$*"7**%,!#;A>	t!!DtLc:!!s!CSqq9qqD		B""Dqqq"Q#dK

T!,

U1-$$&qqq$I3qqqA""AA">!!s111!E3QQQ?#AaaaH!!&&Caaa&HSqq9rdc	fjjtjdddddtj}jjrtjdd}|jjj||tjdd}|j|s7jjd	jjd
njj||dntjdd}|jjj||tjdd}|jjj||djtj j#}|jfd
j$j||dj'j)y)aLoad current configuration settings for the theme options.

        Based on the theme_source toggle, the theme is set as
        either builtin or custom and the initial widget values
        reflect the current settings from idleConf.

        Attributes updated:
            theme_source: Set from idleConf.
            builtinlist: List of default themes from idleConf.
            customlist: List of custom themes from idleConf.
            custom_theme_on: Disabled if there are no custom themes.
            custom_theme: Message with additional information.
            targetlist: Create menu from self.theme_elements.

        Methods:
            set_theme_type
            paint_theme_sample
            set_highlight_target
        r	Themedefaultboolrr6r	highlightuserr~- no custom themes -rc(j|dS)Nr)r)rar`s rcrkz)HighPage.load_theme_cfg.<locals>.<lambda>st':':1'=a'@rd)keyN)rrr0	GetOptionCurrentThemerGetSectionListsortrr'rrrrrrsrrrpaint_theme_sampleset_highlight_target)r`current_option	item_listtheme_namess`   rcrDzHighPage.load_theme_cfgs*	
h00D	E"..0  " //	;GINN$$Y? //DINN$$**=9  $$%;<''	9Q<@ //DINNOO##I~> //	;GINN$$Y	!=4..3356@A[^<!!!#rdcd}|jj}||vr\tjddd|vrtjddd|dtjddd|d|jd<n?tjddd|tjdddd	d	|jd<|jy
)zProcess new builtin theme selection.

        Add the changed theme's name to the changed_items and recreate
        the sample with the values from the selected theme.
        )zIDLE ClassiczIDLE Newr	rr7rname2zNew theme, see HelprlrN)rrr0rrr0rr)r`r2
old_themesr3s    rcrz!HighPage.var_changed_builtin_names2
!!%%'
"!!&'6:*L""67FJqMJvw?)>Dv&vw>vw<)+Dv&!rdc|jj}|dk7r)tjddd||j	yy)zProcess new custom theme selection.

        If a new custom theme is selected, add the name to the
        changed_items and apply the theme to the sample.
        rr	rr7N)rrrr0rr1s   rcrz HighPage.var_changed_custom_namesF  $$&**vw>##%+rdc|jj}tjddd||r|j	y|jy)zProcess toggle between builtin and custom theme.

        Update the default toggle value and apply the newly
        selected theme type.
        r	rrN)rrrr0rrr1s   rcrz!HighPage.var_changed_theme_source$sG!!%%'67Iu=))+((*rdc$|jy)zProcess change to color choice.N)on_new_color_setr`r2s  rcrzHighPage.var_changed_color1srdc$|jy)z5Process selection of new target tag for highlighting.N)rrs  rcrz%HighPage.var_changed_highlight_target5!!#rdcT|jjr:d|jd<d|jd<|jjdyd|jd<|jjdd|jd<|jjdy)aSet available screen options based on builtin or custom theme.

        Attributes accessed:
            theme_source

        Attributes updated:
            builtinlist
            customlist
            button_delete_custom
            custom_theme_on

        Called from:
            handler for builtin_theme_on and custom_theme_on
            delete_custom
            create_new
            load_theme_cfg
        rGrr~rz	!disabledN)rrrrrrrrs rcrzHighPage.set_theme_type9s$  "(0DW%'1DOOG$%%++M:(2DW%  &&~6'/DOOG$%%++N;rdc|jj}|jj|jdd}tj|d|z|\}}|r||k7ry|jjrCd}|j|}|sy|j||jj|y|jj|yyy)aHandle button to select a new color for the target tag.

        If a new color is selected while using a builtin theme, a
        name must be supplied to create a custom theme.

        Attributes accessed:
            highlight_target
            frame_color_set
            theme_source

        Attributes updated:
            color

        Methods:
            get_new_theme_name
            create_new
        rB
backgroundzPick new color for : )rLrOinitialcolorz_Your changes will be saved as a new Custom Theme. Enter a name for your new Custom Theme below.N)r{rrBlookuprr.askcolorrget_new_theme_name
create_newrr)r`target
prev_color	rgbTupletcolor_stringmessage	new_themes       rcrzHighPage.get_colorUs$&&**,ZZ&&t';';G'D'35
"."7"7#:6#A'#)	<\Z7  $$&K 33G<	 OOI.JJNN<0

|,8<rdc|jj}|jjd||jjrdnd}|j
|jjd}|jj|fi||i|jj}|dz|z}tjd|||y)	z4Display sample of new color selection on the dialog.rr
foregroundrr-rN)rrrBrrrr{r
tag_configrrr0)r`	new_colorplanesample_elementtheme
theme_elements      rcrzHighPage.on_new_color_set{sJJNN$	

5)L $ 1 1 5 5 7\,,T-B-B-F-F-HI!L(((NE9;MN  $$&&,u4
;}iHrdctjddtjddz}t|d||j}|S)z*Return name of new theme from query popup.rrrzNew Custom Themer0rr5result)r`r
used_namesrs    rcrzHighPage.get_new_theme_namesL--fkB''	;?@
(':??Ev	rdcN|jd}|r|j|yy)zPrompt for new theme name and create the theme.

        Methods:
            get_new_theme_name
            create_new
        zNew Theme Name:N)rr)r`new_theme_names  rcrzHighPage.save_as_new_themes)001BCOON+rdc |jjrd}|jj}nd}|jj}t	j
||}|tdvrtd|}|D]
}||||<|j||t	jdd}|j|jj|||jjd|jy)aCreate a new custom theme with the given name.

        Create the new theme based on the previously active theme
        with the current changes applied.  Once it is saved, then
        activate the new theme.

        Attributes accessed:
            builtin_name
            custom_name

        Attributes updated:
            customlist
            theme_source

        Method:
            save_new
            set_theme_type
        rrrrN)rrrrr0GetThemeDictrsave_newrrrr'rr)r`r
theme_type
theme_namer
theme_changesrcustom_theme_lists        rcrzHighPage.create_news&  ""J**..0JJ))--/J))*jA	--#K0<M(
<%27%;	'"
<	


ni0$33FKH  1>Ba rdc|jjdk(rR|jjd|jjd|j
j
dnQ|jjd|jjd|j
j
d|jy)ahSet fg/bg toggle and color based on highlight tag target.

        Instance variables accessed:
            highlight_target

        Attributes updated:
            fg_on
            bg_on
            fg_bg_toggle

        Methods:
            set_color_sample

        Called from:
            var_changed_highlight_target
            load_theme_cfg
        rYrrrN)r{rrrrrrset_color_samplers rcrzHighPage.set_highlight_targets$  $$&(2JJ]+JJ]+!!!$JJ^,JJ^,!!!$rdc$|jy)zrChange color sample based on foreground/background toggle.

        Methods:
            set_color_sample
        N)r)r`argss  rcrz!HighPage.set_color_sample_bindings	
rdc|j|jjd}|jjrdnd}|jj||}|jjd|y)aSet the color of the frame background to reflect the selected target.

        Instance variables accessed:
            theme_elements
            highlight_target
            fg_bg_toggle
            highlight_sample

        Attributes updated:
            frame_color_set
        rrrrrN)rr{rrrtag_cgetrBr)r`rrrs    rcrzHighPage.set_color_samplesp!!$"7"7";";"=>qA $ 1 1 5 5 7\%%..sE:

5%Hrdc&|jjr|jj}n|jj}|jD]}|j|d}tj||}|dk(rtj|dd|d<|tdvr0td|}|dz|vr||dz|d<|dz|vr||dz|d<|jj|fi||jy	)
aApply the theme colors to each element tag in the sample text.

        Instance attributes accessed:
            theme_elements
            theme_source
            builtin_name
            custom_name

        Attributes updated:
            highlight_sample: Set the tag elements to the theme.

        Methods:
            set_color_sample

        Called from:
            var_changed_builtin_name
            var_changed_custom_name
            load_theme_cfg
        rrZrGrrz-foregroundrz-backgroundN)rrrrrr0GetHighlightrrrr)r`r
element_titlercolors
theme_dicts      rcrzHighPage.paint_theme_samples/(  "%%))+E$$((*E!00
	@M))-8;G**5':F("'/'<'<x())5(7|$,,$[1%8
]*j8+5g
6M+NF<(]*j8+5g
6M+NF<(,D!!,,W??
	@	
rdctjdj||D]+}||}tjdj|||-y)zSave a newly created theme to idleConf.

        theme_name - string, the name of the new theme
        theme - dictionary containing the new theme
        rNr0userCfg
AddSection	SetOption)r`rrrr3s     rcrzHighPage.save_newsT	%00<	PG'NE[)33JO	Prdc,tj|i|Srr/askyesnor`rkwargss   rcrzHighPage.askyesno*""D3F33rdcj|jj}d}|jd||z|sy|jj	t
j
d|tjdd}|j|s8|jjd|jj|dn|jj||d	|jjtj d
j#dd|j$jtj d
j#dd
t
j'|j(j+|jj-|j/y)a!Handle event to delete custom theme.

        The current theme is deactivated and the default theme is
        activated.  The custom theme is permanently removed from
        the config file.

        Attributes accessed:
            custom_name

        Attributes updated:
            custom_theme_on
            customlist
            theme_source
            builtin_name

        Methods:
            deactivate_current_config
            save_all_changed_extensions
            activate_config_changes
            set_theme_type
        z.Are you sure you wish to delete the theme %r ?zDelete ThemerLNrrrrrr	rrr7)rrrrArrdelete_sectionr0rrrrrr'rr
defaultCfgGetrrrxrrr)r`rdelmsgrs    rcrzHighPage.delete_custom.sN,%%))+
A}}*!4TC))+{J7++FK@	  &&}5OO##I/EFOO##Iy|<h11&9==gyQRh11&9==gvNO002'')rd)rrrrKrCrDrrrrrrrrrrrrrrrrrrrrs@rcryrysu|:|2$h"&	&+ $<8$-L	I	,&P 8 I$& P	P4-rdryceZdZfdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZedZdZdZxZS)r|ct||||_|j|_|j|j
yr)rrKrxr@rAcreate_page_keysload_key_cfgrEs   rcrKzKeysPage.__init__`s?
 '')rdc
tjt||j|_tjt||j
|_tjt||j|_	tjt||j|_t|dtd}t|dtd}t|}t|d}t!|}t!|t"}t%|t&t&|_|j(j+d	|j,|j(j.|d
<|j(j0|d
<|j2|j(d<|j2|j(d<t5|d
|j6d|_t;dDcgc]}t|dd}}t=|d|jd|j>d|_ t=|d|jd|j>d|_!tE|d|jdd|_#tE|d|jdd|_$t5|dd|jJ|_&t5|dd|jN|_(t|dd|_)|jUtVddtXtZ|jUtVddtZ|j8jUtVt\dd|jUt^ddtXtZ|jadd |jcdd |jedddtf!|j(jeddth"|jeddtj"|jeddtl"|j@jeddtftjz"|jBjeddtftjz"|jFjeddth"|jHjeddth"|jRjeddthdd#|jLjUt^t\d$d%|jPjUt^t\d$d%|djUtntZd$&|djUtnt\d$d'ycc}w)(aReturn frame of widgets for Keys tab.

        Enable users to provisionally change both individual and sets of
        keybindings (shortcut keys). Except for features implemented as
        extensions, keybindings are stored in complete sets called
        keysets. Built-in keysets in idlelib/config-keys.def are fixed
        as far as the dialog is concerned. Any keyset can be used as the
        base for a new custom keyset, stored in .idlerc/config-keys.cfg.

        Function load_key_cfg() initializes tk variables and keyset
        lists and calls load_keys_list for the current keyset.
        Radiobuttons builtin_keyset_on and custom_keyset_on toggle var
        keyset_source, which controls if the current set of keybindings
        are from a builtin or custom keyset. DynOptionMenus builtinlist
        and customlist contain lists of the builtin and custom keysets,
        respectively, and the current item from each list is stored in
        vars builtin_name and custom_name.

        Button delete_custom_keys invokes delete_custom_keys() to delete
        a custom keyset from idleConf.userCfg['keys'] and changes.  Button
        save_custom_keys invokes save_as_new_key_set() which calls
        get_new_keys_name() and create_new_key_set() to save a custom keyset
        and its keybindings to idleConf.userCfg['keys'].

        Listbox bindingslist contains all of the keybindings for the
        selected keyset.  The keybindings are loaded in load_keys_list()
        and are pairs of (event, [keys]) where keys can be a list
        of one or more key combinations to bind to the same event.
        Mouse button 1 click invokes on_bindingslist_select(), which
        allows button_new_keys to be clicked.

        So, an item is selected in listbindings, which activates
        button_new_keys, and clicking button_new_keys calls function
        get_new_keys().  Function get_new_keys() gets the key mappings from the
        current keyset for the binding event item that was selected.  The
        function then displays another dialog, GetKeysDialog, with the
        selected binding event and current keys and allows new key sequences
        to be entered for that binding event.  If the keys aren't
        changed, nothing happens.  If the keys are changed and the keyset
        is a builtin, function get_new_keys_name() will be called
        for input of a custom keyset name.  If no name is given, then the
        change to the keybinding will abort and no updates will be made.  If
        a custom name is entered in the prompt or if the current keyset was
        already custom (and thus didn't require a prompt), then
        idleConf.userCfg['keys'] is updated in function create_new_key_set()
        with the change to the event binding.  The item listing in bindingslist
        is updated with the new keys.  Var keybinding is also set which invokes
        the callback function, var_changed_keybinding, to add the change to
        the 'keys' or 'extensions' changes tracker based on the binding type.

        Tk Variables:
            keybinding: Action/key bindings.

        Methods:
            load_keys_list: Reload active set.
            create_new_key_set: Combine active keyset and changes.
            set_keys_type: Command for keyset_source.
            save_new_key_set: Save to idleConf.userCfg['keys'] (is function).
            deactivate_current_config: Remove keys bindings in editors.

        Widgets for KeysPage(frame):  (*) widgets bound to self
            frame_key_sets: LabelFrame
                frames[0]: Frame
                    (*)builtin_keyset_on: Radiobutton - var keyset_source
                    (*)custom_keyset_on: Radiobutton - var keyset_source
                    (*)builtinlist: DynOptionMenu - var builtin_name,
                            func keybinding_selected
                    (*)customlist: DynOptionMenu - var custom_name,
                            func keybinding_selected
                    (*)keys_message: Label
                frames[1]: Frame
                    (*)button_delete_custom_keys: Button - delete_custom_keys
                    (*)button_save_custom_keys: Button -  save_as_new_key_set
            frame_custom: LabelFrame
                frame_target: Frame
                    target_title: Label
                    scroll_target_y: Scrollbar
                    scroll_target_x: Scrollbar
                    (*)bindingslist: ListBox - on_bindingslist_select
                    (*)button_new_keys: Button - get_new_keys & ..._name
        rz Custom Key Bindings rz	 Key Set zAction - Key(s)rkorient)rrrrrxscrollcommandzGet New Keys for Selectionr~)rlrrr)rhrrzUse a Built-in Key SetrzUse a Custom Key SetNrzDelete Custom Key SetrzSave as New Custom Key Setrrrrrr)rr
columnspanrjrrrj)rrrjrrT)rprrrqrrprrrq)rprrrqr)8r[rrrrrrrvar_changed_keyset_source
keyset_sourcevar_changed_keybinding
keybindingr"rr!r&r*rrr
bindingslistron_bindingslist_selectrxviewrr#get_new_keysbutton_new_keysrr)
set_keys_typebuiltin_keyset_oncustom_keyset_onr3rrdelete_custom_keysbutton_delete_custom_keyssave_as_new_key_setbutton_save_custom_keyskeys_messagerrr	rrrrrrurrrrr)	r`rframe_key_setsframe_targettarget_titlescroll_target_yscroll_target_xiframess	         rcrzKeysPage.create_page_keysgsd$KK$!>!>@";;$!=!=?$[[4 $"@"@B!++$!<!<>
"!F,.$!FF\*\0AB#L1#LD#uF2#::	<%)%6%6%<%<	"%)%6%6%<%<	".=.A.A*+.=.A.A*+%#?)) =
!8%qA%%!,q	D$6$6a**1I"K!,q	D$6$6a**1G!I)q	4,,dDB'q	4++T4A)/q	 7//*1&(.q	 <00(2$"&);	vAAdNaadC!!vAAA!Ft!!DtL$$Qq$1!!!A!.aaB1Qt<1R81R8##!AbD#A""q1R4"@!Ad;1T:1Qt!!L&&++AdQR+S$$))t!Dq)Qq	Cd48q	Ca1=W%s#U
c	|jjtjdddddtj}|jjrtjdd}|j|jj||tjdd}|j|s7|jjd	|jjd
n|jj||dntjdd}|j|jj||tjdd}|j|jj|tj|jtj}|j!|y)
z?Load current configuration settings for the keybinding options.r	Keysrrrrrrr- no custom keys -rN)r%rr0rCurrentKeysrrrrr'r/rrrdefault_keysr-load_keys_list)r`rrkeyset_names    rcrzKeysPage.load_key_cfgsy	
x11	 C	D"--/!!# //	6BINN$$Y? //?INN%%++M:  $$%9:''	9Q<@ //?INNOO##I~> //	6BINN$$Y0E0E0GH**,K(rdcd}|jj}||vr\tjddd|vrtjddd|dtjddd|d|jd<n?tjddd|tjdddd	d	|jd<|j|y
)z%Process selection of builtin key set.)zIDLE Classic WindowszIDLE Classic UnixzIDLE Classic MaczIDLE Classic OSXr	r=r7rrzNew key set, see HelprlrN)rrr0rrr0r4rA)r`r2old_keysr3s    rcrz!KeysPage.var_changed_builtin_name&s
!!%%' !!&&&9I""6668A;Gvvw>(?Df%vvvu=vvw;(*Df%E"rdc|jj}|dk7r*tjddd||j	|yy)z$Process selection of custom key set.r>r	r=r7N)rrrr0rAr1s   rcrz KeysPage.var_changed_custom_name:sF  $$&((vvvu=&)rdc|jj}tjddd||r|j	y|jy)z:Process toggle between builtin key set and custom key set.r	r=rN)r%rrr0rrr1s   rcr$z"KeysPage.var_changed_keyset_sourceAsE""&&(669e<))+((*rdc|jj}|jj}|jjtjd}t
j|rtjd|||yt
j|}|dz}tjd|||y)zStore change to a keybinding.rr_cfgBindings
extensionsN)r'rrr(rsplitr0
IsCoreBindingrr0GetExtnNameForEvent)r`r2r3key_setr8ext_nameext_keybind_sections       rcr&zKeysPage.var_changed_keybindingJs##%""&&(!!%%f-335a8!!%(vwu=33E:H"*^";|-@%OrdcT|jjr:d|jd<d|jd<|jjdyd|jd<|jjdd|jd<|jjdy)z@Set available screen options based on builtin or custom key set.rGrr~rrN)r%rrrr1rr/rs rcr-zKeysPage.set_keys_typeVs!!#(0DW%'1DOOG$**00?(2DW%!!''7'/DOOG$**00@rdc|jjt}|jj|}|j	d}|j
jr|jj}n|jj}tj}|tdvr)td|}|D]}||j	||<t|j}t|d||j}	|	r|j
jr]d}
|j|
}|s7|jj!||jj#|y|j%||jj'||jj)||dz|	z|jj!||jj#||j*j-|	y|jj!||jj#|y)a^Handle event to change key binding for selected line.

        A selection of a key/binding in the list of current
        bindings pops up a dialog to enter a new binding.  If
        the current key set is builtin and a binding has
        changed, then a name for a custom key set needs to be
        entered for the change to be applied.
        rrzGet New KeyszcYour changes will be saved as a new Custom Key Set. Enter a name for your new Custom Key Set below.N - )r(r!rrrJr%rrr0GetCurrentKeySetrrsvaluesr2rget_new_keys_namer#r$create_new_key_setdeleterr'r)r`
list_indexbinding	bind_namecurrent_key_set_namecurrent_bindingskey_set_changesr8current_key_sequencesnew_keysr
new_keysets            rcr+zKeysPage.get_new_keysbs&&,,V4
##''
3MMOA&	!!##'#4#4#8#8#: #'#3#3#7#7#9 #44676?2%fo.BCO(
I*9%*@*F*F*H '
I $%5%<%<%> ? ~y%''-v	!!%%'N!33G<
!%%00<%%33J?++J7$$Z0$$Z51IJ((4++J7OO)((4++J7rdctjddtjddz}t|d||j}|S)z)Return new key set name from query popup.rrrzNew Custom Key Setr)r`rrr`s    rcrUzKeysPage.get_new_keys_namesL--ff=''	6:;
 *GZAAG	rdcN|jd}|r|j|yy)z@Prompt for name of new key set and save changes using that name.zNew Key Set Name:N)rUrV)r`
new_keys_names  rcr2zKeysPage.save_as_new_key_sets)../BC
##M2rdc:|jjdy)z6Activate button to assign new keys to selected action.rN)r,rr`r8s  rcr)zKeysPage.on_bindingslist_selects"">2rdcd|jjr|jj}n|jj}t	j
|}i}|D] }|dd}dj
||}|||<"|tdvrtd|}|D]
}||||<|j||t	jdd}	|	j|jj|	||jjd|jy)zCreate a new custom key set with the given name.

        Copy the bindings/keys from the previously active keyset
        to the new keyset and activate the new custom keyset.
        rrqrrrN)r%rrrr0GetCoreKeysjoinrsave_new_key_setrrrr'rr-)
r`new_key_set_nameprev_key_set_name	prev_keysr_r8
event_namerYr]custom_key_lists
          rcrVzKeysPage.create_new_key_sets-!!# $ 1 1 5 5 7 $ 0 0 4 4 6(():;		+EqJhhy/0G#*HZ 	+
/%fo.?@O(
9"1%"8
9	
.9"11&&A1ABq!rdcd}|jjr!d}|jjt}t	j
|}t
|j}|j|jjdt|D]i}dj||}|dd}|tdvr|td|vrtd||}|jjt|dz|zk|rR|jj|jj||jj!|y	y	)
zReload the list of action/key binding pairs for the active key set.

        An action/key binding can be selected to change the key binding.
        FTrrqrrgrrRN)r(curselectionr!rr0	GetKeySetrsrrrWrrirrr"r#r$)r`rBreselectrXkeyset
bind_namesrZrs        rcrAzKeysPage.load_keys_lists8
))+H**008J##K0&++-(
  C(#	?I((6),-C!!BIgfo- <<!&/+6yAC$$S)E/#*=>	?!!*-((4++J7rdctjdj||D]+}||}tjdj|||-y)aQSave a newly created core key set.

        Add keyset to idleConf.userCfg['keys'], not to disk.
        If the keyset doesn't exist, it is created.  The
        binding/keys are taken from the keyset argument.

        keyset_name - string, the name of the new key set
        keyset - dictionary containing the new keybindings
        rNr	)rBrtr8r3s    rcrjzKeysPage.save_new_key_setsT	 ++K8	JE5MEV$..{E5I	Jrdc,tj|i|Srrrs   rcrzKeysPage.askyesnorrdc|jj}d}|jd||z|sy|jj	t
j
d|tjdd}|j|s8|jjd|jj|dn|jj||d	|jjtj d
j#dd|j$jtj d
j#dd
xstj&t
j)|j*j-|jj/|j1y)zHandle event to delete a custom key set.

        Applying the delete deactivates the current configuration and
        reverts to the default.  The custom key set is permanently
        deleted from the config file.
        z0Are you sure you wish to delete the key set %r ?zDelete Key SetrNrrrr>rr	r=rr7)rrrrArrrr0rrr/rrr'r%rrrrr@rrxrrr-)r`rBrrs    rcr0zKeysPage.delete_custom_keyssd&&**,C}} 6K#7F))+v{3++FF;	!!''
6OO##I/CDOO##Iy|<x226: #FI 6	8h11&9==ffM9!)!6!6!8	:	002'')rd)rrrrKrrrrr$r&r-r+rUr2r)rVrAstaticmethodrjrr0rrs@rcr|r|^sn^>@)>#('+
P
A*8X33<84
J
J4 rdr|c0eZdZfdZdZdZdZxZS)r~ct|||j|j|j	yr)rrKinit_validatorscreate_page_windowsload_windows_cfgr`rrs  rcrKzWinPage.__init__s4
   "rdcjtjdfd}|j|df|_y)N[0-9]*c*j|duSz+Return 's is blank or contains only digits'N	fullmatchr,digits_or_empty_res rcis_digits_or_emptyz3WinPage.init_validators.<locals>.is_digits_or_empty%//2$>>rd%Precompileregisterdigits_onlyr`rrs  @rcr|zWinPage.init_validators0ZZ	2	?!MM*<=tErdcjtjt|d|_tjt	|d|_tjt	|d|_tjt	|d|_tjt|d|_	tjt	|d|_
tjt	|d|_tjt	|d|_tjt|d	|_
tjt	|d
|_t|dt d
}t#|d}t%|d}t'||jdd|_t'||jdd|_t#|d}t%|d}t%|d}t-||j
d|j.d|_t%|d}t-||jd|j.d|_t#|d}t%|d}		t5||jddd|j.d|_t%|d"}
tA|d#|j$|_!t#|d}t%|d%}t-||jd&|j.d|_"t#|d}
t%|
d'}tG|
|jd(d)d*d(|_$t#|d}t%|d+}t-||jd&|j.d|_%tA|d,|j$|_&t#|d}t%|d-}t-||jd.|j.d|_'|jQtRd/d/tTtV0|jQtRd/dtX1|jQtZt\d/d/2|j*jQt^t\d/d/2|j(jQt^t\d/d/2|jQtRd/dtX1|jQtZt\d/d/2|j2jQt^t`dd/2|jQt^t`d/3|j0jQt^t`dd/2|jQt^t`d/3|jQtRd/dtX1|	jQtZt\d/4|j6jQtZt\d4|jBjQt^t`d5d/2|jQtRd/dtX1|jQtZt\d/d/2|jDjQtRdd/6|
jQtRd/dtX1|jQtZt\d/d/2|jHjQtRdd/6|jQtRd/dtX1|jQtZt\d/4|jLjQt^t`d5d/2|jJjQtRt\d5d/2|jQtRd/dtX1|jQtZt\d/d/2|jNjQtRdd/6y7#t8$r6t;||jdt=t?dd d!|_YwxYw)8a1Return frame of widgets for Windows tab.

        Enable users to provisionally change general window options.
        Function load_windows_cfg initializes tk variable idleConf.
        Radiobuttons startup_shell_on and startup_editor_on set var
        startup_edit. Entry boxes win_width_int and win_height_int set var
        win_width and win_height.  Setting var_name invokes the default
        callback that adds option to changes.

        Widgets for WinPage(Frame):  > vars, bound to self
            frame_window: LabelFrame
                frame_run: Frame
                    startup_title: Label
                    startup_editor_on: Radiobutton > startup_edit
                    startup_shell_on: Radiobutton > startup_edit
                frame_win_size: Frame
                    win_size_title: Label
                    win_width_title: Label
                    win_width_int: Entry > win_width
                    win_height_title: Label
                    win_height_int: Entry > win_height
                frame_cursor: Frame
                    indent_title: Label
                    indent_chooser: Spinbox > indent_spaces
                    blink_on: Checkbutton > cursor_blink
                frame_autocomplete: Frame
                    auto_wait_title: Label
                    auto_wait_int: Entry > autocomplete_wait
                frame_paren1: Frame
                    paren_style_title: Label
                    paren_style_type: OptionMenu > paren_style
                frame_paren2: Frame
                    paren_time_title: Label
                    paren_flash_time: Entry > flash_delay
                    bell_on: Checkbutton > paren_bell
                frame_format: Frame
                    format_width_title: Label
                    format_width_int: Entry > format_width
        )r	Generaleditor-on-startup)r	r
rI)r	r
rH)r	Indent
num-spaces)r	r
cursor-blink)rIr8	popupwait)rIr:rB)rIr:flash-delay)rIr:bell)rIr;	max-widthrz Window Preferencesrrrz
At StartuprkrzOpen Edit Windowrr3rlzOpen Shell Windowz$Initial Window Size  (in characters)WidthrrtextvariablerIvalidatecommandvalidateHeightzIndent spaces (4 is standard)
)rfrom_torIrrreadonly)rrrTrIzCursor BlinkzCursor blink)rlrz%Completions Popup Wait (milliseconds)rzParen Match Style
expressionopenerparensz;Time Match Displayed (milliseconds)
(0 is until next input)zBell on MismatchzFormat Paragraph Max WidthrrrrrrprrrrrN)1r[rrstartup_editr	win_width
win_height
indent_spacesrcursor_blinkautocomplete_waitparen_styleflash_delay
paren_bellformat_widthr"rr!r&r)startup_editor_onstartup_shell_onr%r
win_width_intwin_height_intr,indent_chooserr r-rsrr$cursor_blink_bool
auto_wait_intr'paren_style_typeparen_flash_timebell_onformat_width_intrrr	rrrrr
r)r`frame_window	frame_run
startup_titleframe_win_sizewin_size_titlewin_width_titlewin_height_titleframe_cursorindent_titlecursor_blink_titleframe_autocompleteauto_wait_titleframe_paren1paren_style_titleframe_paren2paren_time_titleframe_formatformat_width_titles                   rcr}zWinPage.create_page_windowssR$KKtFH $!BD!++$!CE$[[$!AC#KK4 "JL!($!L"N";;$!FH";;$!LN!++4 "FH#KK$!OQ"$Af'<>,A6	il;
!,D$5$5Q'")!,D$5$5Q(!*|;%KMW="T^^1 $ 0 05
!h?#T__A $ 0 05

\q9\"AC	I") t/A/A!$($4$4u#FD#<nE!,\6:6G6G"I#<Q@ 2%LN""1G1G)9)9EK\q9!,5HI *d..,!0\q9 $<=!&4+;+;1 $ 0 05!B##5Q\q9"<(DF %4+<+<A $ 0 05!	s4dKCaaa8QQQ?""aaa"H##qqq#I111=aaa@  eABQ G5;U12AF%:s;tAA6  d12 >##qr#JSqqqA$qqqASr:s;DC"""1"=s;4:uQRa@""ABQ"Gs;T!!!D"""1"=O	I"* t/A/A$T%"+->a#ID	Is3+]33;^21^2c|jjtjdddd|jjtjdddd|j
jtjddd	d|jjtjdd
dd|jjtjdddd|jjtjd
ddd|jjtjd
dd|jjtjd
ddd|jjtjd
dd|jjtjd
dddy)Nr	rrrr6r
rIintrHrrrrIr8rr:rBrrr;r)
rrr0rrrrrrrrrrrs rcr~zWinPage.load_windows_cfgsh00	#6VE	F8--e=	>H..u>	?x11,U <	=h00VE	F""8#5#5nk$G	HX//lG5	6X//lMG	HH..lF4	5h00/5J	Krd)rrrrKr|r}r~rrs@rcr~r~s Fh>TKrdr~c0eZdZfdZdZdZdZxZS)rct|||j|j|j	yr)rrKr|create_page_shedload_shelled_cfgrs  rcrKzShedPage.__init__s4
 rdcjtjdfd}|j|df|_y)Nrc*j|duSrrrs rcrz4ShedPage.init_validators.<locals>.is_digits_or_emptyrrdrrrs  @rcr|zShedPage.init_validatorsrrdcttjt|d|_tjt	|d|_tjt
|d|_tjt|d|_t|dtd}t|dtd}t|d	
}t|d}t|d
|j|jd|_t|d	
}t|d}t!||j
d	d|_t!||j
dd|_t|d	
}t|d}t'||jd|_t|d	
}	t|	d}
t|	|jd|jd|_|j-t.ddt0t|j-|j-t.ddt0|j-t.dd	t2|j-t4t6dd|jj-t.dd|j-t.dd	t2|j-t4t6dd|j$j-t8t6dd|j"j-t8t6dd|j-t.dd	t2|j-t4t6dd|j(j-t4dd|	j-t.dd	t2|
j-t4t6dd|j*j-t.ddy)acReturn frame of widgets for Shell/Ed tab.

        Enable users to provisionally change shell and editor options.
        Function load_shed_cfg initializes tk variables using idleConf.
        Entry box auto_squeeze_min_lines_int sets
        auto_squeeze_min_lines_int.  Setting var_name invokes the
        default callback that adds option to changes.

        Widgets for ShedPage(Frame):  (*) widgets bound to self
            frame_shell: LabelFrame
                frame_auto_squeeze_min_lines: Frame
                    auto_squeeze_min_lines_title: Label
                    (*)auto_squeeze_min_lines_int: Entry -
                       auto_squeeze_min_lines
            frame_editor: LabelFrame
                frame_save: Frame
                    run_save_title: Label
                    (*)save_ask_on: Radiobutton - autosave
                    (*)save_auto_on: Radiobutton - autosave
                frame_format: Frame
                    format_width_title: Label
                    (*)format_width_int: Entry - format_width
                frame_line_numbers_default: Frame
                    line_numbers_default_title: Label
                    (*)line_numbers_default_bool: Checkbutton - line_numbers_default
                frame_context: Frame
                    context_title: Label
                    (*)context_int: Entry - context_lines
        )r	PyShellauto-squeeze-min-lines)r	rautosave)r	r
line-numbers-default)rIr9maxlinesrz Shell Preferencesrz Editor PreferencesrrzAuto-Squeeze Min. Lines:rkrr)rIrrrzAt Start of Run (F5)  zPrompt to Saverrz	No Promptz Show line numbers in new windows)rrIzMax Context Lines :rrrrrrN)r[rrauto_squeeze_min_linesrrrline_numbers_default
context_linesr"rr!r&r%rauto_squeeze_min_lines_intr)save_ask_onsave_auto_onr$line_numbers_default_boolcontext_intrrrrrrr
)r`frame_shellframe_editorframe_auto_squeeze_min_linesauto_squeeze_min_lines_title
frame_saverun_save_titleframe_line_numbers_defaultline_numbers_default_title
frame_context
context_titles           rcrzShedPage.create_page_sheds6>'.kk$!N'P# t=?
$+KK4 @%B!%[[$!JL!1V&:<!$Af'<>(-[a'H$',-I2L(N$*/,A!88 $ 0 05+
'<Q7
z0HI&T]]!%'(T]]! "&+<Q%G"%*&-O&Q")4*22*&
l:
m2GH
 D,>,>a $ 0 05
	c=
ds>$))s)K$))tAAA)N'',,#AA,FSqqq9aaa@E!!!D5C"''Sqqq'I"''T!!!'L&&++AA+F!!!<QQQ?3QQ7rdc	|jjtjdddd|jjtjddddd	
|j
jtjdddd	|jjtjd
dddy)Nr	rrrrrrrr)rr6r
rrIr9r)rrr0rrrrrs rcrzShedPage.load_shelled_cfgYs##''(:(:	#;%)I	J	


(,,	:qvG	H!!%%h&8&8(>V'M	Nx11mZe E	Frd)rrrrKr|rrrrs@rcrrs Ff8P
FrdrcBeZdZfdZdZdZdZdZdZdZ	xZ
S)rwct||tjd|_tj
d|_|jt|_|j|jy)NrI)rrKr0rext_defaultCfgr
ext_userCfgris_intload_extensionscreate_page_extensionsrs  rcrKzExtPage.__init__gs^
 &11,?#++L9mmF+##%rdct||_t|dtd}t	|dtd|_|j
dd|jddt||jd	|_	|jjd
|jt||jj}|j|j_t|dd
|_|jj#ddd|j#ddd|j j#dddddg|j%di|_d|_||_|j|_d}t/|j0D]}|j3||dz|zdz} |jj||jj5d|jd|j#dddt7|j#dd|j
j#dddy)aConfigure IDLE feature extensions and help menu extensions.

        List the feature extensions and a configuration box for the
        selected extension.  Help menu extensions are in a HelpFrame.

        This code reads the current configuration using idleConf,
        supplies a GUI interface to change the configuration values,
        and saves the changes using idleConf.

        Some changes may require restarting IDLE.  This depends on each
        extension's implementation.

        All values are treated as text, and it is up to the user to
        supply reasonable values. The only exception to this are the
        'enable*' options, which are boolean, and can be toggled with a
        True/False button.

        Methods:
            extension_selected: Handle selection from list.
            create_extension_frame: Hold widgets for one extension.
            set_extension_value: Set in userCfg['extensions'].
            save_all_changed_extensions: Call extension page Save().
        rz Feature Extensions rz Help Menu Extensions rrrbrowse)listvariable
selectmodez<<ListboxSelect>>r)rIrHnwsrrrjnsrr)rrrjrrgNr{z} r")rrsew)rextension_namesr"r	HelpFrame
frame_helprrrextension_listrextension_selectedr*rrr
details_framerurconfig_framecurrent_extension
outerframetabbed_page_setrrIcreate_extension_frame
selection_setr&)r`	frame_extscroll	ext_namesrNs     rcrzExtPage.create_page_extensionsos0 )t6$:<	#Da$<>	q+!!!A!.%id>R>R19;  !4d6M6MN9d.A.A.G.GH+1::*'	SI  q ?1!D1qab!WMB'!%#22	t/	:H''1!C(2T9I	:	
  +))!,%	1Qv6
dQq)1U;rdc
i|_tjdD]}g|j|<|jD]}t|jj|}|Dcgc]}|j
dr|}}|D]}|j|||z}|D]}|jj||d}	ddd|}d}	|jj|||d|
}t|}	|	jt||j|j!|||||	dy	cc}w#t$r%	t|}d}n#t$r|}d	}YnwxYwYwxYw#t$r|}YwxYw)zAFill self.extensions with data from the default and user configs.F)active_onlyenableT)raw)TrueFalserrN)r6rr)r7r6rr3var)rIr0
GetExtensionsrr
GetOptionList
startswithremoverKeyErrorrr&rrrrappend)
r`rNopt_listopt_nameenablesdef_strdef_objopt_typer3rs
          rcrzExtPage.load_extensionss ..5A	+H(*DOOH%	+%	4Hd11??IJH199H"--h7 9G9#
*)
*)H$
4--11 (26	(&*E:7CG%H$ ,,00$hX4$+1-E
 oE
#)00(:B=D;@9<	234-
4%	49 (("%g,#(%(")#'(	("$#E$sN)D?
E E5	E2
EE2
E,	)E2+E,	,E21E25FFc|jj}|r|jj|}|||jk7rV|jrJ|jjd|j|jjd|_|rE|jj||j|jddd||_yy)z/Handle selection of an extension from the list.Nrrkrrr)	r	rqrr
rrrgrid_forgetru)r`r8newsels   rcr
zExtPage.extension_selecteds$$113((,,V4F>Vt'='==%%""))r)2!!$"8"89EEG)-&%%6%2f%**!6*J%+D"rdc&t|jdd}||j|<|j}t	|j
|D]\}}t
||d}|j|dt|d}|dd	k(r(t||d
dd
j|dtdc|ddk(r4t||d|jdfdj|dtdt||dj|dtdy)z=Create a frame holding the widgets to configure one extensionrrGr7rkrr"rr6rrrr)rrrrIr)rrrjrrrrr)rrrrIr)rrIN)VerticalScrolledFramerrinterior	enumeraterIr&rurr$rr%rr)r`rNf
entry_arearoptlabelrs        rcrzExtPage.create_extension_frames!$"4"4SL&'(#ZZ
!$//(";<	EHC*3v;7EJJ3qJ4e*C6{f$J$*WA"ds1QQdGV%jsU'+{{D&9Qt!Djs"Qt!D#	E$	rdc|d}|d}|djjxs|}|dj|||k(r|jj	||S|jj|||S)zReturn True if the configuration was added or changed.

        If the value is the same as the default, then remove it
        from user config file.
        r7rr)rrrrRemoveOptionr)r`sectionr2r7rr3s      rcset_extension_valuezExtPage.set_extension_values6{i.E
 &&(3GE
u
W##00$??))'4??rdcd}|jD]-}|j|}|D]}|j||sd}/|r|jjyy)zSave configuration changes to the user config file.

        Attributes accessed:
            extensions

        Methods:
            set_extension_value
        FTN)rIr7rSave)r`has_changesrNoptionsr2s     rcrz#ExtPage.save_all_changed_extensionssj	'Hooh/G
'++Hc:"&K
'	'
!!#rd)rrrrKrrr
rr7rrrs@rcrwrwfs)&=<~,4\
,4@"$rdrwcNeZdZfdZdZdZdZdZdZdZ	dZ
d	ZxZS)
rcft||fi||j|jyr)rrKcreate_frame_help
load_helplist)r`rcfgrs   rcrKzHelpFrame.__init__+s-
'3' rdct|}t|ddt|_t	|}|jj
|d<|j|jd<|jjd|jt|}t|ddd	|j
|_t|dd	|j|_
t|d
dd	|j
|_|j!t"ddt$t&|jj!t"t(t$t&|j!t*t,t.|j!t*ddt.|jj!t0t,d|jj!t0t,|jj!t0t,dy)a8Create LabelFrame for additional help menu sources.

        load_helplist loads list user_helplist with
        name, position pairs and copies names to listbox helplist.
        Clicking a name invokes help_source selected. Clicking
        button_helplist_name invokes helplist_item_name, which also
        changes user_helplist.  These functions all call
        set_add_delete_state. All but load call update_help_changes to
        rewrite changes['main']['HelpFiles'].

        Widgets for HelpFrame(LabelFrame):  (*) widgets bound to self
            frame_helplist: Frame
                (*)helplist: ListBox
                scroll_helplist: Scrollbar
            frame_buttons: Frame
                (*)button_helplist_edit
                (*)button_helplist_add
                (*)button_helplist_remove
        rTrrrrEditr~r)rlrrIrAdd)rlrIrRemover)rprrqrr)rprrrrrrN)r!rr
helplistr*rrrhelp_source_selectedr#helplist_item_editbutton_helplist_edithelplist_item_addbutton_helplist_addhelplist_item_removebutton_helplist_removerrr	rrr
rrr)r`frame_helplistscroll_helplist
frame_buttonss    rcr>zHelpFrame.create_frame_help0s*tqD %'
$N3%)]]%8%8	"*9*=*=

&'

.0I0IJd
$*F*!8!8%:!$*E!7!7$9 '-HJ!:!:'<#
	AAdN

Qt$G%:AAA>!!&&C&B  %%3q%9##((c!!(Drdc$|jy)z+Handle event for selecting additional help.N)set_add_delete_stateres  rcrFzHelpFrame.help_source_selectedbrrdc|jjdkr7|jjd|jjdy|jjr7|jjd|jjdy|jjd|jjdy)zAToggle the state for the help list buttons based on list entries.rrrN)rEsizerHrrLrqrs rcrQzHelpFrame.set_add_delete_statefs==!#%%++M:''--m<}}))+))//?++11.A))//
>++11-@rdct|dj}|rO|jj||jjt|d|jyy)zHandle add button for the help list.

        Query for name and location of new help sources and add
        them to the list.
        zNew Help SourcerN)r6r
user_helplistr!rErrupdate_help_changes)r`help_sources  rcrIzHelpFrame.helplist_item_addssW!'89@@%%k2MM  k!n5$$&rdc|jjt}|j|}t	|d|d|dj
}|rp||k7rj||j|<|jj
||jj||d|j|jyyy)zHandle edit button for the help list.

        Query with existing help source information and update
        config if the values are changed.
        zEdit Help Sourcerr)menuitemfilepathN)
rEr!rrUr6rrWrrVrQ)r`
item_indexrWnew_help_sources    rcrGzHelpFrame.helplist_item_edits]]((0
((4$($Q$Q&		
+=-<Dz*MM  ,MM  _Q-?@$$&%%' >?rdc|jjt}|j|=|jj	||j|j
y)z`Handle remove button for the help list.

        Delete the help list item from config.
        N)rEr!rrUrWrVrQ)r`r[s  rcrKzHelpFrame.helplist_item_removesP
]]((0
z*

Z(  "!!#rdcitdd<tdt|jdzD]E}tj	ddt|dj
|j|dz
ddGy)z2Clear and rebuild the HelpFiles section in changesr		HelpFilesr;Nr)rrrrUr0rri)r`nums  rcrVzHelpFrame.update_help_changessq')$C 2 23a78	=CKSHHT//A6r:;
=	=rdctj|_|jj	dd|jD]%}|jjt|d'|jy)Nrr)r0GetAllExtraHelpSourcesListrUrErWrrrQ)r`	help_items  rcr?zHelpFrame.load_helplists`%@@B

Q&++	4IMM  il3	4!!#rd)
rrrrKr>rFrQrIrGrKrVr?rrs@rcrr)s3
0Ed$A
'((	$=$rdrc>eZdZdZdZdZdZedZdZ	dZ
y)	VarTracez"Maintain Tk variables trace state.c g|_g|_y)aStore Tk variables and callbacks.

        untraced: List of tuples (var, callback)
            that do not have the callback attached
            to the Tk var.
        traced: List of tuples (var, callback) where
            that callback has been attached to the var.
        N)untracedtracedrs rcrKzVarTrace.__init__s
rdcl|jj|jjy)zClear lists (for tests).N)rhrrirs rcrzVarTrace.clears$	


rdct|tr|j||}|jj	||f|S)a_Add (var, callback) tuple to untraced list.

        Args:
            var: Tk variable instance.
            callback: Either function name to be used as a callback
                or a tuple with IdleConf config-type, section, and
                option names used in the default callback.

        Return:
            Tk variable instance.
        )
isinstancetuple
make_callbackrhr!r`rcallbacks   rcrzVarTrace.adds;h&))#x8H

c8_-
rdcfd}|S)zCReturn default callback function to add values to changes instance.cPtjgjy)z&Add config values to changes instance.N)rr0r)r2rrs rcdefault_callbackz0VarTrace.make_callback.<locals>.default_callbacks22	2rdrh)rrrss`` rcrnzVarTrace.make_callbacks	3 rdc|jrZ|jj\}}|jd||jj	||f|jrYyy)z0Attach callback to all vars that are not traced.writeN)rhpop	trace_addrir!ros   rcr\zVarTrace.attachsLmm MM--/MCMM'8,KKX/mmrdc|jrn|jj\}}|jd|jdd|jj||f|jrmyy)z!Remove callback from traced vars.rurrN)rirvtrace_remove
trace_inforhr!ros   rcdetachzVarTrace.detachs]kk KKOO-MCWcnn&6q&9!&<=MM  #x1kkrdN)rrrrrKrrryrnr\r{rhrdrcrfrfs2,
"  02rdrfa7When you click either the Apply or Ok buttons, settings in this
dialog that are different from IDLE's default are saved in
a .idlerc directory in your home directory. Except as noted,
these changes apply to all versions of IDLE installed on this
machine. [Cancel] only cancels changes made since the last save.
u
Font sample: This shows what a selection of Basic Multilingual Plane
unicode characters look like for the current font selection.  If the
selected font does not define a character, Tk attempts to find another
font that does.  Substitute glyphs depend on what is available on a
particular system and will not necessarily have the same size as the
font selected.  Line contains 20 characters up to Devanagari, 14 for
Tamil, and 10 for East Asia.

Hebrew and Arabic letters should display right to left, starting with
alef, א and ا.  Arabic digits display left to right.  The
Devanagari and Tamil lines start with digits.  The East Asian lines
are Chinese digits, Chinese Hanzi, Korean Hangul, and Japanese
Hiragana and Katakana.

You can edit the font sample. Changes remain until IDLE is closed.
z
Highlighting:
The IDLE Dark color theme is new in October 2015.  It can only
be used with older IDLE releases if it is saved as a custom
theme, with a different name.
z
Keys:
The IDLE Modern Unix key set is new in June 2016.  It can only
be used with older IDLE releases if it is saved as a custom
key set, with a different name.
a_
General:

AutoComplete: Popupwait is milliseconds to wait after key char, without
cursor movement, before popping up completion box.  Key char is '.' after
identifier or a '/' (or '\' on Windows) within a string.

FormatParagraph: Max-width is max chars in lines after re-formatting.
Use with paragraphs in both strings and comment blocks.

ParenMatch: Style indicates what is highlighted when closer is entered:
'opener' - opener '({[' corresponding to closer; 'parens' - both chars;
'expression' (default) - also everything in between.  Flash-delay is how
long to highlight if cursor is not moved (0 means forever).

CodeContext: Maxlines is the maximum number of code context lines to
display when Code Context is turned on for an editor window.

Shell Preferences: Auto-Squeeze Min. Lines is the minimum number of lines
of output to automatically "squeeze".
a
ZzDummy: This extension is provided as an example for how to create and
use an extension.  Enable indicates whether the extension is active or
not; likewise enable_editor and enable_shell indicate which windows it
will be active on.  For this extension, z-text is the text that will be
inserted at or removed from the beginning of the lines of selected text,
or the current line if no selection.
)z
Fonts/Tabsrmr=rrnc@|sy	t|y#t$rYywxYw)z(Return 's is blank or represents an int'TF)rr&)r,s rcrr3	s)As	ceZdZdZdZy)r-zA pure Tkinter vertically scrollable frame.

    * Use the 'interior' attribute to place widgets inside the scrollable frame
    * Construct and pack/place/grid normally
    * This frame only allows vertical scrolling
    cH	tj||g|i|t|t}|j	t
ttt|dd|jdj	ttt|jjjdj!dtx|_j%ddt&	fd	}j)d
|	fd}j)d
|y)Nr)rrrprqr)rrerrIr#r)windowrcpjjf}jd|zy)Nz	0 0 %s %s)scrollregion)winfo_reqwidthwinfo_reqheightr)r8rScanvasr.s  rc_configure_interiorz;VerticalScrolledFrame.__init__.<locals>._configure_interiorZ	s2++-x/G/G/IJDMM{T'9M:rdz<Configure>cjjk7r"jjyy)N)rI)rwinfo_width
itemconfigure)r8rr.interior_ids rc_configure_canvasz9VerticalScrolledFrame.__init__.<locals>._configure_canvas`	s?&&(F,>,>,@@$$[8J8J8L$MArd)r!rKr*rrrr
r
rrrrr	rrxview_movetoyview_movetor.
create_windowrr)
r`rLrkw
vscrollbarrrrr.rs
       @@@rcrKzVerticalScrolledFrame.__init__E	s
tV1d1b1tH5
QU59!'1~~SBD6&,,/	AA$)=0
**1a*L	;	

m%89	N	M#45rdN)rrrrrKrhrdrcr-r->	s!rdr-__main__)r	z#idlelib.idle_test.test_configdialogrF)	verbosityexit)run)crrtkinterrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr tkinter.ttkr!r"r#r$r%r&r'r(r)r*r+r,r-r.tkinter.fontr+rr/idlelib.configr0r1idlelib.config_keyr2idlelib.dynoptionr3idlelibr4
idlelib.queryr5r6idlelib.textviewr7idlelib.autocompleter8idlelib.codecontextr9idlelib.parenmatchr:idlelib.formatr;idlelib.squeezerr<r=rrr?rr{ryr|r~rrwrrfr[rrrr-runittestr	idlelib.idle_test.htestrrhrdrc<module>rs

JJJJJJJJ
,,,,!2,+1&-+)*%0
/[*oB8BlE<g1ug1TQ
uQ
hnunb
OKeOKdBFuBFJ@$e@$FC$
C$L:2:2z*"
*g;
|(E(Vz	.!%H+rd