403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.145
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python315/Lib/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python315/Lib/idlelib/__pycache__/configdialog.cpython-315.pyc
R
>lqj��c
��Qs]PHs]QHGsGsGsGsGsGsG	s	G
s
GsGsG
s
GsGsGsGsGsGsGsGsGsGsGsGsGsGsGsGsGsGsG s ]QH�G"s"G#s#G$s$G%s%G&s&G's'G(s(G)s)G*s*G+s+G,s,G-s-G.s.]QHG/s/]PH�G1s2]QHG3s3]QH�G5s5G6s6]QH�G8s8]QH�G:s:]QH�G<s<]Q	H�G>s>G?s?]Q
CHGAsA]QCHGCsC]QCHGEsE]Q
CHGGsG]QCH GIsI]QCH(GKsK]QCHGLsL\62sM\C\E\G\I\K1sNQQ\2sOQrPQQ\"2sQQQ\"2sRQQ\"2sSQQ\"2sTQQ\"2sUQQ\"2sVQ Q!\#2sWQ"Q#2sX\X2sYQ$sZQ%Q&Q'Q(Q)Q*Q+Q,Q-Q.-s[Q/s\Q0Q1\"2s]\^Q26Xc$]Q3CH|G`s`\`Q4]P
Q55]Q6CH�Gbsb\b\O2P!P!)7a�IDLE 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.

)�Toplevel�Listbox�Canvas�	StringVar�
BooleanVar�IntVar�TRUE�FALSE�TOP�BOTTOM�RIGHT�LEFT�SOLID�GROOVE�NONE�BOTH�X�Y�W�E�EW�NS�NSEW�NW�
HORIZONTAL�VERTICAL�ANCHOR�ACTIVE�END�TclError)
�Frame�
LabelFrame�Button�Checkbutton�Entry�Label�
OptionMenu�Notebook�Radiobutton�	Scrollbar�Style�Spinbox�Combobox)�colorchooser)�
messagebox)�idleConf�
ConfigChanges)�
GetKeysWindow)�
DynOptionMenu)�macosx)�SectionName�
HelpSource)�	view_text)�AutoComplete)�CodeContext)�
ParenMatch)�FormatParagraph)�Squeezer)�ScrollableTextFramec�~``�\sQs]-snQsQQP
QP
-QkksQsQsQsQs	Q	s
U1Q
ksQsQs
Q
sQsUsU9s!)�ConfigDialogzConfig dialog for IDLE.
    �_htest�_utestc��[OV2VmU%c-UmU%fUO	2SOS9%fQ2UO
2]*oUO2U%f]L]�*oUOQUQU02UO2UO[[Q5UOU2UOQUO2UOO O#2[$O'2U%f3UO)2UO+2UO-2P!P!)a{Show 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�+��height�width�WM_DELETE_WINDOW)r�__init__�parent�
instance_dict�withdraw�title�winfo_rootx�winfo_rooty�geometry�create_widgets�	resizabler�	transient�protocol�cancel�fontpage�fontlist�	focus_set�tracers�attach�grab_set�wm_deiconify�wait_window)�selfrGrJr>r?�x�ys&&&$$  �)C:\Python315\\Lib\idlelib\configdialog.pyrF�ConfigDialog.__init__1s
��	���$�'����#%�F� ���M�M�O��
�
�5�.�.�.�/���� �2�%����� �f�B�#�>���
�
��!��A�a�S�k�"�	
�������e�5��1����v���
�
�(�$�+�+�6��
�
���(�(�*�	������M�M�O����������c��[U]Q59UmoUOOQQ5[U29Umo[U2Um[V O2Um[V O2Um
[V O2Um[U2Um[U2UmUO#UOQQ5UO#UOQQ5UO#UOQQ5UO#UOQQ5UO#UO Q	Q5UO#UOQ
Q5UO%2UO'[([*[,Q5UO/2O'[0Q5P!)
a�Create 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.
��padding�nwes)�stickyz Fonts ��text�
Highlightsz Keys z	 Windows z
 Shell/Ed �
Extensions��side�expand�fill�rk)r�frame�gridr&�note�ExtPage�extpage�HighPage�highpage�FontPagerS�KeysPage�keyspage�WinPage�winpage�ShedPage�shedpage�add�enable_traversal�packr	rr�create_action_buttonsr
)r[rorqs&  r^rN�ConfigDialog.create_widgets`s:��$#�4��3�3��
�U��
�
���v��&�#�E�?�*��	�D��t�}��� ��|�|�4��
� ��}�}�5��
� ��|�|�4��
��t�}��� ����
�������Y��/�������\��2�������X��.�������K��0�������\��2�������L��1������	�	�s�4�d�	�3��"�"�$�)�)�v�)�6r`c�*�[O2%c-oLQQ
-o[UO]Q5o[U]Q5o-UmQUO
1QUO1QUO1QUO11FDQvqE[U1QUQUQ	[-U@UOU$UOU*O[]Q
5JS	[U]]Q5O[Q5UO[Q5U!)aaReturn 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
rcrb�Ok�Apply�Cancel�Helprg�command�	takefocus)rk�padx)rC�borderwidthrn)��)r2�isAquaTkrro�buttons�ok�applyrR�helpr!rrrr	r
)r[�padding_args�outer�
buttons_frame�txt�cmds&     r^r��"ConfigDialog.create_action_buttons�s��$�?�?����L�%�v�.�L��d�j�j�!�,���e�Q�/�
����
�4�7�7�O�
�d�j�j�!�
�t�{�{�#�
�T�Y�Y��	!�H�C�
!'�}�!8�3�!8��!8�!&�!8�*6�!8�D�L�L����L�L���"�"��1�"�5�!�	�e�A�1�-�2�2��2�<������'��r`c�H�UO2UO2P!)z*Apply config changes, then dismiss dialog.)r��destroy�r[s&r^r��ConfigDialog.ok�s���
�
�����r`c��UO2[O2UOO	2UO2P!)z+Apply config changes and leave dialog open.)�deactivate_current_config�changes�save_allrs�save_all_changed_extensions�activate_config_changesr�s&r^r��ConfigDialog.apply�s6���&�&�(��������0�0�2��$�$�&r`c�P�[O2UO2P!)z8Dismiss config dialog.

Methods:
    destroy: inherited
)r��clearr�r�s&r^rR�ConfigDialog.cancel�s��	�
�
�����r`c�:�UOOOQQ2rUO	2[
RU_2P!)�1.0�end)rS�font_sample�get�font_sample_text�grab_release�superr�)r[�	__class__s&�r^r��ConfigDialog.destroy�s6����=�=�4�4�8�8���F������
���r`c	���UOOUOO2QQ5O2o[	UQ[
[OUP2*Q5P!)z|Create textview for config dialog help.

Attributes accessed:
    note
Methods:
    view_text: Method from textview module.
rg)�optionzHelp for IDLE preferences)rJ�contents)rq�tab�select�stripr5�help_common�
help_pagesr�)r[�pages& r^r��ConfigDialog.help�sQ���y�y�}�}�T�Y�Y�-�-�/��}�?�E�E�G���$�9�&�z�~�~�d�B�'?�?�	Ar`c�d�UOOFDoUO2J	P!)z/Remove current key bindings in current windows.)rGrH�RemoveKeybindings)r[�instances& r^r��&ConfigDialog.deactivate_current_config�s"�����1�1�H��&�&�(�2r`c�@�UOOFDcoUO2UO2UO	2UO2UO
2UO2Je	[FDoUO2J	P!)z�Apply configuration changes to current windows.

Dynamically update the current parent window instances
with some of the configuration changes.
)
rGrH�ResetColorizer�	ResetFont�set_notabs_indentwidth�ApplyKeybindings�reset_help_menu_entries�update_cursor_blink�reloadables�reload)r[r��klasss&  r^r��$ConfigDialog.activate_config_changes�sw�����1�1�H��#�#�%���� ��+�+�-��%�%�'��,�,�.��(�(�*�
2�!�[�E��L�L�N�!r`)
r�rsrSrorurxrqrGr|rz)�)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rFrNr�r�r�rRr�r�r�r��__static_attributes__�__classdictcell__�
__classcell__�r��
__classdict__s@@r^r=r=-sS�����-�5�-��-�^$7�L&�P�
'���
A�)�
�r`r=u^<ASCII/Latin1>
AaBbCcDdEeFfGgHhIiJj
1234567890#:+=(){}[]
¢£¥§©«®¶½ĞÀÁÂÃÄÅÇÐØß

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

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

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

<East Asian>
〇一二三四五六七八九
汉字漢字人木火土金水
가냐더려모뵤수유즈치
あいうえおアイウエオ
c�V``�\sQsQsnU1QksQsQsQsQsQ	Qks	Qs
UsU9s!)
rv�c�:�[RU_U2UOUmUO2UO	2P!�N)r�rF�highlight_sample�create_page_font�
load_font_cfg)r[�masterrur�s&&&�r^rF�FontPage.__init__s6���
���� � (� 9� 9����������r`c	��[O[U2UO2Um[O[U2UO2Um[O[
U2UO2Um[U][QQ5o[U][QQ5o[U2o[U2o[U[QQ5o[U]P	[Q5UmUOO!QUO"2UOO!QUO"2UOO!Q	UO"2[%U2oUO'UOO(Q
5UOO'UO*Q5[UQQ
5o[-V@O
P2Um[1V@O]]QQ5Um[5U2oUO6UmUO8O'[:]]Q5UO8O=[>[@2UOC]]Q5UOE]]Q5UOG]]]]Q5UOG]]]]]QQ5UOI[J]][LQ5UOI[J]][LQ5UOI[J[NQ5UOOI[[P[LQ5UOI[[RQ5UOI[[NQ5UO.OI[[NQ5UO2OI[[N]Q5UOI[P[TQ5P!)ajReturn 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
z Shell/Editor Font �r��reliefrgz Font Sample (Editable) zFont Face :)�justifyrg�rCr��exportselection�<ButtonRelease-1>z<KeyRelease-Up>z<KeyRelease-Down>�r�)�yscrollcommandzSize :rf�Bold)�variable�onvalue�offvaluerg)�wraprDrC��weight)�row�columnr��pady�nsew)r�r��rowspanr�r�re�rkr�r�rm�rk�anchorrj)rkrm�rkr�r�)rlrm)+rVr}r�var_changed_font�	font_name�	font_sizer�	font_boldr rrr$rrrrT�bind�on_fontlist_selectr(�config�yview�setr1�sizelistr"�bold_toggler;rgr�r�insertrr��columnconfigure�rowconfigurerprr	rrrrr)	r[�
frame_font�frame_sample�frame_font_name�frame_font_param�font_name_title�scroll_font�font_size_title�font_sample_frames	&        r^r��FontPage.create_page_font!s���L!���Y�t�_�d�6K�6K�L��� ���Y�t�_�d�6K�6K�L��� ���Z��%5�t�7L�7L�M��� ��!�F�%:�<�
�!�$�A�f�'A�C�� �
�+�� ��,�����M�C�����*.��G��
��
�
���.��0G�0G�H��
�
���,�d�.E�.E�F��
�
���.��0G�0G�H���0�����4�=�=�#6�#6��7��
�
���K�O�O��<�� 0�x�@��%�&6����M��
�&� �>�>��A�F�4���0��=��,�1�1��������T��1��=�������%5�6�	
���Q�q��)����!�A��&����A�a�a�a��8����a��1�1�1�!'�	�	)�	���#�A�A�A��>����3�Q�Q�Q��?����#�a��0��
�
����T���:����d���+����$�q��1��
�
����Q��/������4����;����d���6r`c�^�[OUQQ2oU]*O2oU]*oU]*Q6Ho[[	[
OU222oSFD#oUOO[U2J%	UOO	U2STt,tFDpwO2MJ	ooUOU2o	UOOU	2UOOU	2UOOU	2UOOU	2UO"O%QU2UO&O	U2UO)2P!ttoh[ cK[h9h)z�Load 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�EditorWindow�bold)�7�8�9�10�11�12�13�14�16�18�20�22�25�29�34�40)r.�GetFont�lower�sortedr��tkfont�familiesrTrrr��index�see�
select_set�
select_anchor�activate�
ValueErrorr��SetMenur��set_samples)
r[�configured_fontr�r�r��fonts�font�s�lc_fonts�current_font_indexs
&         r^r��FontPage.load_font_cfgzs\��#�*�*�4���H��#�A�&�,�,�.�	�#�A�&�	�$�Q�'��/�	��s�6�?�?�4�0�1�2���D��M�M� � ��d�+�������9�%�',�-�u�!�G�G�I�u��-�	�!)���	�!:���M�M���0�1��M�M�$�$�%7�8��M�M�'�'�(:�;��M�M�"�"�#5�6�	
�
�
���O�'�	)�	
�����9�%������.���	��	�s�6F�A=F�	F,�(F,�+F,c�T�UOO2o[OQQQU2UOO2o[OQQQU2UO
O2o[OQQQU2UO
2P!)z�Store 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.
rrr0z	font-sizez	font-bold)r�r�r��
add_optionr�r�r-�r[�params�values&* r^r��FontPage.var_changed_font�s������"�"�$�����6�>�6�5�A����"�"�$�����6�>�;��F����"�"�$�����6�>�;��F����r`c���UOOUOOQ6Xc[L[
2oUOOUO22P!)z�Handle 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.
�
KeyRelease)	rTr��type�namerrr�r�r")r[�eventr0s&& r^r��FontPage.on_fontlist_select�sE���}�}� � ��*�*�/�/�\�9��v�G�������4�:�:�<�(r`c�,�UOO2oUOO2%c[OL[O
oV OO2U1oV@OQ$V@OQ$P!)z�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.
r0)	r�r�r�r$�BOLD�NORMALr�r�r�)r[r?r��font_weight�new_fonts&&   r^r-�FontPage.set_samples�sj���N�N�&�&�(�	�%)�^�^�%7�%7�%9�%9�f�k�k�v�}�}���~�~�1�1�3�[�A��#+���� �(0���f�%r`)rr�r�r�r�rTr�r�r�)
r�r�r�r�rFr�r�r�r�r-r�r�r�r�s@@r^rvrvs+�����W7�r �D
�)�1�1r`rvc�``�\sQsQsnU1QksQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsUsU9s!)rt��c�:�[RU_U2V mUO2Um[U2UmUO2UO2P!r�)	r�rFrs�winfo_toplevel�cdr)�style�create_page_highlight�load_theme_cfg�r[r�rsr�s&&&�r^rF�HighPage.__init__�sH���
���� ����'�'�)����6�]��
��"�"�$����r`c��
`�-QQaQQaQQaQQaQ	Q
aQQaQ
QaQQaQQaQQaQQaQQaQQaQQaQQaQQ aRm[O[R2RO2Rm[O[R2RO2Rm[R2Rm	[O[R2RO2Rm[O[R2RO2Rm
[O[R2RO2Rm[!R]["Q!Q"5o[!R]["Q#Q"5o[%U[&]Q$5oUO(9oRmUO-QPQ%]][.][0Q&5UO3Q'Q(2UO3Q)Q*2QQoSFDvqgUO5[6Vg2J	[9UO;Q,[62O=22o[?]U2FD2o	UO5U	Q-0U	[9[AU22Q.0
Q+0Q 2J4	ROFD0o
U
1U1Q/kkoUOCROU
*Q0U2J2	Q1UQ2$RODO-Q3]Q4Q55[GUQ3Q65Rm$[GU2o[KROHQ7ROLQ85Rm'[QROHROP]Q95Rm)[UURO]Q:ROVQ;5Rm,[UURO]Q<ROVQ;5Rm-ROO]]2[KUQ=RO^Q85Rm0[cUQ>Q?5o
[UURO]ROdQ@QA5Rm3[UURO]ROdQBQA5Rm4[QURO
PPQC5Rm5[QUROPPQC5Rm6[KUQDROnQ85Rm8[cU]QE5Rm9UOu[v]][x[zQF5UOu[|]][~QG5ROHOu[|]][~QG5UOu[|]]QH5UOu[|]][x[zQF5RONOu[|[x[~]]QI5ROROu[|[x[~]]QI5ROXOu[v[�QJ5ROZOu[�[�QJ5RO`Ou[�[~]]QK5U
Ou[|[�]]QL5ROfOu[|[�]QM5ROhOu[|[�]]QL5ROjOu[|[~]]QK5ROlOu[|[~[�]]QN5ROpOu[|[~]]QK5ROrOu[|[~]QO5P!)Ra�Return 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�normalzCode Context�contextzPython Keywords�keywordzPython Definitions�
definitionzPython Builtins�builtinzPython Comments�commentzPython Strings�stringz
Selected Text�hilitez
Found Text�hit�Cursor�cursorzEditor Breakpoint�breakzShell Prompt�consolez
Error Text�errorzShell User Output�stdoutzShell User Exception�stderrzLine Number�
linenumberz Custom Highlighting r�z Highlighting Theme )r�r��hand2)r0r\rDrCr��highlightthicknessr�z<Double-Button-1>c��Q!�r]���es&r^�<lambda>�0HighPage.create_page_highlight.<locals>.<lambda>os��r`z<B1-Motion>c��Q!rfrgrhs&r^rjrkps��7r`� r�z.0�dc�@:�ROOU2P!r�)�highlight_targetr�)r?�elemr[s&&�r^�tem�+HighPage.create_page_highlight.<locals>.tem�s����%�%�)�)�$�/r`z<ButtonPress-1>�disabled�state�frame_color_set.TFrame�solid)r�r�)rLzChoose Color for :�rgr�)rd�
Foreground)r�r9rgr��
BackgroundzSave as New Custom Themez	Select : rfza Built-in Theme�r�r9r�rgza Custom Themer�zDelete Custom Theme�r��rkr�r�rlrmr��rkr�r�)rkrlrmr�r�r��rkrmr�r��rkr�r�r�r�)rkrmr�r�r�)rkrmr�)�courier�r�)")z# Click selects item.rW��
rR)zcode context sectionrSr�)z| cursorr\r�)�defrT)rmrR)�funcrU)z(param):
  rR)z"Return None."rX)z

  var0 = rR)z'string'rX)z

  var1 = rR)z
'selected'rY)z

  var2 = rR)z'found'rZ)z

  var3 = rR)�listrV)�(rR)�NonerT)z)
rR)z  breakpoint("line")r])z

rR�z>>>r^)z	 3.14**2
rR)z9.8596r`r�r�)z pri rR)�nr_)zt(
rR)�SyntaxErrorrar�)D�theme_elementsrVr}r�var_changed_builtin_name�builtin_name�var_changed_custom_name�custom_namer�fg_bg_toggle�var_changed_color�color�var_changed_theme_source�theme_source�var_changed_highlight_targetrpr rr;r
rgr��	configurerrr�rr�lenr��
splitlines�range�str�tag_bindrLr�frame_color_setr!�	get_color�button_set_colorr1�
targetlistr'�set_color_sample_binding�fg_on�bg_onr��save_as_new_theme�button_save_customr$�set_theme_type�builtin_theme_on�custom_theme_on�builtinlist�
customlist�
delete_custom�button_delete_custom�
theme_messagerrrrr	rrrrr
)r[�frame_custom�frame_theme�sample_framerg�string_tagsrX�tag�n_lines�lineno�elementrr�frame_fg_bg_toggle�theme_type_titlesf             r^rM�HighPage.create_page_highlight�sh���j�!�8��
�I��
�y�	�

!�,��
�y�
�
�y��
�h��
�X��
�%��
�h��
 ���
�I��
�'��
 ��� 
#�H�!�"
�<�#���&$�K�K��$���!>�!>�@���"�;�;��$���!=�!=�?���&�t�,����[�[��$���!7�!7�9��
�#�K�K��4� �$�"?�"?�A��� '����$���!B�!B�!D���
"�$�A�f�'>�@�� ��1�V�&<�>��+��U��;��'3�'8�'8�8��t�$����(���!��A�D�	�	B�	
�	�	�%�'8�9��	�	�-�!2�3�9��$'�K�F��K�K��V�)�'��d�h�h�u�c�*�5�5�7�8���A�w�'�F��K�K�6�(�"�
�!�3�s�7�|�#4�"5�Q�!6�7�q�9�$�
&�(��*�*�G� '�
0�
�M�M��'�'��0�2C�S�
J�	+�#��W�
��
�
���5�1�$+�	�	-�$�\�9Q�R���"�<�0�� &��$�$�+?����!(���(��$�$�d�&;�&;�T�#$�&���!�"�T�->�->�a�!�4�+H�+H�J��
�!�"�T�->�->�a�!�4�+H�+H�J��
�	
�����a� �"(��#=��.�.�#0���!��;�?�� +��d�&7�&7�q��+�+�2D�!F��� +��d�&7�&7�q��+�+�2B� D���)��T�.�.��d�D���'��T�-�-�t�T�C���$*��"7��*�*�%,��!�#�;�A�>���	���t�!�!�D�t��L����c�����:����!�!�s����!�C����S�q�q��9�����q�q��D�	�	B����"�"��D�q�q�q�"�Q������#�d�����K��
�
���T�!��,��
�
���U�1��-����$�$�&�q�q�q�$�I����3�q�q�q��A����"�"��A�A�"�>����!�!�s�1�1�1�!�E������3�Q�Q�Q��?������#�A�a�a�a��H��!�!�&�&�C�a�a�a�&�H������S�q�q��9r`c
�T�UOO[OQQQQ]Q52[O2oUOO2%c�[OQQ2oUO2UOOV!2[OQQ2oUO2U%f8UOOQ	2UOOQ2L�UOOV"]*2L�[OQQ2oUO2UOOV!2[OQQ2oUO2UOOV"]*2UO2[UO 2oUO"OV3]*2UO%2UO'2P!)
arLoad 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�Theme�default�bool�r=r��	highlight�user�- no custom themes -�rt)r�r�r.�	GetOption�CurrentThemer��GetSectionList�sortr�r,r�rur�r�r�r�r�r��paint_theme_sample�set_highlight_target)r[�current_option�	item_list�theme_namess&   r^rN�HighPage.load_theme_cfg�s���*	
�����h�0�0������D�	E�"�.�.�0����� � �"�"� �/�/�	�;�G�I��N�N�����$�$�Y�?� �/�/���D�I��N�N����$�$�*�*�=�9�� � �$�$�%;�<����'�'�	�Q�<�@� �/�/���D�I��N�N���O�O�#�#�I�>� �/�/�	�;�G�I��N�N�����$�$�Y�!��=������4�.�.�/���������^�<����!��!�!�#r`c��QoUOO2oV27ce[OQQQ2U7c [OQQQU]*2[OQQQU2QUOQ$L?[OQQQU2[OQQQP2PUOQ$UO2P!)z�Process 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.
rr�r>�name2zNew theme, see Helprg)zIDLE ClassiczIDLE New)r�r�r.r�r�r6r�r�)r[r8�
old_themesr9s&*  r^r��!HighPage.var_changed_builtin_name�s���2�
��!�!�%�%�'���"��!�!�&�'�6�:�*�L��"�"�6�7�F�J�q�M�J����v�w���?�)>�D���v�&����v�w���>����v�w���<�)+�D���v�&����!r`c��UOO2oUQ6wc+[OQQQU2UO	2P!P!)z�Process 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.
r�rr�r>)r�r�r�r6r�r7s&* r^r�� HighPage.var_changed_custom_namesF��� � �$�$�&���*�*����v�w���>��#�#�%�+r`c��UOO2o[OQQQU2U%cUO	2P!UO2P!)z{Process toggle between builtin and custom theme.

Update the default toggle value and apply the newly
selected theme type.
rr�r�)r�r�r�r6r�r�r7s&* r^r��!HighPage.var_changed_theme_sourcesG���!�!�%�%�'�����6�7�I�u�=���)�)�+��(�(�*r`c�(�UO2P!)zProcess change to color choice.)�on_new_color_set�r[r8s&*r^r��HighPage.var_changed_color*s�����r`c�(�UO2P!)z5Process selection of new target tag for highlighting.)r�r�s&*r^r��%HighPage.var_changed_highlight_target.����!�!�#r`c�f�UOO2%c<QUOQ$QUOQ$UOOQ2P!QUOQ$UOOQ2QUOQ$UOOQ2P!)a>Set 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
rRrurtr��z	!disabled)r�r�r�r�r�rur�r�s&r^r��HighPage.set_theme_type2s���$��� � �"�"�(0�D���W�%�'1�D�O�O�G�$��%�%�+�+�M�:�(2�D���W�%�� � �&�&�~�6�'/�D�O�O�G�$��%�%�+�+�N�;r`c�
�UOO2oUOOUOQ*Q2o[
OUQU*UQ5vq4U%c�VB6wc�UOO2%cLQoUOU2oU%fP!UOU2UOOU2P!UOOU2P!P!P!)aBHandle 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
rL�
backgroundzPick new color for : )rGrJ�initialcolorz_Your changes will be saved as a new Custom Theme. Enter a name for your new Custom Theme below.)rpr�rL�lookupr�r,�askcolorr��get_new_theme_name�
create_newr�r�)r[�target�
prev_color�	rgbTuplet�color_string�message�	new_themes&      r^r��HighPage.get_colorNs���$�&�&�*�*�,���Z�Z�&�&�t�';�';�G�'D�'3�5�
�".�"7�"7��#:�6�#A�'�#)��	��\�7�� � �$�$�&�&�K�� �3�3�G�<�	� ���O�O�I�.��J�J�N�N�<�0��
�
���|�,�8�<r`c���UOO2oUOOQUQ5UOO2%cQLQoUO
UOO2*oUOOU1-V!-@UOO2oUQ*U*o[OQVEU2P!)z4Display sample of new color selection on the dialog.rv�r��
foregroundr��-r�)r�r�rLr�r�r�rpr��
tag_configr�r�r6)r[�	new_color�plane�sample_element�theme�
theme_elements&     r^r��HighPage.on_new_color_setts����J�J�N�N�$�	��
�
���5�)��L� $� 1� 1� 5� 5� 7� 7��\���,�,�T�-B�-B�-F�-F�-H�I�����(�(��N�E�;M�N�� � �$�$�&��&��,�u�4�
����;��i�Hr`c��[OQQ2[OQQ2*o[UQV2OoU!)z*Return name of new theme from query popup.r�r�r�zNew Custom Theme�r.r�r3�result)r[r��
used_namesr�s&&  r^r��HighPage.get_new_theme_namesJ���-�-�f�k�B��'�'�	�;�?�@�
���(�'�?�?E�v�	��r`c�`�UOQ2oU%cUOU2P!P!)z`Prompt for new theme name and create the theme.

Methods:
    get_new_theme_name
    create_new
zNew Theme Name:)r�r�)r[�new_theme_names& r^r��HighPage.save_as_new_theme�s)���0�0�1B�C����O�O�N�+�r`c�V�UOO2%cQoUOO2oLQoUOO2o[O
V#2oU[Q*7c)[Q*U*oSFD
oVV*VF$J	UOV2[OQQ2oUO2UOOVq2UOO]2UO2P!)aQCreate 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
r�r�r�)r�r�r�r�r.�GetThemeDictr��save_newr�r�r�r,r�r�)r[r��
theme_type�
theme_namer��
theme_changesr��custom_theme_lists&&      r^r��HighPage.create_new�s���&��� � �"�"�"�J��*�*�.�.�0�J��J��)�)�-�-�/�J��)�)�*�A�	����-�-�#�K�0��<�M�(��%2�%;�	�"�)�	
�
�
�n�0�$�3�3�F�K�H����� ������ 1�B������a� ����r`c��UOO2Q6XcSUOOQ2UOOQ2UO
O
]2LQUOOQ2UOOQ2UO
O
]2UO2P!)aSet 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
r[r�r�)rpr�r�rur�r�r��set_color_sampler�s&r^r��HighPage.set_highlight_target�s���$� � �$�$�&�(�2��J�J���]�+��J�J���]�+����!�!�!�$��J�J���^�,��J�J���^�,����!�!�!�$����r`c�(�UO2P!)zZChange color sample based on foreground/background toggle.

Methods:
    set_color_sample
)r	)r[�argss&*r^r��!HighPage.set_color_sample_binding�s��	
���r`c��UOUOO2*oUOO2%cQLQoUOOV2oUOOQUQ5P!)z�Set 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
r�r�rvr�)r�rpr�r�r��tag_cgetrLr�)r[r�r�r�s&   r^r	�HighPage.set_color_sample�sl���!�!�$�"7�"7�";�";�"=�>�� $� 1� 1� 5� 5� 7� 7��\���%�%�.�.�s�:���
�
���5�%��Hr`c��UOO2%cUOO2oLUOO2oUOFD�oUOU*o[
OV2oUQ6Xc"[
OUQ2Q*UQ$U[Q*7cU[Q*U*oUQ*U7cVSQ**UQ$UQ*U7cVSQ**UQ$UOOU1-U@J�	UO2P!)ajApply 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
r\rRr�r�z-foregroundr�z-background)r�r�r�r�r�r.�GetHighlightr�r�r�r	)r[r��
element_titler��colors�
theme_dicts&     r^r��HighPage.paint_theme_sample�s��(��� � �"�"��%�%�)�)�+�E��$�$�(�(�*�E�!�0�0�M��)�)�-�8�G��*�*�5�:�F��(�"�'/�'<�'<��x�()�)5�(7��|�$����,�,�$�[�1�%�8�
��]�*�j�8�+5�
�6M�+N�F�<�(��]�*�j�8�+5�
�6M�+N�F�<�(��!�!�,�,�W�?��?�1�	
���r`c���[OQ*OU2SFD2oV#*o[OQ*OVU2J4	P!)z�Save a newly created theme to idleConf.

theme_name - string, the name of the new theme
theme - dictionary containing the new theme
r��r.�userCfg�
AddSection�	SetOption)r[rr�r�r9s&&&  r^r�HighPage.save_newsI��	����%�0�0��<��G��N�E����[�)�3�3�J��O�r`c�2�[OU-U@!r��r-�askyesno�r[r�kwargss&*,r^r�HighPage.askyesno#����"�"�D�3�F�3�3r`c��UOO2oQoUOQV!*UQ5%fP!UOO	2[
O
QU2[OQQ2oUO2U%f9UOOQ2UOOUQ2L"UOOV3]*2UOO[O Q*O#QQ	22UO$O[O Q*O#QQ
22[
O'2UO(O+2UOO-2UO/2P!)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 Theme�rGr�r�r�rr�r�r>r�)r�r�rrKr�r��delete_sectionr.r�r�r�rur�r,r�r��
defaultCfg�Getr�r�rsr�r�r�)r[r�delmsgr�s&   r^r��HighPage.delete_custom'sP��,�%�%�)�)�+�
�A���}�}���!4�T��C�C�����)�)�+����{�J�7��+�+�F�K�@�	������� � �&�&�}�5��O�O�#�#�I�/E�F��O�O�#�#�I��|�<������h�1�1�&�9�=�=�g�y�Q�R������h�1�1�&�9�=�=�g�v�N�O��������0�0�2����'�'�)����r`)r�r�r�r�r�r�r�rKr�r�r�r�rsr�r�r�r�rprLr�r�r�r�)r�r�r�r�rFrMrNr�r�r�r�r�r�r�r�r�r�r�r�r�r	r�rrr�r�r�r�r�s@@r^rtrt�s|�����}:�~1$�f"�&	&�+� �$�<�8$-�L	I��	,�&�P �8 �I�$& �P	P�4�-�-r`rtc�``�\sQsQsnU1QksQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQs\Q2sQsQsQsUsU9s!)rwiWc�:�[RU_U2V mUO2UmUO2UO
2P!r�)r�rFrsrJrK�create_page_keys�load_key_cfgrOs&&&�r^rF�KeysPage.__init__Ys=���
���� ����'�'�)����������r`c
��[O[U2UO2Um[O[U2UO
2Um[O[U2UO2Um	[O[U2UO2Um[U][QQ5o[U][QQ5o[U2o[UQQ5o[!U2o[!U["Q5o[%U[&[&Q5UmUO(O+QUO,2UO(O.UQ	$UO(O0UQ	$UO2UO(Q
$UO2UO(Q$[5UQUO6Q
Q5Um[;]2Tt,tFDo[U]]Q5MJ	oo[=U]*UO]UO>QQ5Um [=U]*UO]UO>QQ5Um![EU]*UOPPQ5Um#[EU]*UOPPQ5Um$[5U]*QUOJQ5Um&[5U]*QUONQ5Um([U]*]Q5Um)UOU[V]][X[ZQ5UOU[V]][ZQ5UO8OU[V[\]]Q5UOU[^]][X[ZQ5UOa]]Q5UOc]]Q5UOe]]][fQ5UO(Oe]][hQ5UOe]][jQ5UOe]][lQ5UO@Oe]][f[j*Q5UOBOe]][f[j*Q5UOFOe]][hQ5UOHOe]][hQ5UOROe]][h]]Q5UOLOU[^[\P	]Q5UOPOU[^[\P	]Q5U]*OU[n[ZP	Q 5U]*OU[n[\P	]Q!5P!ttoh)"a�Return 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
z Custom Key Bindings r�z	 Key Set zAction - Key(s)rf��orient)r�r�r�r�r��xscrollcommandzGet New Keys for Selectionrt)rgr�ru)rcr�zUse a Built-in Key Setr{zUse a Custom Key Setr�zDelete Custom Key SetrxzSave as New Custom Key Setr|r}r�rr�)r�r��
columnspanre�r�r�re)r�r�rer�r�)rkrmrlr��rkrmrl)rkrmrlr�)8rVr}rr�r�r�r�r�var_changed_keyset_source�
keyset_source�var_changed_keybinding�
keybindingr rrr$r(rrr�bindingslistr��on_bindingslist_selectr��xviewr�r!�get_new_keys�button_new_keysr�r'�
set_keys_type�builtin_keyset_on�custom_keyset_onr1r�r��delete_custom_keys�button_delete_custom_keys�save_as_new_key_set�button_save_custom_keys�keys_messagerr
rrrrrrrprrrrr	)	r[r��frame_key_sets�frame_target�target_title�scroll_target_y�scroll_target_x�i�framess	&        r^r-�KeysPage.create_page_keys`s���d$�K�K��$���!>�!>�@���"�;�;��$���!=�!=�?���$�[�[��4� �$�"@�"@�B���!�+�+��$���!<�!<�>���
"��!�F�,�.��$��!�F��F���\�*���\�0A�B��#�L�1��#�L��D��#���u�F��������2�#�:�:�	<�%)�%6�%6�%<�%<��	�"�%)�%6�%6�%<�%<��	�"�.=�.A�.A����*�+�.=�.A�.A����*�+�%��#?��)�)�� =���
!��8�%�#�a����q�A�#�	�%�!,��q�	�D�$6�$6�a��*�*�1I�"K���!,��q�	�D�$6�$6�a��*�*�1G�!I���)��q�	�4�,�,�d�D�B���'��q�	�4�+�+�T�4�A���)/��q�	� 7��/�/�*1��&�(.��q�	� <��0�0�(2��$�"�&��)��;���	���v�A�A�d���N�����a�a�d��C����!�!�v�A�A�A�!�F����t�!�!�D�t��L��$�$�Q�q�$�1��!�!�!�A�!�.����a��a���B������1�Q�t��<�����1�R��8�����1�R��8����#�#��!�A�b�D�#�A����"�"�q��1�R�4�"�@������!�A�d��;�������1�T��:������1�Q�t�!�!��L��&�&�+�+��A�d�QR�+�S��$�$�)�)�t�!�D�q�)�Q��q�	���C�d�4��8��q�	���C�a��1��=��W%s�#U;c
��UOO[OQQQQ]Q52[O2oUOO2%c�[OQQ2oUO2UOOV!2[OQQ2oUO2U%f8UOOQ	2UOOQ2L�UOOV"]*2L�[OQQ2oUO2UOOV!2[OQQ2oUO2UOOU[O22UO2[O2oUO!U2P!)
z?Load current configuration settings for the keybinding options.r�Keysr�r�r��keysr��- no custom keys -r�)r8r�r.r��CurrentKeysr�r�r�r�r,rBrur�r��default_keysr@�load_keys_list)r[r�r��keyset_names&   r^r.�KeysPage.load_key_cfgsv��	
�����x�1�1���	��� C�	D�"�-�-�/�����!�!�#�#� �/�/�	�6�B�I��N�N�����$�$�Y�?� �/�/���?�I��N�N����%�%�+�+�M�:�� � �$�$�%9�:����'�'�	�Q�<�@� �/�/���?�I��N�N���O�O�#�#�I�>� �/�/�	�6�B�I��N�N�����$�$�Y��0E�0E�0G�H������*�*�,�����K�(r`c��QoUOO2oV27ce[OQQQ2U7c [OQQQU]*2[OQQQU2QUOQ$L?[OQQQU2[OQQQP2PUOQ$UOU2P!)z%Process selection of builtin key set.rrQr>r�zNew key set, see Helprg)zIDLE Classic WindowszIDLE Classic UnixzIDLE Classic MaczIDLE Classic OSX)r�r�r.r�r�r6rGrV)r[r8�old_keysr9s&*  r^r��!KeysPage.var_changed_builtin_names���
���!�!�%�%�'��� ��!�!�&�&�&�9��I��"�"�6�6�6�8�A�;�G����v�v�w��>�(?�D���f�%����v�v�v�u�=����v�v�w��;�(*�D���f�%����E�"r`c��UOO2oUQ6wc,[OQQQU2UO	U2P!P!)z$Process selection of custom key set.rSrrQr>)r�r�r�r6rVr7s&* r^r�� KeysPage.var_changed_custom_name3sF��� � �$�$�&���(�(����v�v�v�u�=�����&�)r`c��UOO2o[OQQQU2U%cUO	2P!UO2P!)z:Process toggle between builtin key set and custom key set.rrQr�)r8r�r�r6r�r�r7s&* r^r7�"KeysPage.var_changed_keyset_source:sE���"�"�&�&�(�����6�6�9�e�<���)�)�+��(�(�*r`c��UOO2oUOO2oUOO[2O2]*o[OU2%c[OQV4U2P![OU2oUQ*o[OQVdU2P!)zStore change to a keybinding.rR�_cfgBindings�
extensions)r:r�r�r;r�splitr.�
IsCoreBindingr�r6�GetExtnNameForEvent)r[r8r9�key_setr?�ext_name�ext_keybind_sections&*     r^r9�KeysPage.var_changed_keybindingCs������#�#�%���"�"�&�&�(���!�!�%�%�f�-�3�3�5�a�8���!�!�%�(�(����v�w�u�=��3�3�E�:�H�"*�^�";�����|�-@��Or`c�f�UOO2%c<QUOQ$QUOQ$UOOQ2P!QUOQ$UOOQ2QUOQ$UOOQ2P!)z@Set available screen options based on builtin or custom key set.rRrurtr�r�)r8r�r�r�rDrurBr�s&r^r@�KeysPage.set_keys_typeOs������!�!�#�#�(0�D���W�%�'1�D�O�O�G�$��*�*�0�0��?�(2�D���W�%��!�!�'�'��7�'/�D�O�O�G�$��*�*�0�0��@r`c�$�UOO[2oUOOU2oUO	2]*oUO
O2%cUOO2oLUOO2o[O2oU[Q*7c7[Q*U*oSFDoVg*O	2VW$J	[UO22o[UQUU2Oo	U	%CcUO
O2%ceQo
UOU
2oU%f9UOO!U2UOO#U2P!UO%U2UOO'U2UOO)VQ*U	*2UOO!U2UOO#U2UO*O-U	2P!UOO!U2UOO#U2P!)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.� - )r;r&rr�rcr8r�r�r.�GetCurrentKeySetr�r��valuesr0r��get_new_keys_namer(r)�create_new_key_set�deleterr:r�)r[�
list_index�binding�	bind_name�current_key_set_name�current_bindings�key_set_changesr?�current_key_sequences�new_keysr��
new_keysets&           r^r>�KeysPage.get_new_keys[s����&�&�,�,�V�4�
��#�#�'�'�
�3���M�M�O�A�&�	����!�!�#�#�#'�#4�#4�#8�#8�#:� �#'�#3�#3�#7�#7�#9� �#�4�4�6���7�6�?�2�%�f�o�.B�C�O�(��*9�*@�*F�*F�*H� �'�)� $�%5�%<�%<�%>� ?�� ��~�y�%�'�'-�v�	��8��!�!�%�%�'�'�N��!�3�3�G�<�
�!��%�%�0�0��<��%�%�3�3�J�?���+�+�J�7����$�$�Z�0����$�$�Z�5���1I�J����(�(��4����+�+�J�7��O�O����)����(�(��4����+�+�J�7r`c��[OQQ2[OQQ2*o[UQV2OoU!)z)Return new key set name from query popup.r�rRr�zNew Custom Key Setr�)r[r�r�r{s&&  r^rp�KeysPage.get_new_keys_name�sJ���-�-�f�f�=��'�'�	�6�:�;�
� ��*�G�A�AG��	��r`c�`�UOQ2oU%cUOU2P!P!)z@Prompt for name of new key set and save changes using that name.zNew Key Set Name:)rprq)r[�
new_keys_names& r^rE�KeysPage.save_as_new_key_set�s)���.�.�/B�C�
���#�#�M�2�r`c�>�UOOQ2P!)z6Activate button to assign new keys to selected action.r�)r?ru�r[r?s&&r^r<�KeysPage.on_bindingslist_select�s�����"�"�>�2r`c��UOO2%cUOO2oLUOO2o[O
U2o-oSFD#oU]QoQO
V5*2oVtU$J%	U[Q*7c)[Q*U*oSFD
oV�*VE$J	UOV2[OQQ2o	U	O2UOOV�2UOO]2UO2P!)z�Create 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.
rmrRr����)r8r�r�r�r.�GetCoreKeys�joinr��save_new_key_setr�r�r�r,r�r@)
r[�new_key_set_name�prev_key_set_name�	prev_keysrzr?�
event_namertrx�custom_key_lists
&&        r^rq�KeysPage.create_new_key_set�s�����!�!�#�#� $� 1� 1� 5� 5� 7�� $� 0� 0� 4� 4� 6���(�(�):�;�	����E��q���J��h�h�y�/�0�G�#*�Z� ��
����/�%�f�o�.?�@�O�(��"1�"8���)�	
���.�9�"�1�1�&�&�A������������B������q�!����r`c��P
oUOO2%c"P	oUOO[2o[O
U2o[
U2oUO2UOO][2SFD�oQOVF*2oU]QoU[Q*7c5U[Q*U*7c[Q*U*U*oUOO[UQ*U*2J�	U%cTUOOW2UOOU2UOOU2P!P!)z�Reload the list of action/key binding pairs for the active key set.

An action/key binding can be selected to change the key binding.
rmrRrmr�)r;�curselectionr&rr.�	GetKeySetr�r�rrrr�r�rr'r(r))r[rW�reselectrs�keyset�
bind_namesru�keys&&      r^rV�KeysPage.load_keys_list�s-��
�����)�)�+�+��H��*�*�0�0��8�J��#�#�K�0���&�\�
�������� � ��C�(�#�I��(�(�6�,�-�C�!�!�B��I��g�f�o�-������ <�<�!�&�/�+�6�y�A�C����$�$�S�)�E�/�#�*=�>�$�����!�!�*�-����(�(��4����+�+�J�7�r`c���[OQ*OU2SFD2oV*o[OQ*OVU2J4	P!)a!Save 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
rRr)rWr�r?r9s&&  r^r��KeysPage.save_new_key_set�sI��	���� �+�+�K�8��E��M�E����V�$�.�.�{�5�I�r`c�2�[OU-U@!r�rr s&*,r^r�KeysPage.askyesno�r#r`c���UOO2oQoUOQV!*UQ5%fP!UOO	2[
O
QU2[OQQ2oUO2U%f9UOOQ2UOOUQ2L"UOOV3]*2UOO[O Q*O#QQ	22UO$O[O Q*O#QQ
29%f[O&22[
O)2UO*O-2UOO/2UO12P!)z�Handle 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 Setr%rRr�rSrrQr�r>r�)r�r�rrKr�r�r&r.r�r�rBrur�r,r8r�r'r(r�rUr�rsr�r�r@)r[rWr)r�s&   r^rC�KeysPage.delete_custom_keys�sk���&�&�*�*�,��C���}�}� �6�#7���F�F�����)�)�+����v�{�3��+�+�F�F�;�	�������!�!�'�'�
�6��O�O�#�#�I�/C�D��O�O�#�#�I��|�<������x�2�2�6�:� #��F�I� 6�	8������h�1�1�&�9�=�=�f�f�M�9�9�!)�!6�!6�!8�	:�	�������0�0�2����'�'�)����r`)r;rAr�r�rDr?rFrKrBr�r�rsr:rGr8)r�r�r�r�rFr-r.r�r�r7r9r@r>rprEr<rqrV�staticmethodr�rrCr�r�r�r�s@@r^rwrwWsu�����^>�@)�>#�('�+�
P�
A�*8�X�3�3��<8�6�
J��
J�4� � r`rwc�F``�\sQsQsnU1QksQsQsQsQsUs	U9s
!)ryi	c�:�[RU_U2UO2UO2UO	2P!r�)r�rF�init_validators�create_page_windows�load_windows_cfg�r[r�r�s&&�r^rF�WinPage.__init__s4���
���� ������ � �"����r`c�r`�[OQ2nU1QkoUOU2Q1UmP!)�[0-9]*c�,:�ROU2PI!�z+Return 's is blank or contains only digits'��	fullmatch�r1�digits_or_empty_res&�r^�is_digits_or_empty�3WinPage.init_validators.<locals>.is_digits_or_empty����%�/�/��2�$�>�>r`�%P��re�compile�register�digits_only�r[r�r�s& @r^r��WinPage.init_validators�0����Z�Z�	�2��	?�!�M�M�*<�=�t�E��r`c�`�[O[U2Q#2Um[O[	U2Q$2Um[O[	U2Q%2Um[O[	U2Q&2Um[O[U2Q'2Um	[O[	U2Q(2Um
[O[	U2Q)2Um[O[	U2Q*2Um[O[U2Q+2Um
[O[	U2Q,2Um[U][ QQ5o[#U]Q5o[%UQQ5o['V O]QQ5Um['V O]QQ5Um[#U]Q5o[%UQ	Q5o[%UQ
Q5o[-V@O
]UO.QQ5Um[%UQ
Q5o[-V@O]UO.QQ5Um[#U]Q5o[%UQQ5o	[5V�O]]
]UO.QQ5Um[%UQQ5o
[AUQUOQ5Um![#U]Q5o[%UQQ5o[-V�O]UO.QQ5Um"[#U]Q5o
[%U
QQ5o[GV�OQQQQ2Um$[#U]Q5o[%UQQ5o[-V�O]UO.QQ5Um%[AUQUOQ5Um&[#U]Q5o[%UQQ5o[-UUO]UO.QQ5Um'UOQ[R]][T[VQ5UOQ[R]][XQ5UOQ[Z[\]]Q5UO*OQ[^[\]]Q5UO(OQ[^[\]]Q5UOQ[R]][XQ5UOQ[Z[\]]Q5UO2OQ[^[`]
]Q5UOQ[^[`]Q 5UO0OQ[^[`]
]Q5UOQ[^[`]Q 5UOQ[R]][XQ5U	OQ[Z[\]Q!5UO6OQ[Z[\]
Q!5UOBOQ[^[`]]Q5UOQ[R]][XQ5UOQ[Z[\]]Q5UODOQ[R]
]Q"5U
OQ[R]][XQ5UOQ[Z[\]]Q5UOHOQ[R]
]Q"5UOQ[R]][XQ5UOQ[Z[\]Q!5UOLOQ[^[`]]Q5UOJOQ[R[\]]Q5UOQ[R]][XQ5UOQ[Z[\]]Q5UONOQ[R]
]Q"5P![8c6[;X�OQ[=[?]]22]Q5SmCKh9h)-aReturn 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
z Window Preferencesr�r|z
At StartuprfzOpen Edit Window�r�r9rgzOpen Shell Windowz$Initial Window Size  (in characters)�Widthr���textvariablerD�validatecommand�validate�HeightzIndent spaces (4 is standard))r��from_�torDr�r��readonly)r�rurorDzCursor BlinkzCursor blink)rgr�z%Completions Popup Wait (milliseconds)zParen Match Style�
expression�opener�parensz;Time Match Displayed (milliseconds)
(0 is until next input)zBell on MismatchzFormat Paragraph Max Widthr}r�r��rkr�r�r�r~)r�General�editor-on-startup)rrrD)rrrC)r�Indent�
num-spaces)rr�cursor-blink)rbr6�	popupwait)rbr8rL)rbr8�flash-delay)rbr8�bell)rbr9�	max-width)1rVr}r�startup_editr�	win_width�
win_height�
indent_spacesr�cursor_blink�autocomplete_wait�paren_style�flash_delay�
paren_bell�format_widthr rrr$r'�startup_editor_on�startup_shell_onr#r��
win_width_int�win_height_intr*�indent_chooserrr+r�r�r"�cursor_blink_bool�
auto_wait_intr%�paren_style_type�paren_flash_time�bell_on�format_width_intrr	rrrrrrr)r[�frame_window�	frame_run�
startup_title�frame_win_size�win_size_title�win_width_title�win_height_title�frame_cursor�indent_title�cursor_blink_title�frame_autocomplete�auto_wait_title�frame_paren1�paren_style_title�frame_paren2�paren_time_title�frame_format�format_width_titles&                  r^r��WinPage.create_page_windowss���R$�K�K��t��F�H��� ����$��!B�D���!�+�+��$��!C�E���$�[�[��$��!A�C���#�K�K��4� �"J�L���!(����$��!L�"N���"�;�;��$��!F�H���"�;�;��$��!L�N���!�+�+��4� �"F�H���#�K�K��$��!O�Q���"�$�A�f�'<�>���,�A�6�	��i�l�;�
�!,��$5�$5�Q�'�")���!,��$5�$5�Q�(�!*����|��;����%K�M����W�=��"��^�^�1� $� 0� 0�5�
���!��h�?��#��_�_�A� $� 0� 0�5�
���
�\�q�9���\�"A�C��	I�")� �/A�/A���!�$(�$4�$4�u�#F�D��#�<�n�E��!,�\��6:�6G�6G�"I���#�<�Q�@��� 2�%L�N��"�"�1G�1G���)9�)9�E�K����\�q�9��!�,�5H�I�� *��.�.����,�!0����\�q�9�� ��$<�=��!&��+;�+;�1� $� 0� 0�5�!B���#��#5����Q����\�q�9��"�<�(D�F�� %��4�+<�+<�A� $� 0� 0�5�!���	���s���4�d��K����C�a�a�a��8�����Q�Q�Q��?����"�"��a�a�a�"�H����#�#��q�q�q�#�I�����1�1�1��=�����a�a�a��@���� � �e�A�B�Q� �G����5����;������U�1�2�A��F����%����:����s�����;����t�A�A��6���� � �d�1�2� �>����#�#��q�r��#�J����S�q�q�q��A����$�q�q�q��A������S�r���:����s�����;����D�����C����"�"��"�1�"�=����s�����;����4����:������u�Q�R�a��@����"�"��A�B�Q�"�G����s�����;����T�!�!�!��D����"�"��"�1�"�=��O�	I�"*� �/A�/A�$�T�%��"�+�->�a�#I�D��	I�s�0*]-�-	^-�72^-�,^-c	��UOO[OQQQQQ52UOO[OQQQQQ52UO
O[OQQQQQ52UOO[OQQ	Q
QQ52UOO[OQQQQQ52UOO[OQQ
QQQ52UOO[OQQQ22UOO[OQQQQQ52UOO[OQQQ22UOO[OQQQQQ52P!)rr�r�r��r=rrD�intrCr�r�r�rbr6r�r8rLr�r�r9r�)
r�r�r.r�r�r�r�r�r�r�r�r�r�r�s&r^r��WinPage.load_windows_cfg�s��������h�0�0��	�#6�V�E�	F������8�-�-����e�=�	>������H�.�.����u�>�	?������x�1�1���,�U� <�	=������h�0�0����V�E�	F����"�"�8�#5�#5��n�k��$G�	H������X�/�/��l�G�5�	6������X�/�/��l�M��G�	H������H�.�.��l�F�4�	5������h�0�0��/��5�J�	Kr`)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)r�r�r�r�rFr�r�r�r�r�r�r�s@@r^ryry	s#���� �F�h>�TK�Kr`ryc�F``�\sQsQsnU1QksQsQsQsQsUs	U9s
!)r{i�c�:�[RU_U2UO2UO2UO	2P!r�)r�rFr��create_page_shed�load_shelled_cfgr�s&&�r^rF�ShedPage.__init__�s4���
���� ������������r`c�r`�[OQ2nU1QkoUOU2Q1UmP!)r�c�,:�ROU2PI!r�r�r�s&�r^r��4ShedPage.init_validators.<locals>.is_digits_or_empty�r�r`r�r�r�s& @r^r��ShedPage.init_validators�r�r`c�r�[O[U2Q2Um[O[	U2Q2Um[O[
U2Q2Um[O[U2Q2Um[U][QQ5o[U][QQ5o[U]Q5o[UQQ5o[U]UOUOQQ5Um[U]Q5o[UQ	Q5o[!VPO
]Q
Q5Um[!VPO
]QQ5Um[U]Q5o[UQ
Q5o['UUO]Q5Um[U]Q5o	[U	QQ5o
[V�O]UOQQ5UmUO-[.]][0Q5[U2O-2UO-[.]][0Q5UO-[.]][2Q5UO-[4[6]]Q5UOO-[.]]Q5UO-[.]][2Q5UO-[4[6]]Q5UO$O-[8[6]]Q5UO"O-[8[6]]Q5UO-[.]][2Q5UO-[4[6]]Q5UO(O-[4]]Q5U	O-[.]][2Q5U
O-[4[6]]Q5UO*O-[.]]Q5P!)a�Return 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
z Shell Preferencesr�z Editor Preferencesr|zAuto-Squeeze Min. Lines:rfr�)rDr�r�r�zAt Start of Run (F5)  zPrompt to Saver�z	No Promptz Show line numbers in new windows)r�rDzMax Context Lines :r�r�r�r~)r�PyShell�auto-squeeze-min-lines)rr��autosave)rr�line-numbers-default)rbr7�maxlines)rVr}r�auto_squeeze_min_linesrr
r�line_numbers_default�
context_linesr rrr$r#r��auto_squeeze_min_lines_intr'�save_ask_on�save_auto_onr"�line_numbers_default_bool�context_intrr	rrrrr)r[�frame_shell�frame_editor�frame_auto_squeeze_min_lines�auto_squeeze_min_lines_title�
frame_save�run_save_title�frame_line_numbers_default�line_numbers_default_title�
frame_context�
context_titles&          r^r�ShedPage.create_page_shed�s0��>'.�k�k��$��!N�'P��#� ����t��=�?��
�$+�K�K��4� �@�%B��!�%�[�[��$��!J�L���!��1�V�&:�<��!�$�A�f�'<�>��(-�[�a�'H�$�',�-I�2L�(N�$�*/�,�A�!�8�8� $� 0� 0�5�+
��'��<�Q�7�
��z�0H�I��&��]�]�!�%�'���(��]�]�!� �"���&+�<�Q�%G�"�%*�&�-O�&Q�"�)4�*��2�2��*��&�
�l��:�
��m�2G�H�
� ��,>�,>�a� $� 0� 0�5�
���	���c�����=�
�d��������s�����>�$�)�)�s����)�K�$�)�)�t�A�A�A�)�N��'�'�,�,�#�A�A�,�F����S�q�q�q��9�����a�a�a��@������E�!�!�!��D������5�����C�"�'�'�S�q�q�q�'�I�"�'�'�T�!�!�!�'�L��&�&�+�+��A�A�+�F�����!�!�!��<�����Q�Q�Q��?������3�Q�Q��7r`c
��UOO[OQQQQQ52UOO[OQQQ]QQ52UO
O[OQQ	Q
QQ52UOO[OQQQ
QQ52P!)rrr	r�r�r�r
r�)r�r=rrrbr7r)r
r�r.r�r
rrr�s&r^r�ShedPage.load_shelled_cfgSs����#�#�'�'��(:�(:��	�#;�%�)I�	J�	
�
�
���(�,�,��	�:�q�v�G�	H��!�!�%�%�h�&8�&8���(>�V�'M�	N������x�1�1��m�Z�e� E�	Fr`)
r
rr
rrr�rrrr)r�r�r�r�rFr�rrr�r�r�r�s@@r^r{r{�s#���� �F�f8�P
F�
Fr`r{c�X``�\sQsQsnU1QksQsQsQsQsQs	Qs
Q	sUsU9s
!)
rri`c�:�[RU_U2[OQ*Um[O
Q*UmUO[2UmUO2UO2P!)rb)r�rFr.r'�ext_defaultCfgr�ext_userCfgr��is_int�load_extensions�create_page_extensionsr�s&&�r^rF�ExtPage.__init__as^���
���� �&�1�1�,�?���#�+�+�L�9����m�m�F�+��������#�#�%r`c��[U2Um[U][QQ5o[	U][QQ5UmUO
]]Q5UO]]Q5[VOQQ5Um	UOOQUO2[VOOQ5oUOUOm[U]�]�Q	5UmUOO#]]Q
Q5UO#]]QQ5UO O#]]Q
]
],Q5UO%]
Q5-UmPUmVmUOUmPo[/UO02FD+oUO3U2UQ*U*Q*oJ-	UOOU2UOO5]2UOP2UO#]]Q
Q5[7U2O#]]Q5UO
O#]]QQ5P!)amConfigure 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().
z Feature Extensions r�z Help Menu Extensions r��browse)�listvariable�
selectmodez<<ListboxSelect>>r�)rDrC�nws�r�r�re�nsr�)r�r�rer�rb�{z} r5)r�r��sew)r�extension_namesr r�	HelpFrame�
frame_helprrr�extension_listr��extension_selectedr(r�r�r��
details_framerpr��config_frame�current_extension�
outerframe�tabbed_page_setr#rb�create_extension_frame�
selection_setr$)r[�	frame_ext�scroll�	ext_namesrgs&    r^r(�ExtPage.create_page_extensionsis��0 )������t��6�$:�<�	�#�D�a��$<�>���	���q���+��!�!�!�A�!�.�%�i�>R�>R�19�;������ � �!4�d�6M�6M�N��9�.A�.A�.G�.G�H��+1�:�:����*�'�	��S�I������ � ��q�� �?����1�!�D��1������q�a��b�!�W��M����B��'����!%�����#�2�2����	��t���/�H��'�'��1�!�C��(�2�T�9�I�0�	
��� � ��+����)�)�!�,�����%�	���1�Q�v��6�
�d����Q�q��)�������1�U��;r`c��-Um[OP
Q5FDo,UOU$J	UOFCDwo[UOOU22o[UOOU22o[V#*2oSTt,tFDoUOQ2%fJUMJ 	ooSFDoUOU2J	Vd*oSFD�oVR7cUOOVP	Q5oLUOOVP	Q5oQP	QP
-U*oQo	UOOVU	P	UQ5o
[U2oUO[U
22UOU*O!Q	UQ
U	QUQU
Q
U-2J�	CJz	P!ttoh[c([S2oQo	K�[c	SoPo	K�h9hh9h[cSo
K�h9h)zAFill self.extensions with data from the default and user configs.)�active_only�enable)�raw�True�Falser�r�)r=rFr�r>r=r�r9�var)rbr.�
GetExtensionsr�r$�
GetOptionListr%r#�
startswith�remover(�KeyErrorr�r+rr��append)r[rgr�r��opt_list�opt_name�enables�def_str�def_obj�opt_typer9rIs&           r^r'�ExtPage.load_extensions�s����� �.�.�5�A�A�H�(*�D�O�O�H�%�B����H��$�-�-�;�;�H�E�F�G��t�'�'�5�5�h�?�@�D��g�n�-�H�19�9��H�"�-�-�h�7� �x��G�9�#������)�$��)�H�$���&�"�1�1�5�5�$�D�6�:�G�#�.�.�2�2�$�D�3�:�G�	(�%�d�G�E�:�7�C�G�%�H�$� �,�,�0�0�$�X�4�$+�1�-�E�
 ��o������E�
�#�����)�0�0�&�(�28�(�2;�W�29�5�27��	23�4�5%�(��9��  �(�(�"%�g�,��#(���%�(�")��#'��(��	(��"�$�#�E�$�sZ�$G�G�7G�G<�	G9�G9�
G"
�"	G5
�,G5
�1G9�4G5
�5G9�<	H�H�Hc��UOO2oU%cUOOU2oUdV O6wcaUO%cOUOOPQ5UOUO*O2PUmU%cJUOOUQ5UOU*O]]QQ5V mP!P!)z/Handle selection of an extension from the list.rfr�r/)	r6r�r�r:r8r�r9�grid_forgetrp)r[r?�newsels&& r^r7�ExtPage.extension_selected�s����$�$�1�1�3����(�(�,�,�V�4�F��>�V�'=�'=�=��%�%�%��"�"�)�)�r�)�2��!�!�$�"8�"8�9�E�E�G�)-��&�����%�%�6�%�2����f�%�*�*�!��6�*�J�%+�"�r`c
�X�[UO]�]�Q5oV OU$UOo[	UO
U*2FD�vqE[
V5Q*Q5oUOU][Q5UQ*oUQ*Q6Xc)[V7QQ	]Q
5OU][]Q5JoUQ*Q6Xc5[V7Q
UOQ1]
Q5OU][]Q5J�[V7]Q5OU][]Q5J�	P!)z=Create a frame holding the widgets to configure one extensionrBr>rfr5rIr=r�rGrH)r�r�r�rD)r�r�rer�r�r�r�)r�r�r�rD)r�rD)�VerticalScrolledFramer8r9�interior�	enumeraterbr$rprr"rr#r&r)r[rg�f�
entry_arear��opt�labelrIs&&      r^r=�ExtPage.create_extension_frame�s���!�$�"4�"4�S��L��&'���(�#��Z�Z�
�!�$�/�/�(�";�<�H�C��*�v�;�7�E��J�J�3�q��J�4��e�*�C��6�{�f�$��J�$*�W�A��"�d�s�1�Q�Q�d�G��V���%��j�U�'+�{�{�D�&9������Q�t�!��D��j�"�����Q�t�!��D�#=�$	r`c�r�UQ*oUQ*oUQ*O2O29%fSoUQ*OU2UOO	U2%c"VT6XcUO
O
V2!UO
OVU2!)z�Return True if the configuration was added or changed.

If the value is the same as the default, then remove it
from user config file.
r>r�rI)r�r�r�r$�has_sectionr%�RemoveOptionr)r[�sectionrar>r�r9s&&&   r^�set_extension_value�ExtPage.set_extension_values����6�{���i�.���E�
��� �&�&�(�3�3�G���E�
���u�����*�*�7�3�3��8H��#�#�0�0��?�?����)�)�'��?�?r`c���P
oUOFD;oUOU*oSFDoUOV$2%fJP	oJ 	J=	U%cUOO2P!P!)z{Save configuration changes to the user config file.

Attributes accessed:
    extensions

Methods:
    set_extension_value
)rbrhr%�Save)r[�has_changesrg�optionsras&    r^r��#ExtPage.save_all_changed_extensionssa�������H��o�o�h�/�G����+�+�H�:�:�"&�K��(�
����!�!�#�r`)r9r:r8r$r%r6r3rbr5r&r;r<)r�r�r�r�rFr(r'r7r=rhr�r�r�r�r�s@@r^rrrr`s0����&�=<�~34�j
,��4@�$$�$r`rrc�d``�\sQsQsnU1QksQsQsQsQsQs	Qs
Q	sQ
sQs
UsU9s!)r4i+c�n:�[RU_U1-U@UO2UO2P!r�)r�rF�create_frame_help�
load_helplist)r[r��cfgr�s&&,�r^rF�HelpFrame.__init__-s-���
����'�3�'���� ����r`c���[U2o[U]P	[Q5Um[	U2oUOO
UQ$UOUOQ$UOOQUO2[U2o[UQQ]UOQ5Um[UQ]UOQ	5Um
[UQ
Q]UOQ5UmUO!["]][$[&Q5UOO!["[([$[&Q5UO![*[,[.Q
5UO![*]][.Q5UOO![0[,]Q5UOO![0[,Q5UOO![0[,]Q5P!)a�Create 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
r�r�r�r��Editrt)rgrurDr��Add)rgrDr��Remover})rkr�rlrm)rkr�rmr�r�r�)rrr�helplistr(r�r�r��help_source_selectedr!�helplist_item_edit�button_helplist_edit�helplist_item_add�button_helplist_add�helplist_item_remove�button_helplist_removerrrrrrrrr	)r[�frame_helplist�scroll_helplist�
frame_buttonss&   r^rq�HelpFrame.create_frame_help2s���*�t�����q�D� %�'��
�$�N�3��%)�]�]�%8�%8��	�"�*9�*=�*=��
�
�&�'��
�
���.��0I�0I�J��d��
�$*��F�*���!8�!8�%:��!�$*��E���!7�!7�$9�� �'-��H�J���!:�!:�'<��#�
	����A�A�d���N��
�
����Q�t�$��G����%����:�����A�A�A��>��!�!�&�&�C���&�B�� � �%�%�3�q�%�9��#�#�(�(�c�!�!�(�Dr`c�(�UO2P!)z+Handle event for selecting additional help.)�set_add_delete_stater�s&&r^rz�HelpFrame.help_source_selecteddr�r`c���UOO2]6c9UOOQ2UOOQ2P!UOO2%c9UOOQ2UOOQ2P!UOOQ2UOOQ2P!)zAToggle the state for the help list buttons based on list entries.r�r�)ry�sizer|rur�r�r�s&r^r��HelpFrame.set_add_delete_statehs����=�=����!�#��%�%�+�+�M�:��'�'�-�-�m�<��}�}�)�)�+�+��)�)�/�/��?��+�+�1�1�.�A��)�)�/�/�
�>��+�+�1�1�-�@r`c���[UQ2OoU%cUUOOU2UOO[U]*2UO2P!P!)zpHandle add button for the help list.

Query for name and location of new help sources and add
them to the list.
zNew Help Source)r4r��
user_helplistrOryrr�update_help_changes)r[�help_sources& r^r}�HelpFrame.helplist_item_addusW��!��'8�9�@�@������%�%�k�2��M�M� � ��k�!�n�5��$�$�&�r`c��UOO[2oUOU*o[	UQU]*U]*Q5O
oU%cvV26wcnV0OU$UOO
U2UOOV]*2UO2UO2P!P!P!)z�Handle edit button for the help list.

Query with existing help source information and update
config if the values are changed.
zEdit Help Source)�menuitem�filepath)
ryr&rr�r4r�rrrr�r�)r[�
item_indexr��new_help_sources&   r^r{�HelpFrame.helplist_item_edit�s����]�]�(�(��0�
��(�(��4��$��(�$�Q��$�Q����&�		�
��=�-<���z�*��M�M� � ��,��M�M� � ��Q�-?�@��$�$�&��%�%�'� >�?r`c���UOO[2oUOUUOO	U2UO2UO
2P!)zPHandle remove button for the help list.

Delete the help list item from config.
)ryr&rr�rrr�r�)r[r�s& r^r�HelpFrame.helplist_item_remove�sP��
�]�]�(�(��0�
����z�*��
�
���Z�(�� � �"��!�!�#r`c�"�-[Q*Q$[][UO2]*2FDRo[O	QQ[U2QO
UOU]*
*Q*22JT	P!)z2Clear and rebuild the HelpFiles section in changesr�	HelpFiles�;:N�N)r�r�r�r�r6r�r�)r[�nums& r^r��HelpFrame.update_help_changes�sj��')�����$���C�� 2� 2�3�a�7�8�C�����K��S���H�H�T�/�/��A��6�r�:�;�
=�9r`c�
�[O2UmUOO	]Q2UOFD*oUOO[U]*2J,	UO2P!)�r�)r.�GetAllExtraHelpSourcesListr�ryrrrrr�)r[�	help_items& r^rr�HelpFrame.load_helplist�s[��%�@�@�B����
�
���Q��&��+�+�I��M�M� � ��i��l�3�,��!�!�#r`)r~r|r�ryr�)r�r�r�r�rFrqrzr�r}r{rr�rrr�r�r�r�s@@r^r4r4+s:�����
0E�d$�A�
'�(�(	$�=�$�$r`r4c�T`�\sQsQsnQsQsQsQs\Q2s	Qs
QsQ	sUs
P!)
�VarTracei�z"Maintain Tk variables trace state.c�$�,Um,UmP!)z�Store 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.
)�untraced�tracedr�s&r^rF�VarTrace.__init__�s����
���r`c�p�UOO2UOO2P!)zClear lists (for tests).)r�r�r�r�s&r^r��VarTrace.clear�s$��	
�
�
���������r`c��[U[2%cUOV2oUOO	V12U!)aAdd (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.
)�
isinstance�tuple�
make_callbackr�rO�r[rI�callbacks&&&r^r}�VarTrace.add�s:���h��&�&��)�)�#�8�H��
�
���c�_�-��
r`c�``�UU1QkoU!)zCReturn default callback function to add values to changes instance.c�p:�RO2oUP6wc[O,RNUM3P!P!)z&Add config values to changes instance.)r�r�r6)r8r9r�rIs* ��r^�default_callback�0VarTrace.make_callback.<locals>.default_callback�s2����G�G�I�E���{��"�"�2�F�2�E�2�r`rg)rIr�r�sff r^r��VarTrace.make_callback�s���	3� �r`c���UO%cMUOO2vqUOQU2UOO	V12J^P!)z0Attach callback to all vars that are not traced.�write)r��pop�	trace_addr�rOr�s&  r^rW�VarTrace.attach�sF���m�m�m� �M�M�-�-�/�M�C��M�M�'�8�,��K�K�����/�r`c��UO%ciUOO2vqUOQUO2]*]*2UOOV12JzP!)z!Remove callback from traced vars.r�)r�r��trace_remove�
trace_infor�rOr�s&  r^�detach�VarTrace.detach�sW���k�k�k� �K�K�O�O�-�M�C����W�c�n�n�&6�q�&9�!�&<�=��M�M� � �#��1�r`)r�r�)r�r�r�r�r�rFr�r}r�r�rWr�r�r��r�s@r^r�r��s:����,�
���"�	 ��	 �0�2�2r`r�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.
z
Fonts/Tabsu
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.
rhz�
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.
rQz�
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.
r�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".
ria�
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.
c�X�U%fP	![U2P	![cP
!h9h)z(Return 's is blank or represents an int')r�r+)r1s&r^r&r&9	s)������A��������s��	)�)�)c�,`�\sQsQsnQsQsQsUsP!)r\iD	z�A 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�R```	�[OV,UN3-U@[U[Q5oUO	[
[[Q5[U]]UO]�Q5nRO	[[[Q5UOROQ5RO]2RO!]2[R29UmnRO%]]R[&Q5n	UU1QkoRO)QU2UUU	1QkoRO)QU2P!)	r1)rmrkrl)r�rdr�rDr6r�)�windowr�c�|:�RO2RO21oROQU*Q5P!)z	0 0 %s %s)�scrollregion)�winfo_reqwidth�winfo_reqheightr�)r?r��canvasr]s& ��r^�_configure_interior�;VerticalScrolledFrame.__init__.<locals>._configure_interior`	s2����+�+�-�x�/G�/G�/I�J�D��M�M�{�T�'9�M�:r`z<Configure>c�:�RO2RO26wc$RORRO2Q5P!P!))rD)r��winfo_width�
itemconfigure)r?r�r]�interior_ids&���r^�_configure_canvas�9VerticalScrolledFrame.__init__.<locals>._configure_canvasf	s?����&�&�(�F�,>�,>�,@�@��$�$�[��8J�8J�8L�$�M�Ar`)rrFr(rrrrrrr�rrrr�r��xview_moveto�yview_movetor]�
create_windowrr�)
r[rGr�kw�
vscrollbarr�r�r�r]r�s
&&*,   @@@r^rF�VerticalScrolledFrame.__init__K	s����
���t�1�d�1�b�1��t�H�5�
����Q�U�5��9���!��'1�~�~�S�B������D���6����&�,�,��/�	���A�����A��$)��=�0��
���*�*�1�a���*�L��	;�	�
�
�m�%8�9�	N�	���M�#4�5�r`)r])r�r�r�r�r�rFr�r�r�s@r^r\r\D	s�����!�!r`r\�__main__)rz#idlelib.idle_test.test_configdialog)�	verbosity�exit)�run)cr�r��tkinterrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrr�tkinter.ttkrr r!r"r#r$r%r&r'r(r)r*r+r,�tkinter.fontr0r$r-�idlelib.configr.r/�idlelib.config_keyr0�idlelib.dynoptionr1�idlelibr2�
idlelib.queryr3r4�idlelib.textviewr5�idlelib.autocompleter6�idlelib.codecontextr7�idlelib.parenmatchr8�idlelib.formatr9�idlelib.squeezerr:r;r�r�r=r�rvrtrwryr{rrr4r�rVr�r�r&r\r��unittestr�idlelib.idle_test.htestr�rgr`r^�<module>r�s���
�
�J�J�J�J�J�J�J�J�
,�,�,�,�!���2�,�+��1�&�-�+�)�*�%�0�
�/���[�*�o����{�8�{�^E��<g1�u�g1�TQ
�u�Q
�ho�u�o�d
OK�e�OK�dBF�u�BF�JH$�e�H$�VC$�
�C$�L>2�>2�B�*������"���
���*��g;�
�|�(�E�(�V�z����	.�!�%�H�+����r`

Youez - 2016 - github.com/yon3zu
LinuXploit