line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tk::ROTextANSIColor; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1382
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
59
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require Tk; |
6
|
|
|
|
|
|
|
require Tk::TextANSIColor; |
7
|
|
|
|
|
|
|
require Tk::ROText; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use vars qw/ $VERSION /; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
10
|
|
|
|
|
|
|
$VERSION = '0.01'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Inherit from Tk::TextANSIColor |
13
|
|
|
|
|
|
|
# Can not inherit from Tk::ROText as well since Tk::TextANSIColor |
14
|
|
|
|
|
|
|
# already inherits from Tk::Text and those methods will supercede |
15
|
|
|
|
|
|
|
# RO::Text methods. |
16
|
1
|
|
|
1
|
|
4
|
use base qw(Tk::TextANSIColor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
95
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Construct the new widget |
19
|
|
|
|
|
|
|
Construct Tk::Widget 'ROTextANSIColor'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Inheritance problems mean we have to provide some methods |
22
|
|
|
|
|
|
|
# that call into Tk::ROText directly. If Tk::ROText is changed |
23
|
|
|
|
|
|
|
# this may well have to change as well. The neater OO approach would |
24
|
|
|
|
|
|
|
# be to have a dummy class containing the ANSIColor methods that |
25
|
|
|
|
|
|
|
# both Tk::TextANSIColor and Tk::ROTextANSIColor can inherit from |
26
|
|
|
|
|
|
|
# Tk::TextANSIColor would inherit from that base class and Tk::Text |
27
|
|
|
|
|
|
|
# and Tk::ROTextANSIColor would inheirt from that base and Tk::ROText. |
28
|
|
|
|
|
|
|
# For now, just jump the tree. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub ClassInit { |
31
|
|
|
|
|
|
|
Tk::ROText::ClassInit(@_); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub clipEvents { |
35
|
|
|
|
|
|
|
Tk::ROText::clipEvents(@_); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |