python (3.11.7)

(root)/
lib/
python3.11/
idlelib/
__pycache__/
configdialog.cpython-311.pyc

ebNdZddlZddlmZmZmZmZmZmZm	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^d0kr'dd1l_m`Z`e`d2d3d45dd6lambZbebeOdSdS)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)ScrollableTextFramecbeZdZdZdddddZdZdZdZd	Zd
Z	fdZ
dZd
ZdZ
xZS)ConfigDialogzConfig dialog for IDLE.
    F)_htest_utestctj||||_|ri|_|s|||pd|dz}||sdndz}|d|d||	|
tt|||
d|j|jjt$|s>|||dSdS)	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)selfrMrPrArBxys       H/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/idlelib/configdialog.pyrLzConfigDialog.__init__1ss	$'''	&#%F 	MMOOO

5..///  2%  f$=BB#>

k!kkakk"""	
e5111v

($+666
((***		MMOOO		ct|dx|_}|jdt|x|_}t||_t||j|_t||j|_
t||j|_t||_t||_||j
d||jd||jd||jd	||jd
||jd||t(t*t,|t0
dS)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 
ExtensionssideexpandfillrqN)r!framegridr(noteExtPageextpageHighPagehighpageFontPagerYKeysPagekeyspageWinPagewinpageShedPageshedpageaddenable_traversalpackrr	rcreate_action_buttonsr)rarurws   rdrTzConfigDialog.create_widgets`s$#47777
U
v&&&#E??*	Dt}} t|44
 t}55
 t|44
t}} 
Y///\222X...K000\222L111		s4d	333""$$))v)66666rectjri}nddi}t|jd}t|d}i|_d|jfd|jfd|jfd|jffD]J\}}t|f||td	||j|<|j|td
Kt|dd
t|t|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
        ri)rhOkApplyCancelHelp)rmcommand	takefocus)rqpadxr)rIborderwidthrt)r4isAquaTkr!rubuttonsokapplyrXhelpr#r
rrrr)rapadding_argsouter
buttons_frametxtcmds      rdrz"ConfigDialog.create_action_buttonss($?	/LL%v.Ldj!,,,eQ///

47O
dj!
t{#
TY	!	6	6HC
!'}!83!&!8!8*6!8!8DLL""1"5555
eA1---222<<<'''recV||dS)z*Apply config changes, then dismiss dialog.N)rdestroyras rdrzConfigDialog.oks 

rec|t|j|dS)z+Apply config changes and leave dialog open.N)deactivate_current_configchangessave_allrysave_all_changed_extensionsactivate_config_changesrs rdrzConfigDialog.applysR&&(((00222$$&&&&&rec`t|dS)zPDismiss config dialog.

        Methods:
            destroy: inherited
        N)rclearrrs rdrXzConfigDialog.cancels"	

rec|jjdda|tdS)N1.0end)rYfont_samplegetfont_sample_textgrab_releasesuperr)ra	__class__s rdrzConfigDialog.destroysJ=488FF
rec	|j|jd}t	|dt
t|dzdS)zCreate textview for config dialog help.

        Attributes accessed:
            note
        Methods:
            view_text: Method from textview module.
        rm)optionzHelp for IDLE preferencesr@)rPcontentsN)rwtabselectstripr7help_common
help_pagesr)rapages  rdrzConfigDialog.helpswy}}TY--//}??EEGG$9&z~~dB'?'??	A	A	A	A	A	ArecL|jjD]}|dS)z/Remove current key bindings in current windows.N)rMrNRemoveKeybindings)rainstances  rdrz&ConfigDialog.deactivate_current_configs51	)	)H&&((((	)	)recP|jjD]z}||||||{tD]}|	dS)zApply configuration changes to current windows.

        Dynamically update the current parent window instances
        with some of the configuration changes.
        N)
rMrNResetColorizer	ResetFontset_notabs_indentwidthApplyKeybindingsreset_help_menu_entriesupdate_cursor_blinkreloadablesreload)rarklasss   rdrz$ConfigDialog.activate_config_changess1	+	+H##%%%   ++---%%''',,...((**** 		ELLNNNN		re)r@)__name__
__module____qualname____doc__rLrTrrrrXrrrr
__classcell__rs@rdr?r?-s-5-----^$7$7$7L&&&P
'''
A
A
A)))
rer?u^<ASCII/Latin1>
AaBbCcDdEeFfGgHhIiJj
1234567890#:+=(){}[]
¢£¥§©«®¶½ĞÀÁÂÃÄÅÇÐØß

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

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

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

<East Asian>
〇一二三四五六七八九
汉字漢字人木火土金水
가냐더려모뵤수유즈치
あいうえおアイウエオ
c>eZdZfdZdZdZdZdZddZxZ	S)	r|ct||j|_||dSN)rrLhighlight_samplecreate_page_font
load_font_cfg)ramasterr{rs   rdrLzFontPage.__init__sP
    ( 9rec6tt||j|_tt||j|_tt
||j|_t|dtd}t|dtd}t|}t|}t|td}t|ddt	|_|jd
|j|jd|j|jd|jt%|}||jj
|j|jt|d}t-||jd|_t1||jddd|_t5|}|j|_|jt:dd|jt>t@|!dd|"dd|#dddd|#dddddd|$tJddtL|$tJddtL|$tJtN|j$ttPtL|$ttR |$ttN|j$ttN|j$ttNd!"|$tPtT#dS)$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 rreliefrmz Font Sample (Editable) zFont Face :)justifyrmTrIrexportselection<ButtonRelease-1>z<KeyRelease-Up>z<KeyRelease-Down>r)yscrollcommandzSize :rlNrBold)variableonvalueoffvaluerm)wraprJrIweightr)rowcolumnrpadyrnsew)rrrowspanrrrkrqrrrsrqanchorrp)rqrsrDrqrr)rrrs)+r\rrvar_changed_font	font_name	font_sizer	font_boldr"rr!r&rrr
rZbindon_fontlist_selectr*configyviewsetr3sizelistr$bold_toggler=rmrrinsertrrcolumnconfigurerowconfigurervrrrrr	rr)	ra
frame_fontframe_sampleframe_font_nameframe_font_paramfont_name_titlescroll_fontfont_size_titlefont_sample_frames	         rdrzFontPage.create_page_font!sL!Yt__d6KLL Yt__d6KLL Z%5%5t7LMM !F%:<<<
!$Af'ACCC 
++ ,,MCCC*.GGG

.0GHHH
,d.EFFF
.0GHHH004=#6777
KO<<< 0x@@@%&6MM
& 4>AF4440==,1T1===%5666	
Qq)))!A&&&Aaaa888a111!'		)	)	)	#AAA>>>3QQQ???#a000
T:::d+++$q111
Q///4;;;d66666rec0tj|dd}|d}|d}|ddk}tt	tj|}|D]"}|jt|#|j
|d|D}	||}|j||j
||j||j|n#t $rYnwxYw|jd||j||d	S)
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EditorWindowrrrboldc6g|]}|S)lower).0ss  rd
<listcomp>z*FontPage.load_font_cfg.<locals>.<listcomp>s ---!AGGII---re)78910111213141618202225293440N)r0GetFontrsortedrtkfontfamiliesrZrrrindexsee
select_set
select_anchoractivate
ValueErrorrSetMenurset_samples)	raconfigured_fontrrrfontsfontlc_fontscurrent_font_indexs	         rdrzFontPage.load_font_cfgzs#*4HH#A&,,..	#A&	$Q'/	s6?4001122	,	,DM  d++++9%%%--u---	!)	!:!:M0111M$$%7888M''(:;;;M""#56666			D		

O'	)	)	)	
9%%%s?A=D==
E
	E
cr|j}tddd||j}tddd||j}tddd||dS)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.
        rrr.z	font-sizez	font-boldN)rrr
add_optionrrr+raparamsvalues   rdrzFontPage.var_changed_fonts""$$6>65AAA""$$6>;FFF""$$6>;FFFrec|j|jjdkrtnt
}|j|dS)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)	rZrtypenamerrrrr)raeventr.s   rdrzFontPage.on_fontlist_selectsV}  */\99vGG4::<<(((((reNc|j}|jrtjntj}||j|f}||jd<||jd<dS)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)	rrrr"BOLDNORMALrrr)rar:rfont_weightnew_fonts     rdr+zFontPage.set_samplessqN&&((	%)^%7%7%9%9Lfkkv}t~1133[A#+ (0f%%%rer)
rrrrLrrrrr+rrs@rdr|r|sW7W7W7r   D


)))11111111rer|ceZdZfdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZxZS)rzct|||_||_t||_||dSr)	rrLrywinfo_toplevelcdr+stylecreate_page_highlightload_theme_cfgrarryrs   rdrLzHighPage.__init__sl
   ''))6]]
""$$$rec
ziddddddddd	d
ddd
ddddddddddddddddddd _ttj_ttj_t_	ttj
_ttj_
ttj_t!d!t"d"#}t!d!t"d$#}t%|t&d%&}|jx}_|d'd(d%d%t.d)t0*|d+d,|d-d.d/}|D]!\}}|t6||"t9|d0t6}t?d%|D]=}	||	d1|	t9tA|d2d3d >jD]+}
|
ffd4	}|!j|
d5|,d6|d7<j"d8d%d9:tG|d8;_$tG|}tKj$d<j&=_'tQj$jd>d)?_)tU|j	d%d@j+A_,tU|j	d)dBj+A_-j	.d%tK|dCj/=_0tc|dDE}
tU|j
d%j2dFG_3tU|j
d)j2dHG_4tQ|jd>d>I_5tQ|jd>d>I_6tK|dJj7=_8tc|d!K_9|:tvdLdLtxtzM|:t|dLdLt~Nj$:t|dLdLt~N|:t|dLd)O|:t|dLdLtxtzMj':t|txt~dPdQRj):t|txt~dPdSRj,:tvtTj-:ttTj0:tt~dLdLU|
:t|tdLdLVj3:t|tdLWj4:t|tdLd!Vj5:t|t~dLdLUj6:t|t~tdLdLXj8:t|t~dLdLUj9:t|t~dLYd>S)ZaReturn 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 TextnormalzCode ContextcontextzPython KeywordskeywordzPython Definitions
definitionzPython BuiltinsbuiltinzPython CommentscommentzPython Stringsstringz
Selected Texthilitez
Found TexthitCursorcursorzEditor BreakpointbreakzShell Promptconsolez
Error TexterrorzShell User OutputstdoutzShell User ExceptionstderrzLine Number
linenumberrz Custom Highlighting rz Highlighting Theme r)rr)courierr@hand2r)r.rSrJrIrhighlightthicknessrz<Double-Button-1>cdSNrTres rd<lambda>z0HighPage.create_page_highlight.<locals>.<lambda>osrez<B1-Motion>cdSr_rr`s rdrbz0HighPage.create_page_highlight.<locals>.<lambda>ps7re)")z# Click selects item.rN
rI)zcode context sectionrJrd)z| cursorrSrd)defrK) rI)funcrL)z(param):
  rI)z"Return None."rO)z

  var0 = rI)z'string'rO)z

  var1 = rI)z
'selected'rP)z

  var2 = rI)z'found'rQ)z

  var3 = rI)listrM)(rI)NonerK)z)
rI)z  breakpoint("line")rT)z

rIz>>>rU)z	 3.14**2
rI)z9.8596rWrdrl)z pri rI)nrV)zt(
rI)SyntaxErrorrXrdrz.0drgc<j|dSr)highlight_targetr)r:elemras  rdtemz+HighPage.create_page_highlight.<locals>.tems %))$/////rez<ButtonPress-1>disabledstateframe_color_set.TFramesolid)rr)rDzChoose Color for :rmrN)r]
Foreground)rr5rmr
BackgroundzSave as New Custom Themez	Select : rlza Built-in Themerr5rrmza Custom ThemerzDelete Custom Themerrrqrrrrrsrrqrr)rqrrrsrrrrrqrsrrrqrrrr)rqrsrrr)rqrsr)Dtheme_elementsr\rrvar_changed_builtin_namebuiltin_namevar_changed_custom_namecustom_namerfg_bg_togglevar_changed_colorcolorvar_changed_theme_sourcetheme_sourcevar_changed_highlight_targetrqr"rr=rrmr	configurer
rrrrlenr
splitlinesrangestrtag_bindrDr!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)raframe_customframe_themesample_framermstring_tagsrOtagn_lineslinenoelementrsframe_fg_bg_toggletheme_type_titles`             rdrEzHighPage.create_page_highlightsj!8
I
y	

!,
y

y
h
X
%
h
 
I
'
  
#H!"
<#&$KK$!>@@";;$!=??&t,,[[$!799
#KK4  $"?AA '$!B!D!D
"$Af'>@@@ 1V&<>>>+U;;;'3'88t$(!AD		B	B	B	
		%'8'8999		-!2!23339$'	*	*KFCKKVS))))dhhuc**557788Aw''	&	&FKK6


!3s7||#4#4999999$
&
&
&
&*	J	JG '
0
0
0
0
0
0
MM'02CS
J
J
J
J"W

51$+		-	-	-$\9QRRR"<00 &$+?!(!(!(($d&;T#$&&&!"T->a!4+HJJJ
!"T->a!4+HJJJ
	
a   "(#=.#0#0#0!;??? +d&7q+2D!F!F!F +d&7q+2B D D D)T.dDDD'T-tTCCC$*"7*%,%,%,!#;A>>>	t!!DtLLLc:::!!s!CCCSqq999qqD		B	B	B""Dqqq"QQQ#dKKK
T!,,,
U1---$$&qqq$III3qqqAAA""AA">>>!!s111!EEE3QQQ???#AaaaHHH!&&Caaa&HHHSqq99999rec	J|jtjdddddtj}|jrtjdd}||j	||tjdd}||s5|j
d	|jd
n|j
	||dntjdd}||j
	||tjdd}||j	||d|t|j}|j	||d||dS)
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
        rThemedefaultboolrr8r	highlightuserrt- no custom themes -rN)rrr0	GetOptionCurrentThemerGetSectionListsortrr*rrurrrrirrpaint_theme_sampleset_highlight_target)racurrent_option	item_listtheme_namess    rdrFzHighPage.load_theme_cfgs*	
h0DDD	E	E	E".00  ""	> /	;GGINN$$Y??? /DDINN
A$**=999 $$%;<<<<''	9Q<@@@@ /DDINNO##I~>>> /	;GGINN$$Y	!===4.//[^<<<!!!!!#####recd}|j}||vrctjddd|vr#tddd|dtddd|d|jd<nDtddd|tdddd	d	|jd<|d
S)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 Newrrr9rname2zNew theme, see Helprmr@N)rrr0rrr2rr)rar4
old_themesr5s    rdrz!HighPage.var_changed_builtin_names2
!%%''
""!&'6::*LL""67FJqMJJJvw???)>Dv&&vw>>>vw<<<)+Dv&!!!!!rec|j}|dkr3tddd||dSdS)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.
        rrrr9N)rrrr2rr3s   rdrz HighPage.var_changed_custom_names^ $$&&***vw>>>##%%%%%+*rec|j}tddd||r|dS|dS)zProcess toggle between builtin and custom theme.

        Update the default toggle value and apply the newly
        selected theme type.
        rrrN)rrrr2rrr3s   rdrz!HighPage.var_changed_theme_sourcesj!%%''67Iu===	+))+++++((*****rec.|dS)zProcess change to color choice.N)on_new_color_setrar4s  rdrzHighPage.var_changed_color*srec.|dS)z5Process selection of new target tag for highlighting.N)rrs  rdrz%HighPage.var_changed_highlight_target.!!#####rec(|jr0d|jd<d|jd<|jddSd|jd<|jdd|jd<|jddS)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
        rIrurtrz	!disabledN)rrrrrrurrs rdrzHighPage.set_theme_type2s$  ""	<(0DW%'1DOG$%++M:::::(2DW% &&~666'/DOG$%++N;;;;;rec|j}|j|jdd}tj|d|z|\}}|r||kr|jrLd}||}|sdS|	||j
|dS|j
|dSdSdS)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
        rD
backgroundzPick new color for : )rMrPinitialcolorz_Your changes will be saved as a new Custom Theme. Enter a name for your new Custom Theme below.N)rqrrDlookuprr.askcolorrget_new_theme_name
create_newrr)ratarget
prev_color	rgbTupletcolor_stringmessage	new_themes       rdrzHighPage.get_colorNs$&**,,Z&&t';G'D'355
"."7#:6#A'#)#)#)	<	-\Z77 $$&&

-K 33G<<	 1FOOI...JNN<00000
|,,,,,	-	-77rec|j}|jd||jrdnd}|j|j}|jj|fi||i|j	}|dz|z}td|||dS)z4Display sample of new color selection on the dialog.rvr
foregroundr-rN)rrrDrrrrqr
tag_configrrr2)ra	new_colorplanesample_elementtheme
theme_elements      rdrzHighPage.on_new_color_settsJNN$$	
5)LLL $ 1 5 5 7 7I\,T-B-F-F-H-HI((NNE9;MNNN $$&&&,u4
;}iHHHHHrectjddtjddz}t|d||j}|S)z*Return name of new theme from query popup.rrrzNew Custom Themer0rr5result)rar
used_namesrs    rdrzHighPage.get_new_theme_namesO-fkBB'	;??@
(':???E	recb|d}|r||dSdS)zPrompt for new theme name and create the theme.

        Methods:
            get_new_theme_name
            create_new
        zNew Theme Name:N)rr)ranew_theme_names  rdrzHighPage.save_as_new_themesB001BCC	,OON+++++	,	,recD|jrd}|j}nd}|j}t	j||}|tdvr#td|}|D]
}||||<|||t	jdd}|	|j
|||jd|
dS)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)rar
theme_type
theme_namer
theme_changesrcustom_theme_lists        rdrzHighPage.create_news"&  ""	0"J*..00JJJ)--//J)*jAA	---#K0<M(
<
<%27%;	'""

ni000$3FKHH    1>BBBa   rec|jdkrO|jd|jd|jdnN|jd|jd|jd|dS)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
        rRrrrN)rqrrrurrrset_color_samplers rdrzHighPage.set_highlight_targets$ $$&&(22J]+++J]+++!!!$$$$J^,,,J^,,,!!!$$$rec.|dS)zrChange color sample based on foreground/background toggle.

        Methods:
            set_color_sample
        N)r)raargss  rdrz!HighPage.set_color_sample_bindings	
rec|j|j}|jrdnd}|j||}|jd|dS)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
        rrrvrN)rrqrrrtag_cgetrDr)rarrrs    rdrzHighPage.set_color_samplesw!$"7";";"="=> $ 1 5 5 7 7I\%..sE::
5%HHHHHrec$|jr|j}n|j}|jD]}|j|}tj||}|dkrtj|dd|d<|tdvr=td|}|dz|vr||dz|d<|dz|vr||dz|d<|jj	|fi||
dS)	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
        rSrIrrz-foregroundrz-backgroundN)rrrrrr0GetHighlightrrrr)rar
element_titlercolors
theme_dicts      rdrzHighPage.paint_theme_samplesI(  ""	+%))++EE$((**E!0
	@
	@M)-8G*5'::F(""'/'<x()())5(7|$,,,$[1%8
]*j88+5g
6M+NF<(]*j88+5g
6M+NF<(,D!,W??????rectjd||D]1}||}tjd|||2dS)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)rarrrr5s     rdrzHighPage.save_newsi	%00<<<	P	PG'NE[)33JOOOO	P	Prec$tj|i|Srr/askyesnorarkwargss   rdrzHighPage.askyesno#"D3F333rec|j}d}|d||z|sdS|jt
d|tjdd}|	|s6|j
d|j
|dn!|j
||d	|jtjd
dd|jtjd
dd
t
|j|j|dS)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 ThemerMNrrrrrrrrr9)rrrrCrrdelete_sectionr0rrrrurr*rr
defaultCfgGetrrryrrr)rardelmsgrs    rdrzHighPage.delete_custom's,%))++
A}}*!4TCC	F))+++{J777+FK@@		= &&}555O##I/EFFFFO##Iy|<<<h1&9==gyQQRRRh1&9==gvNNOOO00222'')))re)rrrrLrErFrrrrrrrrrrrrrrrrrrrrs@rdrzrzsu}:}:}:~1$1$1$f"""&	&	&	&+++   $$$<<<8$-$-$-L	I	I	I	,	,	,&&&P   8   III$& & & P	P	P	P444-------rerzceZdZfdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZedZdZdZxZS)r}ct|||_||_||dSr)rrLryrBrCcreate_page_keysload_key_cfgrGs   rdrLzKeysPage.__init__Ys_
   ''))rec tt||j|_tt||j|_tt||j|_	tt||j
|_t|dtd}t|dtdt|}t|d}t!|}t!|t"}t%|t&t&|_|jd	|j|jj|d
<|jj|d
<|j|jd<|j|jd<t5|d
|jd|_fdt;dD}t=|d|j	d|jd|_ t=|d|j	d|jd|_!tE|d|jdd|_#tE|d|jdd|_$t5|dd|j%|_&t5|dd|j'|_(t|dd|_)|*tVddtXtZ*tVddtZ|j*tVt\dd|*t^ddtXtZ|0dd |1dd |2dddtf!|j2ddth"|2ddtj"|2ddtl"|j 2ddtftjz"|j!2ddtftjz"|j#2ddth"|j$2ddth"|j)2ddthdd#|j&*t^t\d$d%|j(*t^t\d$d%|d*tntZd$&|d*tnt\d$d'dS)(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)rlorient)rrrrrxscrollcommandzGet New Keys for Selectionrt)rmrruc4g|]}tddS)rr)rir)r!)r
iframe_key_setss  rdrz-KeysPage.create_page_keys.<locals>.<listcomp>s8%%%qAAA%%%rerrzUse a Built-in Key Setr{zUse a Custom Key SetNrzDelete Custom Key SetrxzSave as New Custom Key Setr|rr}rrr)rr
columnspanrkrrrk)rrrkrrT)rqrsrrrrqrsrr)rqrsrrr)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	rrrrrrvrrrrr)rarframe_targettarget_titlescroll_target_yscroll_target_xframesrs       @rdrzKeysPage.create_page_keys`s^d$KK$!>@@";;$!=??$[[4  $"@BB!++$!<>>
"!F,...$!FFFF\**\0ABBB#L11#LDDD#uFFF2#:	<	<	<%)%6%<	"%)%6%<	".=.A*+.=.A*+%#?) = = =%%%% 88%%%!,q	D$6a*1I"K"K"K!,q	D$6a*1G!I!I!I)q	4,dDBBB'q	4+T4AAA)/q	 7/*1*1*1&(.q	 <0(2(2(2$"&);;;	vAAdNNNaadCCC!!vAAA!FFFt!!DtLLL$$Qq$111!!!A!...aaBBB1Qt<<<1R8881R888##!AbD#AAA""q1R4"@@@!Ad;;;1T:::1Qt!!LLL&++AdQR+SSS$))t!Dq)QQQq	Cd4888q	Ca1=====rec	|jtjdddddtj}|jrtjdd}||j	||tjdd}||s5|j
d	|jd
n|j
	||dntjdd}||j
	||tjdd}||j	|tj|tj}||dS)
z?Load current configuration settings for the keybinding options.rKeysrrrrkeysrr- no custom keys -rN)rrr0rCurrentKeysrrrrr*r&rurrdefault_keysr$load_keys_list)rarrkeyset_names    rdrzKeysPage.load_key_cfgs	
x1	 C C C	D	D	D"-//!!##	I /	6BBINN$$Y??? /??INN
A%++M::: $$%9::::''	9Q<@@@@ /??INNO##I~>>> /	6BBINN$$Y0E0G0GHHH*,,K(((((recd}|j}||vrctjddd|vr#tddd|dtddd|d|jd<nDtddd|tdddd	d	|jd<||d
S)z%Process selection of builtin key set.)zIDLE Classic WindowszIDLE Classic UnixzIDLE Classic MaczIDLE Classic OSXrr2r9rrzNew key set, see Helprmr@N)rrr0rrr2r+r7)rar4old_keysr5s    rdrz!KeysPage.var_changed_builtin_names
!%%''  !&&&99II""6668A;GGGvvw>>>(?Df%%vvvu===vvw;;;(*Df%E"""""rec|j}|dkr4tddd|||dSdS)z$Process selection of custom key set.r4rr2r9N)rrrr2r7r3s   rdrz KeysPage.var_changed_custom_name3s^ $$&&(((vvvu===&&&&&)(rec|j}tddd||r|dS|dS)z:Process toggle between builtin key set and custom key set.rr2rN)rrrr2rrr3s   rdrz"KeysPage.var_changed_keyset_source:sh"&&((669e<<<	+))+++++((*****rec|j}|j}|jtd}t
j|rt	d|||dSt
j
|}|dz}t	d|||dS)zStore change to a keybinding.rr3_cfgBindings
extensionsN)rrrrrsplitr0
IsCoreBindingrr2GetExtnNameForEvent)rar4r5key_setr:ext_nameext_keybind_sections       rdrzKeysPage.var_changed_keybindingCs##%%"&&((!%%f--3355a8!%((	Pvwu=====3E::H"*^";|-@%OOOOOrec(|jr0d|jd<d|jd<|jddSd|jd<|jdd|jd<|jddS)z@Set available screen options based on builtin or custom key set.rIrurtrrN)rrrrr(rur&rs rdr$zKeysPage.set_keys_typeOs!!##	A(0DW%'1DOG$*00?????(2DW%!''777'/DOG$*00@@@@@rec|jt}|j|}|d}|jr|j}n|j}tj	}|tdvr5td|}|D]}||||< t|}t|d||j}	|	r|jrdd}
||
}|s6|j||j|dS|||j||j||dz|	z|j||j||j|	dS|j||j|dS)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.
        rr3zGet New KeyszcYour changes will be saved as a new Custom Key Set. Enter a name for your new Custom Key Set below.N - )rr$rrr@rrrr0GetCurrentKeySetrrivaluesr2rget_new_keys_namer&r'create_new_key_setdeleterrr)ra
list_indexbinding	bind_namecurrent_key_set_namecurrent_bindingskey_set_changesr:current_key_sequencesnew_keysr
new_keysets            rdr"zKeysPage.get_new_keys[s\&,,V44
#''
33MMOOA&	!!##	:#'#4#8#8#:#:  #'#3#7#7#9#9 #46676?22%fo.BCO(
I
I*9%*@*F*F*H*H '' $%5%<%<%>%> ? ? ~y%'''-		8!%%''	
8N!33G<<
!8%00<<<%33J???F++J777$$Z000$$Z51IJJJ((444++J777O)))))((444++J77777rectjddtjddz}t|d||j}|S)z)Return new key set name from query popup.rr3rzNew Custom Key Setr)rarrrVs    rdrKzKeysPage.get_new_keys_namesP-ff=='	6::;
 *GZAAAG	recb|d}|r||dSdS)z@Prompt for name of new key set and save changes using that name.zNew Key Set Name:N)rKrL)ra
new_keys_names  rdr)zKeysPage.save_as_new_key_setsB../BCC
	3##M22222	3	3rec:|jddS)z6Activate button to assign new keys to selected action.rN)r#rurar:s  rdr zKeysPage.on_bindingslist_selects"">22222rec|jr|j}n|j}t	j|}i}|D],}|dd}d||}|||<-|tdvr#td|}|D]
}||||<|||t	j	dd}	|	
|j|	||j
d|dS)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.
        rrgr3rrN)rrrrr0GetCoreKeysjoinrsave_new_key_setrrrr*rr$)
ranew_key_set_nameprev_key_set_name	prev_keysrUr:
event_namerOrScustom_key_lists
          rdrLzKeysPage.create_new_key_sets]!!##	7 $ 1 5 5 7 7 $ 0 4 4 6 6():;;		+	+EqtJhhy/00G#*HZ  //%fo.?@O(
9
9"1%"8.999"1&&AA1ABBBq!!!recd}|jr!d}|jt}t	j|}t
|}||jdt|D]}d
||}|dd}|tdvr.|td|vrtd||}|jt|dz|z|rP|j
||j||j|d	Sd	S)
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.
        FTrrgrr]r3rHN)rcurselectionr$rr0	GetKeySetrirrMrr_rrr%r&r')rar8reselectrNkeyset
bind_namesrPkeys        rdr7zKeysPage.load_keys_listsi
))++	9H*0088J#K00&\\
  C(((#	?	?I((6),--C!!B$Igfo-- <<<!&/+6yAC$$S)E/#*=>>>>	8!!*---((444++J77777	8	8rectjd||D]1}||}tjd|||2dS)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
        r3Nr)r8rjr:r5s    rdr`zKeysPage.save_new_key_setsi	 ++K888	J	JE5MEV$..{E5IIII	J	Jrec$tj|i|Srrrs   rdrzKeysPage.askyesnorrec|j}d}|d||z|sdS|jt
d|tjdd}|	|s6|j
d|j
|dn!|j
||d	|jtjd
dd|jtjd
dd
ptjt
|j|j|dS)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 SetrNr3rrr4rrr2rr9)rrrrCrrr	r0rrr&rurr*rrr
rrr6rryrrr$)rar8rrs    rdr'zKeysPage.delete_custom_keyss&**,,C}} 6K#7FF	F))+++v{333+FF;;		=!''
666O##I/CDDDDO##Iy|<<<x26: #FI 6 6	8	8	8h1&9==ffMM9!)!6!8!8	:	:	:	00222'')))re)rrrrLrrrrrrr$r"rKr)r rLr7staticmethodr`rr'rrs@rdr}r}WsB^>^>^>@)))>###('''+++
P
P
P
A
A
A*8*8*8X333333<8886
J
J\
J444       rer}c0eZdZfdZdZdZdZxZS)rct||||dSr)rrLinit_validatorscreate_page_windowsload_windows_cfgrarrs  rdrLzWinPage.__init__sW
     """recrtjdfd}||df|_dS)N[0-9]*c2|duSz+Return 's is blank or contains only digits'N	fullmatchrdigits_or_empty_res rdis_digits_or_emptyz3WinPage.init_validators.<locals>.is_digits_or_empty%//22$>>re%Precompileregisterdigits_onlyrarr~s  @rdrszWinPage.init_validatorsNZ	22	?	?	?	?	?!MM*<==tErecNtt|d|_tt	|d|_tt	|d|_tt	|d|_tt|d|_	tt	|d|_
tt	|d|_tt	|d|_tt|d	|_
tt	|d
|_t|dt d
}t#|d}t%|d}t'||jdd|_t'||jdd|_t#|d}t%|d}t%|d}t-||jd|jd|_t%|d}t-||jd|jd|_t#|d}t%|d}		t5||jddd|jd|_nI#t8$r<t;||jdt=t?dd d!|_YnwxYwt%|d"}
tA|d#|j	$|_!t#|d}t%|d%}t-||j
d&|jd|_"t#|d}
t%|
d'}tG|
|jd(d)d*d(|_$t#|d}t%|d+}t-||jd&|jd|_%tA|d,|j
$|_&t#|d}t%|d-}t-||jd.|jd|_'|(tRd/d/tTtV0|(tRd/dtX1|(tZt\d/d/2|j(t^t\d/d/2|j(t^t\d/d/2|(tRd/dtX1|(tZt\d/d/2|j(t^t`dd/2|(t^t`d/3|j(t^t`dd/2|(t^t`d/3|(tRd/dtX1|	(tZt\d/4|j(tZt\d4|j!(t^t`d5d/2|(tRd/dtX1|(tZt\d/d/2|j"(tRdd/6|
(tRd/dtX1|(tZt\d/d/2|j$(tRdd/6|(tRd/dtX1|(tZt\d/4|j&(t^t`d5d/2|j%(tRt\d5d/2|(tRd/dtX1|(tZt\d/d/2|j'(tRdd/6d7S)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
        )rGeneraleditor-on-startup)rrrJ)rrrI)rIndent
num-spaces)rrcursor-blink)r?r8	popupwait)r?r:rD)r?r:flash-delay)r?r:bell)r?r;	max-widthrz Window Preferencesrrr|z
At StartuprlrzOpen Edit Windowrr5rmzOpen Shell Windowz$Initial Window Size  (in characters)WidthrrltextvariablerJvalidatecommandvalidateHeightzIndent spaces (4 is standard)
)rfrom_torJrrreadonly)rrurJrJzCursor BlinkzCursor blink)rmrz%Completions Popup Wait (milliseconds)rzParen Match Style
expressionopenerparensz;Time Match Displayed (milliseconds)
(0 is until next input)zBell on MismatchzFormat Paragraph Max Widthrrr}rrrqrrrrr~N)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-rirr$cursor_blink_bool
auto_wait_intr'paren_style_typeparen_flash_timebell_onformat_width_intrrr	rrrrr
r)ra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                   rdrtzWinPage.create_page_windowsspR$KKtFHH $!BDD!++$!CEE$[[$!ACC#KK4  "JLL!($!L"N"N";;$!FHH";;$!LNN!++4  "FHH#KK$!OQQ"$Af'<>>>,A666	il;;;
!,D$5Q'")")")!,D$5Q(!*!*!*|;;;%KMMMW==="T^1 $ 05


!h???#T_A $ 05



\q999\"ACCC	I") t/A!$($4u#F#F#FD	I	I	I"* t/A$T%"++->->a#I#I#ID	I#<nEEE!,\6:6G"I"I"I#<Q@@@ 2%LNNN""1G)9EKKK\q999!,5HIII *d.,!0!0\q999 $<===!&4+;1 $ 05!B!B!B##5QQQ\q999"<(DFFF %4+<A $ 05!!!	s4dKKKCaaa888QQQ???""aaa"HHH##qqq#III111===aaa@@@  eABQ GGG5;;;U12AFFF%:::s;;;tAA666  d12 >>>##qr#JJJSqqqAAA$qqqAAASr:::s;;;DCCC"""1"===s;;;4:::uQRa@@@""ABQ"GGGs;;;T!!!DDD"""1"=====s$%L

AMMc|jtjdddd|jtjdddd|jtjddd	d|jtjdd
dd|jtjdddd|jtjd
ddd|j	tjd
dd|j
tjd
ddd|jtjd
dd|jtjd
ddddS)Nrrrrr8rrJintrIrrrr?r8rr:rDrrr;r)
rrr0rrrrrrrrrrrs rdruzWinPage.load_windows_cfgsMh0	#6VEEE	F	F	F8-e===	>	>	>H.u>>>	?	?	?x1,U < < <	=	=	=h0VEEE	F	F	F""8#5nk$G$G$G	H	H	HX/lG55	6	6	6X/lMGGG	H	H	HH.lF44	5	5	5h0/5JJJ	K	K	K	K	Kre)rrrrLrsrtrurrs@rdrr	ss     FFFh>h>h>TKKKKKKKrerc0eZdZfdZdZdZdZxZS)rct||||dSr)rrLrscreate_page_shedload_shelled_cfgrvs  rdrLzShedPage.__init__sW
   recrtjdfd}||df|_dS)Nrxc2|duSrzr{r}s rdrz4ShedPage.init_validators.<locals>.is_digits_or_emptyrrerrrs  @rdrszShedPage.init_validatorsrrectt|d|_tt	|d|_tt
|d|_tt|d|_t|dtd}t|dtd}t|d	
}t|d}t|d
|j|jd|_t|d	
}t|d}t!||jd	d|_t!||jdd|_t|d	
}t|d}t'||jd|_t|d	
}	t|	d}
t|	|jd|jd|_|t.ddt0t||t.ddt0|t.dd	t2|t4t6dd|jt.dd|t.dd	t2|t4t6dd|jt8t6dd|jt8t6dd|t.dd	t2|t4t6dd|jt4dd|	t.dd	t2|
t4t6dd|jt.dddS)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
        )rPyShellauto-squeeze-min-lines)rrautosave)rrline-numbers-default)r?r9maxlinesrz Shell Preferencesrz Editor Preferencesrr|zAuto-Squeeze Min. Lines:rlrrl)rJrrrzAt Start of Run (F5)  zPrompt to Saverrz	No Promptz Show line numbers in new windows)rrJzMax Context Lines :rrrrrr~N)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
)raframe_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           rdrzShedPage.create_page_sheds>'.kk$!N'P'P# t=??
$+KK4  @%B%B!%[[$!JLL!1V&:<<<!$Af'<>>>(-[a'H'H'H$',-I2L(N(N(N$*/,A!8 $ 05+
+
+
'<Q777
z0HIII&T]!%'''(T]! """&+<Q%G%G%G"%*&-O&Q&Q&Q")4*2***&
l:::
m2GHHH
 D,>a $ 05


	c===
ds>>>$))s)KKK$))tAAA)NNN',,#AA,FFFSqqq999aaa@@@E!!!DDD5CCC"''Sqqq'III"''T!!!'LLL&++AA+FFF!!!<<<QQQ???3QQ77777rec	|jtjdddd|jtjddddd	
|jtjdddd	|jtjd
ddddS)Nrrrrrrrrr)rr8rrr?r9r)rrr0rrrrrs rdrzShedPage.load_shelled_cfgSs#''(:	#;%)I)I)I	J	J	J	

(,	:qvGGG	H	H	H!%%h&8(>V'M'M'M	N	N	Nx1mZe E E E	F	F	F	F	Fre)rrrrLrsrrrrs@rdrrss     FFFf8f8f8P
F
F
F
F
F
F
FrercBeZdZfdZdZdZdZdZdZdZ	xZ
S)rxc4t|tjd|_tjd|_|t|_|	|
dS)Nr?)rrLr0r
ext_defaultCfgrext_userCfgris_intload_extensionscreate_page_extensionsrvs  rdrLzExtPage.__init__asx
   &1,?#+L9mmF++##%%%%%rect||_t|dtd}t	|dtd|_|dd|ddt||jd	|_	|j	
d
|jt||j	j
}|j|j	_t|dd
|_|j	ddd|ddd|jdddddg|di|_d|_||_|j	|_d}t/|jD]"}|||dz|zdz}#|j||j	d|d|dddt7|dd|jddddS)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)rJrInwsrrrknsrr)rrrkrrhNr@{z} r)rrsew)rextension_namesr"r	HelpFrame
frame_helprrrextension_listrextension_selectedr*rrr
details_framervrconfig_framecurrent_extension
outerframetabbed_page_setr!r?create_extension_frame
selection_setr&)ra	frame_extscroll	ext_namesrDs     rdrzExtPage.create_page_extensionsisv0 )t6$:<<<	#Da$<>>>	q+++!!!A!...%id>R19;;;  !4d6MNNN9d.A.GHHH+1:*'	SIII  q ???1!D111qab!WMMMB'''!%#2	t//	:	:H''111!C(2T9II  +++))!,,,%%%	1Qv666
dQq)))1U;;;;;rec
i|_tjdD]}g|j|<
|jD]G}t|j|}d|D}|D]}||||z}|D]}|j||d}	ddd|}d}n7#t$r*	t|}d}n#t$r|}d	}YnwxYwYnwxYw	|j|||d|
}n#t$r|}YnwxYwt|}	|	
t||j||||||	dId	S)zAFill self.extensions with data from the default and user configs.F)active_onlyc<g|]}|d|S)enable)
startswith)r
opt_names  rdrz+ExtPage.load_extensions.<locals>.<listcomp>s:999H"--h779x999reT)raw)TrueFalserrN)r8rr)r9r8rr5var)r?r0
GetExtensionsr!r
GetOptionListremoverKeyErrorrr)rrrrappend)
rarDopt_listenablesrdef_strdef_objopt_typer5rs
          rdrzExtPage.load_extensionss! .5AAA	+	+H(*DOH%%%	4%	4Hd1??IIJJH99999G#
*
*)))))H$
4
4-11 (266	(&*E::7CG%HH(((("%g,,#(%(((")#'(	($ ,00$hX4$+1--EE"$$$#EEE$ooE

###)00(:B=D;@9<	23234444-
4%	4%	4sH(
B66
C*CC*C$	!C*#C$	$C*)C*.DDDc|j}|r|j|}|||jkrM|jrF|jd|j|jd|_|rG|j||j|ddd||_dSdS)z/Handle selection of an extension from the list.Nr@rlrrr)	rrgrrrrrgrid_forgetrv)rar:newsels   rdrzExtPage.extension_selecteds$1133	5(,,V44F>Vt'===%
."))r)222!$"89EEGGG)-&	,%%6%222f%**!6*JJJ%+D"""	,	,reclt|jdd}||j|<|j}t	|j|D]\}}t
||d}||dt|d}|dd	kr1t||d
dd
|dtd~|ddkr8t||d|jdfd|dtdt||d|dtddS)z=Create a frame holding the widgets to configure one extensionrrHr9rlrrrr8rrrr)rrrrJr)rrrkrrrlrr)rrrrJr)rrJN)VerticalScrolledFramerrinterior	enumerater?r&rvrr$rr%rr)rarDf
entry_arearoptlabelrs        rdrzExtPage.create_extension_framesW!$"4SLLL&'(#Z
!$/(";<<	E	EHC*3v;777EJJ3qJ444e*C6{f$$J$*WA"ds1QQdGGGGV%%jsU'+{D&9Qt!DDDDjs"Qt!DDDDrec.|d}|d}|dp|}|d|||kr|j||S|j|||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.
        r9rr)rrrrRemoveOptionr)rasectionr*r9rr5s      rdset_extension_valuezExtPage.set_extension_values6{i.E
  &&((3GE
u
W#00$???))'4???recd}|jD],}|j|}|D]}|||rd}-|r|jdSdS)zSave configuration changes to the user config file.

        Attributes accessed:
            extensions

        Methods:
            set_extension_value
        FTN)r?r/rSave)rahas_changesrDoptionsr*s     rdrz#ExtPage.save_all_changed_extensionss	'	'Hoh/G
'
'++Hc::'"&K
'	$!!#####	$	$re)rrrrLrrrrr/rrrs@rdrxrx`s&&&&&=<=<=<~,4,4,4\
,
,
,4@@@"$$$$$$$rerxcNeZdZfdZdZdZdZdZdZdZ	dZ
d	ZxZS)
rctj|fi|||dSr)rrLcreate_frame_help
load_helplist)rarcfgrs   rdrLzHelpFrame.__init__%sL''3'''   rect|}t|ddt|_t	|}|jj|d<|j|jd<|jd|jt|}t|ddd	|j

|_t|dd	|j|_
t|d
dd	|j
|_|t"ddt$t&|jt"t(t$t&|t*t,t.|t*ddt.|jt0t,d|j
t0t,|jt0t,ddS)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
        rTrrrrEditrtr)rmrurJrAdd)rmrJrRemover})rqrrrrs)rqrrsrrrN)r!rr
helplistr*rrrhelp_source_selectedr#helplist_item_editbutton_helplist_edithelplist_item_addbutton_helplist_addhelplist_item_removebutton_helplist_removerrr	rrr
rrr)raframe_helplistscroll_helplist
frame_buttonss    rdr6zHelpFrame.create_frame_help*s*tqD %'''
$N33%)]%8	"*9*=
&'
.0IJJJd
$*F*!8%:%:%:!$*E!7$9$9$9 '-HJ!:'<'<'<#
	AAdNNN
Qt$GGG%:::AAA>>>!&&C&BBB %%3q%999#((c!!(DDDDDrec.|dS)z+Handle event for selecting additional help.N)set_add_delete_stater[s  rdr>zHelpFrame.help_source_selected\rrec|jdkr6|jd|jddS|jr6|jd|jddS|jd|jddS)zAToggle the state for the help list buttons based on list entries.rrrN)r=sizer@rurDrgrs rdrIzHelpFrame.set_add_delete_state`s=!##%++M:::'--m<<<<<}))++
A)//???+11.AAAAA)//
>>>+11-@@@@@rect|dj}|rV|j||jt|d|dSdS)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_helplistrr=rrupdate_help_changes)rahelp_sources  rdrAzHelpFrame.helplist_item_addmst!'899@	'%%k222M  k!n555$$&&&&&	'	'rec|jt}|j|}t	|d|d|dj}|ru||krq||j|<|j||j||d||	dSdSdS)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)
r=r$rrMr6rrMrrNrI)ra
item_indexrOnew_help_sources    rdr?zHelpFrame.helplist_item_editys]((00
(4$($Q$Q		
	(+==-<Dz*M  ,,,M  _Q-?@@@$$&&&%%'''''	(	(==rec|jt}|j|=|j|||dS)z`Handle remove button for the help list.

        Delete the help list item from config.
        N)r=r$rrMrMrNrI)rarSs  rdrCzHelpFrame.helplist_item_removesd
]((00
z*
Z(((  """!!#####recitdd<tdt|jdzD]U}tddt|d|j|dz
ddVdS)z2Clear and rebuild the HelpFiles section in changesr	HelpFilesr;Nr)rrrrMr2rr_)ranums  rdrNzHelpFrame.update_help_changess')$C 233a788	=	=CKSHHT/A6rr:;;
=
=
=
=	=	=rectj|_|jdd|jD](}|jt|d)|dS)Nrr)r0GetAllExtraHelpSourcesListrMr=rMrrrI)ra	help_items  rdr7zHelpFrame.load_helplistst%@BB
Q&&&+	4	4IM  il3333!!#####re)
rrrrLr6r>rIrAr?rCrNr7rrs@rdrr#s
0E0E0Ed$$$AAA
'
'
'((((	$	$	$===$$$$$$$rercFeZdZdZdZdZdZedZdZ	dZ
dS)	VarTracez"Maintain Tk variables trace state.c"g|_g|_dS)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 rdrLzVarTrace.__init__s
recj|j|jdS)zClear lists (for tests).N)r`rrars rdrzVarTrace.clears2	

rect|tr|||}|j||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_callbackr`rrarcallbacks   rdrzVarTrace.addsJh&&	9))#x88H
c8_---
recfd}|S)zCReturn default callback function to add values to changes instance.cRtjgRdS)z&Add config values to changes instance.N)rr2r)r4rrs rddefault_callbackz0VarTrace.make_callback.<locals>.default_callbacks-22		222222rer)rrrks`` rdrfzVarTrace.make_callbacks*	3	3	3	3	3	3 rec|jrW|j\}}|d||j||f|jUdSdS)z0Attach callback to all vars that are not traced.writeN)r`pop	trace_addrarrgs   rdr]zVarTrace.attachsqm	0 M--//MCMM'8,,,KX///m	0	0	0	0	0rec|jru|j\}}|d|dd|j||f|jsdSdS)z!Remove callback from traced vars.rmrrN)rarntrace_remove
trace_infor`rrgs   rddetachzVarTrace.detachsk	2 KOO--MCWcnn&6&6q&9!&<===M  #x111k	2	2	2	2	2reN)rrrrrLrrrprfr]rsrrerdr^r^s,,


"  \ 00022222rer^a7When 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/Tabsrnr2rrocP|sdS	t|dS#t$rYdSwxYw)z(Return 's is blank or represents an int'TF)rr))rs rdrr-	sFtAtuus
%%ceZdZdZdZdS)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
    c	tj||g|Ri|t|t}|t
ttt|dd|j	dttt|
jddtx|_ddt&	fd	}d
|	fd}d
|dS)Nr)rsrqrrr)rr]rrJrr)windowrcf}d|zdS)Nz	0 0 %s %s)scrollregion)winfo_reqwidthwinfo_reqheightr)r:rKcanvasr&s  rd_configure_interiorz;VerticalScrolledFrame.__init__.<locals>._configure_interiorT	sD++--x/G/G/I/IJDMM{T'9M:::::rez<Configure>ckr+dSdS)N)rJ)r{winfo_width
itemconfigure)r:r}r&interior_ids rd_configure_canvasz9VerticalScrolledFrame.__init__.<locals>._configure_canvasZ	sZ&&((F,>,>,@,@@@$$[8J8J8L8L$MMMMMA@re)r!rLr*rrrr
r
rrrrr	rrxview_movetoyview_movetor&
create_windowrr)
rarMrkw
vscrollbarr~rr}r&rs
       @@@rdrLzVerticalScrolledFrame.__init__?	s}
tV1d111b111tH555
QU5999!'1~SBBBD666&,///	AA$)==0
**1a*LL	;	;	;	;	;	;	

m%8999	N	N	N	N	N	N	N	M#4555reN)rrrrrLrrerdr%r%8	s-!!!!!rer%__main__)rz#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.r"r/idlelib.configr0r1idlelib.config_keyr2idlelib.dynoptionr3idlelibr4
idlelib.queryr5r6idlelib.textviewr7idlelib.autocompleter8idlelib.codecontextr9idlelib.parenmatchr:idlelib.formatr;idlelib.squeezerr<r=rrr?rr|rzr}rrrxrr^r\rrrr%runittestridlelib.idle_test.htestrrrerd<module>rs"


			JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,!     22222222,,,,,,++++++11111111&&&&&&------++++++))))))******%%%%%%000000
-//[*o{{{{{8{{{^E<g1g1g1g1g1ug1g1g1TQ
Q
Q
Q
Q
uQ
Q
Q
hooooouoood
OKOKOKOKOKeOKOKOKdBFBFBFBFBFuBFBFBFJ@$@$@$@$@$e@$@$@$FC$C$C$C$C$
C$C$C$L:2:2:2:2:2:2:2:2z(**"
*g;;
|(((((E(((VzD	.!%HHHH++++++Cre