.\" 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 "Form::Control 3pm" .TH Form::Control 3pm "2023-01-22" "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" Embperl::Form::Control \- Base class for controls inside an Embperl Form .SH "SYNOPSIS" .IX Header "SYNOPSIS" Do not use directly, instead derive a class .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class is not used directly, it is used as a base class for all controls inside an Embperl Form. It provides a set of methods that could be overwritten to customize the behaviour of your controls. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" Create a new control .SS "init" .IX Subsection "init" Init the new control .SS "noframe" .IX Subsection "noframe" Do not draw frame border if this is the only control .SS "is_disabled" .IX Subsection "is_disabled" Do not display this control at all. .SS "is_readonly" .IX Subsection "is_readonly" Could value of this control be changed ? .SS "label_text" .IX Subsection "label_text" Returns the text of the label .SS "show" .IX Subsection "show" Output the control .SS "get_on_show_code" .IX Subsection "get_on_show_code" Returns JavaScript code that should be executed when the form becomes visible .SS "get_active_id" .IX Subsection "get_active_id" Get the id of the value which is currently active .SS "form" .IX Subsection "form" Return the form object of this control .SS "show_sub_begin" .IX Subsection "show_sub_begin" Output begin of sub form .SS "show_sub_end" .IX Subsection "show_sub_end" Output end of sub form .SS "show_label" .IX Subsection "show_label" Output the label of the control .SS "show_label_icon" .IX Subsection "show_label_icon" Output the icon after the label .SS "show_label_cell" .IX Subsection "show_label_cell" Output the table cell in which the label will be displayed .PP Must return the columns it spans (default: 1) .SS "show_control" .IX Subsection "show_control" Output the control itself .SS "show_control_readonly" .IX Subsection "show_control_readonly" Output the control itself as readonly .SS "show_control_addons" .IX Subsection "show_control_addons" output additional things after the control .SS "show_control_cell" .IX Subsection "show_control_cell" Output the table cell in which the control will be displayed .PP Gets the x position as argument .SH "PARAMETERS" .IX Header "PARAMETERS" \fIname\fR .IX Subsection "name" .PP Specifies the name of the control .PP \fItext\fR .IX Subsection "text" .PP Will be used as label for the control, if not given \&'name' is used as default. .PP Normally the the name and text parameters are processed by the method \f(CW\*(C`convert_label\*(C'\fR of the \f(CW\*(C`Embperl::Form\*(C'\fR object. This method can be overwritten, to allow translation etc. .PP If the parameter \f(CW\*(C`showtext\*(C'\fR is given a true value, \f(CW\*(C`convert_label\*(C'\fR is not called and the text is displayed as it is. .PP \fIshowtext\fR .IX Subsection "showtext" .PP Display label without passing it through \f(CW\*(C`convert_label\*(C'\fR. See \f(CW\*(C`text\*(C'\fR. .SS "labelnowrap" .IX Subsection "labelnowrap" If set, the text label will not be line wrapped. .SS "labelclass" .IX Subsection "labelclass" If set, will be used as additional \s-1CSS\s0 classes for the label text cell. .SS "readonly" .IX Subsection "readonly" If set, displays a readonly version of the control. .SS "disable" .IX Subsection "disable" If set, the control will not be displayed at all. .SS "newline" .IX Subsection "newline" If set to 1, forces a new line before the control. If set to \-1, forces a new line after the control. .SS "width" .IX Subsection "width" Gives the widths of the control. The value is \f(CW\*(C`1/width\*(C'\fR of the the whole width of the form. So if you want to have four controls in one line set \f(CW\*(C`width\*(C'\fR to 4. The default value is 2. .SS "width_percent" .IX Subsection "width_percent" With this parameter you can also specify the width of the control in percent. This parameter take precedence over \&\f(CW\*(C`width\*(C'\fR .SS "default" .IX Subsection "default" Default value of the control .SS "imagedir" .IX Subsection "imagedir" Basepath where to find images, in case the control uses images. Default value is /images .SS "trigger" .IX Subsection "trigger" When set will trigger state changes of other controls. See \*(L"state\*(R". .SS "state" .IX Subsection "state" Can be used to hide/show disable/enable the control trigger by other controls. .PP Checkbox define the following states: .IP "\(bu" 4 \-show .Sp Show control if checkbox checked .IP "\(bu" 4 \-hide .Sp Hide control if checkbox checked .IP "\(bu" 4 \-enable .Sp Enable control if checkbox checked .IP "\(bu" 4 \-disable .Sp Disable control if checkbox checked .SH "AUTHOR" .IX Header "AUTHOR" G. Richter (richter at embperl dot org) .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperl\fR\|(1), Embperl, Embperl::Form