The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Wx::ActiveX - ActiveX interface.

DESCRIPTION

Load ActiveX controls for wxWindows.

SYNOPSIS

  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 ;

METHODS

new ( PARENT , CONTROL_ID , ID , POS , SIZE )

Create the ActiveX control.

  PARENT        need to be a Wx::Window object.
  CONTROL_ID    The control ID (PROGID/string).

PropVal ( PROP_NAME )

Get the value of a propriety of the control.

PropSet ( PROP_NAME , VALUE )

Set a propriety of the control.

  PROP_NAME  The propriety name.
  VALUE      The value(s).

PropType ( PROP_NAME )

Return the type of the propriety.

GetEventCount

Returnt the number of events that the control have.

GetPropCount

Returnt the number of proprieties.

GetMethodCount

Returnt the number of control methods.

GetEventName( X )

Returnt the name of the event X, where X is a integer.

GetPropName( X )

Returnt the name of the propriety X, where X is a integer.

GetMethodName( X )

Returnt the name of the method X, where X is a integer.

GetMethodArgCount( MethodX )

Returnt the number of arguments of the MethodX.

GetMethodArgName( MethodX , ArgX )

Returnt the name of the ArgX of MethodX.

ListEvents()

Return an ARRAY with all the events names.

ListProps()

Return an ARRAY with all the proprieties names.

ListMethods()

Return an ARRAY with all the methods names.

ListMethods_and_Args()

Return an ARRAY with all the methods names and arguments. like:

  foo(argx, argy)

ListMethods_and_Args_Hash()

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} } ;

ActivexInfos()

Return a string with all the informations about the ActiveX Control:

  <EVENTS>
    MouseUp
    MouseMove
    MouseDown
  </EVENTS>
  
  <PROPS>
    FileName
  </PROPS>
  
  <METHODS>
    Close()
    Load(file)
  </METHODS>

Win32::OLE

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() ;

EVENTS

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 ;
  }) ;

NOTE

This package only works for Win32, since it use ActiveX.

SEE ALSO

Wx::ActiveX::IE, Wx::ActiveX::Flash, Wx::ActiveX::WMPlayer, Wx

AUTHOR

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.

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.