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