| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HTML::Display::Win32::OLE; |
|
2
|
1
|
|
|
1
|
|
2810
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
39
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use parent 'HTML::Display::Common'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
4
|
1
|
|
|
1
|
|
51
|
use vars qw($VERSION); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
229
|
|
|
5
|
|
|
|
|
|
|
$VERSION='0.40'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
HTML::Display::Win32::OLE - use an OLE object to display HTML |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=for example begin |
|
14
|
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
4400
|
package HTML::Display::Win32::OleControl; |
|
|
1
|
|
|
|
|
429
|
|
|
|
1
|
|
|
|
|
7
|
|
|
16
|
|
|
|
|
|
|
use parent 'HTML::Display::Win32::OLE'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
|
|
sub new { |
|
19
|
0
|
|
|
|
|
|
my $class = shift; |
|
20
|
0
|
|
|
|
|
|
$class->SUPER::new( app_string => "FooBrowser.Application", @_ ); |
|
21
|
|
|
|
|
|
|
$self; |
|
22
|
|
|
|
|
|
|
}; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $browser = HTML::Display->new( |
|
25
|
|
|
|
|
|
|
class => 'HTML::Display::Win32::OleControl', |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
$browser->display("Hello world!"); |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=for example end |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub new { |
|
34
|
0
|
|
|
0
|
1
|
|
my ($class) = shift; |
|
35
|
0
|
|
|
|
|
|
my %args = @_; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new( %args ); |
|
38
|
0
|
|
|
|
|
|
$self; |
|
39
|
|
|
|
|
|
|
}; |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 setup |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
C is a method you can override to provide initial |
|
44
|
|
|
|
|
|
|
setup of your OLE control. It is called after the control |
|
45
|
|
|
|
|
|
|
is instantiated for the first time. |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
|
48
|
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
1
|
|
sub setup {}; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 control |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This initializes the OLE control and returns it. Only one |
|
54
|
|
|
|
|
|
|
control is initialized for each object instance. You don't need |
|
55
|
|
|
|
|
|
|
to store it separately. |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub control { |
|
60
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
61
|
0
|
0
|
|
|
|
|
unless ($self->{control}) { |
|
62
|
0
|
|
|
|
|
|
eval "use Win32::OLE"; |
|
63
|
0
|
0
|
|
|
|
|
die $@ if $@; |
|
64
|
0
|
|
|
|
|
|
my $control = Win32::OLE->CreateObject($self->{app_string}); |
|
65
|
0
|
|
|
|
|
|
$self->{control} = $control; |
|
66
|
0
|
|
|
|
|
|
$self->setup($control); |
|
67
|
|
|
|
|
|
|
}; |
|
68
|
0
|
|
|
|
|
|
$self->{control}; |
|
69
|
|
|
|
|
|
|
}; |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Copyright (c) 2004-2007 Max Maischein C<< >> |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 LICENSE |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This module is released under the same terms as Perl itself. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |