sub settings_form {
my $self=shift;
my $settings = $self->load_settings();
+ my $settings_desc = $self->{settings_desc};
printHeader('text/html');
.hidden {
visibility:collapse
}
+
+span.dropt {border-bottom: thin dotted; background: #ffeedd;}
+span.dropt:hover {text-decoration: none; background: #ffffff; z-index: 6; }
+span.dropt span {position: absolute; left: -9999px;
+ margin: 20px 0 0 0px; padding: 3px 3px 3px 3px;
+ border-style:solid; border-color:black; border-width:1px; z-index: 6;}
+span.dropt:hover span {left: 2%; background: #ffffff;}
+span.dropt span {position: absolute; left: -9999px;
+ margin: 4px 0 0 0px; padding: 3px 3px 3px 3px;
+ border-style:solid; border-color:black; border-width:1px;}
+span.dropt:hover span {margin: 20px 0 0 170px; background: #ffffff; z-index:6;}
+
</style>
-<form action="table_control.pl" method="get">
+<form action="'.__PACKAGE__.'.pl" method="get" target="_self">
<input type="text" name="sub" value="save_settings" class="hidden"><br>
<table>
';
for my $key ( sort(keys %$settings) ) {
my $value = $settings->{$key};
- print "<tr><td align=right>$key :</td>";
+ print "<tr><td align=right><span class=dropt>$key :";
+
+ print "<span style=\"width:300px;\" >".$settings_desc->{$key}."</span></span></td>";
print "<td><input type='text' name='$key' value='$value'></td></tr>";
}
print '
-
- </table><input type="submit" value="save settings">
+ <tr><td></td><td>
+ <input type="submit" value="save settings"></td>
+ </table>
</form>
';
- return 1;
+ return " ";
}
};
+
+ $self->{settings_desc} = {
+ tty => "The address of the serial device (COMPORT) of the linear table",
+ baudrate => "Baudrate (bits/second) setting of the serial device (tty) of the linear table",
+ approx_speed => "Approximate speed of the linear table in mm/sec. Value is used to estimate timeouts",
+ size_x => "Length/travel of the linear table x axis in mm",
+ size_y => "Length/travel of the linear table y axis in mm",
+ table_precision => "Precision of the linear table in mm/step",
+
+ sample_rect_x1 => "x start coordinate of sample area in mm",
+ sample_rect_x2 => "x end coordinate of sample area in mm",
+ sample_rect_y1 => "y start coordinate of sample area in mm",
+ sample_rect_y2 => "y end coordinate of sample area in mm",
+ sample_step_size => "The step size/width for the scan pattern in mm",
+ sample_aperture_dia => "Estimate of the radiation aperture in mm",
+
+ scan_pattern_svg_file => "Filename for the visualization (svg image) of the scan pattern",
+ scan_pattern_style => "Defines the scan modus, available options are 'linebyline' and 'meander'"
+ };
$self->{has_run} = {}; # remember which subs already have run