Lindsay Mathieson's newest wxActiveX class has been wrapped into a new
extension module called wx.activex. Lots of demo and lib updates to go along with it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
652
wxPython/wx/lib/flashwin.py
Normal file
652
wxPython/wx/lib/flashwin.py
Normal file
@@ -0,0 +1,652 @@
|
||||
#----------------------------------------------------------------------
|
||||
# Name: wx.lib.flashwin
|
||||
# Purpose: A class that allows the use of the Shockwave Flash
|
||||
# ActiveX control
|
||||
#
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 22-March-2004
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 2004 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------
|
||||
# This module was generated by the wx.activex.GernerateAXModule class
|
||||
# (See also the genaxmodule script.)
|
||||
|
||||
import wx
|
||||
import wx.activex
|
||||
|
||||
clsID = '{D27CDB6E-AE6D-11CF-96B8-444553540000}'
|
||||
progID = 'ShockwaveFlash.ShockwaveFlash.1'
|
||||
|
||||
|
||||
|
||||
# Create eventTypes and event binders
|
||||
wxEVT_ReadyStateChange = wx.activex.RegisterActiveXEvent('OnReadyStateChange')
|
||||
wxEVT_Progress = wx.activex.RegisterActiveXEvent('OnProgress')
|
||||
wxEVT_FSCommand = wx.activex.RegisterActiveXEvent('FSCommand')
|
||||
|
||||
EVT_ReadyStateChange = wx.PyEventBinder(wxEVT_ReadyStateChange, 1)
|
||||
EVT_Progress = wx.PyEventBinder(wxEVT_Progress, 1)
|
||||
EVT_FSCommand = wx.PyEventBinder(wxEVT_FSCommand, 1)
|
||||
|
||||
|
||||
# Derive a new class from ActiveXWindow
|
||||
class FlashWindow(wx.activex.ActiveXWindow):
|
||||
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
|
||||
size=wx.DefaultSize, style=0, name='FlashWindow'):
|
||||
wx.activex.ActiveXWindow.__init__(self, parent,
|
||||
wx.activex.CLSID('{D27CDB6E-AE6D-11CF-96B8-444553540000}'),
|
||||
ID, pos, size, style, name)
|
||||
|
||||
# Methods exported by the ActiveX object
|
||||
def QueryInterface(self, riid):
|
||||
return self.CallAXMethod('QueryInterface', riid)
|
||||
|
||||
def AddRef(self):
|
||||
return self.CallAXMethod('AddRef')
|
||||
|
||||
def Release(self):
|
||||
return self.CallAXMethod('Release')
|
||||
|
||||
def GetTypeInfoCount(self):
|
||||
return self.CallAXMethod('GetTypeInfoCount')
|
||||
|
||||
def GetTypeInfo(self, itinfo, lcid):
|
||||
return self.CallAXMethod('GetTypeInfo', itinfo, lcid)
|
||||
|
||||
def GetIDsOfNames(self, riid, rgszNames, cNames, lcid):
|
||||
return self.CallAXMethod('GetIDsOfNames', riid, rgszNames, cNames, lcid)
|
||||
|
||||
def Invoke(self, dispidMember, riid, lcid, wFlags, pdispparams):
|
||||
return self.CallAXMethod('Invoke', dispidMember, riid, lcid, wFlags, pdispparams)
|
||||
|
||||
def SetZoomRect(self, left, top, right, bottom):
|
||||
return self.CallAXMethod('SetZoomRect', left, top, right, bottom)
|
||||
|
||||
def Zoom(self, factor):
|
||||
return self.CallAXMethod('Zoom', factor)
|
||||
|
||||
def Pan(self, x, y, mode):
|
||||
return self.CallAXMethod('Pan', x, y, mode)
|
||||
|
||||
def Play(self):
|
||||
return self.CallAXMethod('Play')
|
||||
|
||||
def Stop(self):
|
||||
return self.CallAXMethod('Stop')
|
||||
|
||||
def Back(self):
|
||||
return self.CallAXMethod('Back')
|
||||
|
||||
def Forward(self):
|
||||
return self.CallAXMethod('Forward')
|
||||
|
||||
def Rewind(self):
|
||||
return self.CallAXMethod('Rewind')
|
||||
|
||||
def StopPlay(self):
|
||||
return self.CallAXMethod('StopPlay')
|
||||
|
||||
def GotoFrame(self, FrameNum):
|
||||
return self.CallAXMethod('GotoFrame', FrameNum)
|
||||
|
||||
def CurrentFrame(self):
|
||||
return self.CallAXMethod('CurrentFrame')
|
||||
|
||||
def IsPlaying(self):
|
||||
return self.CallAXMethod('IsPlaying')
|
||||
|
||||
def PercentLoaded(self):
|
||||
return self.CallAXMethod('PercentLoaded')
|
||||
|
||||
def FrameLoaded(self, FrameNum):
|
||||
return self.CallAXMethod('FrameLoaded', FrameNum)
|
||||
|
||||
def FlashVersion(self):
|
||||
return self.CallAXMethod('FlashVersion')
|
||||
|
||||
def LoadMovie(self, layer, url):
|
||||
return self.CallAXMethod('LoadMovie', layer, url)
|
||||
|
||||
def TGotoFrame(self, target, FrameNum):
|
||||
return self.CallAXMethod('TGotoFrame', target, FrameNum)
|
||||
|
||||
def TGotoLabel(self, target, label):
|
||||
return self.CallAXMethod('TGotoLabel', target, label)
|
||||
|
||||
def TCurrentFrame(self, target):
|
||||
return self.CallAXMethod('TCurrentFrame', target)
|
||||
|
||||
def TCurrentLabel(self, target):
|
||||
return self.CallAXMethod('TCurrentLabel', target)
|
||||
|
||||
def TPlay(self, target):
|
||||
return self.CallAXMethod('TPlay', target)
|
||||
|
||||
def TStopPlay(self, target):
|
||||
return self.CallAXMethod('TStopPlay', target)
|
||||
|
||||
def SetVariable(self, name, value):
|
||||
return self.CallAXMethod('SetVariable', name, value)
|
||||
|
||||
def GetVariable(self, name):
|
||||
return self.CallAXMethod('GetVariable', name)
|
||||
|
||||
def TSetProperty(self, target, property, value):
|
||||
return self.CallAXMethod('TSetProperty', target, property, value)
|
||||
|
||||
def TGetProperty(self, target, property):
|
||||
return self.CallAXMethod('TGetProperty', target, property)
|
||||
|
||||
def TCallFrame(self, target, FrameNum):
|
||||
return self.CallAXMethod('TCallFrame', target, FrameNum)
|
||||
|
||||
def TCallLabel(self, target, label):
|
||||
return self.CallAXMethod('TCallLabel', target, label)
|
||||
|
||||
def TSetPropertyNum(self, target, property, value):
|
||||
return self.CallAXMethod('TSetPropertyNum', target, property, value)
|
||||
|
||||
def TGetPropertyNum(self, target, property):
|
||||
return self.CallAXMethod('TGetPropertyNum', target, property)
|
||||
|
||||
def TGetPropertyAsNumber(self, target, property):
|
||||
return self.CallAXMethod('TGetPropertyAsNumber', target, property)
|
||||
|
||||
# Getters, Setters and properties
|
||||
def _get_ReadyState(self):
|
||||
return self.GetAXProp('ReadyState')
|
||||
readystate = property(_get_ReadyState, None)
|
||||
|
||||
def _get_TotalFrames(self):
|
||||
return self.GetAXProp('TotalFrames')
|
||||
totalframes = property(_get_TotalFrames, None)
|
||||
|
||||
def _get_Playing(self):
|
||||
return self.GetAXProp('Playing')
|
||||
def _set_Playing(self, Playing):
|
||||
self.SetAXProp('Playing', Playing)
|
||||
playing = property(_get_Playing, _set_Playing)
|
||||
|
||||
def _get_Quality(self):
|
||||
return self.GetAXProp('Quality')
|
||||
def _set_Quality(self, Quality):
|
||||
self.SetAXProp('Quality', Quality)
|
||||
quality = property(_get_Quality, _set_Quality)
|
||||
|
||||
def _get_ScaleMode(self):
|
||||
return self.GetAXProp('ScaleMode')
|
||||
def _set_ScaleMode(self, ScaleMode):
|
||||
self.SetAXProp('ScaleMode', ScaleMode)
|
||||
scalemode = property(_get_ScaleMode, _set_ScaleMode)
|
||||
|
||||
def _get_AlignMode(self):
|
||||
return self.GetAXProp('AlignMode')
|
||||
def _set_AlignMode(self, AlignMode):
|
||||
self.SetAXProp('AlignMode', AlignMode)
|
||||
alignmode = property(_get_AlignMode, _set_AlignMode)
|
||||
|
||||
def _get_BackgroundColor(self):
|
||||
return self.GetAXProp('BackgroundColor')
|
||||
def _set_BackgroundColor(self, BackgroundColor):
|
||||
self.SetAXProp('BackgroundColor', BackgroundColor)
|
||||
backgroundcolor = property(_get_BackgroundColor, _set_BackgroundColor)
|
||||
|
||||
def _get_Loop(self):
|
||||
return self.GetAXProp('Loop')
|
||||
def _set_Loop(self, Loop):
|
||||
self.SetAXProp('Loop', Loop)
|
||||
loop = property(_get_Loop, _set_Loop)
|
||||
|
||||
def _get_Movie(self):
|
||||
return self.GetAXProp('Movie')
|
||||
def _set_Movie(self, Movie):
|
||||
self.SetAXProp('Movie', Movie)
|
||||
movie = property(_get_Movie, _set_Movie)
|
||||
|
||||
def _get_FrameNum(self):
|
||||
return self.GetAXProp('FrameNum')
|
||||
def _set_FrameNum(self, FrameNum):
|
||||
self.SetAXProp('FrameNum', FrameNum)
|
||||
framenum = property(_get_FrameNum, _set_FrameNum)
|
||||
|
||||
def _get_WMode(self):
|
||||
return self.GetAXProp('WMode')
|
||||
def _set_WMode(self, WMode):
|
||||
self.SetAXProp('WMode', WMode)
|
||||
wmode = property(_get_WMode, _set_WMode)
|
||||
|
||||
def _get_SAlign(self):
|
||||
return self.GetAXProp('SAlign')
|
||||
def _set_SAlign(self, SAlign):
|
||||
self.SetAXProp('SAlign', SAlign)
|
||||
salign = property(_get_SAlign, _set_SAlign)
|
||||
|
||||
def _get_Menu(self):
|
||||
return self.GetAXProp('Menu')
|
||||
def _set_Menu(self, Menu):
|
||||
self.SetAXProp('Menu', Menu)
|
||||
menu = property(_get_Menu, _set_Menu)
|
||||
|
||||
def _get_Base(self):
|
||||
return self.GetAXProp('Base')
|
||||
def _set_Base(self, Base):
|
||||
self.SetAXProp('Base', Base)
|
||||
base = property(_get_Base, _set_Base)
|
||||
|
||||
def _get_Scale(self):
|
||||
return self.GetAXProp('Scale')
|
||||
def _set_Scale(self, Scale):
|
||||
self.SetAXProp('Scale', Scale)
|
||||
scale = property(_get_Scale, _set_Scale)
|
||||
|
||||
def _get_DeviceFont(self):
|
||||
return self.GetAXProp('DeviceFont')
|
||||
def _set_DeviceFont(self, DeviceFont):
|
||||
self.SetAXProp('DeviceFont', DeviceFont)
|
||||
devicefont = property(_get_DeviceFont, _set_DeviceFont)
|
||||
|
||||
def _get_EmbedMovie(self):
|
||||
return self.GetAXProp('EmbedMovie')
|
||||
def _set_EmbedMovie(self, EmbedMovie):
|
||||
self.SetAXProp('EmbedMovie', EmbedMovie)
|
||||
embedmovie = property(_get_EmbedMovie, _set_EmbedMovie)
|
||||
|
||||
def _get_BGColor(self):
|
||||
return self.GetAXProp('BGColor')
|
||||
def _set_BGColor(self, BGColor):
|
||||
self.SetAXProp('BGColor', BGColor)
|
||||
bgcolor = property(_get_BGColor, _set_BGColor)
|
||||
|
||||
def _get_Quality2(self):
|
||||
return self.GetAXProp('Quality2')
|
||||
def _set_Quality2(self, Quality2):
|
||||
self.SetAXProp('Quality2', Quality2)
|
||||
quality2 = property(_get_Quality2, _set_Quality2)
|
||||
|
||||
def _get_SWRemote(self):
|
||||
return self.GetAXProp('SWRemote')
|
||||
def _set_SWRemote(self, SWRemote):
|
||||
self.SetAXProp('SWRemote', SWRemote)
|
||||
swremote = property(_get_SWRemote, _set_SWRemote)
|
||||
|
||||
def _get_FlashVars(self):
|
||||
return self.GetAXProp('FlashVars')
|
||||
def _set_FlashVars(self, FlashVars):
|
||||
self.SetAXProp('FlashVars', FlashVars)
|
||||
flashvars = property(_get_FlashVars, _set_FlashVars)
|
||||
|
||||
def _get_AllowScriptAccess(self):
|
||||
return self.GetAXProp('AllowScriptAccess')
|
||||
def _set_AllowScriptAccess(self, AllowScriptAccess):
|
||||
self.SetAXProp('AllowScriptAccess', AllowScriptAccess)
|
||||
allowscriptaccess = property(_get_AllowScriptAccess, _set_AllowScriptAccess)
|
||||
|
||||
def _get_MovieData(self):
|
||||
return self.GetAXProp('MovieData')
|
||||
def _set_MovieData(self, MovieData):
|
||||
self.SetAXProp('MovieData', MovieData)
|
||||
moviedata = property(_get_MovieData, _set_MovieData)
|
||||
|
||||
|
||||
# PROPERTIES
|
||||
# --------------------
|
||||
# readystate
|
||||
# type:int arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# totalframes
|
||||
# type:int arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# playing
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# quality
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# scalemode
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# alignmode
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# backgroundcolor
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# loop
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# movie
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# framenum
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# wmode
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# salign
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# menu
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# base
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# scale
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# devicefont
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# embedmovie
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# bgcolor
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# quality2
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# swremote
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# flashvars
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# allowscriptaccess
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# moviedata
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# METHODS
|
||||
# --------------------
|
||||
# QueryInterface
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# riid
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# ppvObj
|
||||
# in:False out:True optional:False type:unsupported type 26
|
||||
#
|
||||
# AddRef
|
||||
# retType: int
|
||||
#
|
||||
# Release
|
||||
# retType: int
|
||||
#
|
||||
# GetTypeInfoCount
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pctinfo
|
||||
# in:False out:True optional:False type:int
|
||||
#
|
||||
# GetTypeInfo
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# itinfo
|
||||
# in:True out:False optional:False type:int
|
||||
# lcid
|
||||
# in:True out:False optional:False type:int
|
||||
# pptinfo
|
||||
# in:False out:True optional:False type:unsupported type 26
|
||||
#
|
||||
# GetIDsOfNames
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# riid
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# rgszNames
|
||||
# in:True out:False optional:False type:unsupported type 26
|
||||
# cNames
|
||||
# in:True out:False optional:False type:int
|
||||
# lcid
|
||||
# in:True out:False optional:False type:int
|
||||
# rgdispid
|
||||
# in:False out:True optional:False type:int
|
||||
#
|
||||
# Invoke
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# dispidMember
|
||||
# in:True out:False optional:False type:int
|
||||
# riid
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# lcid
|
||||
# in:True out:False optional:False type:int
|
||||
# wFlags
|
||||
# in:True out:False optional:False type:int
|
||||
# pdispparams
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# pvarResult
|
||||
# in:False out:True optional:False type:VT_VARIANT
|
||||
# pexcepinfo
|
||||
# in:False out:True optional:False type:unsupported type 29
|
||||
# puArgErr
|
||||
# in:False out:True optional:False type:int
|
||||
#
|
||||
# SetZoomRect
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# left
|
||||
# in:True out:False optional:False type:int
|
||||
# top
|
||||
# in:True out:False optional:False type:int
|
||||
# right
|
||||
# in:True out:False optional:False type:int
|
||||
# bottom
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# Zoom
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# factor
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# Pan
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# x
|
||||
# in:True out:False optional:False type:int
|
||||
# y
|
||||
# in:True out:False optional:False type:int
|
||||
# mode
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# Play
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Stop
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Back
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Forward
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Rewind
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# StopPlay
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# GotoFrame
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# FrameNum
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# CurrentFrame
|
||||
# retType: int
|
||||
#
|
||||
# IsPlaying
|
||||
# retType: bool
|
||||
#
|
||||
# PercentLoaded
|
||||
# retType: int
|
||||
#
|
||||
# FrameLoaded
|
||||
# retType: bool
|
||||
# params:
|
||||
# FrameNum
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# FlashVersion
|
||||
# retType: int
|
||||
#
|
||||
# LoadMovie
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# layer
|
||||
# in:True out:False optional:False type:int
|
||||
# url
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TGotoFrame
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# FrameNum
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# TGotoLabel
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# label
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TCurrentFrame
|
||||
# retType: int
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TCurrentLabel
|
||||
# retType: string
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TPlay
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TStopPlay
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# SetVariable
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# name
|
||||
# in:True out:False optional:False type:string
|
||||
# value
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# GetVariable
|
||||
# retType: string
|
||||
# params:
|
||||
# name
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TSetProperty
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# property
|
||||
# in:True out:False optional:False type:int
|
||||
# value
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TGetProperty
|
||||
# retType: string
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# property
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# TCallFrame
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# FrameNum
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# TCallLabel
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# label
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# TSetPropertyNum
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# property
|
||||
# in:True out:False optional:False type:int
|
||||
# value
|
||||
# in:True out:False optional:False type:double
|
||||
#
|
||||
# TGetPropertyNum
|
||||
# retType: double
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# property
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# TGetPropertyAsNumber
|
||||
# retType: double
|
||||
# params:
|
||||
# target
|
||||
# in:True out:False optional:False type:string
|
||||
# property
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# EVENTS
|
||||
# --------------------
|
||||
# ReadyStateChange
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# newState
|
||||
# in:False out:False optional:False type:int
|
||||
#
|
||||
# Progress
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# percentDone
|
||||
# in:False out:False optional:False type:int
|
||||
#
|
||||
# FSCommand
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# command
|
||||
# in:True out:False optional:False type:string
|
||||
# args
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
890
wxPython/wx/lib/iewin.py
Normal file
890
wxPython/wx/lib/iewin.py
Normal file
@@ -0,0 +1,890 @@
|
||||
#----------------------------------------------------------------------
|
||||
# Name: wx.lib.iewin
|
||||
# Purpose: A class that allows the use of the IE web browser
|
||||
# ActiveX control
|
||||
#
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 22-March-2004
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 2004 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
# This module was originally generated by the
|
||||
# wx.activex.GernerateAXModule class but has been tweaked somewhat as
|
||||
# indicated below.
|
||||
|
||||
import wx
|
||||
import wx.activex
|
||||
|
||||
clsID = '{8856F961-340A-11D0-A96B-00C04FD705A2}'
|
||||
progID = 'Shell.Explorer.2'
|
||||
|
||||
|
||||
# Flags to be used with the RefreshPage method
|
||||
REFRESH_NORMAL = 0
|
||||
REFRESH_IFEXPIRED = 1
|
||||
REFRESH_CONTINUE = 2
|
||||
REFRESH_COMPLETELY = 3
|
||||
|
||||
# Flags to be used with LoadUrl, Navigate, Navigate2 methods
|
||||
NAV_OpenInNewWindow = 0x1
|
||||
NAV_NoHistory = 0x2
|
||||
NAV_NoReadFromCache = 0x4
|
||||
NAV_NoWriteToCache = 0x8
|
||||
NAV_AllowAutosearch = 0x10
|
||||
NAV_BrowserBar = 0x20
|
||||
NAV_Hyperlink = 0x40
|
||||
|
||||
|
||||
|
||||
# Create eventTypes and event binders
|
||||
wxEVT_StatusTextChange = wx.activex.RegisterActiveXEvent('StatusTextChange')
|
||||
wxEVT_ProgressChange = wx.activex.RegisterActiveXEvent('ProgressChange')
|
||||
wxEVT_CommandStateChange = wx.activex.RegisterActiveXEvent('CommandStateChange')
|
||||
wxEVT_DownloadBegin = wx.activex.RegisterActiveXEvent('DownloadBegin')
|
||||
wxEVT_DownloadComplete = wx.activex.RegisterActiveXEvent('DownloadComplete')
|
||||
wxEVT_TitleChange = wx.activex.RegisterActiveXEvent('TitleChange')
|
||||
wxEVT_PropertyChange = wx.activex.RegisterActiveXEvent('PropertyChange')
|
||||
wxEVT_BeforeNavigate2 = wx.activex.RegisterActiveXEvent('BeforeNavigate2')
|
||||
wxEVT_NewWindow2 = wx.activex.RegisterActiveXEvent('NewWindow2')
|
||||
wxEVT_NavigateComplete2 = wx.activex.RegisterActiveXEvent('NavigateComplete2')
|
||||
wxEVT_DocumentComplete = wx.activex.RegisterActiveXEvent('DocumentComplete')
|
||||
wxEVT_Quit = wx.activex.RegisterActiveXEvent('OnQuit')
|
||||
wxEVT_Visible = wx.activex.RegisterActiveXEvent('OnVisible')
|
||||
wxEVT_ToolBar = wx.activex.RegisterActiveXEvent('OnToolBar')
|
||||
wxEVT_MenuBar = wx.activex.RegisterActiveXEvent('OnMenuBar')
|
||||
wxEVT_StatusBar = wx.activex.RegisterActiveXEvent('OnStatusBar')
|
||||
wxEVT_FullScreen = wx.activex.RegisterActiveXEvent('OnFullScreen')
|
||||
wxEVT_TheaterMode = wx.activex.RegisterActiveXEvent('OnTheaterMode')
|
||||
wxEVT_WindowSetResizable = wx.activex.RegisterActiveXEvent('WindowSetResizable')
|
||||
wxEVT_WindowSetLeft = wx.activex.RegisterActiveXEvent('WindowSetLeft')
|
||||
wxEVT_WindowSetTop = wx.activex.RegisterActiveXEvent('WindowSetTop')
|
||||
wxEVT_WindowSetWidth = wx.activex.RegisterActiveXEvent('WindowSetWidth')
|
||||
wxEVT_WindowSetHeight = wx.activex.RegisterActiveXEvent('WindowSetHeight')
|
||||
wxEVT_WindowClosing = wx.activex.RegisterActiveXEvent('WindowClosing')
|
||||
wxEVT_ClientToHostWindow = wx.activex.RegisterActiveXEvent('ClientToHostWindow')
|
||||
wxEVT_SetSecureLockIcon = wx.activex.RegisterActiveXEvent('SetSecureLockIcon')
|
||||
wxEVT_FileDownload = wx.activex.RegisterActiveXEvent('FileDownload')
|
||||
wxEVT_NavigateError = wx.activex.RegisterActiveXEvent('NavigateError')
|
||||
wxEVT_PrintTemplateInstantiation = wx.activex.RegisterActiveXEvent('PrintTemplateInstantiation')
|
||||
wxEVT_PrintTemplateTeardown = wx.activex.RegisterActiveXEvent('PrintTemplateTeardown')
|
||||
wxEVT_UpdatePageStatus = wx.activex.RegisterActiveXEvent('UpdatePageStatus')
|
||||
wxEVT_PrivacyImpactedStateChange = wx.activex.RegisterActiveXEvent('PrivacyImpactedStateChange')
|
||||
|
||||
EVT_StatusTextChange = wx.PyEventBinder(wxEVT_StatusTextChange, 1)
|
||||
EVT_ProgressChange = wx.PyEventBinder(wxEVT_ProgressChange, 1)
|
||||
EVT_CommandStateChange = wx.PyEventBinder(wxEVT_CommandStateChange, 1)
|
||||
EVT_DownloadBegin = wx.PyEventBinder(wxEVT_DownloadBegin, 1)
|
||||
EVT_DownloadComplete = wx.PyEventBinder(wxEVT_DownloadComplete, 1)
|
||||
EVT_TitleChange = wx.PyEventBinder(wxEVT_TitleChange, 1)
|
||||
EVT_PropertyChange = wx.PyEventBinder(wxEVT_PropertyChange, 1)
|
||||
EVT_BeforeNavigate2 = wx.PyEventBinder(wxEVT_BeforeNavigate2, 1)
|
||||
EVT_NewWindow2 = wx.PyEventBinder(wxEVT_NewWindow2, 1)
|
||||
EVT_NavigateComplete2 = wx.PyEventBinder(wxEVT_NavigateComplete2, 1)
|
||||
EVT_DocumentComplete = wx.PyEventBinder(wxEVT_DocumentComplete, 1)
|
||||
EVT_Quit = wx.PyEventBinder(wxEVT_Quit, 1)
|
||||
EVT_Visible = wx.PyEventBinder(wxEVT_Visible, 1)
|
||||
EVT_ToolBar = wx.PyEventBinder(wxEVT_ToolBar, 1)
|
||||
EVT_MenuBar = wx.PyEventBinder(wxEVT_MenuBar, 1)
|
||||
EVT_StatusBar = wx.PyEventBinder(wxEVT_StatusBar, 1)
|
||||
EVT_FullScreen = wx.PyEventBinder(wxEVT_FullScreen, 1)
|
||||
EVT_TheaterMode = wx.PyEventBinder(wxEVT_TheaterMode, 1)
|
||||
EVT_WindowSetResizable = wx.PyEventBinder(wxEVT_WindowSetResizable, 1)
|
||||
EVT_WindowSetLeft = wx.PyEventBinder(wxEVT_WindowSetLeft, 1)
|
||||
EVT_WindowSetTop = wx.PyEventBinder(wxEVT_WindowSetTop, 1)
|
||||
EVT_WindowSetWidth = wx.PyEventBinder(wxEVT_WindowSetWidth, 1)
|
||||
EVT_WindowSetHeight = wx.PyEventBinder(wxEVT_WindowSetHeight, 1)
|
||||
EVT_WindowClosing = wx.PyEventBinder(wxEVT_WindowClosing, 1)
|
||||
EVT_ClientToHostWindow = wx.PyEventBinder(wxEVT_ClientToHostWindow, 1)
|
||||
EVT_SetSecureLockIcon = wx.PyEventBinder(wxEVT_SetSecureLockIcon, 1)
|
||||
EVT_FileDownload = wx.PyEventBinder(wxEVT_FileDownload, 1)
|
||||
EVT_NavigateError = wx.PyEventBinder(wxEVT_NavigateError, 1)
|
||||
EVT_PrintTemplateInstantiation = wx.PyEventBinder(wxEVT_PrintTemplateInstantiation, 1)
|
||||
EVT_PrintTemplateTeardown = wx.PyEventBinder(wxEVT_PrintTemplateTeardown, 1)
|
||||
EVT_UpdatePageStatus = wx.PyEventBinder(wxEVT_UpdatePageStatus, 1)
|
||||
EVT_PrivacyImpactedStateChange = wx.PyEventBinder(wxEVT_PrivacyImpactedStateChange, 1)
|
||||
|
||||
|
||||
# For this there are af ew special methods implemented in C++ in the
|
||||
# IEHtmlWindowBase class, so derive from it instead of ActiveXWindow.
|
||||
class IEHtmlWindow(wx.activex.IEHtmlWindowBase):
|
||||
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
|
||||
size=wx.DefaultSize, style=0, name='IEHtmlWindow'):
|
||||
wx.activex.IEHtmlWindowBase.__init__(self, parent,
|
||||
wx.activex.CLSID('{8856F961-340A-11D0-A96B-00C04FD705A2}'),
|
||||
ID, pos, size, style, name)
|
||||
|
||||
# Methods from IEHtmlWindowBase. Redirected from here just for
|
||||
# the sake of completeness...
|
||||
def LoadString(self, html):
|
||||
"""Load the html document from a string"""
|
||||
return wx.activex.IEHtmlWindowBase.LoadString(self, html)
|
||||
|
||||
|
||||
def LoadStream(self, stream):
|
||||
"""
|
||||
Load the html document from a wx.InputStream or a Python
|
||||
file-like object.
|
||||
"""
|
||||
return wx.activex.IEHtmlWindowBase.LoadStream(self, stream)
|
||||
|
||||
|
||||
def LoadUrl(self, URL, Flags=0):
|
||||
"""Load the document from url."""
|
||||
return self.Navigate2(URL, Flags)
|
||||
|
||||
|
||||
def GetStringSelection(self, asHTML):
|
||||
"""
|
||||
Returns the contents of the selected portion of the document as
|
||||
either html or plain text.
|
||||
"""
|
||||
return wx.activex.IEHtmlWindowBase.GetStringSelection(self, asHTML)
|
||||
|
||||
|
||||
def GetText(self, asHTML):
|
||||
"""
|
||||
Returns the contents of the the html document as either html or plain text.
|
||||
"""
|
||||
return wx.activex.IEHtmlWindowBase.GetText(self, asHTML)
|
||||
|
||||
|
||||
def SetCharset(self, charset):
|
||||
""""""
|
||||
return wx.activex.IEHtmlWindowBase.SetCharset(self, charset)
|
||||
|
||||
|
||||
# Methods exported by the ActiveX object
|
||||
def QueryInterface(self, riid):
|
||||
return self.CallAXMethod('QueryInterface', riid)
|
||||
|
||||
def AddRef(self):
|
||||
return self.CallAXMethod('AddRef')
|
||||
|
||||
def Release(self):
|
||||
return self.CallAXMethod('Release')
|
||||
|
||||
def GetTypeInfoCount(self):
|
||||
return self.CallAXMethod('GetTypeInfoCount')
|
||||
|
||||
def GetTypeInfo(self, itinfo, lcid):
|
||||
return self.CallAXMethod('GetTypeInfo', itinfo, lcid)
|
||||
|
||||
def GetIDsOfNames(self, riid, rgszNames, cNames, lcid):
|
||||
return self.CallAXMethod('GetIDsOfNames', riid, rgszNames, cNames, lcid)
|
||||
|
||||
def Invoke(self, dispidMember, riid, lcid, wFlags, pdispparams):
|
||||
return self.CallAXMethod('Invoke', dispidMember, riid, lcid, wFlags, pdispparams)
|
||||
|
||||
def GoBack(self):
|
||||
return self.CallAXMethod('GoBack')
|
||||
|
||||
def GoForward(self):
|
||||
return self.CallAXMethod('GoForward')
|
||||
|
||||
def GoHome(self):
|
||||
return self.CallAXMethod('GoHome')
|
||||
|
||||
def GoSearch(self):
|
||||
return self.CallAXMethod('GoSearch')
|
||||
|
||||
# added default for Flags
|
||||
def Navigate(self, URL, Flags=0, TargetFrameName=None, PostData=None, Headers=None):
|
||||
return self.CallAXMethod('Navigate', URL, Flags, TargetFrameName, PostData, Headers)
|
||||
|
||||
# Removed to prevent conflict with wx.Window.Refresh
|
||||
#def Refresh(self):
|
||||
# return self.CallAXMethod('Refresh')
|
||||
|
||||
# renamed
|
||||
def RefreshPage(self, Level=REFRESH_NORMAL):
|
||||
return self.CallAXMethod('Refresh2', Level)
|
||||
|
||||
def Stop(self):
|
||||
return self.CallAXMethod('Stop')
|
||||
|
||||
def Quit(self):
|
||||
return self.CallAXMethod('Quit')
|
||||
|
||||
def ClientToWindow(self, pcx, pcy):
|
||||
return self.CallAXMethod('ClientToWindow', pcx, pcy)
|
||||
|
||||
def PutProperty(self, Property, vtValue):
|
||||
return self.CallAXMethod('PutProperty', Property, vtValue)
|
||||
|
||||
def GetProperty(self, Property):
|
||||
return self.CallAXMethod('GetProperty', Property)
|
||||
|
||||
# added default for flags
|
||||
def Navigate2(self, URL, Flags=0, TargetFrameName=None, PostData=None, Headers=None):
|
||||
return self.CallAXMethod('Navigate2', URL, Flags, TargetFrameName, PostData, Headers)
|
||||
|
||||
def QueryStatusWB(self, cmdID):
|
||||
return self.CallAXMethod('QueryStatusWB', cmdID)
|
||||
|
||||
def ExecWB(self, cmdID, cmdexecopt, pvaIn, pvaOut=None):
|
||||
return self.CallAXMethod('ExecWB', cmdID, cmdexecopt, pvaIn, pvaOut)
|
||||
|
||||
def ShowBrowserBar(self, pvaClsid, pvarShow, pvarSize=None):
|
||||
return self.CallAXMethod('ShowBrowserBar', pvaClsid, pvarShow, pvarSize)
|
||||
|
||||
# Getters, Setters and properties
|
||||
def _get_Application(self):
|
||||
return self.GetAXProp('Application')
|
||||
application = property(_get_Application, None)
|
||||
|
||||
def _get_Parent(self):
|
||||
return self.GetAXProp('Parent')
|
||||
parent = property(_get_Parent, None)
|
||||
|
||||
def _get_Container(self):
|
||||
return self.GetAXProp('Container')
|
||||
container = property(_get_Container, None)
|
||||
|
||||
def _get_Document(self):
|
||||
return self.GetAXProp('Document')
|
||||
document = property(_get_Document, None)
|
||||
|
||||
def _get_TopLevelContainer(self):
|
||||
return self.GetAXProp('TopLevelContainer')
|
||||
toplevelcontainer = property(_get_TopLevelContainer, None)
|
||||
|
||||
def _get_Type(self):
|
||||
return self.GetAXProp('Type')
|
||||
type = property(_get_Type, None)
|
||||
|
||||
def _get_Left(self):
|
||||
return self.GetAXProp('Left')
|
||||
def _set_Left(self, Left):
|
||||
self.SetAXProp('Left', Left)
|
||||
left = property(_get_Left, _set_Left)
|
||||
|
||||
def _get_Top(self):
|
||||
return self.GetAXProp('Top')
|
||||
def _set_Top(self, Top):
|
||||
self.SetAXProp('Top', Top)
|
||||
top = property(_get_Top, _set_Top)
|
||||
|
||||
def _get_Width(self):
|
||||
return self.GetAXProp('Width')
|
||||
def _set_Width(self, Width):
|
||||
self.SetAXProp('Width', Width)
|
||||
width = property(_get_Width, _set_Width)
|
||||
|
||||
def _get_Height(self):
|
||||
return self.GetAXProp('Height')
|
||||
def _set_Height(self, Height):
|
||||
self.SetAXProp('Height', Height)
|
||||
height = property(_get_Height, _set_Height)
|
||||
|
||||
def _get_LocationName(self):
|
||||
return self.GetAXProp('LocationName')
|
||||
locationname = property(_get_LocationName, None)
|
||||
|
||||
def _get_LocationURL(self):
|
||||
return self.GetAXProp('LocationURL')
|
||||
locationurl = property(_get_LocationURL, None)
|
||||
|
||||
def _get_Busy(self):
|
||||
return self.GetAXProp('Busy')
|
||||
busy = property(_get_Busy, None)
|
||||
|
||||
def _get_Name(self):
|
||||
return self.GetAXProp('Name')
|
||||
name = property(_get_Name, None)
|
||||
|
||||
def _get_HWND(self):
|
||||
return self.GetAXProp('HWND')
|
||||
hwnd = property(_get_HWND, None)
|
||||
|
||||
def _get_FullName(self):
|
||||
return self.GetAXProp('FullName')
|
||||
fullname = property(_get_FullName, None)
|
||||
|
||||
def _get_Path(self):
|
||||
return self.GetAXProp('Path')
|
||||
path = property(_get_Path, None)
|
||||
|
||||
def _get_Visible(self):
|
||||
return self.GetAXProp('Visible')
|
||||
def _set_Visible(self, Visible):
|
||||
self.SetAXProp('Visible', Visible)
|
||||
visible = property(_get_Visible, _set_Visible)
|
||||
|
||||
def _get_StatusBar(self):
|
||||
return self.GetAXProp('StatusBar')
|
||||
def _set_StatusBar(self, StatusBar):
|
||||
self.SetAXProp('StatusBar', StatusBar)
|
||||
statusbar = property(_get_StatusBar, _set_StatusBar)
|
||||
|
||||
def _get_StatusText(self):
|
||||
return self.GetAXProp('StatusText')
|
||||
def _set_StatusText(self, StatusText):
|
||||
self.SetAXProp('StatusText', StatusText)
|
||||
statustext = property(_get_StatusText, _set_StatusText)
|
||||
|
||||
def _get_ToolBar(self):
|
||||
return self.GetAXProp('ToolBar')
|
||||
def _set_ToolBar(self, ToolBar):
|
||||
self.SetAXProp('ToolBar', ToolBar)
|
||||
toolbar = property(_get_ToolBar, _set_ToolBar)
|
||||
|
||||
def _get_MenuBar(self):
|
||||
return self.GetAXProp('MenuBar')
|
||||
def _set_MenuBar(self, MenuBar):
|
||||
self.SetAXProp('MenuBar', MenuBar)
|
||||
menubar = property(_get_MenuBar, _set_MenuBar)
|
||||
|
||||
def _get_FullScreen(self):
|
||||
return self.GetAXProp('FullScreen')
|
||||
def _set_FullScreen(self, FullScreen):
|
||||
self.SetAXProp('FullScreen', FullScreen)
|
||||
fullscreen = property(_get_FullScreen, _set_FullScreen)
|
||||
|
||||
def _get_ReadyState(self):
|
||||
return self.GetAXProp('ReadyState')
|
||||
readystate = property(_get_ReadyState, None)
|
||||
|
||||
def _get_Offline(self):
|
||||
return self.GetAXProp('Offline')
|
||||
def _set_Offline(self, Offline):
|
||||
self.SetAXProp('Offline', Offline)
|
||||
offline = property(_get_Offline, _set_Offline)
|
||||
|
||||
def _get_Silent(self):
|
||||
return self.GetAXProp('Silent')
|
||||
def _set_Silent(self, Silent):
|
||||
self.SetAXProp('Silent', Silent)
|
||||
silent = property(_get_Silent, _set_Silent)
|
||||
|
||||
def _get_RegisterAsBrowser(self):
|
||||
return self.GetAXProp('RegisterAsBrowser')
|
||||
def _set_RegisterAsBrowser(self, RegisterAsBrowser):
|
||||
self.SetAXProp('RegisterAsBrowser', RegisterAsBrowser)
|
||||
registerasbrowser = property(_get_RegisterAsBrowser, _set_RegisterAsBrowser)
|
||||
|
||||
def _get_RegisterAsDropTarget(self):
|
||||
return self.GetAXProp('RegisterAsDropTarget')
|
||||
def _set_RegisterAsDropTarget(self, RegisterAsDropTarget):
|
||||
self.SetAXProp('RegisterAsDropTarget', RegisterAsDropTarget)
|
||||
registerasdroptarget = property(_get_RegisterAsDropTarget, _set_RegisterAsDropTarget)
|
||||
|
||||
def _get_TheaterMode(self):
|
||||
return self.GetAXProp('TheaterMode')
|
||||
def _set_TheaterMode(self, TheaterMode):
|
||||
self.SetAXProp('TheaterMode', TheaterMode)
|
||||
theatermode = property(_get_TheaterMode, _set_TheaterMode)
|
||||
|
||||
def _get_AddressBar(self):
|
||||
return self.GetAXProp('AddressBar')
|
||||
def _set_AddressBar(self, AddressBar):
|
||||
self.SetAXProp('AddressBar', AddressBar)
|
||||
addressbar = property(_get_AddressBar, _set_AddressBar)
|
||||
|
||||
def _get_Resizable(self):
|
||||
return self.GetAXProp('Resizable')
|
||||
def _set_Resizable(self, Resizable):
|
||||
self.SetAXProp('Resizable', Resizable)
|
||||
resizable = property(_get_Resizable, _set_Resizable)
|
||||
|
||||
|
||||
# PROPERTIES
|
||||
# --------------------
|
||||
# application
|
||||
# type:VT_DISPATCH arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# parent
|
||||
# type:VT_DISPATCH arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# container
|
||||
# type:VT_DISPATCH arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# document
|
||||
# type:VT_DISPATCH arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# toplevelcontainer
|
||||
# type:bool arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# type
|
||||
# type:string arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# left
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# top
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# width
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# height
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# locationname
|
||||
# type:string arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# locationurl
|
||||
# type:string arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# busy
|
||||
# type:bool arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# name
|
||||
# type:string arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# hwnd
|
||||
# type:int arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# fullname
|
||||
# type:string arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# path
|
||||
# type:string arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# visible
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# statusbar
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# statustext
|
||||
# type:string arg:string canGet:True canSet:True
|
||||
#
|
||||
# toolbar
|
||||
# type:int arg:int canGet:True canSet:True
|
||||
#
|
||||
# menubar
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# fullscreen
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# readystate
|
||||
# type:unsupported type 29 arg:VT_EMPTY canGet:True canSet:False
|
||||
#
|
||||
# offline
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# silent
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# registerasbrowser
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# registerasdroptarget
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# theatermode
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# addressbar
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
# resizable
|
||||
# type:bool arg:bool canGet:True canSet:True
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# METHODS
|
||||
# --------------------
|
||||
# QueryInterface
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# riid
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# ppvObj
|
||||
# in:False out:True optional:False type:unsupported type 26
|
||||
#
|
||||
# AddRef
|
||||
# retType: int
|
||||
#
|
||||
# Release
|
||||
# retType: int
|
||||
#
|
||||
# GetTypeInfoCount
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pctinfo
|
||||
# in:False out:True optional:False type:int
|
||||
#
|
||||
# GetTypeInfo
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# itinfo
|
||||
# in:True out:False optional:False type:int
|
||||
# lcid
|
||||
# in:True out:False optional:False type:int
|
||||
# pptinfo
|
||||
# in:False out:True optional:False type:unsupported type 26
|
||||
#
|
||||
# GetIDsOfNames
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# riid
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# rgszNames
|
||||
# in:True out:False optional:False type:unsupported type 26
|
||||
# cNames
|
||||
# in:True out:False optional:False type:int
|
||||
# lcid
|
||||
# in:True out:False optional:False type:int
|
||||
# rgdispid
|
||||
# in:False out:True optional:False type:int
|
||||
#
|
||||
# Invoke
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# dispidMember
|
||||
# in:True out:False optional:False type:int
|
||||
# riid
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# lcid
|
||||
# in:True out:False optional:False type:int
|
||||
# wFlags
|
||||
# in:True out:False optional:False type:int
|
||||
# pdispparams
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# pvarResult
|
||||
# in:False out:True optional:False type:VT_VARIANT
|
||||
# pexcepinfo
|
||||
# in:False out:True optional:False type:unsupported type 29
|
||||
# puArgErr
|
||||
# in:False out:True optional:False type:int
|
||||
#
|
||||
# GoBack
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# GoForward
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# GoHome
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# GoSearch
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Navigate
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# URL
|
||||
# in:True out:False optional:False type:string
|
||||
# Flags
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# TargetFrameName
|
||||
# in:True out:False optional:True type:VT_VARIANT
|
||||
# PostData
|
||||
# in:True out:False optional:True type:VT_VARIANT
|
||||
# Headers
|
||||
# in:True out:False optional:True type:VT_VARIANT
|
||||
#
|
||||
# Refresh
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Refresh2
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Level
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
#
|
||||
# Stop
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Quit
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# ClientToWindow
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pcx
|
||||
# in:True out:True optional:False type:int
|
||||
# pcy
|
||||
# in:True out:True optional:False type:int
|
||||
#
|
||||
# PutProperty
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Property
|
||||
# in:True out:False optional:False type:string
|
||||
# vtValue
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
#
|
||||
# GetProperty
|
||||
# retType: VT_VARIANT
|
||||
# params:
|
||||
# Property
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# Navigate2
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# URL
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# Flags
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# TargetFrameName
|
||||
# in:True out:False optional:True type:VT_VARIANT
|
||||
# PostData
|
||||
# in:True out:False optional:True type:VT_VARIANT
|
||||
# Headers
|
||||
# in:True out:False optional:True type:VT_VARIANT
|
||||
#
|
||||
# QueryStatusWB
|
||||
# retType: unsupported type 29
|
||||
# params:
|
||||
# cmdID
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
#
|
||||
# ExecWB
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# cmdID
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# cmdexecopt
|
||||
# in:True out:False optional:False type:unsupported type 29
|
||||
# pvaIn
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# pvaOut
|
||||
# in:True out:True optional:True type:VT_VARIANT
|
||||
#
|
||||
# ShowBrowserBar
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pvaClsid
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# pvarShow
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# pvarSize
|
||||
# in:True out:False optional:True type:VT_VARIANT
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# EVENTS
|
||||
# --------------------
|
||||
# StatusTextChange
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Text
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# ProgressChange
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Progress
|
||||
# in:True out:False optional:False type:int
|
||||
# ProgressMax
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# CommandStateChange
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Command
|
||||
# in:True out:False optional:False type:int
|
||||
# Enable
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# DownloadBegin
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# DownloadComplete
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# TitleChange
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Text
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# PropertyChange
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# szProperty
|
||||
# in:True out:False optional:False type:string
|
||||
#
|
||||
# BeforeNavigate2
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pDisp
|
||||
# in:True out:False optional:False type:VT_DISPATCH
|
||||
# URL
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# Flags
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# TargetFrameName
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# PostData
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# Headers
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# Cancel
|
||||
# in:True out:True optional:False type:bool
|
||||
#
|
||||
# NewWindow2
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# ppDisp
|
||||
# in:True out:True optional:False type:VT_DISPATCH
|
||||
# Cancel
|
||||
# in:True out:True optional:False type:bool
|
||||
#
|
||||
# NavigateComplete2
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pDisp
|
||||
# in:True out:False optional:False type:VT_DISPATCH
|
||||
# URL
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
#
|
||||
# DocumentComplete
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pDisp
|
||||
# in:True out:False optional:False type:VT_DISPATCH
|
||||
# URL
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
#
|
||||
# Quit
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# Visible
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Visible
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# ToolBar
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# ToolBar
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# MenuBar
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# MenuBar
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# StatusBar
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# StatusBar
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# FullScreen
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# FullScreen
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# TheaterMode
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# TheaterMode
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# WindowSetResizable
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Resizable
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
# WindowSetLeft
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Left
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# WindowSetTop
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Top
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# WindowSetWidth
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Width
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# WindowSetHeight
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Height
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# WindowClosing
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# IsChildWindow
|
||||
# in:True out:False optional:False type:bool
|
||||
# Cancel
|
||||
# in:True out:True optional:False type:bool
|
||||
#
|
||||
# ClientToHostWindow
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# CX
|
||||
# in:True out:True optional:False type:int
|
||||
# CY
|
||||
# in:True out:True optional:False type:int
|
||||
#
|
||||
# SetSecureLockIcon
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# SecureLockIcon
|
||||
# in:True out:False optional:False type:int
|
||||
#
|
||||
# FileDownload
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# Cancel
|
||||
# in:True out:True optional:False type:bool
|
||||
#
|
||||
# NavigateError
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pDisp
|
||||
# in:True out:False optional:False type:VT_DISPATCH
|
||||
# URL
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# Frame
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# StatusCode
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# Cancel
|
||||
# in:True out:True optional:False type:bool
|
||||
#
|
||||
# PrintTemplateInstantiation
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pDisp
|
||||
# in:True out:False optional:False type:VT_DISPATCH
|
||||
#
|
||||
# PrintTemplateTeardown
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pDisp
|
||||
# in:True out:False optional:False type:VT_DISPATCH
|
||||
#
|
||||
# UpdatePageStatus
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pDisp
|
||||
# in:True out:False optional:False type:VT_DISPATCH
|
||||
# nPage
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
# fDone
|
||||
# in:True out:False optional:False type:VT_VARIANT
|
||||
#
|
||||
# PrivacyImpactedStateChange
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# bImpacted
|
||||
# in:True out:False optional:False type:bool
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
261
wxPython/wx/lib/pdfwin.py
Normal file
261
wxPython/wx/lib/pdfwin.py
Normal file
@@ -0,0 +1,261 @@
|
||||
#----------------------------------------------------------------------
|
||||
# Name: wx.lib.pdfwin
|
||||
# Purpose: A class that allows the use of the Acrobat PSF reader
|
||||
# ActiveX control
|
||||
#
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 22-March-2004
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 2004 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------
|
||||
# This module was generated by the wx.activex.GernerateAXModule class
|
||||
# (See also the genaxmodule script.)
|
||||
|
||||
import wx
|
||||
import wx.activex
|
||||
|
||||
clsID = '{CA8A9780-280D-11CF-A24D-444553540000}'
|
||||
progID = 'PDF.PdfCtrl.5'
|
||||
|
||||
|
||||
|
||||
# Derive a new class from ActiveXWindow
|
||||
class PDFWindow(wx.activex.ActiveXWindow):
|
||||
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
|
||||
size=wx.DefaultSize, style=0, name='PDFWindow'):
|
||||
wx.activex.ActiveXWindow.__init__(self, parent,
|
||||
wx.activex.CLSID('{CA8A9780-280D-11CF-A24D-444553540000}'),
|
||||
ID, pos, size, style, name)
|
||||
|
||||
# Methods exported by the ActiveX object
|
||||
def LoadFile(self, fileName):
|
||||
return self.CallAXMethod('LoadFile', fileName)
|
||||
|
||||
def setShowToolbar(self, On):
|
||||
return self.CallAXMethod('setShowToolbar', On)
|
||||
|
||||
def gotoFirstPage(self):
|
||||
return self.CallAXMethod('gotoFirstPage')
|
||||
|
||||
def gotoLastPage(self):
|
||||
return self.CallAXMethod('gotoLastPage')
|
||||
|
||||
def gotoNextPage(self):
|
||||
return self.CallAXMethod('gotoNextPage')
|
||||
|
||||
def gotoPreviousPage(self):
|
||||
return self.CallAXMethod('gotoPreviousPage')
|
||||
|
||||
def setCurrentPage(self, n):
|
||||
return self.CallAXMethod('setCurrentPage', n)
|
||||
|
||||
def goForwardStack(self):
|
||||
return self.CallAXMethod('goForwardStack')
|
||||
|
||||
def goBackwardStack(self):
|
||||
return self.CallAXMethod('goBackwardStack')
|
||||
|
||||
def setPageMode(self, pageMode):
|
||||
return self.CallAXMethod('setPageMode', pageMode)
|
||||
|
||||
def setLayoutMode(self, layoutMode):
|
||||
return self.CallAXMethod('setLayoutMode', layoutMode)
|
||||
|
||||
def setNamedDest(self, namedDest):
|
||||
return self.CallAXMethod('setNamedDest', namedDest)
|
||||
|
||||
def Print(self):
|
||||
return self.CallAXMethod('Print')
|
||||
|
||||
def printWithDialog(self):
|
||||
return self.CallAXMethod('printWithDialog')
|
||||
|
||||
def setZoom(self, percent):
|
||||
return self.CallAXMethod('setZoom', percent)
|
||||
|
||||
def setZoomScroll(self, percent, left, top):
|
||||
return self.CallAXMethod('setZoomScroll', percent, left, top)
|
||||
|
||||
def setView(self, viewMode):
|
||||
return self.CallAXMethod('setView', viewMode)
|
||||
|
||||
def setViewScroll(self, viewMode, offset):
|
||||
return self.CallAXMethod('setViewScroll', viewMode, offset)
|
||||
|
||||
def setViewRect(self, left, top, width, height):
|
||||
return self.CallAXMethod('setViewRect', left, top, width, height)
|
||||
|
||||
def printPages(self, from_, to):
|
||||
return self.CallAXMethod('printPages', from_, to)
|
||||
|
||||
def printPagesFit(self, from_, to, shrinkToFit):
|
||||
return self.CallAXMethod('printPagesFit', from_, to, shrinkToFit)
|
||||
|
||||
def printAll(self):
|
||||
return self.CallAXMethod('printAll')
|
||||
|
||||
def printAllFit(self, shrinkToFit):
|
||||
return self.CallAXMethod('printAllFit', shrinkToFit)
|
||||
|
||||
def setShowScrollbars(self, On):
|
||||
return self.CallAXMethod('setShowScrollbars', On)
|
||||
|
||||
def AboutBox(self):
|
||||
return self.CallAXMethod('AboutBox')
|
||||
|
||||
|
||||
# PROPERTIES
|
||||
# --------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# METHODS
|
||||
# --------------------
|
||||
# LoadFile
|
||||
# retType: bool
|
||||
# params:
|
||||
# fileName
|
||||
# in:False out:False optional:False type:string
|
||||
#
|
||||
# setShowToolbar
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# On
|
||||
# in:False out:False optional:False type:bool
|
||||
#
|
||||
# gotoFirstPage
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# gotoLastPage
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# gotoNextPage
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# gotoPreviousPage
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# setCurrentPage
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# n
|
||||
# in:False out:False optional:False type:int
|
||||
#
|
||||
# goForwardStack
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# goBackwardStack
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# setPageMode
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# pageMode
|
||||
# in:False out:False optional:False type:string
|
||||
#
|
||||
# setLayoutMode
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# layoutMode
|
||||
# in:False out:False optional:False type:string
|
||||
#
|
||||
# setNamedDest
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# namedDest
|
||||
# in:False out:False optional:False type:string
|
||||
#
|
||||
# Print
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# printWithDialog
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# setZoom
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# percent
|
||||
# in:False out:False optional:False type:double
|
||||
#
|
||||
# setZoomScroll
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# percent
|
||||
# in:False out:False optional:False type:double
|
||||
# left
|
||||
# in:False out:False optional:False type:double
|
||||
# top
|
||||
# in:False out:False optional:False type:double
|
||||
#
|
||||
# setView
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# viewMode
|
||||
# in:False out:False optional:False type:string
|
||||
#
|
||||
# setViewScroll
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# viewMode
|
||||
# in:False out:False optional:False type:string
|
||||
# offset
|
||||
# in:False out:False optional:False type:double
|
||||
#
|
||||
# setViewRect
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# left
|
||||
# in:False out:False optional:False type:double
|
||||
# top
|
||||
# in:False out:False optional:False type:double
|
||||
# width
|
||||
# in:False out:False optional:False type:double
|
||||
# height
|
||||
# in:False out:False optional:False type:double
|
||||
#
|
||||
# printPages
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# from
|
||||
# in:False out:False optional:False type:int
|
||||
# to
|
||||
# in:False out:False optional:False type:int
|
||||
#
|
||||
# printPagesFit
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# from
|
||||
# in:False out:False optional:False type:int
|
||||
# to
|
||||
# in:False out:False optional:False type:int
|
||||
# shrinkToFit
|
||||
# in:False out:False optional:False type:bool
|
||||
#
|
||||
# printAll
|
||||
# retType: VT_VOID
|
||||
#
|
||||
# printAllFit
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# shrinkToFit
|
||||
# in:False out:False optional:False type:bool
|
||||
#
|
||||
# setShowScrollbars
|
||||
# retType: VT_VOID
|
||||
# params:
|
||||
# On
|
||||
# in:False out:False optional:False type:bool
|
||||
#
|
||||
# AboutBox
|
||||
# retType: VT_VOID
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# EVENTS
|
||||
# --------------------
|
||||
#
|
||||
#
|
||||
#
|
43
wxPython/wx/tools/genaxmodule.py
Normal file
43
wxPython/wx/tools/genaxmodule.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""
|
||||
|
||||
|
||||
When this script is run it will create a .py module (output to the
|
||||
current directory) containing a class derived from
|
||||
wx.activex.ActiveXWindow for the progID or CLSID given on the command
|
||||
line. By default the class name will be used as the module name as
|
||||
well, but this is just because I am lazy, not trying to define a
|
||||
standard or anything. Feel free to rename the module, I do.
|
||||
|
||||
Usage:
|
||||
|
||||
python genax.py CLSID|progID className
|
||||
|
||||
"""
|
||||
|
||||
import wx
|
||||
import wx.activex
|
||||
import sys
|
||||
|
||||
|
||||
def main(args):
|
||||
if len(args) < 3:
|
||||
print __doc__
|
||||
sys.exit(1)
|
||||
|
||||
# unfortunatly we need to make an app, frame and an instance of
|
||||
# the ActiceX control in order to get the TypeInfo about it...
|
||||
app = wx.PySimpleApp()
|
||||
f = wx.Frame(None, -1, "")
|
||||
clsid = wx.activex.CLSID(args[1])
|
||||
axw = wx.activex.ActiveXWindow(f, clsid)
|
||||
|
||||
wx.activex.GernerateAXModule(axw, args[2], '.', verbose=True)
|
||||
|
||||
# Cleanup
|
||||
f.Close()
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv)
|
||||
|
Reference in New Issue
Block a user