a „oe ã@sRddlZddlZddlZddlZddlmZddlmZej Z Gdd„de ƒZ dS)éN)Údocviewé)Úframec@s\eZdZejdddfdd„Zdd„Zdd„Zdd „Zd d „Z dd d„Z dd„Z ddd„Z dS)ÚEditorTemplateBaseNcCs$|durtj}t |||||¡dS©N)rZ EditorFrameÚParentEditorTemplateÚ__init__)ÚselfÚresZmakeDocZ makeFrameZmakeView©r úJC:\Program Files\Certbot\pkgs\pythonwin\pywin\framework\editor\template.pyrszEditorTemplateBase.__init__cCsds Jdƒ‚dS©NrzYou must override thisr )r Z resourceIdr r r Ú_CreateDocTemplatesz%EditorTemplateBase._CreateDocTemplatecCsds Jdƒ‚dSr r ©r r r r ÚCreateWin32uiDocumentsz(EditorTemplateBase.CreateWin32uiDocumentcCsdS)N)z.txtz.pyr rr r r ÚGetFileExtensionssz$EditorTemplateBase.GetFileExtensionscCs>| |¡}|r|Stj |¡d ¡}|| ¡vr8tjStjS)Nr) ZFindOpenDocumentÚosÚpathÚsplitextÚlowerrÚwin32uiZ(CDocTemplate_Confidence_yesAttemptNativeZ+CDocTemplate_Confidence_maybeAttemptForeign)r ZfileNameZfileTypeÚdocÚextr r r Ú MatchDocTypes  zEditorTemplateBase.MatchDocTypercCs|j |||¡| ¡dSr)Ú_obj_ÚInitialUpdateFrameZ_UpdateUIForState)r rrZ makeVisibler r r r'sz%EditorTemplateBase.InitialUpdateFramecCsddlm}| ¡| ¡gS)z Returns a list of property pagesr)Úconfigui)ÚrZEditorPropertyPageZEditorWhitespacePropertyPage)r rr r r ÚGetPythonPropertyPages+s z)EditorTemplateBase.GetPythonPropertyPagesc Csv|durhz4tj |¡d}t |¡dd}tj ||¡}Wn*tjtfyf}z WYd}~n d}~00|j  ||¡S)Nré) rrÚsplitÚwin32apiZ FindFilesÚjoinÚerrorÚ IndexErrorrÚOpenDocumentFile)r ÚfilenameZ bMakeVisiblerZdetailsr r r r%1sz#EditorTemplateBase.OpenDocumentFile)r)r) Ú__name__Ú __module__Ú __qualname__rZ IDR_TEXTTYPErrrrrrrr%r r r r r s ÿ  r) rZpywin.framework.windowZpywinr!rZ pywin.mfcrrrZ DocTemplaterrr r r r Ús