;ò )‘†Ac@s¼dkZdkZeidjodklZndeifd„ƒYZd„ZdZe djoPdkZdk Z dk Z e i de i ieid ƒgeid ƒndS( Ns __WXMSW__(s PDFWindows TestPanelcBs,tZd„Zd„Zd„Zd„ZRS(NcCsítii||dƒt|_titiƒ}titi ƒ}t |dti ƒ|_|i|idddtiƒti|tiƒdƒ}|iti|i|ƒ|i|dddtitiBddƒti|tiƒd ƒ}|iti|i|ƒ|i|dddtitiBddƒti|tiƒd ƒ}|iti|i|ƒ|i|dddtitiBddƒ|id dfdd dtiƒ|i|dd dtiƒ|i|ƒ|itƒdS(Niÿÿÿÿsstyles proportionisflags Open PDF Filesborderis<-- Previous Pages Next Page -->i2ii(swxsPanels__init__sselfsparentsNonespdfsBoxSizersVERTICALssizers HORIZONTALsbtnSizers PDFWindows SUNKEN_BORDERsAddsEXPANDsButtonsNewIdsbtnsBinds EVT_BUTTONs OnOpenButtonsALLsOnPrevPageButtonsOnNextPageButtonsSetSizers SetAutoLayoutsTrue(sselfsparentslogsbtnSizerssizersbtn((sq/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ActiveX_PDFWindow.pys__init__ s& )))" cCsgti|ddƒ}|iƒtijo.tiƒ|ii|i ƒƒti ƒn|i ƒdS(Nswildcards*.pdf( swxs FileDialogsselfsdlgs ShowModalsID_OKsBeginBusyCursorspdfsLoadFilesGetPaths EndBusyCursorsDestroy(sselfseventsdlg((sq/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ActiveX_PDFWindow.pys OnOpenButton+s  cCs|iiƒdS(N(sselfspdfsgotoPreviousPage(sselfsevent((sq/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ActiveX_PDFWindow.pysOnPrevPageButton6scCs|iiƒdS(N(sselfspdfs gotoNextPage(sselfsevent((sq/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ActiveX_PDFWindow.pysOnNextPageButton:s(s__name__s __module__s__init__s OnOpenButtonsOnPrevPageButtonsOnNextPageButton(((sq/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ActiveX_PDFWindow.pys TestPanel s cCsTtidjot||ƒ}|Sn*dkl}||ddtiƒ}|SdS(Ns __WXMSW__(s MessagePanels*This demo only works on Microsoft Windows.sSorry( swxsPlatforms TestPanelsnbslogswinsMains MessagePanels ICON_WARNING(sframesnbslogswins MessagePanel((sq/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ActiveX_PDFWindow.pysrunTestAs  s2

wx.lib.pdfwin.PDFWindow

The wx.lib.pdfwin.PDFWindow class is another example of using ActiveX controls from wxPython using the new wx.activex module. This allows you to use an ActiveX control as if it is a wx.Window, you can call its methods, set/get properties, and receive events from the ActiveX control in a very intuitive way.

Using this class is simpler than ActiveXWrapper, doesn't rely on the win32all extensions, and is more "wx'ish", meaning that it uses events and etc. as would be expected from any other wx window.

This demo embeds the Adobe Acrobat Reader, and gives you some buttons for opening a PDF file, changing pages, etc. that show how to call methods on the COM object. If you don't have Acrobat Reader 4.0 (or greater) installed it won't work. s__main__sii(ssysswxsPlatforms wx.lib.pdfwins PDFWindowsPanels TestPanelsrunTestsoverviews__name__sossrunsmainspathsbasenamesargv(srunTestsrunsoverviews PDFWindowssysswxsoss TestPanel((sq/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ActiveX_PDFWindow.pys?s  7