Current File : //usr/local/apps/python3/lib/python3.11/idlelib/__pycache__/multicall.cpython-311.opt-1.pyc |
�
�Ke�H � � � d Z ddlZddlZddlZdZdZdZdZdZdZ dZ
d Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZd
ZdZdZdZ ej! dk r dZ"eeee fZ#ndZ"eeeefZ# e$d� e% e&e"� � � � D � � � � Z'd Z( G d!� d"� � Z) e%d e&e"� � z � � Z*d#� e*D � � Z+d$� Z, e,e*� � Z-g Z.e*D ]CZ/dZ0 e% e&e"� � � � D ]Z1de1z e/z re0e#e1 z Z0�e.�2 e0� � �D G d%� d&� � Z3d'Z4e3fdz e)f e&e4� � dz
z z Z5 e$d(� e% e&e4� � � � D � � � � Z6 ej7 d)� � Z8 ej7 d*� � Z9d+� Z:d,� Z;i Z<d-� Z=d.� Z>e?d/k r'dd0l@mAZA eAd1dd2�3� � dd4lBmCZC eCe>� � dS dS )5a�
MultiCall - a class which inherits its methods from a Tkinter widget (Text, for
example), but enables multiple calls of functions per virtual event - all
matching events will be called, not only the most specific one. This is done
by wrapping the event functions - event_add, event_delete and event_info.
MultiCall recognizes only a subset of legal event sequences. Sequences which
are not recognized are treated by the original Tk handling mechanism. A
more-specific event will be called before a less-specific event.
The recognized sequences are complete one-event sequences (no emacs-style
Ctrl-X Ctrl-C, no shortcuts like <3>), for all types of events.
Key/Button Press/Release events can have modifiers.
The recognized modifiers are Shift, Control, Option and Command for Mac, and
Control, Alt, Shift, Meta/M for other platforms.
For all events which were handled by MultiCall, a new member is added to the
event instance passed to the binded functions - mc_type. This is one of the
event type constants defined in this module (such as MC_KEYPRESS).
For Key/Button events (which are handled by MultiCall and may receive
modifiers), another member is added - mc_state. This member gives the state
of the recognized modifiers, as a combination of the modifier constants
also defined in this module (for example, MC_SHIFT).
Using these members is absolutely portable.
The order by which events are called is defined by these rules:
1. A more-specific event will be called before a less-specific event.
2. A recently-binded event will be called before a previously-binded event,
unless this conflicts with the first rule.
Each function will be called at most once for each event.
� N� � � � � � � � � �
� � �
� � � � � � � � � � �@ � �darwin)��Shift��Control)�Option)�Command)r )�Altr )�Meta�Mc �6 � g | ]}t | D ]}||f���S � )�
_modifiers��.0�number�names �;/usr/local/apps/python3/lib/python3.11/idlelib/multicall.py�
<listcomp>r. 7 sF � � 9� 9� 9�#�%/��%7�9� 9�!� �v�� 9� 9� 9� 9� zapplication has been destroyedc �&