| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package UI::Various::PoorTerm::Button; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Author, Copyright and License: see end of file |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
UI::Various::PoorTerm::Button - concrete implementation of L |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# This module should never be used directly! |
|
12
|
|
|
|
|
|
|
# It is used indirectly via the following: |
|
13
|
|
|
|
|
|
|
use UI::Various::Button; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 ABSTRACT |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
This module is the specific minimal fallback implementation of |
|
18
|
|
|
|
|
|
|
L. It manages and hides everything specific to the last |
|
19
|
|
|
|
|
|
|
resort UI. |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
The documentation of this module is only intended for developers of the |
|
24
|
|
|
|
|
|
|
package itself. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
######################################################################### |
|
29
|
|
|
|
|
|
|
|
|
30
|
5
|
|
|
5
|
|
52
|
use v5.14; |
|
|
5
|
|
|
|
|
16
|
|
|
31
|
5
|
|
|
5
|
|
24
|
use strictures; |
|
|
5
|
|
|
|
|
7
|
|
|
|
5
|
|
|
|
|
27
|
|
|
32
|
5
|
|
|
5
|
|
738
|
no indirect 'fatal'; |
|
|
5
|
|
|
|
|
7
|
|
|
|
5
|
|
|
|
|
22
|
|
|
33
|
5
|
|
|
5
|
|
273
|
no multidimensional; |
|
|
5
|
|
|
|
|
10
|
|
|
|
5
|
|
|
|
|
28
|
|
|
34
|
5
|
|
|
5
|
|
177
|
use warnings 'once'; |
|
|
5
|
|
|
|
|
10
|
|
|
|
5
|
|
|
|
|
360
|
|
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
our $VERSION = '0.22'; |
|
37
|
|
|
|
|
|
|
|
|
38
|
5
|
|
|
5
|
|
29
|
use UI::Various::core; |
|
|
5
|
|
|
|
|
9
|
|
|
|
5
|
|
|
|
|
27
|
|
|
39
|
5
|
|
|
5
|
|
31
|
use UI::Various::Button; |
|
|
5
|
|
|
|
|
9
|
|
|
|
5
|
|
|
|
|
198
|
|
|
40
|
5
|
|
|
5
|
|
408
|
use UI::Various::PoorTerm::base; |
|
|
5
|
|
|
|
|
11
|
|
|
|
5
|
|
|
|
|
1249
|
|
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
require Exporter; |
|
43
|
|
|
|
|
|
|
our @ISA = qw(UI::Various::Button UI::Various::PoorTerm::base); |
|
44
|
|
|
|
|
|
|
our @EXPORT_OK = qw(); |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
######################################################################### |
|
47
|
|
|
|
|
|
|
######################################################################### |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 METHODS |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
######################################################################### |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 B<_show> - print UI element |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
$ui_element->_show($prefix); |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head3 example: |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
$_->_show('(1) '); |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head3 parameters: |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
$prefix text in front of first line |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head3 description: |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Show (print) the UI element. I
|
|
70
|
|
|
|
|
|
|
UI::Various::PoorTerm container elements!> |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub _show($$) |
|
77
|
|
|
|
|
|
|
{ |
|
78
|
116
|
|
|
116
|
|
1541
|
my ($self, $prefix) = @_; |
|
79
|
|
|
|
|
|
|
|
|
80
|
116
|
|
|
|
|
392
|
print $self->_wrap($prefix . '[ ', $self->text), " ]\n"; |
|
81
|
|
|
|
|
|
|
} |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
######################################################################### |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 B<_process> - handle action of UI element |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
$ui_element->_process; |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head3 description: |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Handle the action of the UI element aka I. |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub _process($) |
|
98
|
|
|
|
|
|
|
{ |
|
99
|
22
|
|
|
22
|
|
615
|
my ($self) = @_; |
|
100
|
|
|
|
|
|
|
|
|
101
|
22
|
|
|
|
|
76
|
local $_ = $self->code; |
|
102
|
22
|
|
|
|
|
183
|
&$_($self->_toplevel, $self); |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
######################################################################### |
|
108
|
|
|
|
|
|
|
######################################################################### |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
L, L |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 LICENSE |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Copyright (C) Thomas Dorner. |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
|
119
|
|
|
|
|
|
|
under the same terms as Perl itself. See LICENSE file for more details. |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 AUTHOR |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Thomas Dorner Edorner (at) cpan (dot) orgE |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |