KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/pygtk/2.0/demos/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/pygtk/2.0/demos/textview.pyo
m
e8Hc@sdZdkZdkZdkZdkZdZdZdZeii	eii
eddZeii	eii
eddZ
deifdYZd	Zed
joendS(sText Widget/TextView

The GtkTextView widget displays a GtkTextBuffer. One GtkTextBuffer can be displayed
by multiple GtkTextViews. This demo has two views displaying a single buffer, and
shows off the widget's text formatting features.Nistimagessgtk-logo-rgb.gifsfloppybuddy.giftTextViewDemocBsJtZddZdZdZdZdZdZdZ	RS(NcCstii|y|i|iWn&tj
o|iddnX|i	|i
i|idd|i
dti}|i
d|i|ti}|i}ti|}ti}|iti|ititi|i||i|ti}|iti|ititi|i||i||i||i||i ||i |d|_"|i#dS(NtdestroycGs
tiS(N(tgtkt	main_quit(tw((t&/usr/lib64/pygtk/2.0/demos/textview.pyt<lambda>siii($RtWindowt__init__tselft
set_screentparentt
get_screentAttributeErrortconnectt	set_titlet	__class__t__name__tset_default_sizetset_border_widthtVPanedtvpanedtaddtTextViewtview1t
get_buffertbuffer_1tview2tScrolledWindowtswtset_shadow_typetSHADOW_ETCHED_INt
set_policytPOLICY_AUTOMATICtadd1tadd2tcreate_tagstinsert_texttattach_widgetstNonetwintshow_all(R
RRRRRR((RR	s<










	cCsdk}|idd|idd|i|idd|i|idd|i|id	dd
|i|idd|i|id
d|i|iddd|iddd|idddti	i
dtt
t}|idd||idd||iddd|iddd|iddd|id d!t|id"d#ti|id$d#ti|id%d#ti|id&d'ti|id(d'ti|id)d*d+d,d+|id-d-t|id.d.|i|id/d.|i|id0d1d|idd2|i|id3d1d4|idd2|i|id5d#tid6tid7dd*d
d,d
dS(8s
        Create a bunch of tags. Note that it's also possible to
        create tags with gtk.text_tag_new() then add them to the
        tag table for the buffer, text_buffer.create_tag() is
        just a convenience function. Also note that you don't have
        to give tags a name; pass None for the name to create an
        anonymous tag.

        In any real app, another useful optimization would be to create
        a GtkTextTagTable in advance, and reuse the same tag table for
        all the buffers with the same tag set, instead of creating
        new copies of the same tags for every buffer.

        Tags are assigned default priorities in order of addition to the
        tag table. That is, tags created later that affect the same text
        property affected by an earlier tag will override the earlier
        tag. You can modify tag priorities with
        gtk.text_tag_set_priority().
        Ntheadingtweighttsizeititalictstyletboldtbigisxx-smalltscalesx-larget	monospacetfamilytblue_foregroundt
foregroundtbluetred_backgroundt
backgroundtredtbackground_stippletforeground_stippletbig_gap_before_linetpixels_above_linesitbig_gap_after_linetpixels_below_linestdouble_spaced_linetpixels_inside_wrapi
tnot_editableteditablet	word_wrapt	wrap_modet	char_wraptno_wraptcentert
justificationt
right_justifytwide_marginstleft_margini2tright_margint
strikethrought	underlinetdouble_underlinetsuperscripttriseit	subscriptit	rtl_quotet	directiontindent(tpangottext_buffert
create_tagtWEIGHT_BOLDtSCALEtSTYLE_ITALICtSCALE_XX_SMALLt
SCALE_X_LARGERtgdktbitmap_create_from_dataR(tgray50_bitstgray50_widtht
gray50_heighttstippletFalset	WRAP_WORDt	WRAP_CHARt	WRAP_NONEtJUSTIFY_CENTERt
JUSTIFY_RIGHTtTruetUNDERLINE_SINGLEtUNDERLINE_DOUBLEtTEXT_DIR_RTL(R
RYReRX((RR%IsT					
	
	
	
	c	Csytiit}Wn%tij
o}ti	dnX|i
ddd}|}|i
d}|i|d|i|dd|i|d|i|d	d	|i|d
|i|dd|i|dd
|i|dd|i|d|i|dd|i|d|i|d|i|dd|i|d|i|dd|i|d|i|dd|i|d|i|dd|i|d|i|dd|i|dd
|i|ddd|i|dd
|i|d ddd!|i|d"d
|i|d#d|i|d$d%|i|d
d
|i|d&d&|i|d
d
|i|d'd(|i|d
d
|i|d)d)|i|d*d
|i|d+d+|i|d,d
|i|d-d|i|d.d
|i|||i|||i|||i|d/d
|i|d0d|i|d1d
|i|d2d3d4|i|d5d6d4|i|d7d8d4|i|d9d
|i|d:d|i|d;d<|i|d=d|i|d>d
|i|d?d@|i|dAdB|i|dCd|i|dDdE|i|dFdG|i|dHd4|i|dId|i|dJd
|i|dKd
|i|dLdM|i|dNd
|i|}|i|dOd
|i|}|i|dPd
|i|}|i|dQd
|i|}|i|dRd
|i|}|i|dSd
|i|dTd
|i\}}|idU||dS(VNs+Failed to load image file gtk-logo-rgb.gif
i tbilinearisThe text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.

s
Font styles. R+sFor example, you can have R.s, R0s, or ismonospace(typewriter)R3R1s text. s_It's best not to hardcode specific text sizes; you can use relative sizes as with CSS, such as sxx-smalls or sx-largesY to ensure that your program properly adapts if the user changes the default font size.

sColors. sColors such as sa blue foregroundR5sa red backgroundR8s	 or even sa stippled red backgroundR;s2a stippled blue foreground on solid red backgroundR<s'(select that to read it) can be used.

s$Underline, strikethrough, and rise. t
StrikethroughRORPsdouble underlineRQRRs, and RTs are all supported.

sImages. s"The buffer can have images in it: s for example.

s	Spacing. s5You can adjust the amount of space before each line.
s.This line has a whole lot of space before it.
R=RLsfYou can also adjust the amount of space after each line; this line has a whole lot of space after it.
R?sYou can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.
RAs5Also note that those lines have extra-wide margins.

s
Editability. sgThis line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.

RCs
Wrapping. s>This line(and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah

sThis line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah

RGsVThis line has all wrapping turned off, so it makes the horizontal scrollbar appear.


RHsJustification. s%
This line has center justification.
RIs#This line has right justification.
RKs
This line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.
sInternationalization. s[You can put all sorts of Unicode text in the buffer.

German(Deutsch Süd) Grüß Gott
Greek(Ελληνικά) Γειά σας
Hebrew   שלום
Japanese(日本語)

The widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.
s9Here's a word-wrapped quote in a right-to-left language:
sوقد بدأ ثلاث من أكثر المؤسسات تقدما في شبكة اكسيون برامجها كمنظمات لا تسعى للربح، ثم تحولت في السنوات الخمس الماضية إلى مؤسسات مالية منظمة، وباتت جزءا من النظام المالي في بلدانها، ولكنها تتخصص في خدمة قطاع المشروعات الصغيرة. وأحد أكثر هذه المؤسسات نجاحا هو »بانكوسول« في بوليفيا.

RUs4You can put widgets in the buffer: Here's a button: s
 and a menu: s and a scale: s and an animation: s finally a text entry: s.
s

This demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text(doesn't work in GTK 2, but planned), tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...RE(RR`tpixbuf_new_from_filet
GTKLOGO_IMAGEtpixbuftgobjecttGErrorterrortsystexittscale_simpletscaledRYtget_iter_at_offsettitertinserttinsert_with_tags_by_namet
insert_pixbuftcreate_child_anchortanchort
get_boundststarttendtapply_tag_by_name(	R
RYR{RRtR}RRwR((RR&s	
	
	
	
	
	
	
				
						
	
	
	
					
	
		
		"cCsk|i}|i}d}xF|i|o5|i}|djo&t
id}|i
d|in|djo7t
i}|id|id|idn|djo0t
i}|idd	|id
dnN|djot
i}|itn$|d
jot
i}nt|i|||i|d7}q!WdS(NisClick MetclickedisOption 1sOption 2sOption 3iidiFiii(t	text_viewRtbuffertget_start_iterR}tiR
tfind_anchortget_child_anchorRRtButtontwidgetRteaster_egg_callbacktcombo_box_new_texttappend_texttHScalet	set_rangetset_size_requesttImaget
set_from_filetFLOPPYBUDDY_IMAGEtEntryt
ValueErrortadd_child_at_anchorR*(R
RRRR}RR((RR's8







cCs.x'|io|iotSqqWtS(N(R}tforward_charRRlRf(R
R}((RRs



cCs|io|iidSnti}|i}|i|d|i	|}|i|dti|}|i
d||ti|_ti}|ititi|ii||i||iidd|iidS(NsCThis buffer is shared by a set of nested text views.
 Nested view:
s-
Don't do this in real applications, please.
ii,i(R
R)tpresentRt
TextBufferRRR}R~RRRtviewtrecursive_attach_viewRRRR!R"RRR*(R
tbuttonRRR}RR((RRs(

		

cCs|djodSnti|i}ti}tii	d}|iti|ti
dddd}|id|i||i||i|||i|d||dS(Nitblackf0.5f1.0i(tdepthRRRRt
child_viewtEventBoxt	event_boxR`tcolor_parsetcolort	modify_bgtSTATE_NORMALt	AlignmenttalignRRRRR
R(R
RRRRRRR((RRs



(
Rt
__module__R(R	R%R&R'RRR(((RRs1	[				cCsttidS(N(RRtmain(((RRst__main__(t__doc__tosRxRuRRcRdRbtpathtjointdirnamet__file__RsRRRRR(RbRRcRRsRRxRuRRRd((Rt?s 					


Anon7 - 2021