Ë
    c­øc   ã                   ó(   — d dl mZ dZ G d„ d«      Zy)é    )ÚGtkz*/com/github/maoschanz/drawing/optionsbars/c                   ód   — e Zd Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zy)ÚAbstractOptionsBarc                 ó    — d| _         d| _        y )Ni¼  F)Ú_limit_sizeÚ
_is_narrow©Úselfs    ú=/usr/lib/python3/dist-packages/drawing/abstract_optionsbar.pyÚ__init__zAbstractOptionsBar.__init__   s   € à€$ÔØ€$…/ó    c                 ó|  — t         j                  j                  t        |z   «      }|j	                  d«      | _        |j	                  d«      | _        |j	                  d«      | _        |j	                  d«      | _        |j	                  d«      | _	        |j	                  d«      | _
        | j                  | _        |S )aL  Creates a Gtk.Builder for the resource whose path is hinted in the
		method parameter, and tries to extract usual widgets ids from it. Most
		resulting widgets can be `None`, except `action_bar`. The builder is
		returned if the caller wants to extract more objects from it.
		This is valid for any instance of `AbstractOptionsBar`.zbottom-paneÚ
cancel_btnÚcentered_boxÚ	apply_btnÚhelp_btnÚoptions_btn)r   ÚBuilderÚnew_from_resourceÚRSRC_PREFIXÚ
get_objectÚ
action_barr   r   r   r   r   Ú_togglable_btn)r
   Úend_of_pathÚbuilders      r   Ú	_build_uizAbstractOptionsBar._build_ui   sž   € ô �K‰K×)Ñ)¬+¸Ñ*CÓD€'Ø×&Ñ& }Ó5€$„/Ø×&Ñ& |Ó4€$„/Ø×(Ñ(¨Ó8€$ÔØ×%Ñ% kÓ2€$„.Ø×$Ñ$ ZÓ0€$„-Ø×'Ñ'¨Ó6€$ÔØ×(Ñ(€$ÔØ	€.r   c                 ój  — t         j                  j                  t        |z   «      }|j	                  d«      | _        | j                  j                  | j
                  «       |j	                  d«      }|r| j                  j                  |«       |S | j                  j                  «        d| _        |S )a  Same as above, BUT this isn't valid for any instance of
		`AbstractOptionsBar`: only an optionsbar for a transform tool should
		call that method, and it should call it *after* `_build_ui`. This method
		will "hydrate" the previously built (but still incomplete) widgets.r   zactions-menuN)r   r   r   r   r   r   r   Úset_center_widgetr   Úset_menu_modelÚdestroy)r
   r   r   Úactions_menus       r   Ú_hydrate_transform_toolz*AbstractOptionsBar._hydrate_transform_tool.   s—   € ô
 �K‰K×)Ñ)¬+¸Ñ*CÓD€'Ø×(Ñ(¨Ó8€$ÔØ‡/�/×#Ñ# D×$5Ñ$5Ô6Ø×#Ñ# NÓ3€,ÙØ×Ñ×"Ñ" <Ô0ð 
€.ð ×Ñ×ÑÔØ€4ÔØ	€.r   c                  ó   — y)zµSet a widget (or a menu) as the popover with tools options. In
		practice this is used only with the classic tools' pane, and all classic
		tools provide a menu instead of a widget.N© )r
   ÚwidgetÚmodelÚlabels       r   Úbuild_options_menuz%AbstractOptionsBar.build_options_menu>   ó   € ð r   c                  ó   — y)z Update the pane when a tool using it has just been activated. Widgets
		may be hidden/shown or enabled/disabled depending on the properties of
		the given tool.Nr$   )r
   Útools     r   Úupdate_for_new_toolz&AbstractOptionsBar.update_for_new_toolD   r)   r   c                  ó   — y ©Nr$   r	   s    r   Úget_minimap_btnz"AbstractOptionsBar.get_minimap_btnJ   ó   € Ør   c                  ó   — y r.   r$   )r
   r'   s     r   Úset_minimap_labelz$AbstractOptionsBar.set_minimap_labelM   r0   r   c                 ó¼   — | j                   rP| j                   j                  «       r5| j                   j                  | j                   j                  «        «       y y y r.   )r   Úget_visibleÚ
set_activeÚ
get_activer	   s    r   Útoggle_options_menuz&AbstractOptionsBar.toggle_options_menuP   sJ   € Ø	×Ò˜T×0Ñ0×<Ñ<Ô>Ø×Ñ×!Ñ! d×&9Ñ&9×&DÑ&DÓ&FÐ"FÕGð ?Ðr   c                 óT   — | j                   r| j                   j                  d«       y y )NF)r   r5   r	   s    r   Úhide_options_menuz$AbstractOptionsBar.hide_options_menuT   s$   € Ø	×ÒØ×Ñ×!Ñ! %Õ(ð r   c                  ó   — y r.   r$   r	   s    r   Úmiddle_click_actionz&AbstractOptionsBar.middle_click_actionX   r0   r   c                 óZ   — | j                  d«       | j                  j                  «        y)aE  Instructions to run during the first window size allocation (and only
		the first). Calling this is managed by the window's `DrOptionsManager`.
		It estimates the minimal amount of pixels for the mobile version, and
		gives it to the `_set_limit_size` method.
		Any implementation HAS TO end with a call to `_set_limit_size`!FN)Úset_compactr   Úshow_allr	   s    r   Úinit_adaptabilityz$AbstractOptionsBar.init_adaptability[   s"   € ð ×Ñ�5ÔØ‡/�/×ÑÕr   c                 óL   — t        d|z  «      | _        | j                  d«       y )Ng      ô?T)Úintr   r=   )r
   Útemp_limit_sizes     r   Ú_set_limit_sizez"AbstractOptionsBar._set_limit_sizee   s"   € Ü˜ Ñ/Ó0€$ÔØ×Ñ�4Õr   c                 ó~   — || j                   kD  }|| j                  k(  }|r| j                  | j                   «       yy)z’Check whether or not the costly `set_compact` method should be
		called, depending on a given window width, and the pane's limit
		previously set.N)r   r   r=   )r
   Úallocated_widthÚ
can_expandÚ
incoherents       r   Úadapt_to_window_sizez'AbstractOptionsBar.adapt_to_window_sizei   s?   € ð   $×"2Ñ"2Ñ2€*Ø˜dŸo™oÑ-€*ÙØ×Ñ˜Ÿ™Ð'Õ(ð r   c                 ód   — || _         | j                  �| j                  j                  | «       yy)zUThe parameter is a boolean telling if the bottom pane should become
		compact or not.N)r   r   Úset_visible)r
   Ústates     r   r=   zAbstractOptionsBar.set_compactr   s.   € ð €$„/Ø	‡]�]ÐØ‡=�=×Ñ ˜YÕ'ð r   N)Ú__name__Ú
__module__Ú__qualname__Ú__gtype_name__r   r   r"   r(   r,   r/   r2   r7   r9   r;   r?   rC   rH   r=   r$   r   r   r   r      sN   „ Ø&€òò
ò ò òòòòHò)òòòò)ó(r   r   N)Úgi.repositoryr   r   r   r$   r   r   ú<module>rQ      s   ðõ$ à:€÷a(ò a(r   