%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/orca/scripts/apps/Eclipse/__pycache__/ |
| Current File : //lib/python3/dist-packages/orca/scripts/apps/Eclipse/__pycache__/script.cpython-312.pyc |
�
g
f2 � � � d Z dZdZdZdZdZddlmZ ddlm Z ddl
mc mc m
Z
ddlmZ dd lmZ G d
� de
j$ � Zy)zCustom script for Eclipse.z$Id$z
$Revision$z$Date$z-Copyright (c) 2010 Informal Informatica LTDA.�LGPL� N)�AXText)�AXUtilitiesc �X � � e Zd Z� fd�Zd� fd� Z� fd�Z� fd�Z� fd�Zd� Z� fd�Z � xZ
S ) �Scriptc �6 �� t �| � |� g d�| _ y)z/Creates a new script for the given application.)�Up�Down�Left�Right�Page_Up� Page_Down�Home�EndN)�super�__init__�movementKeys)�self�app� __class__s ��B/usr/lib/python3/dist-packages/orca/scripts/apps/Eclipse/script.pyr zScript.__init__* s �� �
�����/��� c � �� t �
| � ||� | j j � \ }}|| j v ry|xs |j
}t
j |� ryd}|dv rt j |� \ }}} | dkD }|r| j | � n| j |� | j |� y)z�Updates braille and outputs speech for the event.source or the
otherObj. Overridden here so that we can give more feedback to user.
NF)�Tab�ISO_Left_Tabr )
r �_presentTextAtNewCaretPosition� utilities�lastKeyAndModifiersr �sourcer �is_single_liner �get_selected_text� sayPhrase�sayLine�_saveLastTextPosition)r �event�otherObj�lastKey�mods�obj�hasSelection�text�startOffset� endOffsetr s �r r z%Script._presentTextAtNewCaretPosition0 s� �� � ��.�u�h�?� ���:�:�<�
����d�'�'�'���&�%�,�,���%�%�c�*��
���-�-�+1�+C�+C�C�+H�(�D�+�y�$�q�=�L���N�N�3��Y�7��L�L����"�"�3�'r c � �� t j |j � r/t j � j ||j � yt j |j � r\| j j � rB| j j � r(d}t j t j |d� yt �| �9 |� y)z)Callback for focus: accessibility events.Nz!ECLIPSE: Ignoring event. In menu.T)r �is_panelr �
focus_manager�
getManager�set_locus_of_focus�is_textr � lastInputEventWasUnmodifiedArrow�inMenu�debug�printMessage�
LEVEL_INFOr �onFocus)r r% �msgr s �r r9 zScript.onFocusR s� �� �
������-��$�$�&�9�9�%����N�����u�|�|�,��~�~�>�>�@��~�~�$�$�&�5�C����u�/�/��d�;��
����r c � �� | j j |j � rg|j dk( r-|j t j |j � k( ryt �| �! |� | j |j � yy)z�Called whenever text is inserted into an object. Overridden here
so that we can avoid speaking text when caret moves after new text
is inserted.
Arguments:
- event: the Event
r N)
r �
isTextArear �detail1�detail2r �get_character_countr �onTextInsertedr$ �r r% r s �r r@ zScript.onTextInsertedd sm �� � �>�>�$�$�U�\�\�2��}�}��!�e�m�m�v�7Q�7Q�RW�R^�R^�7_�&_� ��G�"�5�)��&�&�u�|�|�4� 3r c �Z �� t �| � |� | j |j � y)z�Called whenever text is deleted from an object. Overridden here
so that we can avoid speaking text when caret moves after new text
is deleted.
Arguments:
- event: the Event
N)r �
onTextDeletedr$ r rA s �r rC zScript.onTextDeletedw s$ �� � ���e�$��"�"�5�<�<�0r c � � | j j |� r&| j |t j |� � y y �N)r r<