The following lines which are part of /online_dir/TkIrc.pl create a widget to operate Hexapod attributes.
$Spc::res_h{ blsc} = "hexa1";
$Spc::res_h{ hexa1_title} = { text => "Hexa1"};
$Spc::res_h{ hexa1_help} = sub
{
Util::display_text( "Help Hexa1",
'
n.n.
'
)};
$Spc::res_h{ "hexa1_io1"} = {
label => { name => "PivotR",
get => sub { sprintf "%g", Spectra::tng_attrDoubleRd( "hexa1conf", "PositionPivotR");}},
entry => { set => sub { Spectra::tng_attrDoubleWrt( "hexa1conf", "PositionPivotR", $_[0])}}};
$Spc::res_h{ "hexa1_io2"} = {
label => { name => "PivotS",
get => sub { sprintf "%g", Spectra::tng_attrDoubleRd( "hexa1conf", "PositionPivotS");}},
entry => { set => sub { Spectra::tng_attrDoubleWrt( "hexa1conf", "PositionPivotS", $_[0])}}};
$Spc::res_h{ "hexa1_io3"} = {
label => { name => "PivotT",
get => sub { sprintf "%g", Spectra::tng_attrDoubleRd( "hexa1conf", "PositionPivotT");}},
entry => { set => sub { Spectra::tng_attrDoubleWrt( "hexa1conf", "PositionPivotT", $_[0])}}};
my $cnt = 4;
foreach my $ax ( qw( X Y Z U V W K M))
{
$Spc::res_h{ "hexa1_io${cnt}"} = {
label => { name => "Conv${ax}",
get => sub { sprintf "%g", Spectra::tng_attrDoubleRd( "hexa1_mot${ax}", "Conversion");}},
entry => { set => sub { Spectra::tng_attrDoubleWrt( "hexa1_mot${ax}", "Conversion", $_[0])}}};
$cnt++;
}