Ñò §ÚêLc@sUddkTdd d„ƒYZdd d„ƒYZd„Zedjo eƒndS( iÿÿÿÿ(t*tWidgetRedirectorcBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(säSupport for redirecting arbitrary widget subcommands. Some Tk operations don't normally pass through Tkinter. For example, if a character is inserted into a Text widget by pressing a key, a default Tk binding to the widget's 'insert' operation is activated, and the Tk library processes the insert without calling back into Tkinter. Although a binding to could be made via Tkinter, what we really want to do is to hook the Tk 'insert' operation itself. When a widget is instantiated, a Tcl command is created whose name is the same as the pathname widget._w. This command is used to invoke the various widget operations, e.g. insert (for a Text widget). We are going to hook this command and provide a facility ('register') to intercept the widget operation. In IDLE, the function being registered provides access to the top of a Percolator chain. At the bottom of the chain is a call to the original Tk widget operation. cCseh|_||_|i|_}|i}|d|_|id||iƒ|i||iƒdS(Nt_origtrename(t _operationstwidgetttkt_wtorigtcallt createcommandtdispatch(tselfRRtw((s0/usr/lib64/python2.6/idlelib/WidgetRedirector.pyt__init__s    cCsd|iii|iifS(NsWidgetRedirector(%s<%s>)(Rt __class__t__name__R(R ((s0/usr/lib64/python2.6/idlelib/WidgetRedirector.pyt__repr__&scCs{x$t|iƒD]}|i|ƒqW|i}|`|i}|`|i}|i}|i|ƒ|id||ƒdS(NR( tlistRt unregisterRRRRt deletecommandR (R t operationRRRR ((s0/usr/lib64/python2.6/idlelib/WidgetRedirector.pytclose*s     cCs-||i|s W