%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/idlelib/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/idlelib/keybindingDialog.pyo

ó
Pêáac@swdZddlTddlZddlZddlZdefd„ƒYZedkrsddlm	Z	e	eƒndS(s6
Dialog for building Tkinter accelerator key bindings
iÿÿÿÿ(t*Nt
GetKeysDialogcBs†eZed„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
d
„Zd
d„Zd„ZRS(cCs°tj||ƒ|jddƒ|jdtdtƒ|j|ƒ|j|ƒ|jƒ|jd|j	ƒ||_
||_||_d|_
t|ƒ|_|jjdƒ|jƒg|_x:|jD]/}t|ƒ}|jdƒ|jj|ƒqÍWt|_|jƒ|jƒ|jƒ|jƒ|jd|jƒ|jƒd|jƒd|jƒ|sŒ|j ƒd|j!ƒdnd	fƒ|j"ƒ|j#ƒd
S(s3
        action - string, the name of the virtual event these keys will be
                 mapped to
        currentKeys - list, a list of all key sequence lists currently mapped
                 to virtual events, for overlap checking
        _htest - bool, change box location when running htest
        tborderwidthitheighttwidthtWM_DELETE_WINDOWts+%d+%dii–N($tToplevelt__init__t	configuret	resizabletFALSEttitlet	transienttgrab_settprotocoltCanceltparenttactiontcurrentKeySequencestresultt	StringVart	keyStringtsettSetModifiersForPlatformt
modifier_varst	modifierstappendtFalsetadvancedt
CreateWidgetstLoadFinalKeyListtwithdrawtupdate_idletaskstgeometrytwinfo_rootxtwinfo_widthtwinfo_reqwidthtwinfo_rootytwinfo_heighttwinfo_reqheightt	deiconifytwait_window(tselfRRRRt_htesttmodifiertvariable((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR
s@


				
	
	



		0
c
CsZt|dddtƒ}|jdtdtdtƒt|ƒ}|jdtdtƒt|ddd	d
d|j	ƒ|_
|j
jdd
dd
ddddƒt|ddd	d
d|jƒ|_
|j
jdd
ddddddƒt|ƒ|_t|ƒ|_t|ƒ|_t|ƒ|_|jjdd
dd
dtddddƒ|jjdd
dd
dtddddƒ|jjƒ|jjdddd
dtddƒ|jjdddd
dtddƒ|jjƒt|d|jddƒ|_|jjdddd
dtddddƒt|jdd|jdƒ}|jdtƒt|jdtd|jdtddƒ}|jdddddtƒi|_d
}x¡t|j|j ƒD]Š\}}|j!j"||ƒ}t#|jd|j$d|d|d|d d!ƒ}	|	jdd
d|dddtƒ|	|j|<|d7}qÂWt|jdtdd"d#d$d%d&d'ƒ}
|
jdddd
d(d)dddtƒt%|jd	d*d+d,d-t&ƒ|_'|j'j(d.|j)ƒ|j'jdd
dd)d/d)dt*ƒt+|jd0t,d|j'j-ƒ}|j'j.d1|j/ƒ|jdd
ddd/d)dt*ƒt|jdd2d|j0ƒ|_1|j1jdddd
d(d)ƒt|jdtdd3|jd4d5ƒ}|jdtƒt2|jd|jƒ|_3|j3jdtƒt|jdtdd6d7d8d9d:d;d<ƒ}
|
jdd
dd
dtƒdS(=NRitrelieftsidetexpandtfillttexttOKRitcommandtrowitcolumntpadxitpadyRitstickysAdvanced Key Binding Entry >>tsticksNew keys for  's' :tanchortjustifyttextvariabletipadxtipadyR.tonvaluetoffvalueRs!Select the desired modifier keys
s"above, and the final key from the
slist on the right.

s"Use upper case Symbols when using
s&the Shift modifier.  (Letters will be
sconverted automatically.)t
columnspaniiRi
t
selectmodes<ButtonRelease-1>trowspantorienttyscrollcommands
Clear KeyssEnter new binding(s) for  's' :
s2(These bindings will not be checked for validity!)s4Key bindings are specified using Tkinter keysyms as
sŸin these samples: <Control-f>, <Shift-F2>, <F12>,
<Control-space>, <Meta-less>, <Control-Alt-Shift-X>.
Upper case is used when the Shift modifier is present!

s8'Emacs style' multi-keystroke bindings are specified as
s5follows: <Control-x><Control-y>, where the first key
s!is the 'do-nothing' keybinding.

s4Multiple separate bindings for one action should be
s,separated by a space, eg., <Alt-v> <Meta-v>.(4tFrametSUNKENtpacktTOPtTRUEtBOTHtBOTTOMtXtButtonR4tbuttonOKtgridRtbuttonCanceltframeKeySeqBasictframeKeySeqAdvancedtframeControlsBasictframeHelpAdvancedtNSEWtlifttToggleLeveltbuttonLeveltEWtLabelRtWtLEFTRtGROOVEtmodifier_checkbuttonstzipRRtmodifier_labeltgettCheckbuttontBuildKeyStringtListboxtSINGLEt
listKeysFinaltbindtFinalKeySelectedtNSt	ScrollbartVERTICALtyviewtconfigRtClearKeySeqtbuttonCleartEntrytentryKeysAdvanced(R+t	frameMaintframeButtonstlabelTitleBasictlabelKeysBasicR7R-R.tlabeltcheckt
labelFnAdvicetscrollKeysFinaltlabelTitleAdvancedtlabelHelpAdvanced((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR5s‚%%++
%%
+	"	"

(%"

cCsMtjdkr'ddddg|_ndddg|_idd6|_dS(	sUDetermine list of names of key modifiers for this platform.

        The names are used to build Tk bindings -- it doesn't matter if the
        keyboard has these keys, it matters if Tk understands them. The
        order is also important: key binding equality depends on it, so
        config-keys.def must use the same ordering.
        tdarwintShifttControltOptiontCommandtAlttCtrlN(tsystplatformRRc(R+((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR„scCs°|jjdƒd dkrl|jƒ|jjddƒ|jjƒ|jjƒ|jjƒt	|_
n@|jƒ|jjddƒ|jjƒ|jjƒt
|_
dS(NR3itAdvanceds<< Basic Key Binding EntrysAdvanced Key Binding Entry >>(R[tcgetRqRpRURYRWRtt	focus_settTrueRRTRVR(R+((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyRZ’s






cCs|jƒdS(N(Rf(R+tevent((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyRk¡scCsr|jƒ}}|jjtƒ}|rJ|j||ƒ}|j|ƒn|jjdtj	|dƒdƒdS(Nt<t-t>(
tGetModifiersRiRdtANCHORtTranslateKeyRRRtstringtjoin(R+tkeyListRtfinalKey((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyRf¤scCs?g|jD]}|jƒ^q
}g|D]}|r)|^q)S(N(RRd(R+R.tmodListtmod((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR¬s"cCs[|jjdtƒ|jjtdƒx|jD]}|jdƒq0W|jjdƒdS(Nis0.0R(Ritselect_cleartENDRotMOVETORRR(R+R.((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyRq°s
cCsd|_ttjtjƒ|_td
ƒ|_d|_d|_d|_	|j|j|j|j|j|j	}|j
jt|ŒdS( NtF1tF2tF3tF4tF5tF6tF7tF8tF9tF10tF11tF12s~!@#%^&*()_-+={}[]|;:,.<>/?tTabtSpacetReturnt	BackSpacetDeletetInserttHometEndsPage Ups	Page Downs
Left ArrowsRight ArrowsUp Arrows
Down Arrow(RœRRžRŸR R¡R¢R£R¤R¥R¦R§(R¨R©Rª(R«R¬R­(R®R¯sPage Ups	Page Downs
Left ArrowsRight ArrowsUp Arrows
Down Arrow(
tfunctionKeysttupleR“tascii_lowercasetdigitstalphanumKeystpunctuationKeystwhitespaceKeysteditKeystmoveKeysRitinsertRš(R+tkeys((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR·s				,cCsRi#dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdE6}||jƒkr||}ndF|krD|tjkrD|jƒ}ndG|}|S(Hs2Translate from keycap symbol to the Tkinter keysymtspaceR©t
asciitildet~texclamt!tatt@t
numbersignt#tpercentt%tasciicircumt^t	ampersandt&tasteriskRt	parenleftt(t
parenrightt)t
underscoret_tminusRŽtplust+tequalt=t	braceleftt{t
bracerightt}tbracketleftt[tbracketrightt]tbart|t	semicolont;tcolont:tcommat,tperiodt.tlessRtgreaterRtslasht/tquestiont?tPriorsPage UptNexts	Page DowntLefts
Left ArrowtRightsRight ArrowtUpsUp ArrowtDowns
Down ArrowR¨R€sKey-(RºR“R²tupper(R+tkeyRt
translateDict((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR’Æs 
#

cCsB|js|jƒr>|jjƒ|_|jƒ|jƒndS(N(RtKeysOKRRdRtgrab_releasetdestroy(R+RŒ((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR4Ùs
cCs!d|_|jƒ|jƒdS(NR(RRøRù(R+RŒ((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyRßs	
cCsj|jjƒ}|jƒ|jjtƒ}|jƒ}|jƒ}t}d}|sttj	d|d|ddƒnò|j
dƒs¢tj	d|d|ddƒnÄ|rÞ||j|jkrÞtj	d|d|ddƒnˆ|d	gkr,||j|jdkr,d}tj	d|d|d|ƒn:||j
kr`d
}tj	d|d|d|ƒnt}|S(s©Validity check on user's 'basic' keybinding selection.

        Doesn't check the string produced by the advanced dialog because
        'modifiers' isn't set.

        sKey Sequence ErrorRRtmessagesNo keys specified.RsMissing the final KeysNo modifier key(s) specified.R€R¨R©sBThe shift modifier by itself may not be used with this key symbol.s'This key combination is already in use.(R¨R©(RRdtstripRiR‘RtsplitRttkMessageBoxt	showerrortendswithR°R¸RR‹(R+RºR–RtkeySequencetkeysOKRtmsg((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR÷äs6



N(t__name__t
__module__RRRRRZRkRfRRqRR’tNoneR4RR÷(((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyR	s+	O								t__main__(trun(
t__doc__tTkinterRýR“R†RRRtidlelib.idle_test.htestR(((s4/usr/local/lib/python2.7/idlelib/keybindingDialog.pyt<module>s
ÿ

Zerion Mini Shell 1.0