%PDF- %PDF-
Direktori : /lib/python3/dist-packages/orca/__pycache__/ |
Current File : //lib/python3/dist-packages/orca/__pycache__/flat_review.cpython-312.pyc |
� g f � � � � d Z dZdZdZdZdZddlZ ej dd � dd lm Z ddl Z ddlmZ dd lm Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dZ G d� d� Z G d� d� Z G d� d� Z G d� de� Z G d� d e� Z G d!� d"e� Z! G d#� d$� Z" G d%� d&� Z#y)'z=Provides the default implementation for flat review for Orca.z$Id$z $Revision$z$Date$zLCopyright (c) 2005-2008 Sun Microsystems Inc.Copyright (c) 2016 Igalia, S.L.�LGPL� N�Atspiz2.0)r � )�braille)�debug)� focus_manager)�script_manager)�settings)�AXComponent)�AXEventSynthesizer)�AXObject)�AXText)�AXUtilitiesu c � � e Zd ZdZd� Zy)�Charz/A character's worth of presentable information.c � � || _ || _ || _ |dz | _ || _ || _ || _ || _ || _ y)a Creates a new char. Arguments: - word: the Word instance this belongs to - startOffset: the start offset with respect to the accessible - string: the actual char - x, y, width, height: the extents of this Char on the screen r N) �word�index�startOffset� endOffset�string�x�y�width�height) �selfr r r r r r r r s �2/usr/lib/python3/dist-packages/orca/flat_review.py�__init__z Char.__init__4 sH � � �� ��� �&���$�q��������������� ���� N)�__name__� __module__�__qualname__�__doc__r � r r r r 1 s � �9�r r c �4 � � e Zd ZdZd� Zd� Z� fd�Zd� Z� xZS )�Wordz;A single chunk (word or object) of presentable information.c �� � || _ || _ || _ || _ t |� | _ | j t |� z | _ || _ || _ || _ || _ g | _ y)aG Creates a new Word. Arguments: - zone: the Zone instance this belongs to - index: the index of this Word in the Zone - startOffset: the start offset with respect to the accessible - string: the actual string - x, y, width, height: the extents of this Word on the screen N)�zoner r r �len�lengthr r r r r �chars) r r( r r r r r r r s r r z Word.__init__L se � � �� ��� �&�������&�k����)�)�C��K�7����������� ������ r c � � d| j j dd� | j | j | j j fz S )NzWORD: '%s' (%i-%i) %s� �\n)r �replacer r r( � accessible�r s r �__str__zWord.__str__c sE � �&� �[�[� � ��u� -� � � � �^�^� �Y�Y� !� !� #�#� #r c �x �� |dk7 rt �| � |� S g }t | j � D ]� \ }}|| j z }t j | j j |� }|j |j |j |j f}|j t | |||g|��� � �� |S )Nr+ )�super�__getattribute__� enumerater r r �get_character_rectr( r0 r r r r �appendr ) r �attrr+ �i�char�start�rect1�extents� __class__s �r r5 zWord.__getattribute__j s� �� ��7�?��7�+�D�1�1��� ����-� ?�G�A�t���(�(�(�E��-�-�d�i�i�.B�.B�E�J�E��g�g�u�w�w����U�\�\�A�G��L�L��d�A�u�d�=�W�=�>� ?� �r c � � | j |cxk r%| j t | j � z k rn y|| j z S y)z8Returns the char offset with respect to this word or -1.���)r r) r )r �offsets r �getRelativeOffsetzWord.getRelativeOffsetw sF � � ���v�K��(8�(8�3�t�{�{�;K�(K�K� � �D�,�,�,�,�r ) r r! r"