+
    Qid  c                  s2   R t ^ RIHt RtRtRtRtR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tRtRt ! R R]P,                  4      t ! R R]P0                  4      t ! R R]P4                  4      tR#   ]
 d    Rt	 L{i ; i)zCProvides a graphical braille display, mainly for development tasks.)annotationsz$Id$z
$Revision$z$Date$zNCopyright (c) 2006-2008 Sun Microsystems Inc.Copyright (c) 2011 The Orca Team.ZLGPL)KEY_CMD_ROUTENGtkz3.0)r   )script_manager)BrailleEventZ@t   t   Àc                  sZ   a  ] tR t^4tRtRtRtRtRR V 3R llltR R lt	R	 R
 lt
RtV ;t# )BrlDotzA single braille dot.z<tt><small>%s</small></tt>u   ○u   ●c               s$    V ^8  d   QhRRRRRR/# )   
dot_numberint	is_raisedboolreturnNone Zformat   "0/usr/lib/python3.14/site-packages/orca/brlmon.py__annotate__BrlDot.__annotate__;   s!      3 4 D     c                s  < \         SV `  4        VR9   d*   V P                  RRRR4       V P                  ^^ ^ ^4       M(V P                  RRRR4       V P                  ^^ ^^ 4       \        P
                  ! 4       V n        V P                  V P                  4       V'       d   V P                  4        R# V P                  4        R# )zCreate a new BrlDot.

Arguments:
- dot_number: an integer reflecting the location of the dot within
  an 8-dot braille cell, using traditional braille dot values.
- is_raised: whether the dot should initially be raised.
g      ?      ?g        N)i   r   i   i   )
super__init__setZset_paddingr   Labellabeladd	raise_dot	lower_dot)selfr   r	   	__class__s   &&&r   r   ZBrlDot.__init__;   s     	%HHS#sC(Q1a(HHS#sC(Q1a(YY[
NNNNr   c                   V ^8  d   QhRR/# r   r   r   r   r   r   r   r   r   S   s     G G4 Gr   c                    V P                  RR^ ^ 4       V P                  P                  V P                  V P                  ,          4       R# )z'Raise the dot (make it visible/filled).r   N)r   r   
set_markupMARKUP_NORMALSYMBOL_RAISEDr      &r   r   ZBrlDot.raise_dotS   s7    c1a 

d0043E3EEFr   c               r   r    r   r   r   r   r   r   X   s     H H4 Hr   c                r!   )z(Lower the dot (make it invisible/empty).r   N)r   r   r"   r#   SYMBOL_LOWEREDr%   r&   r   r   ZBrlDot.lower_dotX   s7    c1a 

d0043F3FFGr   )r   )F)__name__
__module____qualname____firstlineno____doc__r#   r'   r$   r   r   r   __static_attributes____classcell__r      @r   r   r   4   s1    1MNM 0G
H Hr   r   c                  sb   a  ] tR t^]tRtRtRtR V 3R lltR R ltR R	 lt	RR
 R llt
RtV ;t# )BrlCellz?A single graphical braille cell with cursor routing capability.z<tt><big>%s</big></tt>z<b><u>%s</u></b>c                    V ^8  d   QhRRRR/# )r   positionr   r   r   r   r   r   r   r   BrlCell.__annotate__c   s     7 7 7 7r   c                s  < \         SV `  4        V P                  ^^-4       Wn        \        P
                  ! 4       V n        \        ^4      V n        \        ^4      V n	        \        P                  ! 4       pVP                  V P                  ^ ^ ^^4       VP                  V P                  ^ ^^^4       VP                  V P                  ^^^^4       V P                  V4       V P                  RV P                  4       R# )zdCreate a new BrlCell.

Arguments:
- position: The location of the cell with respect to the monitor.
ZclickedN)r   r   Zset_size_request	_positionr   r   _displayed_charr   _dot7_dot8Gridattachr   Zconnect_on_cell_clicked)r   r3   gridr   s   && r   r   ZBrlCell.__init__c   s     	b"%!"yy{AY
AY
xxzD((!Q15DJJ1a+DJJ1a+Y 5 56r   c               r2   )r   _widgetz
Gtk.Buttonr   r   r   r   r   r   r   r4   y   s     * *
 *t *r   c                s    \         f   R# \        P                  ! 4       P                  4       pVf   R# / p\         VR&   V P                  VR&   \        V4      pVP                  V4       R# )z5Callback for the 'clicked' signal on the push button.NZcommandZargument)r   r   Zget_managerZget_active_scriptr5   r   Zprocess_routing_key)r   r=   ZscriptZfake_key_pressZevents   &&   r   r;   ZBrlCell._on_cell_clickedy   sa      ++-??A>$1y!%)^^z"^,""5)r   c               r   r    r   r   r   r   r   r4      s      t r   c                s    V P                   P                  R4       V P                  P                  4        V P                  P                  4        R# )zClears the braille cell. N)r6   r"   r7   r   r8   r%   r&   r   clearZBrlCell.clear   s8     	''+



r   c               (    V ^8  d   QhRRRRRRRR/# )	r   charstrmask
str | Noneis_cursor_cellr
   r   r   r   r   r   r   r   r4      s)     # #C #z #$ #[_ #r   c                s~   VR8X  d   RpMVR8X  d   RpM	VR8X  d   RpV P                   pV'       d   W@P                  ,          pV P                  P                  WA,          4       V\        \
        39   d   V P                  P                  4        V\        \
        39   d   V P                  P                  4        R# R# )zDisplays the specified character in the cell.

Arguments:
- char: The character to display in the cell.
- mask: Optional mask for displaying attributes.
- is_cursor_cell: If True, the cursor/caret is at this cell.
Z&z&amp;Z<z&lt;Z	z$tN)
r#   MARKUP_CURSOR_CELLr6   r"   DOT_7DOTS_78r7   r   DOT_8r8   )r   rA   rC   rE   Zmarkups   &&&& r   displayZBrlCell.display   s     3;DS[DT\D##555F''6E7##JJ  "E7##JJ  " $r   )r6   r7   r8   r5   )NF)r(   r)   r*   r+   r,   r#   rF   r   r;   r?   rJ   r-   r.   r/   r0   r   r1   r1   ]   s/    I1M+7 7,* # #r   r1   c                  sR   a  ] tR t^tRtR	R V 3R llltR R ltR
R R lltRtV ;t	# )BrlMonzDisplays a GUI braille monitor that mirrors what would be displayed
by Orca on a connected, configured, and enabled braille display.c               r2   )r   	num_cellsr   r   r   r   r   r   r   r   BrlMon.__annotate__   s     ' '# 't 'r   c                s  < \         SV `  4        V P                  R4       \        P                  ! 4       pV P                  V4       . V n        \        V4       F=  p\        V4      pVP                  WC^ ^^4       V P                  P                  V4       K?  	  V P                  R4       V P                  RR4       V P                  R4       V P                  R4       R# )zMCreate a new BrlMon.

Arguments:
- num_cells: how many braille cells to make
zBraille MonitorFzaccept-focusTN)r   r   Z	set_titler   r9   r   cellsranger1   r:   ZappendZset_resizableZset_propertyZset_skip_taskbar_hintZset_skip_pager_hint)r   rL   r<   icellr   s   &&   r   r   ZBrlMon.__init__   s     	()xxz$&
y!A1:DKKAq)JJd# "
 	5!.%0""4(  &r   c               r   r    r   r   r   r   r   rM      s      t r   c                sL    V P                    F  pVP                  4        K  	  R# )z#Clears the braille monitor display.N)rN   r?   )r   rQ   s   & r   r?   ZBrlMon.clear   s     JJDJJL r   c               r@   )	r   cursor_cellr   stringrB   rC   rD   r   r   r   r   r   r   r   rM      s/     H Hc H3 Hj HTX Hr   c                sZ   V P                  4        \        \        V4      \        V P                  4      4      p\	        V4       FJ  pWQ^,
          8H  p V'       d	   W5,          MRpV P                  V,          P                  W%,          Wv4       KL  	  R#   \
        \        3 d    Rp LDi ; i)zDisplay the given text and highlight the given cursor cell.

Arguments:
- cursor_cell: 1-based index of cell with cursor (0 means no cursor)
- string: text to display (length must be <= num cells)
- mask: optional attribute mask
N)r?   ZminZlenrN   rO   Z
IndexErrorZ	TypeErrorrJ   )r   rR   rS   rC   ZlengthrP   rE   Z	cell_masks   &&&&    r   
write_textZBrlMon.write_text   s     	

S[#djj/2vA/1N!'+DG	 JJqM!!&)YG  	* ! 	!s   BB*)B*)rN   )i    )N)
r(   r)   r*   r+   r,   r   r?   rT   r-   r.   r/   r0   r   rK   rK      s$    H' '0H Hr   rK   )r,   Z
__future__r    Z__id__Z__version__Z__date__Z__copyright__Z__license__Zbrlapir   ZImportErrorZgiZrequire_versionZgi.repositoryr   r>   r   Zinput_eventr   rG   rI   rH   Z	Alignmentr   ZButtonr1   ZWindowrK   r   r   r   <module>rU      s   . J #4$ 
   5%     % 

'HS]] 'HRK#cjj K#Z3HSZZ 3HK  Ms   B
 
	BB