line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# You may distribute under the terms of the GNU General Public License |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# (C) Paul Evans, 2011-2015 -- leonerd@leonerd.org.uk |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Circle::FE::Term::Widget::Label; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1220
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
8
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4
|
use constant type => "Label"; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
452
|
use Tickit::Widget::Static; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub build |
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
my $class = shift; |
17
|
|
|
|
|
|
|
my ( $obj, $tab ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $widget = Tickit::Widget::Static->new( |
20
|
|
|
|
|
|
|
classes => $obj->prop( "classes" ), |
21
|
|
|
|
|
|
|
text => "", |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$tab->adopt_future( |
25
|
|
|
|
|
|
|
$obj->watch_property_with_initial( |
26
|
|
|
|
|
|
|
"text", |
27
|
|
|
|
|
|
|
on_set => sub { $widget->set_text( $_[0] ) }, |
28
|
|
|
|
|
|
|
) |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return $widget; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Tickit::Style->load_style( <<'EOF' ); |
35
|
|
|
|
|
|
|
Static.ident { |
36
|
|
|
|
|
|
|
bg: "blue"; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
EOF |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
0x55AA; |