line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::ebug::Wx::View::Base; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1094
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
4
|
use base qw(Class::Accessor::Fast Devel::ebug::Wx::Plugin::Listener::Base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
477
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( qw(wxebug _has_destroy) ); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# not yet in wxPerl |
9
|
0
|
|
|
0
|
0
|
|
sub EVT_DESTROY($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_DESTROY, $_[2] ) } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub _setup_destroy { |
12
|
0
|
|
|
0
|
|
|
my( $self ) = @_; |
13
|
|
|
|
|
|
|
|
14
|
0
|
0
|
|
|
|
|
unless( $self->_has_destroy ) { |
15
|
0
|
|
|
|
|
|
$self->_has_destroy( 1 ); |
16
|
0
|
|
|
|
|
|
EVT_DESTROY( $self, $self, \&_on_destroy ); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# FIXME will likely need to be generalized |
21
|
0
|
|
|
0
|
0
|
|
sub is_managed { !$_[0]->GetParent->isa( 'Wx::AuiNotebook' ) } |
22
|
0
|
|
|
0
|
0
|
|
sub is_multiview { 0 } |
23
|
0
|
|
|
0
|
0
|
|
sub default_size { ( 350, 250 ) } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# save/restore view layout |
26
|
0
|
|
|
0
|
0
|
|
sub set_layout_state { } |
27
|
|
|
|
|
|
|
sub get_layout_state { |
28
|
0
|
|
|
0
|
0
|
|
my( $self ) = @_; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return { class => ref( $self ), |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub register_view { |
35
|
0
|
|
|
0
|
0
|
|
my( $self ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
$self->_setup_destroy; |
38
|
0
|
|
|
|
|
|
$self->wxebug->view_manager_service->register_view( $self ); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub subscribe_ebug { |
42
|
0
|
|
|
0
|
0
|
|
my( $self, $event, $handler ) = @_; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
$self->_setup_destroy; |
45
|
0
|
|
|
|
|
|
$self->add_subscription( $self->ebug, $event, $handler ); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _on_destroy { |
49
|
0
|
|
|
0
|
|
|
my( $self ) = @_; |
50
|
0
|
|
|
|
|
|
$self->delete_subscriptions; |
51
|
0
|
|
|
|
|
|
$self->wxebug->view_manager_service->unregister_view( $self ); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
0
|
0
|
|
sub ebug { $_[0]->wxebug->ebug } |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |