.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTML::Widget::Element::Block 3pm" .TH HTML::Widget::Element::Block 3pm "2023-08-10" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTML::Widget::Element::Block \- Block Level Element .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& my $e = $widget\->element( \*(AqBlock\*(Aq, \*(Aqdiv\*(Aq ); \& $e\->value(\*(Aqbar\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Block Level Element. Base class for HTML::Widget::Element::Fieldset .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" Returns a new Block element. Not usually required, use \&\f(CW$widget\fR\->\fBelement()\fR or \f(CW$block\fR\->\fBelement()\fR to create a new Block element within an existing widget or element. .SS "type" .IX Subsection "type" Default value is div, to create a
container. Can be changed to create a tag of any type. .SS "element" .IX Subsection "element" Add a new element, nested within this Block. See \*(L"element\*(R" in HTML::Widget for full documentation. .SS "push_content" .IX Subsection "push_content" Add previously-created elements to the end of this block's elements. .SS "unshift_content" .IX Subsection "unshift_content" Add previously-created elements to the start of this block's elements. .SS "block_container" .IX Subsection "block_container" Creates a new block container object of type \f(CW$self\fR\->block_container_class. Defaults to HTML::Widget::BlockContainer. .SS "block_container_class" .IX Subsection "block_container_class" Sets the class to be used by \f(CW$self\fR\->block_container. Can be called as a class or instance method. .SS "containerize" .IX Subsection "containerize" Containerize the block and all its contained elements for later rendering. Uses HTML::Widget::BlockContainer by default, but this can be over-ridden on a class or instance basis via block_container_class. .SS "get_elements" .IX Subsection "get_elements" .Vb 1 \& my @elements = $self\->get_elements; \& \& my @elements = $self\->get_elements( type => \*(AqTextfield\*(Aq ); \& \& my @elements = $self\->get_elements( name => \*(Aqusername\*(Aq ); .Ve .PP Returns a list of all elements added to the widget. .PP If a 'type' argument is given, only returns the elements of that type. .PP If a 'name' argument is given, only returns the elements with that name. .SS "get_element" .IX Subsection "get_element" .Vb 1 \& my $element = $self\->get_element; \& \& my $element = $self\->get_element( type => \*(AqTextfield\*(Aq ); \& \& my $element = $self\->get_element( name => \*(Aqusername\*(Aq ); .Ve .PP Similar to \fBget_elements()\fR, but only returns the first element in the list. .PP Accepts the same arguments as \fBget_elements()\fR. .SS "find_elements" .IX Subsection "find_elements" Similar to \fBget_elements()\fR, and has the same alternate forms, but performs a recursive search through itself and child elements. .SH "SEE ALSO" .IX Header "SEE ALSO" HTML::Widget::Element .SH "AUTHOR" .IX Header "AUTHOR" Michael Gray, \f(CW\*(C`mjg@cpan.org\*(C'\fR .SH "LICENSE" .IX Header "LICENSE" This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.