line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::GUI::text; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
19542
|
use warnings; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
226
|
|
4
|
6
|
|
|
6
|
|
37
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
323
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
HTML::GUI::text - Create and control a text input for webapp |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.01 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
6
|
|
|
6
|
|
4068
|
use HTML::GUI::input; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our @ISA = qw(HTML::GUI::input); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 TEXT |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
The text widget is the specialisation of the widget class for classical values ("enter your name"). |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
#array of string : list of all specifric public properties of the widget |
30
|
|
|
|
|
|
|
my @GHW_publicPropList = qw/size/; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 PUBLIC METHODS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head3 new |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Parameters : |
41
|
|
|
|
|
|
|
params : widget : |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub new |
46
|
|
|
|
|
|
|
{ |
47
|
|
|
|
|
|
|
my($class, |
48
|
|
|
|
|
|
|
$params, # widget : |
49
|
|
|
|
|
|
|
) = @_; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $this = $class->SUPER::new($params); |
52
|
|
|
|
|
|
|
$this->{type} = "text"; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
if (exists $params->{size}){ |
55
|
|
|
|
|
|
|
$this->{size} = $params->{size}; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
bless($this, $class); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=pod |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head3 getDefinitionData |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This method is the specialisation of the widget.pm method, refer to the widget.pm manual for more information. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub getDefinitionData($) |
69
|
|
|
|
|
|
|
{ |
70
|
|
|
|
|
|
|
my ($self) = @_; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $publicProperties = $self->SUPER::getDefinitionData(); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
return $self->SUPER::getDefinitionData($publicProperties, |
75
|
|
|
|
|
|
|
undef,\@GHW_publicPropList); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=pod |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head3 getNudeHtml |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Description : |
83
|
|
|
|
|
|
|
Return the html of the widget to be inserted in a tag or a a table. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub getNudeHtml |
88
|
|
|
|
|
|
|
{ |
89
|
|
|
|
|
|
|
my($self) = @_; |
90
|
|
|
|
|
|
|
my %tagProp=(); |
91
|
|
|
|
|
|
|
my %styleProp=(); |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
if (exists $self->{display} && 0==$self->{display}){ |
95
|
|
|
|
|
|
|
$styleProp{display} = 'none'; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
$tagProp{style} = $self->getStyleContent(\%styleProp); |
99
|
|
|
|
|
|
|
$tagProp{type} = $self->{type}; |
100
|
|
|
|
|
|
|
$tagProp{value} = $self->getValue(); |
101
|
|
|
|
|
|
|
$tagProp{name} = $tagProp{id} = $self->{id}; |
102
|
|
|
|
|
|
|
if (exists $self->{size}){ |
103
|
|
|
|
|
|
|
$tagProp{size} = $self->{size}; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
return $self->getHtmlTag("input", \%tagProp); |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Jean-Christian Hassler, C<< >> |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 BUGS |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
117
|
|
|
|
|
|
|
C, or through the web interface at |
118
|
|
|
|
|
|
|
L. |
119
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
120
|
|
|
|
|
|
|
your bug as I make changes. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 SUPPORT |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
perldoc HTML::GUI::widget |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
You can also look for information at: |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=over 4 |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
L |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=item * CPAN Ratings |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
L |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
L |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=item * Search CPAN |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
L |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=back |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Copyright 2007 Jean-Christian Hassler, all rights reserved. |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
157
|
|
|
|
|
|
|
under the same terms as Perl itself. |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=cut |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
1; # End of HTML::GUI::text |