.\" 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 "Weasel::WidgetHandlers 3pm" .TH Weasel::WidgetHandlers 3pm "2023-08-21" "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" Weasel::WidgetHandlers \- Mapping elements to widget handlers .SH "VERSION" .IX Header "VERSION" 0.01 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Weasel::WidgetHandlers qw( register_widget_handler ); \& \& register_widget_handler( \& \*(AqWeasel::Widgets::HTML::Radio\*(Aq, # Perl class handler \& \*(AqHTML\*(Aq, # Widget group \& tag_name => \*(Aqinput\*(Aq, \& attributes => { \& type => \*(Aqradio\*(Aq, \& }); \& \& register_widget_handler( \& \*(AqWeasel::Widgets::Dojo::FilteringSelect\*(Aq, \& \*(AqDojo\*(Aq, \& tag_name => \*(Aqspan\*(Aq, \& classes => [\*(AqdijitFilteringSelect\*(Aq], \& attributes => { \& role => \*(Aqpresentation\*(Aq, \& ... \& }); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" .SH "SUBROUTINES/METHODS" .IX Header "SUBROUTINES/METHODS" .ie n .IP "register_widget_handler($handler_class_name, $group_name, %conditions)" 4 .el .IP "register_widget_handler($handler_class_name, \f(CW$group_name\fR, \f(CW%conditions\fR)" 4 .IX Item "register_widget_handler($handler_class_name, $group_name, %conditions)" Registers \f(CW$handler_class_name\fR to be the instantiated widget returned for an element matching \f(CW%conditions\fR into \f(CW$group_name\fR. .Sp \&\f(CW\*(C`Weasel::Session\*(C'\fR can select a subset of widgets to be applicable to that session by adding a subset of available groups to that session. .ie n .IP "best_match_handler_class($driver, $_id, $groups)" 4 .el .IP "best_match_handler_class($driver, \f(CW$_id\fR, \f(CW$groups\fR)" 4 .IX Item "best_match_handler_class($driver, $_id, $groups)" Returns the best matching handler's class name, within the groups listed in the arrayref \f(CW$groups\fR, or \f(CW\*(C`undef\*(C'\fR in case of no match. .Sp When \f(CW$groups\fR is undef, all registered handlers will be searched. .Sp When multiple handlers are considered \*(L"best match\*(R", the one last added to the group last mentioned in \f(CW$groups\fR is selected. .SH "AUTHOR" .IX Header "AUTHOR" Erik Huelsmann .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Erik Huelsmann Yves Lavoie .SH "MAINTAINERS" .IX Header "MAINTAINERS" Erik Huelsmann .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" Bugs can be filed in the GitHub issue tracker for the Weasel project: https://github.com/perl\-weasel/weasel/issues .SH "SOURCE" .IX Header "SOURCE" The source code repository for Weasel is at https://github.com/perl\-weasel/weasel .SH "SUPPORT" .IX Header "SUPPORT" Community support is available through perl\-weasel@googlegroups.com . .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" .Vb 1 \& (C) 2016\-2023 Erik Huelsmann .Ve .PP Licensed under the same terms as Perl.