line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public License |
2
|
|
|
|
|
|
|
# or the Artistic License (the same terms as Perl itself) |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# (C) Paul Evans, 2013 -- leonerd@leonerd.org.uk |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Tickit::Widget::Menu::itembase; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
9
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
113
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.09'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _init_itembase |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
0
|
|
|
my $self = shift; |
16
|
0
|
|
|
|
|
|
my %args = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
$self->{name} = $args{name}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub name |
22
|
|
|
|
|
|
|
{ |
23
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
24
|
0
|
|
|
|
|
|
return $self->{name}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub render_label |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
30
|
0
|
|
|
|
|
|
my ( $rb, $cols, $menu ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$rb->text( $self->name ); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
0x55AA; |