Ë
    g
f~R  ã                   ó@  — d Z dZdZdZdZdZddlZ ej                  dd	«       dd
lm	Z	 ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ  G d„ d«      Z e«       gZ G d„ dej>                  «      Z y)z:Utilities for obtaining braille presentations for objects.z$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2009 Sun Microsystems Inc.ÚLGPLé    NÚAtspiz2.0)r   é   )Úbraille)Údebug)Úfocus_manager)Ú	generator)Úmessages)Úobject_properties)Úsettings)Úsettings_manager)ÚAXObject)ÚAXText)ÚAXUtilities)ÚAXValue)ÚshortRoleNamesc                   ó   — e Zd ZdZdd„Zy)ÚSpacezxA dummy class to indicate we want to insert a space into an
    utterance, but only if there is text prior to the space.c                 ó   — || _         y ©N)Ú	delimiter©Úselfr   s     ú8/usr/lib/python3/dist-packages/orca/braille_generator.pyÚ__init__zSpace.__init__2   s	   € Ø"ˆ�ó    N©ú )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   © r   r   r   r   /   s   „ ñ@ô#r   r   c                   ó¸  ‡ — e Zd ZdZej
                  j                  ej
                  j                  ej
                  j                  ej
                  j                  ej
                  j                  ej
                  j                  fZd„ Zd„ Zd„ Zd„ Zd„ Zˆ fd„Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zˆ fd„Zˆ fd„Zd„ Z d„ Z!d„ Z"dd„Z#dd„Z$ˆ xZ%S )ÚBrailleGeneratora  Takes accessible objects and produces a list of braille Regions
    for those objects.  See the generateBraille method, which is the
    primary entry point.  Subclasses can feel free to override/extend
    the brailleGenerators instance field as they see fit.c                 óF   — t         j                  j                  | |d«       y )Nr   )r	   Ú	Generatorr   )r   Úscripts     r   r   zBrailleGenerator.__init__D   s   € Ü×Ñ×$Ñ$ T¨6°9Õ=r   c                 ó  — t         j                  j                  | |«       | j                  |d<   t        j
                  |d<   t        j                  |d<   t        j                  |d<   t        j                  |d<   | j                  |d<   y)zCOther things to make available from the formatting string.
        ÚspaceÚ	ComponentÚRegionÚTextÚLinkÚasStringN)
r	   r'   Ú_addGlobalsr*   r   r+   r,   r-   r.   r/   )r   ÚglobalsDicts     r   r0   zBrailleGenerator._addGlobalsG   sp   € ô 	×Ñ×'Ñ'¨¨kÔ:Ø#Ÿz™zˆ�GÑÜ#*×#4Ñ#4ˆ�KÑ Ü '§¡ˆ�HÑÜ%Ÿl™lˆ�FÑÜ%Ÿl™lˆ�FÑØ"&§-¡-ˆ�JÒr   c                 ó  — t        |t        j                  t        j                  f«      syt	        j
                  ||j                  «      syt        j                  |«      t        j                  |j                  «      k(  S )NF)	Ú
isinstancer   r+   r-   r   Úhave_same_roleÚ
accessibler   Úget_name)r   ÚobjÚregions      r   Ú_isCandidateFocusedRegionz*BrailleGenerator._isCandidateFocusedRegionR   s^   € Ü˜&¤7×#4Ñ#4´g·l±lÐ"CÔDØä×)Ñ)¨#¨v×/@Ñ/@ÔAØä× Ñ  Ó%¬×):Ñ):¸6×;LÑ;LÓ)MÑMÐMr   c                 ó¦  ‡ ‡— t        j                  «       j                  d«      sLt        j                  «       j                  d«      s)t        j                  t        j
                  dd«       g d gS ‰t        j                  «       j                  «       k(  r|j                  dd «      sd|d<    ‰ j                  ‰fi |¤Ž}	 |d   }|D �]  }t        |t        j                  t        j                  f«      r8‰ j                  j                   j#                  |j$                  ‰d«      r|} ||gS t        |t        j                  «      r>t'        j(                  ‰«      r)t+        j,                  |j$                  «      ‰k(  r|} ||gS t        |t        j                  «      sŒÙt'        j.                  ‰«      sŒït+        j,                  |j$                  «      ‰k(  s�Œ|} ||gS  ˆˆ fd„}t1        t3        ||«      «      }d	‰d
|g}t        j4                  t        j
                  |d«       t7        |«      dk(  r|d   }||gS # t        $ r d }Y �Œˆw xY w)NÚenableBrailleÚenableBrailleMonitorz&BRAILLE GENERATOR: generation disabledTÚ
formatTypeÚfocusedr   c                 ó(   •— ‰j                  ‰| «      S r   )r9   )Úxr7   r   s    €€r   Úpredz.BrailleGenerator.generateBraille.<locals>.pred…   s   ø€ Ø×5Ñ5°c¸1Ó=Ð=r   z9BRAILLE GENERATOR: Could not determine focused region forzCandidates:r   )r   Ú
getManagerÚ
getSettingr   ÚprintMessageÚ
LEVEL_INFOr   Úget_locus_of_focusÚgetÚgenerateÚ	Exceptionr3   r   r+   r-   Ú_scriptÚ	utilitiesÚisSameObjectr5   r   Úis_combo_boxr   Ú
get_parentÚis_table_cellÚlistÚfilterÚprintTokensÚlen)	r   r7   ÚargsÚresultÚfocusedRegionr8   rA   Ú
candidatesÚtokenss	   ``       r   ÚgenerateBraillez BrailleGenerator.generateBraille[   s  ù€ Ü×*Ñ*Ó,×7Ñ7¸ÔHÜ#×.Ñ.Ó0×;Ñ;Ð<RÔSÜ×Ñœu×/Ñ/Ð1YÐ[_Ô`Ø˜�:Ðà”-×*Ñ*Ó,×?Ñ?ÓAÒAØ—8‘8˜L¨$Ô/Ø!*ˆD�ÑØ�—‘˜sÑ+ dÑ+ˆð	!Ø" 1™IˆMð ó 	.ˆFÜ˜&¤7×#4Ñ#4´g·l±lÐ"CÔDØ—<‘<×)Ñ)×6Ñ6°v×7HÑ7HÈ#ÈtÔTØ &�Øð. ˜Ð&Ð&ô- ˜F¤G§L¡LÔ1Ü ×-Ñ-¨cÔ2Ü×(Ñ(¨×):Ñ):Ó;¸sÒBØ &�Øð$ ˜Ð&Ð&ô# ˜F¤G×$5Ñ$5Õ6Ü ×.Ñ.¨sÕ3Ü×(Ñ(¨×):Ñ):Ó;¸sÔBØ &�Øð ˜Ð&Ð&ð7	.õ">ô œf T¨6Ó2Ó3ˆJØQØ˜=¨*ð6ˆFä×Ñœe×.Ñ.°¸Ô=Ü�:‹ !Ò#Ø *¨1¡�à˜Ð&Ð&øô= ò 	!Ø ‹Mð	!ús   ÃI ÉIÉIc                 óª  — |j                  d«      r%t        j                  «       j                  d«      sg S g }|j                  dt	        j
                  |«      «      }t        j                  «       j                  d«      }t        j                  j                  t        j                  j                  t        j                  j                  t        j                  j                  t        j                  j                  g}t        j                  t	        j                  |«      «      r$|j!                  t	        j
                  |«      «       |t"        j$                  k(  rC|j'                  t        j                  j(                  t        j                  j*                  g«       |t        j                  j,                  k(  rI| j.                  j0                  j3                  |«      }|j!                  t4        j6                  |z  «       |S |t"        j8                  k(  r8|j                  dd«      s&||vr"|j!                   | j:                  |fi |¤Ž«       |S )a   Returns 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.
        ÚisProgressBarUpdateÚbrailleProgressBarUpdatesÚroleÚbrailleVerbosityLevelÚ
readingRowF)rG   r   rB   rC   r   Úget_roler   ÚRoleÚUNKNOWNÚREDUNDANT_OBJECTÚFILLERÚEXTENDEDÚLINKr   Úis_list_boxrN   Úappendr   ÚVERBOSITY_LEVEL_BRIEFÚextendÚICONÚCANVASÚHEADINGrJ   rK   ÚheadingLevelr   ÚROLE_HEADING_LEVEL_BRAILLEÚVERBOSITY_LEVEL_VERBOSEÚgetLocalizedRoleName)r   r7   rT   rU   r]   ÚverbosityLevelÚdoNotPresentÚlevels           r   Ú_generateRoleNamez"BrailleGenerator._generateRoleName—   s©  € ð �8‰8Ð)Ô*Ü#×.Ñ.Ó0×;Ñ;Ð<WÔXØˆIàˆØ�x‰x˜¤× 1Ñ 1°#Ó 6Ó7ˆÜ)×4Ñ4Ó6×AÑAÐBYÓZˆäŸ
™
×*Ñ*ÜŸ
™
×3Ñ3ÜŸ
™
×)Ñ)ÜŸ
™
×+Ñ+ÜŸ
™
Ÿ™ð	)ˆô ×"Ñ"¤8×#6Ñ#6°sÓ#;Ô<Ø×Ñ¤× 1Ñ 1°#Ó 6Ô7àœX×;Ñ;Ò;Ø×Ñ¤§¡§¡´%·*±*×2CÑ2CÐ DÔEà”5—:‘:×%Ñ%Ò%Ø—L‘L×*Ñ*×7Ñ7¸Ó<ˆEØ�M‰MÔ+×FÑFÈÑNÔOð
 ˆð œx×?Ñ?Ò?Ø—8‘8˜L¨%Ô0°TÀÑ5MØ�M‰MÐ3˜$×3Ñ3°CÑ@¸4Ñ@ÔAØˆr   c                 ó  •— t        j                  «       j                  d«      t        j                  k(  r>|j                  dt        j                  |«      «      }t        j
                  |«      }|r|S t        ‰| �(  |fi |¤ŽS )z¨Returns the localized name of the given Accessible object; the name
        is suitable to be brailled.

        Arguments:
        - obj: an Accessible object
        ÚbrailleRolenameStyler]   )r   rB   rC   r   ÚBRAILLE_ROLENAME_STYLE_SHORTrG   r   r`   r   Úsuperrq   )r   r7   rT   r]   ÚrvÚ	__class__s        €r   rq   z%BrailleGenerator.getLocalizedRoleName¼   ss   ø€ ô ×&Ñ&Ó(×3Ñ3Ð4JÓKÜ×8Ñ8ò9à—8‘8˜F¤H×$5Ñ$5°cÓ$:Ó;ˆDÜ×#Ñ# DÓ)ˆBÙØ�	ä‰wÑ+¨CÑ8°4Ñ8Ð8r   c                 óª   — g }| j                   j                  j                  |«      }|D ]&  } | j                  |fi |¤Ž}|j	                  |«       Œ( |S r   )rJ   rK   ÚunrelatedLabelsÚ_generateNamerj   )r   r7   rT   rU   ÚlabelsÚlabelÚnames          r   Ú_generateUnrelatedLabelsz)BrailleGenerator._generateUnrelatedLabelsÍ   sZ   € ØˆØ—‘×'Ñ'×7Ñ7¸Ó<ˆØò 	 ˆEØ%�4×%Ñ% eÑ4¨tÑ4ˆDØ�M‰M˜$Õð	 ð ˆr   c                 óþ   — t        j                  «       j                  d«      }|t        j                  k(  rg S g }| j
                  j                  j                  |«      \  }}}|r|j                  d|z   dz   «       |S )zÃReturns an array of strings (and possibly voice and audio
        specifications) that represent the accelerator for the object,
        or an empty array if no accelerator can be found.
        r^   ú(ú))	r   rB   rC   r   ri   rJ   rK   ÚmnemonicShortcutAcceleratorrh   )r   r7   rT   rr   rU   ÚmnemonicÚshortcutÚaccelerators           r   Ú_generateAcceleratorz%BrailleGenerator._generateAcceleratorÜ   sw   € ô *×4Ñ4Ó6×AÑAÐBYÓZˆØœX×;Ñ;Ò;ØˆIàˆà�L‰L×"Ñ"×>Ñ>¸sÓCñ 	*ˆ�8˜[áØ�M‰M˜# Ñ+¨cÑ1Ô2Øˆr   c                 óÊ   — g }	 | j                   j                  j                  |«      }|dkD  r$|j	                  t        j                  |«      «       |S # t        $ r d}Y Œ8w xY w)zÔReturns an array of strings that says how many alerts and dialogs
        are associated with the application for this object.  [[[WDW -
        I wonder if this string should be moved to settings.py.]]]
        r   )rJ   rK   ÚunfocusedAlertAndDialogCountrI   rh   r
   ÚdialogCountBraille)r   r7   rT   rU   ÚalertAndDialogCounts        r   Ú_generateAlertAndDialogCountz-BrailleGenerator._generateAlertAndDialogCountó   si   € ð
 ˆð	$à—‘×&Ñ&×CÑCÀCÓHð  ð  Ò"Ø�]‰]œ8×6Ñ6Ð7JÓKÔLàˆøô ò 	$Ø"#Òð	$ús   „%A ÁA"Á!A"c                 óœ  — g }t        j                  «       j                  d«      s|S d|d<   |j                  dt	        j
                  |«      «      }|t        j                  j                  k(  }t	        j                  |«      }|r6t	        j
                  |«      | j                  v rt	        j                  |«      }|�rýg }t	        j
                  |«      }|t        j                  j                  k7  r±|t        j                  j                  k7  r”|t        j                  j                  k7  rw|t        j                  j                  k7  rZ|t        j                  j                  k7  r=| j                   j"                  j%                  |«      s||d<    | j&                  |fi |¤Ž}|t        j                  j                  t        j                  j(                  fv rr| j                   j"                  j+                  |«      }|rKt-        |«      r@|j/                  «       s0|s,t	        j
                  |«      |d<    | j&                  |fi |¤Ž}nd}|r&|r$|j1                  t3        j4                  d«      «       |j7                  |«       |t        j                  j8                  k(  rnt	        j                  |«      }|r�Œý|j;                  «        |S )aE  Returns an array of strings (and possibly voice and audio
        specifications) that represent the text of the ancestors for
        the object.  This is typically used to present the context for
        an object (e.g., the names of the window, the panels, etc.,
        that the object is contained in).  If the 'priorObj' attribute
        of the args dictionary is set, only the differences in
        ancestry between the 'priorObj' and the current obj will be
        computed.  The 'priorObj' is typically set by Orca to be the
        previous object with focus.
        ÚenableBrailleContextFÚincludeContextr]   r   )r   rB   rC   rG   r   r`   r   ra   ÚRADIO_BUTTONÚget_parent_checkedÚSKIP_CONTEXT_ROLESrd   ÚINVALIDÚSECTIONÚ
SPLIT_PANEÚDESKTOP_FRAMErJ   rK   ÚisLayoutOnlyrH   ÚPANELÚdisplayedLabelrS   Úisspacerh   r   r,   rj   ÚEMBEDDEDÚreverse)	r   r7   rT   rU   r]   ÚexcludeRadioButtonGroupÚparentÚparentResultr€   s	            r   Ú_generateAncestorsz#BrailleGenerator._generateAncestors  s+  € ð ˆÜ×*Ñ*Ó,×7Ñ7Ð8NÔOØˆMØ!&ˆÐÑð �x‰x˜¤× 1Ñ 1°#Ó 6Ó7ˆØ"&¬%¯*©*×*AÑ*AÑ"AÐä×,Ñ,¨SÓ1ˆÙ”x×(Ñ(¨Ó0°D×4KÑ4KÑKÜ×0Ñ0°Ó8ˆFÚØˆLô ×$Ñ$ VÓ,ˆDØ”u—z‘z×(Ñ(Ò(ØœEŸJ™J×.Ñ.Ò.ØœEŸJ™J×.Ñ.Ò.ØœEŸJ™J×1Ñ1Ò1ØœEŸJ™J×4Ñ4Ò4ØŸ™×.Ñ.×;Ñ;¸FÔCØ#��V‘Ø,˜tŸ}™}¨VÑ<°tÑ<�ð œŸ
™
×)Ñ)¬5¯:©:×+;Ñ+;Ð<Ñ<ØŸ™×.Ñ.×=Ñ=¸fÓE�ÙœS œZ°·±´Ù2Ü'/×'8Ñ'8¸Ó'@˜˜V™Ø'4 t§}¡}°VÑ'D¸tÑ'D™à27Ð/Ù™,Ø—‘œgŸn™n¨SÓ1Ô2Ø�M‰M˜,Ô'Ø”u—z‘z×*Ñ*Ò*Øä×0Ñ0°Ó8ˆFóM ðN 	�‰ÔØˆr   c                 óÐ  — g }|j                  dt        j                  |«      «      }|t        j                  j
                  t        j                  j                  fvr|S t        j                  |«      r&| j                  j                  j                  |«      }nt        j                  |«      g}|r|d   s|S t        | j                  |«      D ]  }|j                  |«       Œ |S )Nr]   r   )rG   r   r`   r   ra   ÚLISTÚLIST_BOXÚsupports_selectionrJ   rK   ÚselectedChildrenr   Úget_focused_objectÚmapr~   rj   )r   r7   rT   rU   r]   ÚitemsÚitems          r   Ú_generateFocusedItemz%BrailleGenerator._generateFocusedItemJ  s¾   € ØˆØ�x‰x˜¤× 1Ñ 1°#Ó 6Ó7ˆØœŸ
™
Ÿ™¬¯©×)<Ñ)<Ð=Ñ=ØˆMä×&Ñ& sÔ+Ø—L‘L×*Ñ*×;Ñ;¸CÓ@‰Eä ×3Ñ3°CÓ8Ð9ˆEÙ˜% š(ØˆMä˜×*Ñ*¨EÓ2ò 	 ˆDØ�M‰M˜$Õð	 ð ˆr   c                 óŽ   — | j                   j                  j                  |«      }|dk  rg S dt        j                  |«      › d�gS )Nr   r„   r…   )rJ   rK   ÚgetValueCountForTermr
   ÚvalueCountForTerm)r   r7   rT   Úcounts       r   Ú_generateTermValueCountz(BrailleGenerator._generateTermValueCount\  sF   € Ø—‘×&Ñ&×;Ñ;¸CÓ@ˆØ�1Š9ØˆIà”H×.Ñ.¨uÓ5Ð6°aÐ8Ð9Ð9r   c                 ó:  — t        j                  |«      sg S | j                  j                  j	                  |«      }|r||gk(  rg S g }|D ]M  }| j                  |d¬«      }|sŒ|j                  |«       |j                  t        j                  d«      «       ŒO |S ©NF)r’   r   )
r   Úis_status_barrJ   rK   ÚstatusBarItemsrH   rj   rh   r   r,   )r   r7   rT   r«   rU   ÚchildÚchildResults          r   Ú_generateStatusBarz#BrailleGenerator._generateStatusBarc  s�   € Ü×(Ñ(¨Ô-ØˆIà—‘×&Ñ&×5Ñ5°cÓ:ˆÙ˜ # šØˆIàˆØò 	3ˆEØŸ-™-¨¸e˜-ÓDˆKÚØ—‘˜kÔ*Ø—‘œgŸn™n¨SÓ1Õ2ð		3ð ˆr   c                 ó  — t        j                  t        j                  |«      «      sg S g }t        j                  |«      D ]H  }|j                  | j                  |d¬«      «       |j                  t        j                  d«      «       ŒJ |S r´   )
r   rg   r   rN   Úget_all_widgetsrj   rH   rh   r   r,   )r   r7   rT   rU   Úwidgets        r   Ú_generateListBoxItemWidgetsz,BrailleGenerator._generateListBoxItemWidgetst  st   € Ü×&Ñ&¤x×':Ñ':¸3Ó'?Ô@ØˆIàˆÜ!×1Ñ1°#Ó6ò 	/ˆFØ�M‰M˜$Ÿ-™-¨¸u˜-ÓEÔFØ�M‰Mœ'Ÿ.™.¨Ó-Õ.ð	/ð ˆr   c                 ó´   — |j                  d«      r | j                  |fi |¤Žsg S | j                  «       \  }}}||k7  r| j                  |«      \  }}|› gS g S )Nr[   )rG   Ú_shouldPresentProgressBarUpdateÚ_getMostRecentProgressBarUpdateÚgetProgressBarNumberAndCount)r   r7   rT   ÚaccÚ
updateTimeÚupdateValueÚnumberr±   s           r   Ú_generateProgressBarIndexz*BrailleGenerator._generateProgressBarIndex~  sh   € Ø�x‰xÐ-Ô.Ø6�$×6Ñ6°sÑC¸dÒCØˆIà'+×'KÑ'KÓ'MÑ$ˆˆZ˜Ø�#Š:Ø ×=Ñ=¸cÓB‰MˆF�EØ�h�=Ð àˆ	r   c                 óÌ   — |j                  d«      r | j                  |fi |¤Žsg S  | j                  |fi |¤Ž}|t        j                  «       j                  «       k(  r|sdgS |S )Nr[   Ú )rG   r¿   Ú_generatePercentager   rB   rF   )r   r7   rT   rU   s       r   Ú_generateProgressBarValuez*BrailleGenerator._generateProgressBarValueŠ  sh   € Ø�8‰8Ð)Ô*Ø7�4×7Ñ7¸ÑD¸tÒDØˆIà)�×)Ñ)¨#Ñ6°Ñ6ˆØ”-×*Ñ*Ó,×?Ñ?ÓAÒAÉ&Ø�4ˆKàˆr   c                 ó@   — t        j                  |«      }|�|› d�gS g S )Nú%)r   Úget_value_as_percent)r   r7   rT   Úpercents       r   rÉ   z$BrailleGenerator._generatePercentage•  s+   € Ü×.Ñ.¨sÓ3ˆØÐØ�i˜q�M�?Ð"àˆ	r   c                 ó€   •— t        j                  «       j                  d«      }|€t        ‰| �  «       S t        |«      S )NÚprogressBarBrailleInterval)r   rB   rC   ry   Ú_getProgressBarUpdateIntervalÚint)r   Úintervalr{   s     €r   rÑ   z.BrailleGenerator._getProgressBarUpdateIntervalœ  s;   ø€ Ü#×.Ñ.Ó0×;Ñ;Ð<XÓYˆØÐÜ‘7Ñ8Ó:Ð:ä�8‹}Ðr   c                 ól   •— t        j                  «       j                  d«      syt        ‰| �  |fi |¤ŽS )Nr\   F)r   rB   rC   ry   r¿   )r   r7   rT   r{   s      €r   r¿   z0BrailleGenerator._shouldPresentProgressBarUpdate£  s3   ø€ Ü×*Ñ*Ó,×7Ñ7Ð8SÔTØä‰wÑ6°sÑC¸dÑCÐCr   c                 ó8  — g }| j                   j                  j                  |«      }|D ]%  }|j                   | j                  |fi |¤Ž«        n |sF| j                  d|«      }|j                   | j                  |fi |¤Ž«       | j                  ||«       |S )zåIf this scroll pane is labelled by a page tab, then return the page
        tab information for the braille context instead. Thunderbird
        folder properties is such a case. See bug #507922 for more
        details.
        ÚREAL_ROLE_SCROLL_PANE)rJ   rK   ÚlabelsForObjectrj   rH   Ú_overrideRoleÚ_restoreRole)r   r7   rT   rU   r   r€   ÚoldRoles          r   Ú_generateAsPageTabOrScrollPanez/BrailleGenerator._generateAsPageTabOrScrollPane¯  sœ   € ð ˆØ—‘×'Ñ'×7Ñ7¸Ó<ˆØò 	ˆEØ�M‰M˜-˜$Ÿ-™-¨Ñ6°Ñ6Ô7Ùð	ñ ð ×(Ñ(Ð)@À$ÓGˆGØ�M‰M˜-˜$Ÿ-™-¨Ñ4¨tÑ4Ô5Ø×Ñ˜g tÔ,Øˆr   c                 óð  — |j                  d«      ryt        j                  «       j                  d«      }|s|S | j                  j
                  j                  |«      st        j                  |«      r‚t        j                  |«      d   dk(  }|ret        j                  |t        j                  j                  «      }|r5| j                  j
                  j                  |j!                  d«      «       }|S )z]Returns True or False to indicate whether context should be
        included or not.
        r[   Fr‘   r   r   )rG   r   rB   rC   rJ   rK   Ú
isTextArear   Úis_labelr   Úget_line_at_offsetr   Úget_relationr   ÚRelationTypeÚ
FLOWS_FROMÚ
get_target)r   r7   rT   ÚincludeÚrelations        r   Ú_generateIncludeContextz(BrailleGenerator._generateIncludeContextÆ  sÉ   € ð
 �8‰8Ð)Ô*Øô #×-Ñ-Ó/×:Ñ:Ð;QÓRˆÙØˆNà�<‰<×!Ñ!×,Ñ,¨SÔ1´[×5IÑ5IÈ#Ô5NÜ×/Ñ/°Ó4°QÑ7¸1Ñ<ˆGÙÜ#×0Ñ0°´e×6HÑ6H×6SÑ6SÓT�ÙØ"&§,¡,×"8Ñ"8×"CÑ"CÀH×DWÑDWÐXYÓDZÓ"[Ð[�GØˆr   c                 ó^  — t        j                  «       j                  d«      rg S t        j                  |«      s'| j
                  j                  j                  |«      sg S |j                  dd «      s| j                  |d<   d|d<    | j
                  j                  j                  di |¤ŽgS )NÚdisableBrailleEOLÚmodeÚeolÚ
stringTyper#   )r   rB   rC   r   Úis_editablerJ   rK   ÚisCoderG   Ú_modeÚ
formattingÚ	getString)r   r7   rT   s      r   Ú_generateEolzBrailleGenerator._generateEolä  s‘   € Ü×&Ñ&Ó(×3Ñ3Ð4GÔHØˆIä×'Ñ'¨Ô,°·±×0FÑ0F×0MÑ0MÈcÔ0RØˆIà�x‰x˜ Ô%ØŸ:™:ˆD�‰LØ"ˆˆ\ÑØ1�—‘×'Ñ'×1Ñ1Ñ9°DÑ9Ð:Ð:r   c                 ó0   — |dk(  rt         S t        |«      gS )Nr   )ÚSPACEr   r   s     r   r*   zBrailleGenerator.spaceð  s   € Ø˜ÒÜˆLä˜)Ó$Ð%Ð%r   c                 óà  — d}d }t        |t        «      r|}|S |rÓt        |t        «      rÃ|r.t        |d   t        «      r|dd  }|rt        |d   t        «      rŒ|r.t        |d   t        «      r|dd }|rt        |d   t        «      rŒ|D ]^  }t        |t        «      r|r||j                  z  }d }Œ'| j                  |«      }| j                  j                  j                  |||«      }Œ` |S )NrÈ   r   r   éÿÿÿÿ)	r3   ÚstrrP   r   r   r/   rJ   rK   ÚappendString)r   Úcontentr   ÚcombinedÚpriorÚelements         r   r/   zBrailleGenerator.asStringö  sò   € ØˆØˆÜ�gœsÔ#ØˆHð  ˆñ œ G¬TÔ2ñ œj¨°©´UÔ;Ø! ! "˜+�ñ œj¨°©´UÕ;áœj¨°©´eÔ<Ø! ! B˜-�ñ œj¨°©´eÕ<à"ò 4�Ü˜g¤uÔ-±%Ø × 1Ñ 1Ñ1�HØ ‘Eà ŸM™M¨'Ó2�EØ#Ÿ|™|×5Ñ5×BÑBØ  %¨ó 4‘Hð4ð ˆr   r   )&r   r    r!   r"   r   ra   ÚMENUÚMENU_BARÚPAGE_TAB_LISTrc   rb   Ú	COMBO_BOXr•   r   r0   r9   rY   ru   rq   r‚   rŠ   r�   r£   r­   r²   r¹   r½   rÆ   rÊ   rÉ   rÑ   r¿   rÛ   ræ   rñ   r*   r/   Ú__classcell__)r{   s   @r   r%   r%   7   sÜ   ø„ ñ=ð
  Ÿ*™*Ÿ/™/ØŸ*™*×-Ñ-ØŸ*™*×2Ñ2ØŸ*™*×5Ñ5ØŸ*™*×,Ñ,ØŸ*™*×.Ñ.ð0Ðò>ò	0òNò4'òx#ôJ9ò"òò.ò EòNò$:òò"ò
ò	òôôDòò.ò<
;ó&÷r   r%   )!r"   Ú__id__Ú__version__Ú__date__Ú__copyright__Ú__license__ÚgiÚrequire_versionÚgi.repositoryr   rÈ   r   r   r   r	   r
   r   r   r   Ú	ax_objectr   Úax_textr   Úax_utilitiesr   Úax_valuer   Úbraille_rolenamesr   r   ró   r'   r%   r#   r   r   ú<module>r     sŒ   ðñ( Aà€Ø€Ø€Ø?€Ø€ã 	Ø €× Ñ �7˜EÔ "Ý å Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý %Ý Ý -÷#ñ #ñ 
‹ˆ	€ôS�y×*Ñ*õ Sr   