+
    Qi?  c                  s  a  0 t $ R t^ RIHt RtRtRtRtRt^ RI	t	^ RI
Ht ^ RIt]P                  ! R	R
4       ^ RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIH t  ^RI!H"t" ^RI#H$t$ ]'       d    ]P                  ! RR4       ^ RIH%t% ^R I&H't'  ! R! R"4      t( ! R# R$4      t)](! 4       t*R"]+R%&   R& R' lt,R# )(zModule for flat-review commands)annotationsz$Id$z
$Revision$z$Date$zQCopyright (c) 2005-2008 Sun Microsystems Inc.Copyright (c) 2016-2023 Igalia, S.L.ZLGPLN)TYPE_CHECKINGGtkz3.0)r   )braille)cmdnames)dbus_service)debug)flat_review)focus_manager)	guilabels)input_event)keybindings)messages)script_manager)settings_manager)settings)speech_and_verbosity_manager)AXEventSynthesizer)AXObject)AXTextAtspiz2.0)r   )defaultc                  sl   ] tR t^FtRtR R ltR R ltRpR R lltRqR	 R
 lltR R lt	RrR R llt
R R ltR R ltR R ltR R ltRsR R lltRsR R llt]P$                  RtR R ll4       t]P$                  RuR R ll4       t]P$                  RuR R  ll4       t]P$                  RuR! R" ll4       t]P$                  RuR# R$ ll4       t]P$                  RuR% R& ll4       t]P$                  RuR' R( ll4       t]P$                  RuR) R* ll4       t]P$                  RuR+ R, ll4       t]P$                  RuR- R. ll4       t]P$                  RuR/ R0 ll4       t]P$                  RuR1 R2 ll4       t]P$                  RuR3 R4 ll4       t]P$                  RuR5 R6 ll4       t ]P$                  RuR7 R8 ll4       t!]P$                  RuR9 R: ll4       t"]P$                  RuR; R< ll4       t#]P$                  RuR= R> ll4       t$]P$                  RuR? R@ ll4       t%]P$                  RuRA RB ll4       t&]P$                  RuRC RD ll4       t']P$                  RuRE RF ll4       t(]P$                  RuRG RH ll4       t)]P$                  RuRI RJ ll4       t*]P$                  RuRK RL ll4       t+]P$                  RuRM RN ll4       t,]P$                  RuRO RP ll4       t-]P$                  RuRQ RR ll4       t.RS RT lt/RvRU RV llt0RvRW RX llt1RpRY RZ llt2]P$                  RuR[ R\ ll4       t3]P$                  RuR] R^ ll4       t4]P$                  RuR_ R` ll4       t5]P$                  RuRa Rb ll4       t6]Pn                  Rc Rd l4       t8]Pr                  Re Rf l4       t:]P$                  RuRg Rh ll4       t;RwRi Rj llt<RwRk Rl llt=RwRm Rn llt>Rot?R# )xFlatReviewPresenterz5Provides access to on-screen objects via flat-review.c                   V ^8  d   QhRR/#    returnNone Zformat   "?/usr/lib/python3.14/site-packages/orca/flat_review_presenter.py__annotate__ FlatReviewPresenter.__annotate__I   s     J J$ J    c                	s   R V n         RV n        \        P                  ! 4       P	                  R4      ;'       g    RV n        V P                  R4      V n        \        P                  ! 4       V n
        \        P                  ! 4       V n        R V n        Rp\        P                  ! \        P                  VR4       \         P"                  ! 4       pVP%                  RV 4       R # )N flatReviewIsRestrictedFTz2FLAT REVIEW PRESENTER: Registering D-Bus commands.r   )_context_current_contentsr   get_managerget_setting	_restrictget_handlers	_handlersr   KeyBindings_desktop_bindings_laptop_bindings_guir   print_message
LEVEL_INFOr   Zget_remote_controllerZregister_decorated_module)selfmsgZ
controllers   &  r   __init__ZFlatReviewPresenter.__init__I   s    48&(((*667OPYYTY 	CGCTCTUYCZ:E:Q:Q:S9D9P9P9R15	BE,,c48!779
,,-BDIr"   c               r   r   r   boolr   r   r   r   r    r!   X   s     ) )4 )r"   c                s    V P                   RJ# )z4Returns True if the flat review presenter is active.N)r%   r2      &r   	is_activeZFlatReviewPresenter.is_activeX   s     }}D((r"   Nc                    V ^8  d   QhRRRR/# )r   scriptdefault.Script | Noner   zflat_review.Contextr   r   r   r   r    r!   ]   s     - -,A -M` -r"   c                s`   V P                   '       g   RV P                   2p\        P                  ! \        P                  VR4       V P                  '       dC   \
        P                  ! 4       P                  4       w  r4\        P                  ! WR7      V n         M\        P                  ! V4      V n         \
        P                  ! 4       P                  V P                   P                  4       \
        P                  R7       V P                   # RV P                   2p\        P                  ! \        P                  VR4       \
        P                  ! 4       P                  4       w  r4T;'       g$    \
        P                  ! 4       P                  4       pV\
        P                  8w  d   W@P                   P                  4       8w  dr   V P                  '       g`   RV P                   P                  4       RV.p\        P                  ! \        P                  VR4       V P                   P                  V4       V P                  '       dY   V\
        P                  8w  dD   Rp\        P                  ! \        P                  VR4       \        P                  ! W4      V n         V P                   # )	z;Returns the flat review context, creating one if necessary.z7FLAT REVIEW PRESENTER: Creating new context. Restrict: T)Zrootmodez9FLAT REVIEW PRESENTER: Using existing context. Restrict: z9FLAT REVIEW PRESENTER: Attempting to update location fromZtoz7FLAT REVIEW PRESENTER: Creating new restricted context.)r%   r)   r   r0   r1   r   r'   Z&get_active_mode_and_object_of_interestr   Contextemit_region_changedget_current_objectFLAT_REVIEWget_locus_of_focusprint_tokensZset_current_to_zone_with_object)r2   r;   r3   r>   objtokenss   &&    r   get_or_create_contextZ)FlatReviewPresenter.get_or_create_context]   s    }}}KDNNK[\C 0 0#t<~~~)557^^`	 + 3 3F E + 3 3F ;%%';;0029R9R < T == I$..IYZE,,c48 "--/VVX	EE]..0CCE=,,,8X8X8Z1Z>>>Qmm668$EFu//>MM99#> >>>dm&?&??KC 0 0#t<'//<DM}}r"   c               s$    V ^8  d   QhRRRRRR/# )r   refreshr6   
is_desktopr   zkeybindings.KeyBindingsr   r   r   r   r    r!      s(     % %% % 
!	%r"   c                s   V'       dp   Rp\         P                  ! \         P                  VR4       V P                  P	                  R4       V P
                  P	                  R4       V P                  4        MqV'       d2   V P
                  P                  4       '       d   V P                  4        M8V'       g1   V P                  P                  4       '       d   V P                  4        V'       d   V P
                  # V P                  # )z.Returns the flat-review-presenter keybindings.z+FLAT REVIEW PRESENTER: Refreshing bindings.T)r   r0   r1   r.   Zremove_key_grabsr-   _setup_bindingsZis_empty)r2   rH   rI   r3      &&& r   get_bindingsZ FlatReviewPresenter.get_bindings   s     ?C 0 0#t<!!223`a""334ab  "D22;;==  " 5 5 > > @ @  ")))$$$r"   c               r   )r   r   z(dict[int, input_event.InputEventHandler]r   r   r   r   r    r!      s      &N r"   c                s`   / p V P                   R,          V\        P                  P                  &   V P                   R,          V\        P                  P                  &   V P                   R,          V\        P                  P
                  &   V P                   R,          V\        P                  P                  &   V P                   R,          V\        P                  P                  &   V#   \         d7   pRT.p\        P                  ! \        P                  TR4       / u Rp?# Rp?ii ; i)	z3Returns the flat-review-presenter braille bindings.reviewAboveHandlerreviewBelowHandlertoggleFlatReviewModeHandlerreviewHomeHandlerreviewBottomLeftHandlerz:FLAT REVIEW PRESENTER: Exception getting braille bindings:TN)r+   r   ZbrlapiZKEY_CMD_LNUPZKEY_CMD_LNDNZKEY_CMD_FREEZEZKEY_CMD_TOP_LEFTZKEY_CMD_BOT_LEFTZAttributeErrorr   rD   r1   )r2   ZbindingsZerrorrF   s   &   r   get_braille_bindingsZ(FlatReviewPresenter.get_braille_bindings   s     	34 W^^001 34 W^^001 <= W^^223 23 W^^445 89 W^^445 	  	RTYZFu//>I	s   C&C, ,D-7+D("D-(D-c               r:   )r   rH   r6   r   z(dict[str, input_event.InputEventHandler]r   r   r   r   r    r!      s      D 5] r"   c                s    V'       d9   Rp\         P                  ! \         P                  VR4       V P                  4        V P                  # )z+Returns the flat-review-presenter handlers.z+FLAT REVIEW PRESENTER: Refreshing handlers.T)r   r0   r1   _setup_handlersr+   )r2   rH   r3      && r   r*   Z FlatReviewPresenter.get_handlers   s:     ?C 0 0#t<  "~~r"   c               r   r   r   r   r   r   r    r!      s     & & &r"   c                sF    V P                  4        V P                  4        R# )z/Sets up the flat-review-presenter key bindings.N)_setup_desktop_bindings_setup_laptop_bindingsr7   r8   r   rJ   Z#FlatReviewPresenter._setup_bindings   s     	$$&##%r"   c               r   r   r   r   r   r   r    r!      s     R9 R9 R9r"   c                s   / V n         \        P                  ! V P                  \        P
                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                  \        P                  4      V P                   R&   \        P                  ! V P                   \        P"                  4      V P                   R&   \        P                  ! V P$                  \        P&                  4      V P                   R&   \        P                  ! V P(                  \        P*                  4      V P                   R	&   \        P                  ! V P,                  \        P.                  4      V P                   R
&   \        P                  ! V P0                  \        P2                  4      V P                   R&   \        P                  ! V P4                  \        P6                  4      V P                   R&   \        P                  ! V P8                  \        P:                  4      V P                   R&   \        P                  ! V P<                  \        P>                  4      V P                   R&   \        P                  ! V P@                  \        PB                  4      V P                   R&   \        P                  ! V PD                  \        PF                  4      V P                   R&   \        P                  ! V PH                  \        PJ                  4      V P                   R&   \        P                  ! V PL                  \        PN                  4      V P                   R&   \        P                  ! V PP                  \        PR                  4      V P                   R&   \        P                  ! V PT                  \        PV                  4      V P                   R&   \        P                  ! V PX                  \        PZ                  4      V P                   R&   \        P                  ! V P\                  \        P^                  4      V P                   R&   \        P                  ! V P`                  \        Pb                  4      V P                   R&   \        P                  ! V Pd                  \        Pf                  4      V P                   R&   \        P                  ! V Ph                  \        Pj                  4      V P                   R&   \        P                  ! V Pl                  \        Pn                  4      V P                   R&   \        P                  ! V Pp                  \        Pr                  4      V P                   R&   \        P                  ! V Pt                  \        Pv                  4      V P                   R&   Rp\x        Pz                  ! \x        P|                  VR4       R# ) z7Sets up the flat-review-presenter input event handlers.rO   rP   reviewEndHandlerrQ   reviewPreviousLineHandlerreviewCurrentLineHandlerreviewNextLineHandlerreviewSpellCurrentLineHandler reviewPhoneticCurrentLineHandlerreviewEndOfLineHandlerreviewPreviousItemHandlerreviewCurrentItemHandlerreviewNextItemHandlerreviewSpellCurrentItemHandler reviewPhoneticCurrentItemHandlerreviewPreviousCharacterHandlerreviewCurrentCharacterHandler"reviewSpellCurrentCharacterHandler$reviewUnicodeCurrentCharacterHandlerreviewNextCharacterHandlerreviewCurrentAccessibleHandlerrM   rN   showContentsHandlerflatReviewCopyHandlerflatReviewAppendHandlerflatReviewSayAllHandlerflatReviewToggleRestrictHandlerz'FLAT REVIEW PRESENTER: Handlers set up.TN)?r+   r
   ZInputEventHandlertoggle_flat_review_moder   ZTOGGLE_FLAT_REVIEWgo_homeZREVIEW_HOMEgo_endZ
REVIEW_ENDgo_bottom_leftZREVIEW_BOTTOM_LEFTgo_previous_lineZREVIEW_PREVIOUS_LINEpresent_lineZREVIEW_CURRENT_LINEgo_next_lineZREVIEW_NEXT_LINE
spell_lineZREVIEW_SPELL_CURRENT_LINEphonetic_lineZREVIEW_PHONETIC_CURRENT_LINEgo_end_of_lineZREVIEW_END_OF_LINEgo_previous_itemZREVIEW_PREVIOUS_ITEMpresent_itemZREVIEW_CURRENT_ITEMgo_next_itemZREVIEW_NEXT_ITEM
spell_itemZREVIEW_SPELL_CURRENT_ITEMphonetic_itemZREVIEW_PHONETIC_CURRENT_ITEMgo_previous_characterZREVIEW_PREVIOUS_CHARACTERpresent_characterZREVIEW_CURRENT_CHARACTERspell_characterZREVIEW_SPELL_CURRENT_CHARACTERunicode_current_characterZ REVIEW_UNICODE_CURRENT_CHARACTERgo_next_characterZREVIEW_NEXT_CHARACTERpresent_objectZREVIEW_CURRENT_ACCESSIBLEgo_aboveZREVIEW_ABOVEgo_belowZREVIEW_BELOWshow_contentsZFLAT_REVIEW_SHOW_CONTENTScopy_to_clipboardZFLAT_REVIEW_COPYappend_to_clipboardZFLAT_REVIEW_APPENDsay_allZSAY_ALL_FLAT_REVIEWtoggle_restrictZTOGGLE_RESTRICT_FLAT_REVIEWr   r0   r1   r2   r3      & r   rS   Z#FlatReviewPresenter._setup_handlers   sx     )),,++- 	45 ))$$& 	*+ ))##% 	)* ))##++- 	01 ))%%--/ 	23 ))!!,,. 	12 ))!!))+ 	./ ))224 	67 ))""557 	9: ))##++- 	/0 ))%%--/ 	23 ))!!,,. 	12 ))!!))+ 	./ ))224 	67 ))""557 	9: ))**224 	78 ))&&113 	67 ))$$779 	;< ))..99; 	=> ))&&..0 	34 ))##224 	78 ))%%' 	+, ))%%' 	+, ))""224 	,- ))&&))+ 	./ ))((++- 	01 )),,. 	01 ))$$446 	89
 8E,,c48r"   c               r   r   r   r   r   r   r    r!   [  s     M9 M9 M9r"   c           	     s   \         P                  ! 4       V n        V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R	,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R
,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R ,          ^4      4       V P                  P                  \         P                  ! R!\         P
                  \         P                  V P                  R",          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R$,          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R%,          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R&,          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R',          4      4       R(p\        P                  ! \        P                  VR)4       R*# )+z7Sets up the flat-review-presenter desktop key bindings.ZKP_SubtractrO   ZKP_Addrl   ZKP_HomerP   rX   ZKP_UprY   r[   r\   Z
KP_Page_UprZ   rW   ZKP_Leftr^   rM   ZKP_Beginr_   ra   rb   rh   ZKP_Rightr`   rN   ZKP_Endrc   r]   ZKP_Downrd   re   rf   ZKP_Page_Downrg   r#   ri   rj   rk   rm   z/FLAT REVIEW PRESENTER: Desktop bindings set up.TN)r   r,   r-   add
KeyBindingDEFAULT_MODIFIER_MASKNO_MODIFIER_MASKr+   ORCA_MODIFIER_MASKr   r0   r1   r   r   r   rU   Z+FlatReviewPresenter._setup_desktop_bindings[  s    "-!8!8!:""""11,,<=	?	@ 	""""11,,89	 	""""11..23	5	6 	""""11,,:;	=	> 	""""11,,9:	 	""""11,,>?	 	""""11,,AB	 	""""11,,67	9	: 	""""11..12	4	5 	""""11,,:;	=	> 	""""11..34	6	7 	""""11,,9:	 	""""11,,>?	 	""""11,,AB	 	""""11..?@	B	C 	""""11,,67	9	: 	""""11..34	6	7 	""""11,,?@	B	C 	""""11..78	:	; 	""""11,,>?	 	""""11,,CD	 	""""11,,EF	 	""""11,,;<	>	? 	""""11,,45	7	8 	""""11,,67	9	: 	""""11,,89	;	< 	""""11,,@A	C	D @E,,c48r"   c               r   r   r   r   r   r   r    r!   *  s     M9 M9 M9r"   c           	     s   \         P                  ! 4       V n        V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R	,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R
,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R,          ^4      4       V P                  P                  \         P                  ! R\         P
                  \         P                  V P                  R ,          ^4      4       V P                  P                  \         P                  ! R!\         P
                  \         P                  V P                  R",          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R$,          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R%,          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R&,          4      4       V P                  P                  \         P                  ! R#\         P
                  \         P                  V P                  R',          4      4       R(p\        P                  ! \        P                  VR)4       R*# )+z6Sets up the flat-review-presenter laptop key bindings.ZprO   Z	semicolonrl   ZurX   rP   ZirY   r[   r\   ZorZ   rW   Zjr^   rM   Zkr_   ra   rb   rh   Zlr`   rN   Zmrc   r]   Zcommard   re   rf   Zperiodrg   r#   ri   rj   rk   rm   z.FLAT REVIEW PRESENTER: Laptop bindings set up.TN)r   r,   r.   r   r   r   r   r+   ZORCA_CTRL_MODIFIER_MASKr   r   r0   r1   r   r   r   rV   Z*FlatReviewPresenter._setup_laptop_bindings*  s    !, 7 7 9!!""11..<=	?	@ 	!!""11..89	 	!!""11..:;	=	> 	!!""113323	5	6 	!!""11..9:	 	!!""11..>?	 	!!""11..AB	 	!!""11..67	9	: 	!!""113312	4	5 	!!""11..:;	=	> 	!!""113334	6	7 	!!""11..9:	 	!!""11..>?	 	!!""11..AB	 	!!""1133?@	B	C 	!!""11..67	9	: 	!!""113334	6	7 	!!""11..?@	B	C 	!!""113378	:	; 	!!""11..>?	 	!!""11..CD	 	!!""11..EF	 	!!""11..;<	>	? 	!!""11,,45	7	8 	!!""11,,67	9	: 	!!""11,,89	;	< 	!!""11,,@A	C	D ?E,,c48r"   c               $    V ^8  d   QhRRRRRR/# r   r;   r<   eventinput_event.InputEvent | Noner   r   r   r   r   r   r    r!     s(     / /%/ -/ 
	/r"   c                s   V P                   '       d+   Rp\        P                  ! \        P                  VR4       R# Rp\        P                  ! \        P                  VR4       Vf$   \        P
                  ! 4       P                  4       pV P                  V4       Vf   R# \        P
                  ! 4       P                  R4      \        P                  8w  d    VP                  \        P                  4       V P                  W4       R# )zStarts flat review.z-FLAT REVIEW PRESENTER: Already in flat reviewTNz+FLAT REVIEW PRESENTER: Starting flat reviewspeechVerbosityLevel)r%   r   r0   r1   r   r'   Zget_active_scriptrG   r   r(   r   VERBOSITY_LEVEL_BRIEFpresent_messager   ZFLAT_REVIEW_START_item_presentation)r2   r;   r   r3   rK   r   startZFlatReviewPresenter.start  s     ===AC 0 0#t<;E,,c48>#//1CCEF 	""6*='')556LM,,-""8#=#=>.r"   c               r   r   r   r   r   r   r    r!     s(     % %%% -% 
	%r"   c                sd   V P                   f+   Rp\        P                  ! \        P                  VR4       R# Rp\        P                  ! \        P                  VR4       RV n         \        P
                  ! 4       P                  4       p\        P
                  ! 4       P                  V\        P                  R7       Ve   Vf   R# \        P
                  ! 4       P                  R4      \        P                  8w  d    VP                  \        P                  4       VP!                  V4       R# )zQuits flat review.Nz)FLAT REVIEW PRESENTER: Not in flat reviewTz+FLAT REVIEW PRESENTER: Quitting flat reviewr=   r   )r%   r   r0   r1   r   r'   rC   r@   ZFOCUS_TRACKINGr   r(   r   r   r   r   ZFLAT_REVIEW_STOPZupdate_braille)r2   r;   r   r3   focuss   &&&  r   quitZFlatReviewPresenter.quit  s     == =C 0 0#t<;E,,c48))+>>@!!#77MD`D`7a=FN'')556LM,,-""8#<#<=e$r"   c               (    V ^8  d   QhRRRRRRRR/# )r   r;   r<   r   r   notify_userr6   r   r   r   r   r   r    r!   0  s2      % - 	
 
r"   c                s    RVRVRV.p\         P                  ! \         P                  VR4       V P                  4       '       d   V P	                  W4       R# V P                  W4       R# )z9Toggles between flat review mode and focus tracking mode.z7FLAT REVIEW PRESENTER: toggle_flat_review_mode. Script:Event:notify_user:T)r   rD   r1   r9   r   r   r2   r;   r   r   rF      &&&& r   rn   Z+FlatReviewPresenter.toggle_flat_review_mode/  s^     LVE>;@5++VT:>>IIf$

6!r"   c               r   r   r;   default.Scriptr   r   r   r6   r   r   r   r   r   r    r!   D  2       - 	
 
r"   c                   RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        V P                  P                  \        P                  P                  4       V P                  W4       R# )z,Moves to the top left of the current window.z'FLAT REVIEW PRESENTER: go_home. Script:r   r   T)
r   rD   r1   rG   r%   go_to_start_ofr   r?   WINDOWrs   r   r   r   ro   ZFlatReviewPresenter.go_homeC  ss     <VE>;@5++VT:226:$$[%8%8%?%?@&(r"   c               r   r   r   r   r   r   r    r!   V  r   r"   c                r   )z0Moves to the bottom right of the current window.z&FLAT REVIEW PRESENTER: go_end. Script:r   r   T)
r   rD   r1   rG   r%   go_to_end_ofr   r?   r   rs   r   r   r   rp   ZFlatReviewPresenter.go_endU  ss     ;FE>;@5++VT:226:"";#6#6#=#=>&(r"   c               r   r   r   r   r   r   r    r!   h  2       - 	
 
r"   c                s|   RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        V P                  P                  \        P                  P                  4       V P                  P                  \        P                  P                  4       V P                  W4       R# )z/Moves to the bottom left of the current window.z.FLAT REVIEW PRESENTER: go_bottom_left. Script:r   r   T)r   rD   r1   rG   r%   r   r   r?   r   r   LINErs   r   r   r   rq   Z"FlatReviewPresenter.go_bottom_leftg  s     CFE>;@5++VT:226:"";#6#6#=#=>$$[%8%8%=%=>&(r"   c               r   r   r   r   r   r   r    r!   {  r   r"   c                    RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        V P                  P                  4       '       d   V P                  W4       R# )zMoves to the previous line.z0FLAT REVIEW PRESENTER: go_previous_line. Script:r   r   T)r   rD   r1   rG   r%   rr   rs   r   r   r   rr   Z$FlatReviewPresenter.go_previous_linez  i     EfE>;@5++VT:226:==))++f,r"   c               r   r   r   r   r   r   r    r!     2       - 	
 
r"   c                    RVRVRV.p\         P                  ! \         P                  VR4       V P                  W^4       R# )Presents the current line.z,FLAT REVIEW PRESENTER: present_line. Script:r   r   Tr   rD   r1   _line_presentationr   r   r   rs   Z FlatReviewPresenter.present_line  F     A&E>;@5++VT:q1r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )zMoves to the next line.z,FLAT REVIEW PRESENTER: go_next_line. Script:r   r   T)r   rD   r1   rG   r%   rt   rs   r   r   r   rt   Z FlatReviewPresenter.go_next_line  i     A&E>;@5++VT:226:==%%''f,r"   c               r   r   r   r   r   r   r    r!     r   r"   c                    RVRVRV.p\         P                  ! \         P                  VR4       V P                  W^4       R# )z+Presents the current line letter by letter.z*FLAT REVIEW PRESENTER: spell_line. Script:r   r   Tr   r   r   r   ru   ZFlatReviewPresenter.spell_line  E     ?E>;@5++VT:q1r"   c               r   r   r   r   r   r   r    r!     r   r"   c                    RVRVRV.p\         P                  ! \         P                  VR4       V P                  W^4       R# )z8Presents the current line letter by letter phonetically.z-FLAT REVIEW PRESENTER: phonetic_line. Script:r   r   Tr   r   r   r   rv   Z!FlatReviewPresenter.phonetic_line  F     B6E>;@5++VT:q1r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )z+Moves to the beginning of the current line.z0FLAT REVIEW PRESENTER: go_start_of_line. Script:r   r   T)
r   rD   r1   rG   r%   r   r   r?   r   r~   r   r   r   go_start_of_lineZ$FlatReviewPresenter.go_start_of_line  st     EfE>;@5++VT:226:$$[%8%8%=%=>v-r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )zMoves to the end of the line.z.FLAT REVIEW PRESENTER: go_end_of_line. Script:r   r   T)
r   rD   r1   rG   r%   r   r   r?   r   r~   r   r   r   rw   Z"FlatReviewPresenter.go_end_of_line  st     CFE>;@5++VT:226:"";#6#6#;#;<v-r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )z#Moves to the previous item or word.z0FLAT REVIEW PRESENTER: go_previous_item. Script:r   r   T)r   rD   r1   rG   r%   Zgo_previous_wordry   r   r   r   rx   Z$FlatReviewPresenter.go_previous_item  r   r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )Presents the current item/word.z,FLAT REVIEW PRESENTER: present_item. Script:r   r   Tr   rD   r1   r   r   r   r   ry   Z FlatReviewPresenter.present_item  r   r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )zMoves to the next item or word.z,FLAT REVIEW PRESENTER: go_next_item. Script:r   r   T)r   rD   r1   rG   r%   Zgo_next_wordry   r   r   r   rz   Z FlatReviewPresenter.go_next_item  r   r"   c               r   r   r   r   r   r   r    r!   '  r   r"   c                r   )z0Presents the current item/word letter by letter.z*FLAT REVIEW PRESENTER: spell_item. Script:r   r   Tr   r   r   r   r{   ZFlatReviewPresenter.spell_item&  r   r"   c               r   r   r   r   r   r   r    r!   7  r   r"   c                r   )z8Presents the current word letter by letter phonetically.z-FLAT REVIEW PRESENTER: phonetic_item. Script:r   r   Tr   r   r   r   r|   Z!FlatReviewPresenter.phonetic_item6  r   r"   c               r   r   r   r   r   r   r    r!   G  r   r"   c                r   )z Moves to the previous character.z5FLAT REVIEW PRESENTER: go_previous_character. Script:r   r   T)r   rD   r1   rG   r%   r}   r~   r   r   r   r}   Z)FlatReviewPresenter.go_previous_characterF  si     J6E>;@5++VT:226:==..00""61r"   c               r   r   r   r   r   r   r    r!   Y  r   r"   c                r   )Presents the current character.z1FLAT REVIEW PRESENTER: present_character. Script:r   r   Tr   rD   r1   _character_presentationr   r   r   r~   Z%FlatReviewPresenter.present_characterX  sF     FvE>;@5++VT:$$VA6r"   c               r   r   r   r   r   r   r    r!   i  r   r"   c                r   )zMoves to the next character.z1FLAT REVIEW PRESENTER: go_next_character. Script:r   r   T)r   rD   r1   rG   r%   r   r~   r   r   r   r   Z%FlatReviewPresenter.go_next_characterh  si     FvE>;@5++VT:226:==**,,""61r"   c               r   r   r   r   r   r   r    r!   {  r   r"   c                r   )z,Presents the current character phonetically.z/FLAT REVIEW PRESENTER: spell_character. Script:r   r   Tr   r   r   r   r   Z#FlatReviewPresenter.spell_characterz  sF     DVE>;@5++VT:$$VA6r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )z/Presents the current character's unicode value.z9FLAT REVIEW PRESENTER: unicode_current_character. Script:r   r   Tr   r   r   r   r   Z-FlatReviewPresenter.unicode_current_character  sF     NvE>;@5++VT:$$VA6r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )zMoves to the character above.z(FLAT REVIEW PRESENTER: go_above. Script:r   r   T)r   rD   r1   rG   r%   Zgo_upry   r   r   r   r   ZFlatReviewPresenter.go_above  sh     =fE>;@5++VT:226:==  f,r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )zMoves to the character below.z(FLAT REVIEW PRESENTER: go_below. Script:r   r   T)r   rD   r1   rG   r%   Zgo_downry   r   r   r   r   ZFlatReviewPresenter.go_below  sh     =fE>;@5++VT:226:==  ""f,r"   c               (    V ^8  d   QhRRRRRRRR/# )	r   r;   r   r   r   r   r6   r   zAtspi.Accessibler   r   r   r   r    r!     s2     2 22 -2 	2
 
2r"   c                s    RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        V P                  P                  4       # )z&Returns the current accessible object.z2FLAT REVIEW PRESENTER: get_current_object. Script:r   r   T)r   rD   r1   rG   r%   rA   r   r   r   rA   Z&FlatReviewPresenter.get_current_object  sX     GE>;@5++VT:226:}}//11r"   c               r   r   r   r   r   r   r    r!     s2       - 	
 
r"   c                s   RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        \        V\        P                  4      '       g,   VP                  V P                  P                  4       RR7       \        P                  ! 4       P                  V P                  P                  4       \        P                  R7       R# )z'Presents the current accessible object.z.FLAT REVIEW PRESENTER: present_object. Script:r   r   T)Z
speechonlyr=   )r   rD   r1   rG   r%   
isinstancer
   BrailleEventr   rA   r   r'   r@   rB   r   r   r   r   Z"FlatReviewPresenter.present_object  s     CFE>;@5++VT:226:%!9!9::!!$--"B"B"DQU!V!!#77MM,,.]5N5N 	8 	Pr"   c               r   r   r   r   r   r   r    r!     2     7 77 -7 	7
 
7r"   c                sl   RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        V P                  P                  4       pV P                  P                  4       pV^ 8  d    \        P                  ! WV^4      '       d   R# \        P                  ! V^4      # )z>Attempts to synthesize a left click on the current accessible.z4FLAT REVIEW PRESENTER: left_click_on_object. Script:r   r   T
r   rD   r1   rG   r%   rA   get_current_text_offsetr   Zclick_characterZclick_objectr2   r;   r   r   rF   rE   Zoffset   &&&&   r   left_click_on_objectZ(FlatReviewPresenter.left_click_on_object  s     I&E>;@5++VT:226:mm..0668Q;-==c1MM!..sA66r"   c               r   r   r   r   r   r   r    r!     r   r"   c                sl   RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        V P                  P                  4       pV P                  P                  4       pV^ 8  d    \        P                  ! WV^4      '       d   R# \        P                  ! V^4      # )z?Attempts to synthesize a right click on the current accessible.z5FLAT REVIEW PRESENTER: right_click_on_object. Script:r   r   Tr   r   r   r   right_click_on_objectZ)FlatReviewPresenter.right_click_on_object  s     J6E>;@5++VT:226:mm..0668Q;-==c1MM!..sA66r"   c               r   r   r   r   r   r   r    r!     r   r"   c                sh   RVRVRV.p\         P                  ! \         P                  VR4       V P                  V4      V n        V P                  P                  4       pV P                  P                  4       pV^ 8  d   \        P                  ! WV4      '       d   R# \        P                  ! V4      # )z3Routes the mouse pointer to the current accessible.z7FLAT REVIEW PRESENTER: route_pointer_to_object. Script:r   r   T)
r   rD   r1   rG   r%   rA   r   r   Zroute_to_characterZroute_to_objectr   r   r   route_pointer_to_objectZ+FlatReviewPresenter.route_pointer_to_object  s     LVE>;@5++VT:226:mm..0668Q;-@@MM!11#66r"   c               r:   )r   r;   r   r   r   r   r   r   r   r    r!     s      n  r"   c                st   \         P                  ! 4       P                  R4      '       gS   \         P                  ! 4       P                  R4      '       g)   \        P                  ! \        P
                  RR4       R# V P                  V4      V n        V P                  P                  4       w  r#V'       g   \        P                  ! R4       R# \        P                  ! 4       pVP                  V4       \        P                  ! V.4       \        P                  ! V4       \        P                  ! R4       R# )zOObtains the braille regions for the current flat review line and displays them.ZenableBrailleZenableBrailleMonitorzBRAILLE: update review disabledTN)r   r'   r(   r   r0   r1   rG   r%   Zget_current_braille_regionsr   rH   ZLineZadd_regionsZ	set_linesZsetFocus)r2   r;   ZregionsZfocused_regionZlines   &&   r   _update_brailleZ#FlatReviewPresenter._update_braille  s      ++-99/JJ#//1==>TUU 0 02SUYZ226:"&--"K"K"MOOD!||~!4&!(r"   c               r   	r   r;   r   _eventr   
pan_amountintr   r6   r   r   r   r   r    r!   4  s2       . 	
 
r"   c                s   V P                  V4      V n        \        P                  '       da   V P                  P	                  \
        P                  P                  4       V P                  P                  4        V P                  V4       R# \        P                  ! V4       \        P                  ! ^4      w  rEV'       dJ   \        VR4      '       g8   \        P                  ! ^4      '       g   M\        P                  ! ^4      w  rEKQ  V'       ds   \        VR4      '       ga   V P                  P	                  \
        P                  P                  4       V P                  P                  4        V P                  V4       R# V'       dJ   \        VR4      '       d8   V P                  P                  VP                  V4       V P                  V4       R# )zPans the braille display left.Tzone)rG   r%   r   ZbeginningIsShowingr   r   r?   r   r}   r   ZpanLeftgetRegionAtCellhasattrset_current_zoner   r2   r;   r   r   Zbraille_regionZoffset_in_zone   &&&&  r   pan_braille_leftZ$FlatReviewPresenter.pan_braille_left4  s>    226:%%%MM(()<)<)A)ABMM//1  (
#)0)@)@)C&W^V%D%D??1%%-4-D-DQ-G*NN'.&"A"AMM(()<)<)A)ABMM//1  (gnf==MM**>+>+>O  (r"   c               r   r   r   r   r   r   r    r!   V  s2       . 	
 
r"   c                s   V P                  V4      V n        \        P                  '       d.   V P                  P	                  4        V P                  V4       R# \        P                  ! V4       \        P                  ! ^4      w  rEV'       dJ   \        VR4      '       g8   \        P                  ! ^4      '       g   M\        P                  ! ^4      w  rEKQ  V'       d@   \        VR4      '       g.   V P                  P	                  4        V P                  V4       R# V'       dJ   \        VR4      '       d8   V P                  P                  VP                  V4       V P                  V4       R# )zPans the braille display right.Tr   )rG   r%   r   ZendIsShowingrt   r   ZpanRightr   r   r   r   r   r   r   pan_braille_rightZ%FlatReviewPresenter.pan_braille_rightV  s    226:MM&&(  ($)0)@)@)C&W^V%D%D##A&&-4-D-DQ-G*NN'.&"A"AMM&&(  (gnf==MM**>+>+>O  (r"   c               r   )r   r;   r   r   r   r   z+tuple[list[str], tuple[int, int, int, int]]r   r   r   r   r    r!   u  s(       . 
5	r"   c                s   . pV P                  V4      V n        V P                  P                  4       pV P                  P                  \        P
                  P                  4       V P                  P                  4       pVea   VP                  VP                  R4      4       V P                  P                  4       '       g    W43# V P                  P                  4       pKd  W43# )z2Returns a (textual lines, current location) tuple.
)rG   r%   Zget_current_locationr   r   r?   r   get_current_line_stringZappendrstriprt   )r2   r;   r   lineslocationstrings   &&&   r   _get_all_linesZ"FlatReviewPresenter._get_all_linesu  s     226:==557$$[%8%8%?%?@668 LLt,-==--// ]]::<Fr"   c               r   r   r   r   r   r   r    r!     r   r"   c                s&   RVRVRV.p\         P                  ! \         P                  VR4       V P                  W4      ^ ,           FF  pVP	                  4       '       d   K  VP                  WQP                  P                  VR7      4       KH  	  R# )z)Speaks the contents of the entire window.z'FLAT REVIEW PRESENTER: say_all. Script:r   r   Tr   )r   rD   r1   r   isspacespeak_messagespeech_generatorvoice)r2   r;   r   r   rF   r   r   r   r   ZFlatReviewPresenter.say_all  s     <VE>;@5++VT:))&8;;F>>##$$V-D-D-J-JRX-J-YZ < r"   c               r   r   r   r   r   r   r    r!     s2       - 	
 
r"   c                s    RVRVRV.p\         P                  ! \         P                  VR4       V P                  W4      w  rVRP	                  V4      p\
        P                  p\        WWv4      V n        V P                  P                  4        R# )z8Displays the entire flat review contents in a text view.z-FLAT REVIEW PRESENTER: show_contents. Script:r   r   Tr   )
r   rD   r1   r   Zjoinr	   ZFLAT_REVIEW_CONTENTSFlatReviewContextGUIr/   show_gui)	r2   r;   r   r   rF   r   r   texttitles	   &&&&     r   r   Z!FlatReviewPresenter.show_contents  s     B6E>;@5++VT:--f<yy..(G			r"   c               r   r   r   r   r   r   r    r!     2       - 	
 
r"   c                   RVRVRV.p\         P                  ! \         P                  VR4       V P                  4       '       g*   V'       d    VP	                  \
        P                  4       R# VP                  4       P                  V P                  P                  R4      4       V'       d    VP	                  \
        P                  4       R# )z2Copies the string just presented to the clipboard.z1FLAT REVIEW PRESENTER: copy_to_clipboard. Script:r   r   Tr   )r   rD   r1   r9   r   r   FLAT_REVIEW_NOT_INget_clipboard_presenterset_textr&   r   ZFLAT_REVIEW_COPIEDr   r   r   r   Z%FlatReviewPresenter.copy_to_clipboard  s     FvE>;@5++VT:~~&&x'B'BC&&(11$2H2H2O2OPT2UV""8#>#>?r"   c               r   r   r   r   r   r   r    r!     r   r"   c                r   )z3Appends the string just presented to the clipboard.z3FLAT REVIEW PRESENTER: append_to_clipboard. Script:r   r   Tr   )r   rD   r1   r9   r   r   r   r   Zappend_textr&   r   ZFLAT_REVIEW_APPENDEDr   r   r   r   Z'FlatReviewPresenter.append_to_clipboard  s     HE>;@5++VT:~~&&x'B'BC&&(44T5K5K5R5RSW5XY""8#@#@Ar"   c               r   r5   r   r   r   r   r    r!     s     T T4 Tr"   c                sJ    \         P                  ! 4       P                  R4      # )z@Returns whether flat review is restricted to the current object.r$   )r   r'   r(   r7   r8   r   get_is_restrictedZ%FlatReviewPresenter.get_is_restricted  s      ++-99:RSSr"   c               s     V ^8  d   QhRRRR/# )r   valuer6   r   r   r   r   r   r    r!     s      t  r"   c                s    RV R2p\         P                  ! \         P                  VR4       \        P                  ! 4       P                  RV4       R# )z=Sets whether flat review is restricted to the current object.z0FLAT REVIEW PRESENTER: Setting is-restricted to Z.Tr$   )r   r0   r1   r   r'   set_setting)r2   r   r3   rT   r   set_is_restrictedZ%FlatReviewPresenter.set_is_restricted  sH     AqIE,,c48$$&223KUSr"   c               r   r   r   r   r   r   r    r!     s2       - 	
 
r"   c                s   RVRVRV.p\         P                  ! \         P                  VR4       V P                  '       * V n        \        P
                  ! 4       P                  RV P                  4       V P                  '       d)   V'       d    VP                  \        P                  4       M'V'       d    VP                  \        P                  4       V P                  4       '       d   RV n        V P                  4        R# )z>Toggles the restricting of flat review to the current object. z/FLAT REVIEW PRESENTER: toggle_restrict. Script:r   r   Tr$   N)r   rD   r1   r)   r   r'   r   r   r   ZFLAT_REVIEW_RESTRICTEDZFLAT_REVIEW_UNRESTRICTEDr9   r%   r   r   r   r   r   Z#FlatReviewPresenter.toggle_restrict  s     DVE>;@5++VT:!^^+$$&223KT^^\>>>&&x'F'FG&&x'H'HI>> DMJJLr"   c               r   	r   r;   r   r   r   speech_typer   r   r6   r   r   r   r   r    r!   	  s2     ! !! -! 	!
 
!r"   c                s   V P                  V4      V n        V P                  P                  4       pVP                  P	                  VR7      p\        V\        P                  4      '       Eg   V'       d   VR8X  d!   VP                  \        P                  4       MVP                  4       '       d!   VP                  \        P                  4       MVP                  4       '       d!   V^8  g   V^8  d   VP                  WE4       MV^8X  d   VP                  V4       MiV^8X  d   VP                  V4       MP\         P"                  ! 4       pVP%                  V P                  P'                  4       V4      pVP                  WE4       \(        P"                  ! 4       P+                  V P                  P'                  4       \(        P,                  R7       V P/                  V4       W@n        R# )r   r   r   r=   T)rG   r%   r   r   r   r   r
   r   r   r   BLANKr   WHITE_SPACEisupperr{   spell_phoneticallyr   r'   adjust_for_presentationrA   r   r@   rB   r   r&   )r2   r;   r   r   line_stringr   managerr   r   r   Z&FlatReviewPresenter._line_presentation	  ss    226:mm;;=''--[-A%!9!9::+"5$$X^^4$$&&$$X%9%9:$$&&K!O{Q$$[8!!!+.!))+66BBD%==MM446E$$[8!!#77MM,,.]5N5N 	8 	PV$!,r"   c               r   r   r   r   r   r   r    r!   ,  s2     $ $$ -$ 	$
 
$r"   c                sd   V P                  V4      V n        V P                  P                  4       pVP                  P	                  VR7      p\        V\        P                  4      '       Eg`   V'       d   VR8X  d"   VP                  \        P                  4       EM/V P                  P                  4       pVR8X  d!   VP                  \        P                  4       MVP                  4       '       d!   VP                  \        P                  4       MVP                  4       '       d   V^8X  d   VP                  WE4       MV^8X  d   VP                  V4       MpV^8X  d   VP!                  V4       MWV^8X  dQ   \"        P$                  ! 4       pVP'                  V P                  P)                  4       V4      pVP                  WE4       \*        P$                  ! 4       P-                  V P                  P)                  4       \*        P.                  R7       V P1                  V4       W@n        R# )r   r   r   r=   T)rG   r%   Zget_current_word_stringr   r   r   r
   r   r   r   r   r   r   r   r   r{   r   r   r'   r   rA   r   r@   rB   r   r&   )r2   r;   r   r   Zword_stringr   r   r   s   &&&&    r   r   Z&FlatReviewPresenter._item_presentation,  s    226:mm;;=''--[-A%!9!9::+"5$$X^^4"mmCCE$&((8 ((**(()=)=> ((**{a/?((< A%%%k2 A%--k: A%:FFHG")"A"A88:K#IK((<!!#77MM,,.]5N5N 	8 	PV$!,r"   c               r   r   r   r   r   r   r    r!   R  s2     " "" -" 	"
 
"r"   c                s   \         P                  ! 4       P                  4       pV P                  '       g;   \        P
                  ! V4      '       d   \        P                  ! V4      ^ ,          pM0V P                  V4      V n        V P                  P                  4       p\        V\        P                  4      '       g   V'       g!   VP                  \        P                  4       MVR8X  d(   V^8w  d!   VP                  \        P                  4       McV^8X  d3   VP                  \        P                   \#        V4      R ,          4       M*V^8X  d   VP%                  V4       MVP'                  V4       V P                  '       g   R# \         P                  ! 4       P)                  V P                  P+                  4       \         P,                  R7       V P/                  V4       WPn        R# )r   r   Z04xTr=   )r   r'   rC   r%   r   Zsupports_textr   Zget_character_at_offsetrG   Zget_current_character_stringr   r
   r   r   r   r   ZUNICODEZordr   Zspeak_characterr@   rA   rB   r   r&   )r2   r;   r   r   r   Zchar_stringr   r   r   Z+FlatReviewPresenter._character_presentationR  s^    ))+>>@}}}!7!7!>!> 88?BK 66v>DM--DDFK%!9!9::$$X^^4$&;!+;((8 A%(()9)9s;?OPS>T)UV A%--k:**;7}}}!!#77MM,,.]5N5N 	8 	PV$!,r"   )r%   r&   r-   r/   r+   r.   r)   N)FT)F)NN)NNF)NT)Ni    )Ni   )@__name__
__module____qualname____firstlineno____doc__r4   r9   rG   rL   rR   r*   rJ   rS   rU   rV   r   r   r   Zcommandrn   ro   rp   rq   rr   rs   rt   ru   rv   r   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   rA   r   r   r   r   r   r   r   r   r   r   r   r   Zgetterr   Zsetterr   r   r   r   r   __static_attributes__r   r"   r   r   r   F   s   ?J)
-^%,*&R9hM9^M9^/8%4  &  "  "  $  "    "      "  "  "    "      "    "      "  " 2 2  ( 7 7& 7 7& 7 7&*D>&  $  &  ,  , T T
    8!F$L" "r"   r   c                  sJ    ] tR tRtRtR R ltR R ltR R ltR	 R
 ltRt	R# )r   iv  z6Presents the entire flat review context in a text viewc          
     s,    V ^8  d   QhRRRRRRRRRR	/# )
r   r;   r   r   strr   r   tuple[int, int, int, int]r   r   r   r   r   r   r    !FlatReviewContextGUI.__annotate__y  sC     K KK K 	K
 ,K 
Kr"   c                	s@    Wn         V P                  W#V4      V n        R # r   )_script_create_dialogr/   )r2   r;   r   r   r   s   &&&&&r   r4   ZFlatReviewContextGUI.__init__y  s     (. $ 3 3E J	r"   c               s(    V ^8  d   QhRRRRRRRR/# )r   r   r   r   r   r   r   
Gtk.Dialogr   r   r   r   r    r    s2     / // / ,	/
 
/r"   c                s   \         P                  ! VR\         P                  P                  \         P                  \         P
                  P                  34      pVP                  RR4       \         P                  ! 4       pVP                  \         P                  P                  \         P                  P                  4       VP                  R4       VP                  R4       \         P                  ! 4       pVP                  V4       Vw  rxrVP!                  4       pVP#                  V4       \%        V	4       FQ  pVP'                  4        VP)                  4       P+                  4       '       d   K9  VP-                  4       '       d   K>  KS  	  VP/                  4       '       g   VP-                  4       '       d   K.   VP1                  V
4       VP3                  V4       \         P4                  ! VR7      pVP7                  \         P8                  P:                  4       VP=                  V4       VP?                  4       PA                  VRR^ 4       VPC                  RV PD                  4       V# )zCreates the dialog.Ni   iX  T)Zbufferresponse)#r   ZDialogZDialogFlagsZMODALZSTOCK_CLOSEResponseTypeCLOSEZset_default_sizeZScrolledWindowZ
set_policyZ
PolicyTypeZ	AUTOMATICZset_hexpandZset_vexpandZ
TextBufferr   Zget_start_iterZforward_linesZrangeZforward_word_endZget_charr   Zforward_charZstarts_wordZforward_charsZplace_cursorZTextViewZset_wrap_modeZWrapModeZWORDr   Zget_content_areaZ
pack_startZconnecton_response)r2   r   r   r   ZdialogZscrolled_windowZ
textbufferZ
line_indexZ_zone_indexZ
word_indexZ
char_indexZ
start_iterZ_Ztextviews   &&&&          r   r  Z#FlatReviewContextGUI._create_dialog  s    E OO11 __c.>.>.D.DEG 	S),,.""3>>#;#;S^^=U=UV##D)##D)^^%
D!:B7
..0
  ,z"A'') !))+3355!..00 # ((****,,  ,
+<<z2s||001H%!,,_dD!Lz4#3#34r"   c               r   )r   _dialogr  r  zGtk.ResponseTyper   r   r   r   r   r   r    r    s"        :  9I  d  r"   c                s|    V\         P                  P                  8X  d   V P                  P	                  4        R# R# )z0Handler for the 'response' signal of the dialog.N)r   r  r  r/   Zdestroy)r2   r	  r  s   &&&r   r  Z FlatReviewContextGUI.on_response  s-     s''---II .r"   c               r   r   r   r   r   r   r    r    s     1 1$ 1r"   c                s    V P                   P                  4        V P                   P                  \        P                  ! 4       4       R# )zShows the dialog.N)r/   Zshow_allZpresent_with_timetimer7   r8   r   r   ZFlatReviewContextGUI.show_gui  s,     					##DIIK0r"   )r/   r  N)
r   r   r   r   r   r4   r  r  r   r   r   r"   r   r   r   v  s     @K/b 1 1r"   r   
_presenterc               r   )r   r   r   r   r   r   r   r    r      s      * r"   c                 s    \         # )z!Returns the Flat Review Presenter)r  r   r"   r   get_presenterr    s
     r"   )-__conditional_annotations__r   Z
__future__r    Z__id__Z__version__Z__date__Z__copyright__Z__license__r
  Ztypingr   ZgiZrequire_versionZgi.repositoryr   r#   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   Zax_event_synthesizerr   Z	ax_objectr   Zax_textr   r   Zscriptsr   r   r   r  Z__annotations__r  )r  s   @r   <module>r     s   4 & #7    	   5%                 * 4  w&# n n`1H1 H1V #6"7
 7r"   