a
    §ˆcq  ã                   @   sn   d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	 ddl
mZ dZeeƒG dd	„ d	e	eƒƒZdS )
z$ Enthought pyface package component
é    N)Úprovides)ÚIAboutDialogÚMAboutDialogé   )ÚDialogal  
<html>
  <body>
    <center>
      <table width="100%%" cellspacing="4" cellpadding="0" border="0">
        <tr>
          <td align="center">
          <p>
            <img src="%s" alt="">
          </td>
        </tr>
      </table>

      <p>
      %s<br>
      <br>
      Python %s<br>
      wxPython %s<br>
      </p>
      <p>
      %s
      </p>
      <p>
      Copyright &copy; 2003-2010 Enthought, Inc.
      </p>

      <p>
        <wxp module="wx" class="Button">
          <param name="label" value="%s">
          <param name="id"    value="ID_OK">
        </wxp>
      </p>
  </center>
  </body>
</html>
c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚAboutDialogz{ The toolkit specific implementation of an AboutDialog.  See the
    IAboutDialog interface for the API documentation.
    c           	      C   s¶   |  ¡ d ur|  ¡  ¡ }nd}d| | _| j ¡ }| ¡ d }tjj|d|dfd�}| 	|  
¡ ¡ | tj¡}| ¡  | ¡ }| d| ¡ f¡ | ¡  ¡ \}}| ||d f¡ d S )NÚ zAbout %séP   éÿÿÿÿ)Úsizeé
   )Z	GetParentZGetTitleÚtitleÚimageZcreate_imageZGetWidthÚwxÚhtmlZ
HtmlWindowZSetPageÚ_create_htmlZFindWindowByIdZID_OKZ
SetDefaultZGetInternalRepresentationZSetSizeZ	GetHeightZGetSizeZGetZSetClientSize)	ÚselfÚparentr   r   Úwidthr   Z	ok_buttonZinternalÚheight© r   ú\/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/ui/wx/about_dialog.pyÚ_create_contentsK   s     

ÿzAboutDialog._create_contentsc                 C   sp   | j j}d | j¡}tjdtj d¡… }tj}d dd„ | j	D ƒ¡}| j
d u rVd}n| j
}t||||||f S )Nz<br />r   ú(c                 S   s   g | ]}d | ‘qS )zCopyright &copy; %sr   )Ú.0Úliner   r   r   Ú
<listcomp>   ó    z,AboutDialog._create_html.<locals>.<listcomp>ÚOK)r   Zabsolute_pathÚjoinÚ	additionsÚsysÚversionÚfindr   ZVERSION_STRINGÚ
copyrightsZok_labelÚ_DIALOG_TEXT)r   Úpathr    Ú
py_versionZ
wx_versionr$   Úokr   r   r   r   r   s$    ÿ
úzAboutDialog._create_htmlN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   A   s   'r   )r,   r!   r   Zwx.htmlZwx.lib.wxpTagZ
traits.apir   Zpyface.i_about_dialogr   r   Údialogr   r%   r   r   r   r   r   Ú<module>   s   &