%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/orca/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/orca/__pycache__/generator.cpython-312.pyc

�

g
f	���x�dZdZdZdZdZdZddlZejdd	�dd
lm	Z	ejdd�dd
lm
Z
ddlZddlZddl
Z
ddlZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZ	ddl m!Z"dd�Z%dZ&Gd�d�Z'y#e#$rddl$Z"Y�wxYw)zASuperclass of classes used to generate presentations for objects.z$Id:$z$Revision:$z$Date:$zLCopyright (c) 2009 Sun Microsystems Inc.Copyright (c) 2015-2016 Igalia, S.L.�LGPL�N�Atspiz2.0)r�Atkz1.0)r�)�braille)�debug)�messages)�object_properties)�settings)�settings_manager)�AXHypertext)�AXObject)�AXTable)�AXUtilities)�AXValuec��tj�\}}}|j}	|j}tj||�}|||fS#t$rd}Y�(wxYw)Nz	<no args>)�sys�exc_info�__name__�args�KeyError�	traceback�	format_tb)�
maxTBlevel�cla�exc�trbk�excName�excArgs�excTbs       �0/usr/lib/python3/dist-packages/orca/generator.py�_formatExceptionInfor"<sa���\�\�^�N�C��d��l�l�G���(�(��
����j�1�E��W�e�$�$�������s�A
�
A�A�	_generatec���eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZdSd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdD�ZFdE�ZGdF�ZHdG�ZIdH�ZJdI�ZKdJ�ZLdK�ZMdL�ZNdTdN�ZOdO�ZPdP�ZQdQ�ZRdR�ZSyM)U�	Generatorz�Takes accessible objects and generates a presentation for those
    objects.  See the generate method, which is the primary entry
    point.c��||_||_i|_i|_t	|�D�cgc]}|jt�s�|��c}D�cgc](}t||�j||j���*c}D�cgc]}t|tj�r|�� c}D]F}|jtt�d}|dj�|ddz}||j|<�H|j!�ycc}wcc}wcc}w)Nrr)�_mode�_script�_activeProgressBars�_methodsDict�dir�
startswith�
METHOD_PREFIX�getattr�__get__�	__class__�
isinstance�collections_abc�Callabler�len�lower�_verifyFormatting)�self�script�mode�x�y�z�method�names        r!�__init__zGenerator.__init__Ts�����
����#%�� ����/2�$�i�"W��1�<�<�
�;V�1�"W�Y��!��q�)�1�1�$����G�Y�
H�1�)�!�_�-E�-E�F��
H�	-�F��?�?�3�}�#5�#6�7�D���7�=�=�?�T�!�"�X�-�D�&,�D���d�#�
	-�	
��� ��#X��Y��
Hs�D�D�-D�#D
c��d|d<d|d<y)zCOther things to make available from the formatting string.
        N�obj�role�)r7�globalsDicts  r!�_addGlobalszGenerator._addGlobalsbs��"��E��"��F��c��i}|jj�D]}g||<�	|j|�|jj|j
D]D}dD]=}	|jj|j
||}|s�0		t
||��?�Fy#t$rot�}|dd}|jdd�}|jdd�}||jvr#tjtj�g||<Yn1t$r&tjtj�Y��wxYw��#t$rY��wxYw)N)�focused�	unfocusedrr�name '��' is not defined)r*�keysrEr(�
formattingr'�eval�	NameErrorr"�replacer�printException�LEVEL_SEVERE�	Exception)r7rD�key�roleKey�
evalString�info�args       r!r6zGenerator._verifyFormattinghsd�����$�$�)�)�+�	"�C�!�K���	"�����%��|�|�.�.�t�z�z�:�	"�G�/�
"��"����/�/��
�
�;�G�D�S�I��
&�!��
"� ��[�9�!�
"�	"��  )�2�#7�#9�D�"&�q�'�!�*�C�"%�+�+�h��";�C�"%�+�+�.@�"�"E�C�"�$�*;�*;�;� %� 4� 4�U�5G�5G� H�/1�K��,�(�"�!�0�0��1C�1C�D�!�"����!����s+�$)E�B#�#A5E�+E�E�	E�Ec�4�|jdd�}||d<|S)z�Convenience method to allow you to temporarily override the role in
        the args dictionary.  This changes the role in args ags
        returns the old role so you can pass it back to _restoreRole.
        rBN��get)r7�newRoler�oldRoles    r!�
_overrideRolezGenerator._overrideRole�s"��
�(�(�6�4�(����V���rFc��|r||d<y|d=y)z�Convenience method to restore the old role back in the args
        dictionary.  The oldRole should have been obtained from
        _overrideRole.  If oldRole is None, then the 'role' key/value
        pair will be deleted from args.
        rBNrC)r7r^rs   r!�_restoreRolezGenerator._restoreRole�s���"�D��L��V�rFc��gS�NrC)r7�contentsrs   r!�generateContentszGenerator.generateContents�����	rFc��gSrcrC�r7rArs   r!�generateContextzGenerator.generateContext�rfrFc����tj|�r)d}tjtj|d�gStj
�}g}i}�j
|�||d<	|jdtj|��|d<	|d|d<�j|d<|jd	d�s|jd
d�rd|d	<nd
|d	<�jjjd(i|��}	|jdd�sm|jdd�rV�jjjd(i|��}
�jjj d(i|��}|
�d|	�d|��}	d|d<�jj#�d|jd	�d|d|jd�dg}tjtj|d�d�jj$d<d�jj$d<d�jj$d<�fd�}|	sJ�	tj
�}
	t'|	|�}	tj
�|z
d�}tjtj>d!�d&|����jA|�|jd'�r|r|dr�jC|�|S#t$r7}d|d|g}tjtj|d�|cYd}~Sd}~wwxYw#t($�r
g}t+�}|dd}|j-dd�}|j-dd�}|�j.vr&tj0tj2�Y��7�j.||fi|��||<tj
�|
z
d�}t5||t6�rYdj9t;d �t=|||���}tjtj>d!�d"|�d#|�d$|�d%��YnwxYw���#t$r)tj0tj2�g}Y��wxYw))a4Returns an array of strings (and possibly voice and audio
        specifications) that represent the complete presentation for the
        object.  The presentation to be generated depends highly upon the
        formatting strings in formatting.py.

        args is a dictionary that may contain any of the following:
        - alreadyFocused: if True, we're getting an object
          that previously had focus
        - priorObj: if set, represents the object that had focus before
          this object
        - includeContext: boolean (default=True) which says whether
          the context for an object should be included as a prefix
          and suffix
        - role: a role to override the object's role
        - formatType: the type of formatting, such as
          'focused', 'basicWhereAmI', etc.
        - forceMnemonic: boolean (default=False) which says if we
          should ignore the settings.enableMnemonicSpeaking setting
        - forceTutorial: boolean (default=False) which says if we
          should force a tutorial to be spoken or not
        z4GENERATOR: Cannot generate presentation for dead objTrArBz+GENERATOR: Cannot generate presentation for�:Nr9�
formatType�alreadyFocusedFrHrI�	recursing�includeContextz + zGENERATOR: Startingzgeneration forz(using role:�)�usedDescriptionForName�!usedDescriptionForUnrelatedLabels�usedDescriptionForAlertc�(���j|d�S)NF)�_resultElementToString)r:r7s �r!�	debuginfoz%Generator.generate.<locals>.debuginfo�s����2�2�1�e�<�<rFrrrJrKrLz.4f� c��|SrcrC�r:s r!�<lambda>z$Generator.generate.<locals>.<lambda>s���rF�                  zGENERATION TIME: z ----> z=[�]zCOMPLETION TIME: �isProgressBarUpdaterC)"r�is_deadr�printMessage�
LEVEL_INFO�timerEr\�get_rolerT�printTokensr'r(rN�	getFormat�	getPrefix�	getSuffix�upper�pointOfReferencerOrPr"rQr*rRrSr1�list�join�filter�map�	LEVEL_ALL�_debugResultInfo� setProgressBarUpdateTimeAndValue)r7rAr�msg�	startTime�resultrD�error�tokensrN�prefix�suffixrv�currentTimerXrY�duration�stringResults`                 r!�generatezGenerator.generate�s2���.���C� �H�C����u�/�/��d�;��I��I�I�K�	���������%� ��E��	�"&�(�(�6�8�3D�3D�S�3I�"J�K���
F	�'�v�.�D��L� �:�:�D��L��8�8�L�$�/��8�8�,�e�4�)2�D��&�)4�D��&�:����0�0�:�:�B�T�B�J�
�8�8�K��/��8�8�,�d�3�>�T�\�\�4�4�>�>�F��F�F�>�T�\�\�4�4�>�>�F��F�F�$*�8�3�z�l�#�f�X�!F�J�$(��[�!��j�j�&�&�(�*?����,�AW�&��^�T�X�X�f�=M�s�T�F����e�.�.���=�GL�D�L�L�)�)�*B�C�QV�D�L�L�)�)�*M�N�GL�D�L�L�)�)�*C�D�
=���:��"�i�i�k��c�!�*�k�:�F��.�i�i�k�I�-�c�2��
���5�?�?�x�j�8I�(��,T�U����f�%��8�8�)�*�v�&��)��1�1�#�6��
��e�	�C�S�#�u�U�F����e�.�.���=��M��	��l!�c��F�/�1�D��q�'�!�*�C��+�+�h��3�C��+�+�&8�"�=�C��$�"3�"3�3��,�,�U�-?�-?�@��'=�t�'8�'8��'=�c�'J�T�'J�K��$�"&�)�)�+��";�C�!@�H�!�+�c�"2�D�9�'*�x�x��{�8;�I�{�SV�GW�8X�1Z�([���*�*�!�O�O�'�j�(9�(��7�3�%�r�R^�Q_�_`�a�c��c����.�	�� � ��!3�!3�4��F�	�sc�/(K�F9P<�L �P<�	L�&,L�L�L� A3P7�P<�BP7�4P<�6P7�7P<�<.Q.�-Q.c�N�|st|�jdd�Sdd�d|�d�S)N�
z\nr{�')�strrQ)r7�element�
includeAlls   r!ruz Generator._resultElementToString%s1����w�<�'�'��e�4�4��H�:�Q�w�i�q�)�)rFc� �tjtjkryd�|jj	��d�}|djt
|j|���z
}tjtj|�y)Nr{z GENERATOR: Results: rw)	rr��
debugLevelr'r�r�r�rur)r7r�rXs   r!r�zGenerator._debugResultInfo+sm���?�?�U�-�-�-����D�J�J�,�,�.�/�/D�E���3�8�8�C�� ;� ;�V�D�E�F�G��
���5�?�?�D�1rFc��gS)aReturns the role name for the object in an array of strings, with
        the exception that the Atspi.Role.UNKNOWN role will yield an
        empty array.  Note that a 'role' attribute in args will
        override the accessible role of the obj.
        rCrhs   r!�_generateRoleNamezGenerator._generateRoleName9s	���	rFc��|jdtj|��}|tjj
k(ryy)NrBFT)r\rr�r�Role�LABEL�r7rArrBs    r!�_fallBackOnDescriptionForNamez'Generator._fallBackOnDescriptionForNameBs5���x�x��� 1� 1�#� 6�7���5�:�:�#�#�#��rFc��g}d|jjd<tj|�}|j	dtj
|��}tj|�}|r|j|�n�|j|fi|��r�tj|�}|r+|j|�d|jjd<ned}|tjjk(r|}ntj|�r|}|r*tj |d��}	|	r|j|	�|sC|tjj"k(r&tj$|�r|j'|�S|S)a Returns an array of strings for use by speech and braille that
        represent the name of the object.  If the object is directly
        displaying any text, that text will be treated as the name.
        Otherwise, the accessible name of the object will be used.  If
        there is no accessible name, then the description of the
        object will be used.  This method will return an empty array
        if nothing can be found.  [[[WDW - I wonder if we should just
        have _generateName, _generateDescription,
        _generateDisplayedText, etc., that don't do any fallback.
        Then, we can allow the formatting to do the fallback (e.g.,
        'displayedText or name or description'). [[[JD to WDW - I
        needed a _generateDescription for whereAmI. :-) See below.
        FrqrBTN)�remove_extension)r(r�r�get_namer\r��
get_parent�appendr��get_descriptionrr��LINKr�is_linkr
�get_link_basename�ICON�is_panel�
_generateName)
r7rArr�r>rB�parent�description�link�basenames
          r!r�zGenerator._generateNameIs8����BG����%�%�&>�?�� � ��%���x�x��� 1� 1�#� 6�7���$�$�S�)����M�M�$��
/�T�
/�
/��
<�t�
<�"�2�2�3�7�K���
�
�k�*�JN����-�-�.F�G����5�:�:�?�?�*��D� �(�(��0�!�D��*�<�<�T�TX�Y�H���
�
�h�/��$�%�*�*�/�/�1�k�6J�6J�6�6R��%�%�f�-�-��
rFc���tj|�}|jd�}|r|tj|�k7r|gS|jd�}|r|tj|�k7r|gSgS)a�Returns an array of strings for use by speech and braille that
        represent the 'placeholder' text. This is typically text that
        serves as a functional label and is found in a text widget until
        that widget is given focus at which point the text is removed,
        the assumption being that the user was able to see the text prior
        to giving the widget focus.
        zplaceholder-text�placeholder)r�get_attributes_dictr\r�)r7rAr�attrsr�s     r!�_generatePlaceholderTextz"Generator._generatePlaceholderTextssp���,�,�S�1���i�i� 2�3���;�(�*;�*;�C�*@�@��=� ��i�i�
�.���;�(�*;�*;�C�*@�@��=� ��	rFc���g}|j|fi|��}|j|fi|��}|jdtj|��}|sU|sS|t
jjk(r6|jjj|�}|j|�}|s|S|j|�|s|Stjdd|d�j�}tjdd|d�j�}	t|�j!t|	��r4d|dd|ddg}
t#j$t"j&|
d�|S|j|�|S)	z�Returns the label and the name as an array of strings for speech
        and braille.  The name will only be present if the name is
        different from the label.
        rBz[\W_]rwrzGENERATOR: name 'z' is redundant to label 'r�T)�_generateLabelr�r\rr�rr��
TABLE_CELLr(�	utilities�realActiveDescendant�extend�re�sub�split�set�issubsetrr�r�)r7rArr��labelr>rB�
descendant�	nameWords�
labelWordsr�s           r!�_generateLabelAndNamezGenerator._generateLabelAndName�sS��
��#��#�#�C�0�4�0��!�t�!�!�#�.��.���x�x��� 1� 1�#� 6�7����4�5�:�:�+@�+@�#@����/�/�D�D�S�I�J��%�%�j�1�D���K��
�
�e����M��F�F�8�S�$�q�'�2�8�8�:�	��V�V�H�c�5��8�4�:�:�<�
��y�>�"�"�3�z�?�3�)�4��7�4O�QV�WX�QY�[^�_�F����e�.�.���=��M��
�
�d���
rFc�V�|j|fi|��}|s|j|fi|��}|S)z�Returns the label as an array of strings for speech and braille.
        If the label cannot be found, the name will be used instead.
        If the name cannot be found, an empty array will be returned.
        )r�r��r7rArr�s    r!�_generateLabelOrNamezGenerator._generateLabelOrName�s:��
%��$�$�S�1�D�1���'�T�'�'��4�t�4�F��
rFc���|j|fi|��}|rd|jjd<|S|j|fi|��}|rd|jjd<|S)NFrrT)�_generateUnrelatedLabelsr(r��_generateDescriptionr�s    r!�%_generateUnrelatedLabelsOrDescriptionz/Generator._generateUnrelatedLabelsOrDescription�sj��.��.�.�s�;�d�;���QV�D�L�L�)�)�*M�N��M�*��*�*�3�7�$�7���QU�D�L�L�)�)�*M�N��
rFc�\�|jjjd�rgS|jjjd�rgS|jjjd�rgStj|�xs)|jj
j
|�xsd}|sgStj|�}|jdtj|��}	|jj|j||jd�j�}d|v}d|v}d
}	|jj
j|�xsd}
|rQ|jj
j||�xr'|jj
j|
|�}	nS|r*|
r(|jj
j|
|�}	n'|jj
j||�}	|	sgS|gS#t$rd	}d	}Y��wxYw)z�Returns an array of strings fo use by speech and braille that
        represent the description of the object, if that description
        is different from that of the name and label.
        rqrsrrrKrBrl�labelAndName�labelOrNameFT)r(r�r\rr�r��displayedDescriptionr�r�rNr'r�rT�displayedLabel�stringsAreRedundant)r7rArr�r>rBr��isLabelAndName�
isLabelOrName�canUser�s           r!r�zGenerator._generateDescription�s����<�<�(�(�,�,�-E�F��I��<�<�(�(�,�,�-F�G��I��<�<�(�(�,�,�-P�Q��I��.�.�s�3�F��|�|�%�%�:�:�3�?�F�CE�	���I�� � ��%���x�x��� 1� 1�#� 6�7��	"��\�\�,�,�T�Z�Z�8��>�t�x�x��?U�V�\�\�^�F�+�v�5�N�)�V�3�M�
�����&�&�5�5�c�:�@�b������/�/�C�C�D�+�V�V�\�!�\�\�3�3�G�G��{�[�[�
�
�u����/�/�C�C�E�;�W�W�F����/�/�C�C�D�+�V�V�F���I��}���#�	"�"�N�!�M�	"�s�5AH�
H+�*H+c�z�g}|jjj|�}|r|j|�|S)aReturns the label for an object as an array of strings for use by
        speech and braille.  The label is determined by the displayedLabel
        method of the script utility, and an empty array will be returned if
        no label can be found.
        )r(r�r�r�)r7rArr�r�s     r!r�zGenerator._generateLabel�s7�������&�&�5�5�c�:����M�M�%� ��
rFc��gS)z8Returns an array of strings that represent a status bar.rCrhs   r!�_generateStatusBarzGenerator._generateStatusBar�s	���	rFc��gSrcrCrhs   r!�_generateTermValueCountz!Generator._generateTermValueCount�rfrFc�:�tj|�}|r|gSgS)z�Returns an array of strings for use by speech and braille that
        represent the description of the image on the object, if it
        exists.  Otherwise, an empty array is returned.
        )r�get_image_description�r7rArr�s    r!�_generateImageDescriptionz#Generator._generateImageDescriptions$���4�4�S�9����=� ��	rFc��gSrcrCrhs   r!�_generateClickablezGenerator._generateClickablerfrFc��gSrcrCrhs   r!�_generateHasLongDesczGenerator._generateHasLongDescrfrFc��gSrcrCrhs   r!�_generateHasDetailszGenerator._generateHasDetailsrfrFc��gSrcrCrhs   r!�_generateDetailsForzGenerator._generateDetailsFor"rfrFc��gSrcrCrhs   r!�_generateAllDetailszGenerator._generateAllDetails%rfrFc��gSrcrCrhs   r!�_generateHasPopupzGenerator._generateHasPopup(rfrFc���g}|jdd�s|j|d<d|d<tj|�s5|j	|j
jjdi|���|S)aReturns an array of strings for use by speech and braille that
        represent the grayed/sensitivity/availability state of the
        object, but only if it is insensitive (i.e., grayed out and
        inactive).  Otherwise, and empty array will be returned.
        r9N�insensitive�
stringTyperC)r\r'r�is_sensitiver�r(rN�	getStringr�s    r!�_generateAvailabilityzGenerator._generateAvailability+sh�����x�x���%��:�:�D��L�*��\���'�'��,��M�M�;�$�,�,�1�1�;�;�C�d�C�D��
rFc���|jjj|�}|sgSg}|jdd�s|j|d<d|d<|jj
jd
i|��}|dk(r|d}n|dk(r|d}n|d}|jjj|�}|r|j|�d	|���|S|j|�|S)Nr9�invalidr��spellingr�grammar�rz: rC)	r(r��getErrorr\r'rNr��getErrorMessager�)r7rArr�r��
indicators�	indicator�errorMessages        r!�_generateInvalidzGenerator._generateInvalid9s������&�&�/�/��4����I����x�x���%��:�:�D��L�&��\��6�T�\�\�,�,�6�6�>��>�
��J��"�1�
�I�
�i�
�"�1�
�I�"�1�
�I��|�|�-�-�=�=�c�B����M�M�Y�K�r�,��8�9��
�
�M�M�)�$��
rFc�p�g}|jdd�s|j|d<d|d<tj|�}|s?tj|�r*tj|�}tj|�}|r5|j|jjjdi|���|S)a*Returns an array of strings for use by speech and braille that
        represent the required state of the object, but only if it is
        required (i.e., it is in a dialog requesting input and the
        user must give it a value).  Otherwise, and empty array will
        be returned.
        r9N�requiredr�rC)r\r'r�is_required�is_radio_buttonrr�r�r(rNr�)r7rArr��
isRequiredr�s      r!�_generateRequiredzGenerator._generateRequiredSs������x�x���%��:�:�D��L�'��\�� �,�,�S�1�
��k�9�9�#�>��(�(��-�F�$�0�0��8�J���M�M�;�$�,�,�1�1�;�;�C�d�C�D��
rFc�4�g}|jdd�s|j|d<d|d<tj|�s%|jj
j
|�r5|j|jjjdi|���|S)z�Returns an array of strings for use by speech and braille that
        represent the read only state of this object, but only if it
        is read only (i.e., it is a text area that cannot be edited).
        r9N�readonlyr�rC)
r\r'r�is_read_onlyr(r��isReadOnlyTextArear�rNr�r�s    r!�_generateReadOnlyzGenerator._generateReadOnlyfs���
���x�x���%��:�:�D��L�'��\���#�#�C�(��l�l�$�$�7�7��<��M�M�;�$�,�,�1�1�;�;�C�d�C�D��
rFc��g}|jjj|�r^|jtj
j|�}|j|j|fi|���|j||�|S)aReturns an array of strings for use by speech and braille that
        represent the checked state of the object.  This is typically
        for check boxes that are in a table. An empty array will be
        returned if this is not a checkable cell.
        )
r(r��hasMeaningfulToggleActionr_rr��	CHECK_BOXr�r�ra�r7rArr�r^s     r!�_generateCellCheckedStatez#Generator._generateCellCheckedStatetsn�����<�<�!�!�;�;�C�@��(�(����)=�)=�t�D�G��M�M�-�$�-�-��4�t�4�5����g�t�,��
rFc�v�g}|jdd�s|j|d<d|d<|jjjdi|��}tj|�r|j|d�|Stj|�r|j|d�|S|j|d�|S)	�Returns an array of strings for use by speech and braille that
        represent the checked state of the object.  This is typically
        for check boxes. [[[WDW - should we return an empty array if
        we can guarantee we know this thing is not checkable?]]]
        r9N�checkboxr�rr�rrC)	r\r'r(rNr�r�
is_checkedr��is_indeterminate�r7rArr�rs     r!�_generateCheckedStatezGenerator._generateCheckedState�s������x�x���%��:�:�D��L�'��\��6�T�\�\�,�,�6�6�>��>�
��!�!�#�&��M�M�*�Q�-�(�
�
�	�
)�
)�#�
.��M�M�*�Q�-�(��
�
�M�M�*�Q�-�(��
rFc� �g}|jdd�s|j|d<d|d<|jjjdi|��}tj|�r|j|d�|S|j|d�|S)rr9N�radiobuttonr�rrrC�r\r'r(rNr�rrr�rs     r!�_generateRadioStatezGenerator._generateRadioState�s������x�x���%��:�:�D��L�*��\��6�T�\�\�,�,�6�6�>��>�
��!�!�#�&��M�M�*�Q�-�(��
�
�M�M�*�Q�-�(��
rFc����tjjtjjtjjtjj
tjjtjjg��fd�}tjtj|��r+tj||�}|r|j|d��SgS)Nc�2��tj|��vSrc)rr�)r:�widgetRoless �r!�isWidgetz0Generator._generateChildWidget.<locals>.isWidget�s����$�$�Q�'�;�6�6rFF)ro)rr�r�	COMBO_BOX�PUSH_BUTTON�RADIO_BUTTON�SLIDER�
TOGGLE_BUTTONr�is_list_boxrr��find_descendantr�)r7rArr#�widgetr"s     @r!�_generateChildWidgetzGenerator._generateChildWidget�s�����z�z�+�+��z�z�+�+��z�z�-�-��z�z�.�.��z�z�(�(��z�z�/�/�1��	7��"�"�8�#6�#6�s�#;�<��-�-�c�8�<�F���}�}�V�E�}�B�B��	rFc�J�g}|jdd�s|j|d<d|d<|jjjdi|��}tj|�stj|�r|j|d�|S|j|d�|S)Nr9�switchr�rrrC�	r\r'r(rNr�rr�
is_pressedr�rs     r!�_generateSwitchStatezGenerator._generateSwitchState�s������x�x���%��:�:�D��L�%��\��6�T�\�\�,�,�6�6�>��>�
��!�!�#�&�+�*@�*@��*E��M�M�*�Q�-�(��
�
�M�M�*�Q�-�(��
rFc�J�g}|jdd�s|j|d<d|d<|jjjdi|��}tj|�stj|�r|j|d�|S|j|d�|S)rr9N�togglebuttonr�rrrCr/rs     r!�_generateToggleStatezGenerator._generateToggleState�s������x�x���%��:�:�D��L�+��\��6�T�\�\�,�,�6�6�>��>�
��!�!�#�&�+�*@�*@��*E��M�M�*�Q�-�(��
�
�M�M�*�Q�-�(��
rFc���tj|�stj|�r|j|fi|��Stj|�r|j|fi|��SgSrc)r�is_checkable�is_check_menu_itemrrrhs   r!� _generateCheckedStateIfCheckablez*Generator._generateCheckedStateIfCheckable�s`���#�#�C�(�K�,J�,J�3�,O�-�4�-�-�c�:�T�:�:��!�!�#�&�-�4�-�-�c�:�T�:�:��	rFc���g}|jdd�s|j|d<d|d<|jjjdi|��}tj|�r|j|d�|S)z�Returns an array of strings for use by speech and braille that
        represent the checked state of the menu item, only if it is
        checked. Otherwise, and empty array will be returned.
        r9Nrr�rrCrrs     r!�_generateMenuItemCheckedStatez'Generator._generateMenuItemCheckedState�sp��
���x�x���%��:�:�D��L�'��\��6�T�\�\�,�,�6�6�>��>�
��!�!�#�&��M�M�*�Q�-�(��
rFc��g}|jdd�s|j|d<d|d<|jjjdi|��}tj|�r|j|d�|Stj|�r|j|d�|Stj|�r|j|d�|S)z�Returns an array of strings for use by speech and braille that
        represent the expanded/collapsed state of an object, such as a
        tree node. If the object is not expandable, an empty array
        will be returned.
        r9N�	expansionr�rrrC)
r\r'r(rNr�r�is_collapsedr��is_expanded�
is_expandablers     r!�_generateExpandableStatez"Generator._generateExpandableState�s������x�x���%��:�:�D��L�(��\��6�T�\�\�,�,�6�6�>��>�
��#�#�C�(��M�M�*�Q�-�(��
��
$�
$�S�
)��M�M�*�Q�-�(��
��
&�
&�s�
+��M�M�*�Q�-�(��
rFc��g}|jdd�s|j|d<d|d<tj|�rJt	j
|�r5|j
|jjjdi|���|S)aReturns an array of strings (and possibly voice and audio
        specifications) that represent the multiselectable state of
        the object.  This is typically for list boxes. If the object
        is not multiselectable, an empty array will be returned.
        r9N�multiselectr�rC)
r\r'r�is_multiselectabler�get_child_countr�r(rNr�r�s    r!�_generateMultiselectableStatez'Generator._generateMultiselectableStatesu�����x�x���%��:�:�D��L�*��\���)�)�#�.�8�3K�3K�C�3P��M�M�;�$�,�,�1�1�;�;�C�d�C�D��
rFc��|jd�rgSg}|jd�r&tj||jd��}ntj|�}g}|D]Z}|jj
j
|�}|s�+|j�s�<|j|j���\|s|Sdj|�}|j|tjj��}	|jd�dk(r<tjtj k(r6|jd�d	vr#|�d
|	��}n|jd�dk(r|�d
|	��}|j|�|S)z�Returns an array of strings to be used in speech and braille that
        represent the row header for an object that is in a table, if
        it exists.  Otherwise, an empty array is returned.
        �
readingRow�newOnly�priorObj�. �rBr9�speechrl��
basicWhereAmI�detailedWhereAmIrwr)r\r�get_new_row_headers�get_row_headersr(r��
displayedText�stripr�r��getLocalizedRoleNamerr��
ROW_HEADERr�speechVerbosityLevel�VERBOSITY_LEVEL_VERBOSE�
r7rArr��headersr��header�token�text�
roleStrings
          r!�_generateRowHeaderzGenerator._generateRowHeadersL���8�8�L�!��I����8�8�I���1�1�#�t�x�x�
�7K�L�G��-�-�c�2�G����	-�F��L�L�*�*�8�8��@�E�������
�
�e�k�k�m�,�	-�
��M��y�y�� ���/�/��%�*�*�:O�:O�/�P�
��8�8�F��x�'��,�,��0P�0P�P��8�8�L�)�1V�V���q���-��
�X�X�f�
��
*��V�1�Z�L�)�D��
�
�d���
rFc���g}|jd�r&tj||jd��}ntj|�}g}|D]Z}|jj
j
|�}|s�+|j�s�<|j|j���\|s|Sdj|�}|j|tjj��}	|jd�dk(r<tjtj k(r6|jd�dvr#|�d	|	��}n|jd�d
k(r|�d	|	��}|j|�|S)z�Returns an array of strings (and possibly voice and audio
        specifications) that represent the column header for an object
        that is in a table, if it exists.  Otherwise, an empty array
        is returned.
        rHrIrJrKr9rLrlrMrwr)r\r�get_new_column_headers�get_column_headersr(r�rRrSr�r�rTrr��
COLUMN_HEADERrrVrWrXs
          r!�_generateColumnHeaderzGenerator._generateColumnHeader:s;�����8�8�I���4�4�S�$�(�(�:�:N�O�G��0�0��5�G����	-�F��L�L�*�*�8�8��@�E�������
�
�e�k�k�m�,�	-�
��M��y�y�� ���/�/��%�*�*�:R�:R�/�S�
��8�8�F��x�'��,�,��0P�0P�P��8�8�L�)�1V�V���q���-��
�X�X�f�
��
*��V�1�Z�L�)�D��
�
�d���
rFc�Z�|jjj|�}|sgS|gSrc)r(r��getSortOrderDescriptionr�s    r!�_generateSortOrderzGenerator._generateSortOrder[s,���l�l�,�,�D�D�S�I����I��}�rFc	��g}tj|�dk(r�g}ddg}ttj|��D]1\}}|jj
j
|�s�,d||<n|dr
|dsddg}n|ds	|drddg}|rC|D]>}||r�	|j|jtj||�fi|����@|S)z�Returns an array of strings for use by speech and braille for the
        label of a toggle in a table cell that has a special 2 child
        pattern that we run into.  Otherwise, an empty array is
        returned.
        r�FTrr�
rrD�	enumerate�
iter_childrenr(r�rr�r��	get_child�r7rArr��	cellOrder�	hasToggle�i�childs        r!�_generateTableCell2ChildLabelz'Generator._generateTableCell2ChildLabelbs������#�#�C�(�A�-��I����I�%�h�&<�&<�S�&A�B�
���5��<�<�)�)�C�C�E�J�#'�I�a�L��
���|�I�a�L���H�	��q�\�i��l���H�	��"�Y�A�$�Q�<��
�
�m�d�m�m�H�4F�4F�s�A�4N�&W�RV�&W�X�Y��
rFc	��g}tj|�dk(r�g}ddg}ttj|��D]1\}}|jj
j
|�s�,d||<n|dr
|dsddg}n|ds	|drddg}|rC|D]>}||s�	|j|jtj||�fi|����@|S)z�Returns an array of strings for use by speech and braille for the
        toggle value of a toggle in a table cell that has a special 2
        child pattern that we run into.  Otherwise, an empty array is
        returned.
        r�FTrrrhrls        r!�_generateTableCell2ChildTogglez(Generator._generateTableCell2ChildToggle�s������#�#�C�(�A�-��I����I�%�h�&<�&<�S�&A�B�
���5��<�<�)�)�C�C�E�J�#'�I�a�L��
���|�I�a�L���H�	��q�\�i��l���H�	��"�Y�A� ��|��
�
�m�d�m�m�H�4F�4F�s�A�4N�&W�RV�&W�X�Y��
rFc��|ddk(r|jdd�sgSg}|jjj|�}|jjj	|�}|sc|jjj|�r>t
j|�}|r'|jtj|d��|S)z�If this table cell has a "toggle" action, and doesn't have any
        label associated with it then also speak the table column
        header.  See Orca bug #455230 for more details.
        r9rLrGFr)r\r(r�r�rRrrrar�rr�)r7rArr�r�r�rYs       r!�&_generateColumnHeaderIfToggleAndNoTextz0Generator._generateColumnHeaderIfToggleAndNoText�s�����<�8�#�D�H�H�\�5�,I��I����\�\�+�+�@�@��E�
����&�&�4�4�Z�@������/�/�I�I�#�N��2�2�3�7�g���
�
�h�/�/���
�;�<��
rFc��g}|jd|�}|j|j|fi|���|j||�|S)a`Orca has a feature to automatically read an entire row of a table
        as the user arrows up/down the roles.  This leads to
        complexity in the code.  This method is used to return an
        array of strings for use by speech and braille for a single
        table cell itself.  The string, 'blank', is added for empty
        cells.
        �REAL_ROLE_TABLE_CELL)r_r�r�rars     r!�_generateRealTableCellz Generator._generateRealTableCell�sM�����$�$�%;�T�B���
�
�m�d�m�m�C�0�4�0�1����'�4�(��
rFc��|jjj|�rgS|jjj|�rgSt	j
|�}t	j|�}|dks|dkr'|jjj|�sgS|dk(r|dk(r|j|fi|��Stj||�gS)zaReturns an array of strings for use by speech and braille to present
        the size of a table.r)r(r��isLayoutOnly�isSpreadSheetTabler�
get_row_count�get_column_count�rowOrColumnCountUnknownr�r	�	tableSize)r7rAr�rows�colss     r!�_generateTablezGenerator._generateTable�s����<�<�!�!�.�.�s�3��I��<�<�!�!�4�4�S�9��I��$�$�S�)���'�'��,��
�1�H��q���<�<�)�)�A�A�#�F��I�
�1�9����)�4�)�)�#�6��6�6��"�"�4��.�/�/rFc��|jd�duxs\|jd�dk(xsF|jdk(xs5|jjj	||jd��}|s|j
|fi|��Sd|d<g}|jjj
|d��}gd�}|j�}|D]}|j|d	��|D]�}	|	|k(r|j
|	fi|��}
n|j
|	fi|��}
|
rC|rA|jdk(r2|jtjtj��|j|
���|j|j|fi|���|S)
a�Orca has a feature to automatically read an entire row of a table
        as the user arrows up/down the roles.  This leads to complexity in
        the code.  This method is used to return an array of strings
        (and possibly voice and audio specifications) for an entire row
        in a table if that's what the user has requested and if the row
        has changed.  Otherwise, it will return an array for just the
        current cell.
        rGTrlrOrrI)�forceFullRow)�startOffset�	endOffset�stringN)r\r'r(r��shouldReadFullRowrx�getShowingCellsInSameRow�copy�popr�r�Regionr
�TABLE_CELL_DELIMITER_BRAILLEr��_generatePositionInList)r7rAr�
presentAllr��cells�doNotInclude�
otherCellArgsrY�cell�
cellResults           r!�_generateTableCellRowzGenerator._generateTableCellRow�s����X�X�l�+�t�3�S��x�x��%�);�;�S��z�z�Y�&�S��|�|�%�%�7�7��T�X�X�j�=Q�R�	�
�.�4�.�.�s�;�d�;�;�!��\�������&�&�?�?��RV�?�W��>���	�	��
��	)�C����c�4�(�	)��	&�D��s�{�8�T�8�8��F��F�
�8�T�8�8��O��O�
��f����y�)@��
�
�g�n�n�->�-[�-[�\�]��M�M�*�%�	&�	�
�
�2�d�2�2�3�?�$�?�@��
rFc��gS)z>Returns the expanded embedded object characters for an object.rCrhs   r!�_generateExpandedEOCszGenerator._generateExpandedEOCss���	rFc��|jd�}|jd�}|�|�gS|jd|jjj|||��}|r|jj|vr|gSgS)Nr�r�r�)r\r(r��	substring�EMBEDDED_OBJECT_CHARACTER)r7rAr�start�endr�s      r!�_generateSubstringzGenerator._generateSubstringsw������'���h�h�{�#���=�C�K��I��H�H�X�t�|�|�'=�'=�'G�'G��U�TW�'X�Y�	�����?�?�y�P��;���	rFc�$�|jd�S)Nr�r[rhs   r!�_generateStartOffsetzGenerator._generateStartOffsets���x�x�
�&�&rFc�$�|jd�S)Nr�r[rhs   r!�_generateEndOffsetzGenerator._generateEndOffsets���x�x��$�$rFc��|j|fi|��}|r|S|jj|�\}}}|r|jj|vr|gSgS)z�Returns an array of strings for use by speech and braille
        that represents the current line of text, if
        this is a text object.  [[[WDW - consider returning an empty
        array if this is not a text object.]]]
        )r�r(�getTextLineAtCaretr�)r7rArr�r\�caretOffsetr�s       r!�_generateCurrentLineTextz"Generator._generateCurrentLineText"s^��)��(�(��5��5����M�+/�<�<�+J�+J�3�+O�(��{�K��D�L�L�:�:�$�F��6�M��	rFc��|j|fi|��}|r|S|jjj|�}|sgS|gS)z�Returns an array of strings for use by speech and braille that
        represents all the text being displayed by the object.
        )r�r(r�rR)r7rArr�rRs     r!�_generateDisplayedTextz Generator._generateDisplayedText2sM��)��(�(��5��5����M����.�.�<�<�S�A�
���I���rFc� �g}|jdd�s|j|d<d|d<|jjj	|�}|dk\r;|j|jjjdi|��|dzz�|S)z�Returns an array of strings for use by speech and braille that
        represents the tree node level of the object, or an empty
        array if the object is not a tree node.
        r9N�	nodelevelr�rrrC)r\r'r(r��	nodeLevelr�rNr�)r7rArr��levels     r!�_generateNodeLevelzGenerator._generateNodeLevelFs���
���x�x���%��:�:�D��L�(��\�����&�&�0�0��5���A�:��M�M�;�$�,�,�1�1�;�;�C�d�C�"�Q�Y�(�
)��
rFc�v�|jdtj|��}|tjj
k(r(|jjj|�}|gS|tjjk(rtj|�sgStj|�}|r|gSgS)aMReturns an array of strings for use by speech and braille that
        represents the value of the object.  This is typically the
        numerical value, but may also be the text of the 'value'
        attribute if it exists on the object.  [[[WDW - we should
        consider returning an empty array if there is no value.
        rB)r\rr�rr�r$r(r��getComboBoxValue�	SEPARATORr�
is_focusedr�get_current_value_text)r7rArrB�valuer�s      r!�_generateValuezGenerator._generateValue[s����x�x��� 1� 1�#� 6�7���5�:�:�'�'�'��L�L�*�*�;�;�C�@�E��7�N��5�:�:�'�'�'��0F�0F�s�0K��I��/�/��4����8�O��	rFc��g}tjtj|��}|r|j|�|S)z�Returns an array of strings for use by speech and braille that
        represents the name of the application for the object.
        )rr��get_applicationr�)r7rArr�r>s     r!�_generateApplicationNamez"Generator._generateApplicationNamevs8����� � ��!9�!9�#�!>�?����M�M�$���
rFc�d�|jd�}|jd�}|�|�gSg}|jdd�s|j|d<d|d<|jjj	|�}|r8|j|jjjdi|��|z�|S)z�Returns an array of strings for use by speech and braille that
        represent the nesting level of an object in a list.
        r�r�Nr9�nestinglevelr�rC)r\r'r(r��nestingLevelr�rNr�)r7rArr�r�r�r�s       r!�_generateNestingLevelzGenerator._generateNestingLevel�s�������'���h�h�{�#�������I����x�x���%��:�:�D��L�+��\���|�|�-�-�:�:�3�?����M�M�;�$�,�,�1�1�;�;�C�d�C�(�)�
*��
rFc���tj|�sgSd}tj|tj
j�}|r|jd�}|r&|jjj|�gStj|�}|rWtj|�stj|�r|j|�}|r|Stj|�}|r�WgS)z�Returns an array of strings for use by speech and braille that
        represents the radio button group label for the object, or an
        empty array if the object has no such label.
        Nr)rrr�get_relationr�RelationType�LABELLED_BY�
get_targetr(r�rR�get_parent_checkedr��	is_fillerr�)r7rAr�radioGroupLabel�relationr�r�s       r!�_generateRadioButtonGroupz#Generator._generateRadioButtonGroup�s���
�*�*�3�/��I����(�(��e�.@�.@�.L�.L�M���&�1�1�!�4�O���L�L�*�*�8�8��I�J�J��,�,�S�1����#�#�F�+�{�/D�/D�V�/L��2�2�6�:��� �L��0�0��8�F���	rFc���|jjj|�}tj|�rtj|�s|j|fi|��Sttj|�D�cgc]5}|jjj|�j���7c}�}djtd�|��}|s|j|fi|��S|gScc}w)aNObjects, such as tables and trees, can represent individual cells
        via a complicated nested hierarchy.  This method returns an
        array of strings for use by speech and braille that represents
        the text actually being painted in the cell, if it can be
        found.  Otherwise, an empty array is returned.
        rwc��|SrcrCrys r!rzzFGenerator._generateRealActiveDescendantDisplayedText.<locals>.<lambda>�s��q�rF)r(r�r�r�
is_table_cellrrDr�r�rjrRrSr�r�)r7rAr�radr:�content�rvs       r!�*_generateRealActiveDescendantDisplayedTextz4Generator._generateRealActiveDescendantDisplayedText�s����l�l�$�$�9�9�#�>���)�)�#�.�8�3K�3K�C�3P�.�4�.�.�s�;�d�;�;���+�+�C�0�2���|�|�-�-�;�;�A�>�D�D�F�2�3��
�X�X�f�[�'�2�
3���.�4�.�.�s�;�d�;�;��t���2s�?:C4c��|jjj|�}tj|�|d<|j
|fi|��S)aObjects, such as tables and trees, can represent individual cells
        via a complicated nested hierarchy.  This method returns an
        array of strings for use by speech and braille that represents
        the role of the object actually being painted in the cell.
        rB)r(r�r�rr�r�)r7rArr�s    r!�%_generateRealActiveDescendantRoleNamez/Generator._generateRealActiveDescendantRoleName�sJ���l�l�$�$�9�9�#�>���(�(��-��V��%�t�%�%�c�2�T�2�2rFc���g}tj|�}|rTtj|�r'|j	|�}|r|j|�	|Stj|�}|r�T|S)z�Returns an array of strings for use by speech and braille that
        represents the nearest ancestor of an object which is a named panel.
        )rr�rr�r�r�)r7rArr�r�r�s      r!�_generateNamedContainingPanelz'Generator._generateNamedContainingPanel�so�����,�,�S�1����#�#�F�+��2�2�6�:����M�M�%�(���
��0�0��8�F�
��
rFc��gSrcrCrhs   r!�_generatePageSummaryzGenerator._generatePageSummary�rfrFc��gSrcrCrhs   r!r�z!Generator._generatePositionInList�rfrFc��gSrcrCrhs   r!�_generateProgressBarIndexz#Generator._generateProgressBarIndex�rfrFc��gSrcrCrhs   r!�_generateProgressBarValuez#Generator._generateProgressBarValue�rfrFc�Z�ttj�jd��S)N�progressBarUpdateInterval)�intr�
getManager�
getSetting)r7s r!�_getProgressBarUpdateIntervalz'Generator._getProgressBarUpdateInterval�s#���#�.�.�0�;�;�<W�X�Y�YrFc�,�tj|�}|j||��\}}||k(r,d|d|g}tjtj
|d�y|dk(ryt
tj�|z
�}||j�k\S)N)�typez$GENERATOR: Not presenting update forz
. Value stillTF�d)	r�get_value_as_percent� getProgressBarUpdateTimeAndValuerr�r�r�r�r�)r7rAr�percent�lastTime�	lastValuer��intervals        r!�_shouldPresentProgressBarUpdatez)Generator._shouldPresentProgressBarUpdate�s����.�.�s�3��"�C�C�C�d�C�S���)��i��<�c�?�T[�\�F����e�.�.���=���c�>���t�y�y�{�X�-�.���4�=�=�?�?�?rFc���tttj|j��}|D�cic]}||jj|��� c}|_ycc}wrc)r�r�r�is_validr)r\)r7�barsr:s   r!�_cleanUpCachedProgressBarsz$Generator._cleanUpCachedProgressBars�sK���F�8�,�,�d�.F�.F�G�H��OS�#T�!�A�d�&>�&>�&B�&B�1�&E�$E�#T�� ��#Ts�#Ac��|j�|jj�syt|jj�d���}|d\}}t	|jj��d||fS)N)N�Nc��|dS)NrrCrys r!rzz;Generator._getMostRecentProgressBarUpdate.<locals>.<lambda>�s��q�QR�t�rF)rU���)r�r)�values�sortedr�rM)r7�sortedValues�prevTime�	prevValues    r!�_getMostRecentProgressBarUpdatez)Generator._getMostRecentProgressBarUpdate�ss���'�'�)��'�'�.�.�0�"��d�6�6�=�=�?�^�T��*�2�.���)��D�,�,�1�1�3�4�R�8�(�I�M�MrFc��|j�||jvrd|j|<|j|�}t|jj	��j|�}|dzt
|j�fS)N�r�Nr)r�r)r�r�r��indexr4)r7rA�	thisValuer�s    r!�getProgressBarNumberAndCountz&Generator.getProgressBarNumberAndCountsz���'�'�)��d�.�.�.�,5�D�$�$�S�)��9�9�#�>�	��T�-�-�4�4�6�7�=�=�i�H���q�y�#�d�6�6�7�7�7rFc�r�||jvrd|j|<|jj|�S)Nr�)r)r\rhs   r!r�z*Generator.getProgressBarUpdateTimeAndValue
s7���d�.�.�.�,5�D�$�$�S�)��'�'�+�+�C�0�0rFNc��|xstj�}|xstj|�}||f|j|<yrc)r�rr�r))r7rAr�r�s    r!r�z*Generator.setProgressBarUpdateTimeAndValues<���*�t�y�y�{���B��!=�!=�c�!B�	�(0�)�(;�� � ��%rFc�
�|jjj|��r
|jjj|�ry|jjj	|�ry|jjj|�ry|jjj
|�ry|jjj|�ry|jjj|�ry|jjj|�ry|jjj|�r<|jjj|�rytj|�ry	|jjj|�ry
|jjj|�rt j"j$S|jjj'|�rt j"j(S|jjj+|�rt j"j,S|jjj/|�ry|jjj1|�ry|jjj3|�ry
|jjj5|�ry|jjj7|�ry|jjj9|�rt j"j:S|jjj=|�rt j"j>S|jjjA|�rt j"jBS|jjjE|�ry|jjjG|�ry|jjj|�r@|jjjI|�ryt j"jJS|jjjM|�rt j"jNS|jjjQ|�r/tSjT|�rt j"jVS|jYdtSjZ|��S)N�ROLE_MATH_SCRIPT_SUBSUPER�ROLE_MATH_SCRIPT_UNDEROVER�ROLE_MATH_MULTISCRIPT�ROLE_MATH_ENCLOSED�ROLE_MATH_FENCED�ROLE_MATH_TABLE�ROLE_MATH_TABLE_ROW�ROLE_DPUB_LANDMARK�ROLE_DPUB_SECTION�ROLE_SWITCH�ROLE_CONTENT_DELETION�ROLE_CONTENT_ERROR�ROLE_CONTENT_INSERTION�ROLE_CONTENT_MARK�ROLE_CONTENT_SUGGESTION�ROLE_ARTICLE_IN_FEED�	ROLE_FEED�ROLE_REGIONrB).r(r��isMath�isMathSubOrSuperScript�isMathUnderOrOverScript�isMathMultiScript�
isMathEnclose�isMathFenced�isMathTable�isMathTableRow�isDPub�
isLandmarkr�
is_section�isSwitch�isAnchorrr��STATIC�isBlockquote�BLOCK_QUOTE�	isComment�COMMENT�isContentDeletion�isContentError�isContentInsertion�isContentMarked�isContentSuggestion�isDescriptionList�DESCRIPTION_LIST�isDescriptionListTerm�DESCRIPTION_TERM�isDescriptionListDescription�DESCRIPTION_VALUE�
isFeedArticle�isFeed�isLandmarkRegion�LANDMARK�isFocusableLabel�	LIST_ITEM�
isDocumentr�supports_image�IMAGEr\r�rhs   r!�_getAlternativeRolezGenerator._getAlternativeRoles����<�<�!�!�(�(��-��|�|�%�%�<�<�S�A�2��|�|�%�%�=�=�c�B�3��|�|�%�%�7�7��<�.��|�|�%�%�3�3�C�8�+��|�|�%�%�2�2�3�7�)��|�|�%�%�1�1�#�6�(��|�|�%�%�4�4�S�9�,��<�<�!�!�(�(��-��|�|�%�%�0�0��5�+��%�%�c�*�*��<�<�!�!�*�*�3�/� ��<�<�!�!�*�*�3�/��:�:�$�$�$��<�<�!�!�.�.�s�3��:�:�)�)�)��<�<�!�!�+�+�C�0��:�:�%�%�%��<�<�!�!�3�3�C�8�*��<�<�!�!�0�0��5�'��<�<�!�!�4�4�S�9�+��<�<�!�!�1�1�#�6�&��<�<�!�!�5�5�c�:�,��<�<�!�!�3�3�C�8��:�:�.�.�.��<�<�!�!�7�7��<��:�:�.�.�.��<�<�!�!�>�>�s�C��:�:�/�/�/��<�<�!�!�/�/��4�)��<�<�!�!�(�(��-���<�<�!�!�,�,�S�1��|�|�%�%�6�6�s�;�$��:�:�&�&�&��<�<�!�!�2�2�3�7��:�:�'�'�'��<�<�!�!�,�,�S�1�h�6M�6M�c�6R��:�:�#�#�#��x�x��� 1� 1�#� 6�7�7rFc��|jdtj|��}tj|��rdt	j
|�rtjSt	j|�rtjSt	j|�rtjSt	j|�rtjSt	j|�rtjSt	j |�rtj"St	j$|�rqt	j&|�s|jdd�rJt	j(|�rtj"St	j*|�rtjS|j,j.j1|�rtj2S|j,j.j5|�rtj6S|j,j.j9|�rtj:S|j,j.j=|�rtj>S|j,j.jA|�rtjBS|j,j.jE|��r�|j,j.jG|��r�|j,j.jI|�rtjJS|j,j.jM|�rtjNS|j,j.jQ|�rtjRS|j,j.jU|�rtjVS|j,j.jY|�rtjZS|j,j.j]|�rtj^S|j,j.ja|�rtjbS|j,j.je|�rtjfS|j,j.ji|�rtjjS|j,j.jm|�rtjnS|j,j.jq|�rtjrS|j,j.ju|�rtjvS|j,j.jy|�rtjzS|j,j.j}|�rtj~S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|��r�tj�S|dk(�r�|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|��r6tj�S|t�j�j�k(rj|j,j.j�|�rtj�S|j,j.j�|�r�tj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.jG|��r�|j,j.j�|�ry|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rtj�S|j,j.j�|�rZt�j�j�}n?|j,j.j�|�rt�j�j�}t�|t�j��s	|j��St�j�|�}t�j�|�}|t�j��jk(r3|t�j��jk(rt�j�d�}t��j|�S#t�$rYywxYw)NrBrmFrrK�	statusbar)�r\rr��supports_valuer�is_horizontal_sliderr
�ROLE_SLIDER_HORIZONTAL�is_vertical_slider�ROLE_SLIDER_VERTICAL�is_horizontal_scrollbar�ROLE_SCROLL_BAR_HORIZONTAL�is_vertical_scrollbar�ROLE_SCROLL_BAR_VERTICAL�is_horizontal_separator�ROLE_SPLITTER_HORIZONTAL�is_vertical_separator�ROLE_SPLITTER_VERTICAL�
is_split_paner��
is_horizontal�is_verticalr(r�r%rr-r
�isFigure�ROLE_FIGURE�isMenuButton�ROLE_MENU_BUTTONrrrr�isDPubAcknowledgments�ROLE_ACKNOWLEDGMENTS�isDPubAfterword�ROLE_AFTERWORD�isDPubAppendix�
ROLE_APPENDIX�isDPubBibliography�ROLE_BIBLIOGRAPHY�
isDPubChapter�ROLE_CHAPTER�isDPubConclusion�ROLE_CONCLUSION�
isDPubCredits�ROLE_CREDITS�isDPubEndnotes�
ROLE_ENDNOTES�isDPubEpilogue�
ROLE_EPILOGUE�isDPubErrata�ROLE_ERRATA�isDPubForeword�
ROLE_FOREWORD�isDPubGlossary�
ROLE_GLOSSARY�isDPubIndex�
ROLE_INDEX�isDPubIntroduction�ROLE_INTRODUCTION�isDPubPagelist�
ROLE_PAGELIST�
isDPubPart�	ROLE_PART�
isDPubPreface�ROLE_PREFACE�isDPubPrologue�
ROLE_PROLOGUE�	isDPubToc�ROLE_TOC�isDPubAbstract�
ROLE_ABSTRACT�isDPubColophon�
ROLE_COLOPHON�isDPubCredit�ROLE_CREDIT�isDPubDedication�ROLE_DEDICATION�isDPubEpigraph�
ROLE_EPIGRAPH�
isDPubExample�ROLE_EXAMPLE�isDPubPullquote�ROLE_PULLQUOTE�	isDPubQna�ROLE_QNArr�r1�isDPubBiblioentry�ROLE_BIBLIOENTRY�
isDPubEndnote�ROLE_ENDNOTE�isDPubCover�
ROLE_COVER�isDPubPagebreak�ROLE_PAGEBREAK�isDPubSubtitle�
ROLE_SUBTITLE�isLandmarkWithoutType�isLandmarkBanner�ROLE_LANDMARK_BANNER�isLandmarkComplementary�ROLE_LANDMARK_COMPLEMENTARY�isLandmarkContentInfo�ROLE_LANDMARK_CONTENTINFO�isLandmarkMain�ROLE_LANDMARK_MAIN�isLandmarkNavigation�ROLE_LANDMARK_NAVIGATIONr.�ROLE_LANDMARK_REGION�isLandmarkSearch�ROLE_LANDMARK_SEARCH�isLandmarkForm�FORMrr r1rTrT�
role_get_namer�
role_for_name�INVALID�
STATUS_BAR�role_get_localized_name)r7rArrB�nonlocalized�atkRoles      r!rTzGenerator.getLocalizedRoleNameQs����x�x��� 1� 1�#� 6�7���"�"�3�'��/�/��4�(�?�?�?��-�-�c�2�(�=�=�=��2�2�3�7�(�C�C�C��0�0��5�(�A�A�A��2�2�3�7�(�A�A�A��0�0��5�(�?�?�?��(�(��-��*�*�3�/�4�8�8�<L�e�3T��,�,�S�1�,�C�C�C��*�*�3�/�,�E�E�E��<�<�!�!�5�5�c�:�$�<�<�<��<�<�!�!�(�(��-�$�.�.�.��<�<�!�!�*�*�3�/�$�0�0�0��<�<�!�!�.�.�s�3�$�5�5�5��<�<�!�!�*�*�3�/�$�0�0�0��<�<�!�!�(�(��-��|�|�%�%�0�0��5��<�<�)�)�?�?��D�,�A�A�A��<�<�)�)�9�9�#�>�,�;�;�;��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�<�<�S�A�,�>�>�>��<�<�)�)�7�7��<�,�9�9�9��<�<�)�)�:�:�3�?�,�<�<�<��<�<�)�)�7�7��<�,�9�9�9��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�6�6�s�;�,�8�8�8��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�5�5�c�:�,�7�7�7��<�<�)�)�<�<�S�A�,�>�>�>��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�4�4�S�9�,�6�6�6��<�<�)�)�7�7��<�,�9�9�9��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�3�3�C�8�,�5�5�5��,�,��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�6�6�s�;�,�8�8�8��<�<�)�)�:�:�3�?�,�<�<�<��<�<�)�)�8�8��=�,�:�:�:��<�<�)�)�7�7��<�,�9�9�9��<�<�)�)�9�9�#�>�,�;�;�;��<�<�)�)�3�3�C�8�,�5�5�5�����-�-�-��<�<�)�)�;�;�C�@�,�=�=�=��<�<�)�)�7�7��<�,�9�9�9��<�<�)�)�5�5�c�:�,�7�7�7��<�<�)�)�9�9�#�>�,�;�;�;��<�<�)�)�8�8��=�,�:�:�:��<�<�!�!�,�,�S�1��|�|�%�%�;�;�C�@���|�|�%�%�6�6�s�;�(�=�=�=��|�|�%�%�=�=�c�B�(�D�D�D��|�|�%�%�;�;�C�@�(�B�B�B��|�|�%�%�4�4�S�9�(�;�;�;��|�|�%�%�:�:�3�?�(�A�A�A��|�|�%�%�6�6�s�;�(�=�=�=��|�|�%�%�6�6�s�;�(�=�=�=��|�|�%�%�4�4�S�9��z�z����
�\�\�
#�
#�
-�
-�c�
2��:�:�%�%�D��$��
�
�+�
��/�/�1�1��*�*�4�0���#�#�L�1���c�h�h�&�&�&�4�5�:�:�3H�3H�+H��'�'��4�G��*�*�7�3�3���
��
�s�r4�4	s�?sc��|jjj|�r|j|fi|��S|j	dtj|��}|tjjk(r|j|fi|��S|tjjtjjfvr|j|fi|��S|tjjtjjfvr|j |fi|��S|tjj"k(r|j$|fi|��S|tjj&k(r|j(|fi|��SgS�NrB)r(r�rr1r\rr�rr��	MENU_ITEMr:r&�RADIO_MENU_ITEMrr�CHECK_MENU_ITEMrr(r4r�rr�s    r!�getStateIndicatorzGenerator.getStateIndicator�sB���<�<�!�!�*�*�3�/�,�4�,�,�S�9�D�9�9��x�x��� 1� 1�#� 6�7���5�:�:�'�'�'�5�4�5�5�c�B�T�B�B��E�J�J�+�+�U�Z�Z�-G�-G�H�H�+�4�+�+�C�8�4�8�8��E�J�J�(�(�%�*�*�*D�*D�E�E�-�4�-�-�c�:�T�:�:��5�:�:�+�+�+�,�4�,�,�S�9�D�9�9��5�:�:�(�(�(�1�4�1�1�#�>��>�>��	rFc�B�|jdtj|��}|tjj
k(r|j|fi|��S|tjjtjjfvr|j|fi|��SgSr�)
r\rr�rr��PROGRESS_BARr��
SCROLL_BARr'�_generatePercentager�s    r!�getValuezGenerator.getValue�s����x�x��� 1� 1�#� 6�7���5�:�:�*�*�*�1�4�1�1�#�>��>�>��E�J�J�)�)�5�:�:�+<�+<�=�=�+�4�+�+�C�8�4�8�8��	rF)T)NN)Tr�
__module__�__qualname__�__doc__r?rEr6r_rarerir�rur�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrrrr,r1r4r8r:r@rEr^rcrfrqrsrurxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r5rTr�r�rCrFr!r%r%Os����!�#�*"�X�	���u�n*�2���(�T�&!�F	�
�,�\
��
�	�"��������4�&���&�"�&
��"���(
�*"�H�B��@�@�(�0�4&�\�
�'�%�� �(
�*�6��&�0�&3�
�����Z�@�U�N�8�1�<�
:8�xN4�`�.	rFr%)�)(r��__id__�__version__�__date__�
__copyright__�__license__�gi�require_version�
gi.repositoryrrr�rr�rrKrrr	r
rr�ax_hypertextr
�	ax_objectr�ax_tabler�ax_utilitiesr�ax_valuer�collections.abc�abcr2�ImportError�collectionsr"r-r%rCrFr!�<module>r�s���*H�������7�
���	�����7�E�"������5�%� ��	�
���������%���%��*�-�%�"�
�r�r��-�*�)�*�s�B-�-	B9�8B9

Zerion Mini Shell 1.0