Luis Mochán
and 1 contributors

NAME

Tk::MTDial - A MTDial Tk widget that can turn indefinitely in any direction.

VERSION

Version 0.001

SYNOPSIS

    use Tk;
    use Tk::MTDial;
    my $value=0;
    my $svalue="";
    my $mw=Tk::MainWindow->new(-title=>"MTDial test");
    my $kf=$mw->Frame->pack;
    $kf->MTDial( -width=>100, 
               -height=>100,
               -dialsize=>49, 
               -dialrovariable=>\$v,
               -dialcommand=>\&cmd,
    )->pack->createMTDial;

    sub cmd {
        $value=$v;
        $svalue=sprintf "Value: %.2f Hz", $value;
        $svalue.=" OUT OF RANGE (0-10)", if $value>10 or $value < 0;
        $value=0 if $value<0;
        $value=10 if $value > 10;
    }  
    

Creates a circular MTDial that can be turned continuously and indefinitely in any direction

DESCRIPTION

MTDial Widget that allows the creation of circular dials that can turn indefinitely to produce arbitrary positive or negative values.

FUNCTIONS

MTDial

Make a MTDial object and pass it initialization parameters. They may also be set and interrogated with Tk's 'configure' and 'cget'.

-width (500)
-height (500)
-dialsize (250)
-dialvalue (0)
-dialcolor ('DarkGrey')
-dialborder (2)
-dialbordercolor1 ('grey38')
-dialbordercolor2 ('grey99')
-dialrovariable (undef)
-dialcommand (sub {return})

createMTDial

Displays the dial, sets its initial parameters, binds the callback routines.

Not to be called by the user directly

ClassInit

Calls the base class initializer

Populate

Sets default values for the class parameters.

pushed

Routine called when button 1 is pushed

rotate

Routine called to rotate dial when the mouse moves

AUTHOR

W. Luis Mochán, Instituto de Ciencias Físicas, UNAM, México mochan@fis.unam.mx

ACKNOWLEDGMENTS

This work was partially supported by DGAPA-UNAM under grants IN108413 and IN113016.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 61:

Unknown directive: =head

Around line 64:

'=item' outside of any '=over'