Wx::ActiveX - ActiveX interface.
Load ActiveX controls for wxWindows.
use Wx::ActiveX ; my $activex = Wx::ActiveX->new( $this , "ShockwaveFlash.ShockwaveFlash" , 101 , wxDefaultPosition , wxDefaultSize ) ; $activex->Invoke("LoadMovie",'0',"file:///F:/swf/test.swf") ; $activex->PropSet("Quality",'Best') ; my $frames_n = $activex->PropVal("TotalFrames") ; $activex->Invoke("Play") ; ... or ... $activex->Play ;
Create the ActiveX control.
PARENT need to be a Wx::Window object. CONTROL_ID The control ID (PROGID/string).
Get the value of a propriety of the control.
Set a propriety of the control.
PROP_NAME The propriety name. VALUE The value(s).
Return the type of the propriety.
Returnt the number of events that the control have.
Returnt the number of proprieties.
Returnt the number of control methods.
Returnt the name of the event X, where X is a integer.
Returnt the name of the propriety X, where X is a integer.
Returnt the name of the method X, where X is a integer.
Returnt the number of arguments of the MethodX.
Returnt the name of the ArgX of MethodX.
Return an ARRAY with all the events names.
Return an ARRAY with all the proprieties names.
Return an ARRAY with all the methods names.
Return an ARRAY with all the methods names and arguments. like:
foo(argx, argy)
Return a HASH with all the methods names (keys) and arguments (values). The arguments are inside a ARRAY ref:
my %methods = $activex->ListMethods_and_Args_Hash ; my @args = @{ $methods{foo} } ;
Return a string with all the informations about the ActiveX Control:
<EVENTS> MouseUp MouseMove MouseDown </EVENTS> <PROPS> FileName </PROPS> <METHODS> Close() Load(file) </METHODS>
From version 0.5 Wx::ActiveX is compatible with Win32::OLE objects:
use Wx::ActiveX ; use Win32::OLE ; my $activex = Wx::ActiveX->new( $this , "ShockwaveFlash.ShockwaveFlash" , 101 , wxDefaultPosition , wxDefaultSize ) ; my $OLE = $activex->GetOLE() ; $OLE->LoadMovie('0' , "file:///F:/swf/test.swf") ; $OLE->Play() ;
All the events use EVT_ACTIVEX.
EVT_ACTIVEX($parent , $activex , "EventName" , sub{...} ) ;
** You can get the list of ActiveX events using ListEvents():
Eache ActiveX event has their own argument list (hash), and the Key 'Cancel' can be used to ignore the event. In this example any new window will be canceled, seting $evt->{Cancel} to true:
EVT_ACTIVEX($this,$activex, "EventX" , sub{ my ( $obj , $evt ) = @_ ; $evt->{Cancel} = 1 ; }) ;
This package only works for Win32, since it use ActiveX.
Wx::ActiveX::IE, Wx::ActiveX::Flash, Wx::ActiveX::WMPlayer, Wx
Graciliano M. P. <gm@virtuasites.com.br>
Thanks to Simon Flack <sf@flacks.net>, for the compatibility of Wx::ActiveX objetc with Win32::OLE and MingW tests.
Thanks to wxWindows peoples and Mattia Barbon for wxPerl! ;-P
Thanks to Justin Bradford <justin@maxwell.ucsf.edu> and Lindsay Mathieson <lmathieson@optusnet.com.au>, that wrote the original C++ classes for wxActiveX and wxIEHtmlWin.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Wx::ActiveX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wx::ActiveX
CPAN shell
perl -MCPAN -e shell install Wx::ActiveX
For more information on module installation, please visit the detailed CPAN module installation guide.