+
     Bi                     &   R t ^ RIHtHtHtHtHtHtHtH	t	H
t
HtHt ^ RIHtHtHt ^ RIHt ^ RIHt  ! R R]4      t ! R R]4      t ! R	 R
]4      t ! R R]4      tRR ltRR lt]R8X  d"   ^ RIHt ]! R^RR7       ^ RIHt ]! ]4       R# R# )zSimple text browser for IDLE

)ToplevelTextTclError
HORIZONTALVERTICALNSEWNSEWNONEWORDSUNKEN)Frame	ScrollbarButton)	showerror)color_configc                   B   a a ] tR t^t oRtV 3R ltR tR tRtVt	V ;t
# )AutoHideScrollbarzhA scrollbar that is automatically hidden when not needed.

Only the grid geometry manager is supported.
c                   < \        V4      R 8  g   \        V4      R8  d   V P                  4        MV P                  4        \        SV `  W4       R# )g        g      ?N)floatgridgrid_removesuperset)selflohi	__class__s   &&&'/usr/lib/python3.14/idlelib/textview.pyr   AutoHideScrollbar.set   s9    9s?eBi#oIIKB    c                F    \        V P                  P                   R 24      h)z does not support "pack"r   r   __name__r   kwargss   &,r   packAutoHideScrollbar.pack   s     $..1122JKLLr    c                F    \        V P                  P                   R 24      h)z does not support "place"r"   r$   s   &,r   placeAutoHideScrollbar.place   s     $..1122KLMMr     )r#   
__module____qualname____firstlineno____doc__r   r&   r)   __static_attributes____classdictcell____classcell__r   __classdict__s   @@r   r   r      s!     MN Nr    r   c                   <   a a ] tR t^t oRt]3V 3R lltRtVtV ;t	# )ScrollableTextFramezDisplay text with scrollbar(s).c                f  < \         SV `  ! V3/ VB  \        WR7      ;q@n        VP	                  ^ ^ \
        R7       V P                  ^ ^R7       V P                  ^ ^R7       \        V \        RVP                  R7      V n        V P                  P	                  ^ ^\        R7       V P                  P                  VR&   V\        8X  d`   \        V \        RVP                   R7      V n        V P"                  P	                  ^^ \$        R7       V P"                  P                  VR&   R# RV n        R# )	aY  Create a frame for Textview.

master - master widget for this frame
wrap - type of text wrapping to use ('word', 'char' or 'none')

All parameters except for 'wrap' are passed to Frame.__init__().

The Text widget is accessible via the 'text' attribute.

Note: Changing the wrapping mode of the text widget after
instantiation is not supported.
wrap)rowcolumnsticky)weightF)orient	takefocuscommandyscrollcommandxscrollcommandN)r   __init__r   textr   r	   grid_rowconfiguregrid_columnconfigurer   r   yviewyscrollr   r   r
   r   xviewxscrollr   )r   masterr9   r%   rD   r   s   &&&, r   rC   ScrollableTextFrame.__init__"   s    	*6*00y		a$	/q+!!!A!. )h3815= 	a"5!%!1!1 4<,T*7<59ZZADL LL!Ab9%)\\%5%5D!"DLr    )rD   rJ   rH   )
r#   r,   r-   r.   r/   r
   rC   r0   r1   r2   r3   s   @@r   r6   r6      s     )$( #  # r    r6   c                   D   a a ] tR t^Ht oRtRV 3R lltRR ltRtVtV ;t	# )	ViewFramez#Display TextFrame and Close button.c                *  < \         SV `  V4       Wn        V P                  RV P                  4       V P                  RV P                  4       \        V \        RR7      V n        V P                  P                  ;q@n        VP                  RV4       VP                  V^ RR7       \        V4       VP                  4        \        V RV P                  R	R
7      ;V n        pV P                  P                  RRRR7       VP                  RR7       R# )zCreate a frame for viewing text with a "Close" button.

parent - parent widget for this frame
contents - text to display
wrap - type of text wrapping to use ('word', 'char' or 'none')

The Text widget is accessible via the 'text' attribute.
z<Return>z<Escape>i  )reliefheightz1.0disabled)r9   highlightthicknessstateCloseFrD   r@   r?   topTbothsideexpandfillbottom)rZ   N)r   rC   parentbindokr6   r   	textframerD   insert	configurer   	focus_setr   	button_okr&   )r   r^   contentsr9   rD   re   r   s   &&&&  r   rC   ViewFrame.__init__J   s     	 		*dgg&		*dgg&,T&M>>...yE8$DQjIT%+7DGGu&F 	Ft&AH%r    c                :    V P                   P                  4        R# zDismiss text viewer dialog.N)r^   destroyr   events   &&r   r`   ViewFrame.okd   s    r    )re   r^   rD   ra   )wordN)
r#   r,   r-   r.   r/   rC   r`   r0   r1   r2   r3   s   @@r   rN   rN   H   s     )&4 r    rN   c                   T   a a ] tR t^it oRtR]3RRRR/V 3R llltR	R ltRtVt	V ;t
# )

ViewWindowz%A simple text viewer dialog for IDLE.T_htestF_utestc               r  < \         SV `  V4       ^V R&   VP                  4       ^
,           pVP                  4       V'       g   ^
M^d,           p	V P	                  RV RV	 24       V P                  V4       \        WVR7      V n        V P                  RV P                  4       \        V RV P                  RR7      ;V n        p
V P                  P                  R	R
RR7       W@n        V P                  '       d>   V P                  V4       V P                  4        V'       g   V P!                  4        R# R# R# )a  Show the given text in a scrollable window with a 'close' button.

If modal is left True, users cannot interact with other windows
until the textview window is closed.

parent - parent of this dialog
title - string which is title of popup dialog
contents - text to display in dialog
wrap - type of text wrapping to use ('word', 'char' or 'none')
_htest - bool; change box location when running htest.
_utest - bool; don't wait_window when running unittest.
borderwidthz	=750x500++r8   WM_DELETE_WINDOWrU   FrV   rW   TrX   rY   N)r   rC   winfo_rootxwinfo_rootygeometrytitlerN   	viewframeprotocolr`   r   re   r&   is_modal	transientgrab_setwait_window)r   r^   r{   rf   modalr9   rr   rs   xyre   r   s   &&&&&&$$   r   rC   ViewWindow.__init__l   s    	 ] 2% fB#>	!AaS)*

5"4=($''2%+Dw48GGu&N 	Nt&A===NN6"MMO  "  r    c                j    V P                   '       d   V P                  4        V P                  4        R# ri   )r~   grab_releaserj   rk   s   &&r   r`   ViewWindow.ok   s     ===r    )re   r~   r|   ro   )r#   r,   r-   r.   r/   r   rC   r`   r0   r1   r2   r3   s   @@r   rq   rq   i   s2     +6: !# !#).!# !#F r    rq   Fc           	         \        WW#WER7      # )ao  Create text viewer for given text.

parent - parent of this dialog
title - string which is the title of popup dialog
contents - text to display in this dialog
wrap - type of text wrapping to use ('word', 'char' or 'none')
modal - controls if users can interact with other windows while this
        dialog is displayed
_utest - bool; controls wait_window on unittest
r9   rs   )rq   )r^   r{   rf   r   r9   rs   s   &&&&&&r   	view_textr      s     fX4OOr    c           	     B    \        W#R7      ;_uu_ 4       pVP                  4       pRRR4       \        WXWEVR7      #   + '       g   i     L; i  \         d    \	        RRT: R2T R7        R# \
         d#   p	\	        R\        T	4      T R7        Rp	?	R# Rp	?	ii ; i)	zCreate text viewer for text in filename.

Return error message if file cannot be read.  Otherwise calls view_text
with contents of the file.
)encodingNr   zFile Load ErrorzUnable to load file z .)r{   messager^   zUnicode Decode Error)openreadr   OSErrorr   UnicodeDecodeErrorstr)
r^   r{   filenamer   r   r9   rs   filerf   errs
   &&&&&&&   r   	view_filer      s    ((..$yy{H / % &( 	( /. !)0B?	!   !.c(	! 	! !s7   A >A A		A B2B;B<BB__main__)mainzidlelib.idle_test.test_textview)	verbosityexit)runN)Trn   F) r/   tkinterr   r   r   r   r   r   r   r	   r
   r   r   tkinter.ttkr   r   r   tkinter.messageboxr   idlelib.colorizerr   r   r6   rN   rq   r   r   r#   unittestr   idlelib.idle_test.htestr   r+   r    r   <module>r      s   ; ; ; ; 0 0 ( *N	 N&& % & R B* *ZP0 z	*aeD+
O r    