+
     i  c                  s    R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHtHt ^ RIHtHt ^ R	IHt  ! R
 R]P(                  4      t ! R R4      t ! R R4      tR# )z#Components used in multiple places.)annotationsN)Gtk)Optional)MappingData)
Controller)MessageBrokerMessageType)	GroupData
PresetData)HandlerDisabledc                  sF   a  ] tR t^+tRtR tRR V 3R llltR tR tRt	V ;t
# )FlowBoxEntryzNA device that can be selected in the GUI.

For example a keyboard or a mouse.
c               s(    V ^8  d   QhRRRRRRRR/# )	   message_brokerr   
controllerr   nameZstr	icon_nameOptional[str] Zformat   "H/usr/lib/python3.14/site-packages/inputremapper/gui/components/common.py__annotate__ZFlowBoxEntry.__annotate__3   s2     *5 *5%*5 *5 	*5
 !*5    c                	sL  < \         SV `  4        W@n        Wn        W n        \
        P                  ! \
        P                  P                  R 7      pV'       dJ   \
        P                  P                  V\
        P                  P                  4      pVP                  V4       \
        P                  ! 4       pVP                  V4       W0n        VP#                  R4       VP%                  ^4       VP'                  ^4       VP)                  ^4       VP                  V4       VP+                  ^4       VP-                  ^4       VP/                  R4       VP1                  ^4       V P                  V4       V P3                  4        V P5                  RV P6                  4       R# ))ZorientationTZtoggledN)Zsuper__init__r   r   _controllerr   ZBoxZOrientationZVERTICALZImageZnew_from_icon_nameZIconSizeZDIALOGZaddZLabel	set_labelr   set_line_wrapset_line_wrap_modeZset_width_charsset_max_width_charsZset_margin_topZset_margin_bottomZset_homogeneousZset_spacingZshow_allZconnect_on_gtk_toggle)	selfr   r   r   r   ZboxZiconlabel	__class__s	   &&&&&   r   r   ZFlowBoxEntry.__init__3   s(    	",%gg#//":":;99//	3<<;N;NODGGDM			 	D!  #b!!!"%2b!D! 	Y 3 34r   c                	s    \         hN)ZNotImplementedErrorr      &r   r   ZFlowBoxEntry._on_gtk_toggle_   s    !!r   c                s    \        W P                  4      ;_uu_ 4        V P                  V4       RRR4       R#   + '       g   i     R# ; i)z2Show the active state without triggering anything.N)r	   r   Z
set_active)r   Zactive   &&r   show_activeZFlowBoxEntry.show_activeb   s.    T#6#677OOF# 8777s	   :A	)r   r   r   r   r!   )__name__
__module____qualname____firstlineno____doc__Z__gtype_name__r   r   r%   __static_attributes__Z__classcell__)r    s   @r   r
   r
   +   s)    
 $N*5 *5X"$ $r   r
   c                  s2    ] tR t^htRtR R ltR R ltRtR# )FlowBoxWrapperz;A wrapper for a flowbox that contains FlowBoxEntry widgets.c                   V ^8  d   QhRR/# )r   flowboxzGtk.FlowBoxr   r   r   r   r   FlowBoxWrapper.__annotate__k   s       r   c                	s    Wn         R # r!   _gui)r   r.   r$   r   r   ZFlowBoxWrapper.__init__k   s    	r   c               r-   )r   r   r   r   r   r   r   r   r/   n   s     D Dm Dr   c                s    V P                   P                  4        F8  pVP                  4       ^ ,          pVP                  VP                  V8H  4       K:  	  R# )z0Activate the togglebutton that matches the name.N)r1   Zget_childrenr%   r   )r   r   ZchildZflow_box_entrys   &&  r   show_active_entryZ FlowBoxWrapper.show_active_entryn   sE    YY++-E+0+=+=+?+BN&&~':':d'BC .r   r0   N)r&   r'   r(   r)   r*   r   r2   r+   r   r   r   r,   r,   h   s    ED Dr   r,   c                  sZ    ] tR t^utRtRR R lltR tR R ltR R ltR	 R
 lt	R t
RtR# )Breadcrumbsz/Writes a breadcrumbs string into a given label.c          
     s,    V ^8  d   QhRRRRRRRRRR/# )	r   r   r   r   z	Gtk.Labelshow_device_groupZboolshow_presetshow_mappingr   r   r   r   r   Breadcrumbs.__annotate__x   s<      %   	
  r   c                	s   Wn         W n        V P                  4        W0n        W@n        WPn        R V n        R V n        R V n        VP                  ^24       VP                  R4       VP                  ^4       V P                  4        R# ) TN)_message_brokerr1   _connect_message_listenerr4   r5   r6   
_group_key_preset_name_mapping_namer   r   r   _render)r   r   r   r4   r5   r6   s   &&&&&&r   r   ZBreadcrumbs.__init__x   sw      .	&&(!2&(!!#"$!!"%D!  #r   c                	s>   V P                   P                  \        P                  V P                  4       V P                   P                  \        P
                  V P                  4       V P                   P                  \        P                  V P                  4       R # r!   )	r9   Z	subscriber   Zgroup_on_group_changedZpreset_on_preset_changedZmapping_on_mapping_changedr"   r#   r   r:   Z%Breadcrumbs._connect_message_listener   sh    &&{'8'8$:P:PQ&&{'9'94;R;RS&&{':':D<T<TUr   c               r-   )r   datar   r   r   r   r   r   r7      s      z r   c                	s\    VP                   ;'       g    R V n        V P                  4        R# )r8   N)r   r<   r>   r   rB   r$   r   r@   ZBreadcrumbs._on_preset_changed   s     IIOOr   c               r-   )r   rB   r   r   r   r   r   r   r7      s      i r   c                	sH    VP                   V n        V P                  4        R # r!   )Z	group_keyr;   r>   rC   r$   r   r?   ZBreadcrumbs._on_group_changed   s    ..r   c               r-   )r   mapping_datar   r   r   r   r   r   r7      s       r   c                	sP    VP                  4       V n        V P                  4        R # r!   )Zformat_namer=   r>   )r   rD   r$   r   rA   ZBreadcrumbs._on_mapping_changed   s    )557r   c                	s   . pV P                   '       d&   TP                  V P                  ;'       g    R 4       V P                  '       d&   TP                  V P                  ;'       g    R 4       V P
                  '       d&   TP                  V P                  ;'       g    R 4       V P                  P                  RP                  V4      4       R# )Z?z  /  N)
r4   Zappendr;   r5   r<   r6   r=   r1   r   Zjoin)r   r   s   & r   r>   ZBreadcrumbs._render   s    !!!LL//C0LL**11c2LL++22s3		GLL/0r   )r;   r1   r=   r9   r<   r4   r6   r5   N)FFF)r&   r'   r(   r)   r*   r   r:   r@   r?   rA   r>   r+   r   r   r   r3   r3   u   s$    94V
1r   r3   )r*   Z
__future__r    ZgiZgi.repositoryr   Ztypingr   Zinputremapper.configs.mappingr   Zinputremapper.gui.controllerr   Z)inputremapper.gui.messages.message_brokerr   r   Z'inputremapper.gui.messages.message_datar   r   Zinputremapper.gui.utilsr	   ZToggleButtonr
   r,   r3   r   r   r   <module>rE      sU   * * # 	   5 3 J 3:$3## :$z
D 
D:1 :1r   