§
   
Ì²&^IÖã                   ó^   — d Z ddlmZ ddlZddlmZ ddlmZm	Z	m
Z
mZ d„ Zed„ ¦   «         ZdS )a­  Where a context menu of a hero button opens (docs/plan/skin-milionar/220-hero-buttons.md).

Kodi centres a context menu on the focused control. A card's menu opens over its row, the row being the focused control.
A hero button lies in a group list, which places its buttons only when it draws them, so Kodi takes the list's own
position for every button and the menu opened at the list's left end. Every hero has an invisible anchor over the width
of its rows at the height of its buttons (gen_cinema.HERO_ANCHOR, id <base> + BUTTON_ANCHOR): it takes the focus while
the menu is open, so the menu opens where the rows' menus open, right over the buttons; then the button gets it back.
é    )ÚcontextmanagerN)ÚGROUP)ÚBASESÚBUTTON_ANCHORÚBUTTON_OFFSETSÚBUTTON_PLAINc                 ó    — t          t          j        ¦   «         ¦  «        t          fz   D ]#}| |z
  t          t
          fz   v r|t          z   c S Œ$dS )zBThe anchor of the hero whose button `control` (an id) is, or None.N)Útupler   ÚvaluesÚDETAIL_BASEr   r   r   )ÚcontrolÚbases     úb/Users/chudy/Library/Application Support/Kodi/addons/plugin.video.milionar/wcs/skin/menu_anchor.pyÚ	anchor_ofr      sW   € å•e”l‘n”nÑ%Ô%­¨Ñ6ð (ð (ˆØ�T‰>�^­|¨oÑ=Ð=Ð=Ø�-Ñ'Ð'Ð'Ð'ð >àˆ4ó    c               #   óF  K  — t          j        d¦  «        } |                      ¦   «         rt          t	          | ¦  «        ¦  «        nd}|r(t          j        d                     |¦  «        d¦  «         	 dV — |rOt          j        d¦  «        t          |¦  «        k    r,t          j        d                     | ¦  «        d¦  «         dS dS dS # |rNt          j        d¦  «        t          |¦  «        k    r*t          j        d                     | ¦  «        d¦  «         w w w xY w)zgOpen the context menus of this block at the focused hero button's anchor (no change for anything else).zSystem.CurrentControlIDNzSetFocus({})T)ÚxbmcÚgetInfoLabelÚisdigitr   ÚintÚexecutebuiltinÚformatÚstr)ÚfocusedÚanchors     r   Úanchoredr      s,  è è € õ ÔÐ 9Ñ:Ô:€GØ(/¯ªÑ(9Ô(9ÐC�Y•s˜7‘|”|Ñ$Ô$Ð$¸t€FØð AÝÔ˜N×1Ò1°&Ñ9Ô9¸4Ñ@Ô@Ð@ðFØˆˆˆàð 	F•dÔ'Ð(AÑBÔBÅcÈ&ÁkÄkÒQÐQÝÔ × 5Ò 5°gÑ >Ô >ÀÑEÔEÐEÐEÐEð	Fð 	FÐQÐQøˆ6ð 	F•dÔ'Ð(AÑBÔBÅcÈ&ÁkÄkÒQÐQÝÔ × 5Ò 5°gÑ >Ô >ÀÑEÔEÐEÐEð	FÐQøøøs   Á4C ÃAD )Ú__doc__Ú
contextlibr   r   Úwcs.skin.detail_contractr   r   Úwcs.skin.hero_contractr   r   r   r   r   r   © r   r   ú<module>r"      s›   ððð ð &Ð %Ð %Ð %Ð %Ð %à €€€Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9Ø UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ Uðð ð ð ð
Fð 
Fñ „ð
Fð 
Fð 
Fr   