CircuitLayout

 view release on metacpan or  search on metacpan

Examples/GDS2Tool/gds2tool  view on Meta::CPAN

        {
            zoom($G_canvas, 1, '', '');
        }
        elsif ($G_keyLast =~ m/r/i) ## ruler
        {
            $G_mouseInfoText='mouse buttons:    ruler  |  nothing  |  nothing';
            ruler($G_canvas, 1, '', '');
        }
        elsif ($G_keyLast eq 'z')
        {
            $G_canvas -> configure(-cursor => 'crosshair');
            zoom($G_canvas, 0, $x - 20, $y - 30);
        }
        elsif ($G_keyLast eq 'plus')
        {
            zoom($G_canvas, 2, $x, $y);
        }
        elsif ($G_keyLast eq 'minus')
        {
            zoom($G_canvas, 0.5, $x, $y);
        }
        elsif ($G_keyLast eq 'p') ## pan
        {
            pan($G_canvas, $x, $y);
        }
        setCursor();
    } 
);
$G_keyBindingText = <<EOKBT;
<f>             full view           
<p>             pan to cursor       
<r>             ruler               
<z>             zoom in with window 
<->             zoom in on cursor   
<+>             zoom out on cursor  
<Escape>        clear, interrupt    
<Delete>        clear rulers        
<Up-arrow>      pan up              
<Down-arrow>    pan down            
<Right-arrow>   pan right           
<Left-arrow>    pan left            

EOKBT

### y scroll bar

Examples/GDS2Tool/gds2tool  view on Meta::CPAN

    $result;
}   
################################################################################

sub ruler 
{
    my ($canvas, $type, $x, $y) = @_;
    if ($x ne '')
    {
        $G_statusText='Enter another coordinate';
        $canvas -> configure(-cursor => 'pencil');
        my ($x1,$y1) = $canvas -> worldxy($x,$y); ## convert before call....
        $G_startx = round2Grid($x1,$G_xSnapGrid);
        $G_starty = round2Grid($y1,$G_ySnapGrid);
        startPolygon($canvas, 
            -type    => 'line', 
            -subtype => $type, 
            -x       => $G_startx, 
            -y       => $G_starty, 
            -tag     => 'type=rulerTmp',
        );

Examples/GDS2Tool/gds2tool  view on Meta::CPAN

            pan($canvas, $x, $y);
            $canvas -> zoom($amount);
            $G_statusText='Enter coordinate to zoom on';
        }
    }
    else ## zoom in with window
    {
        if ($x ne '')
        {
            $G_statusText='Enter 2nd coordinate';
            $canvas -> configure(-cursor => 'crosshair');
            my ($x1,$y1) = $canvas -> worldxy($x,$y); ## convert before call....
            startPolygon($canvas, 
                -type => 'rectangle',
                -x    => $x1, 
                -y    => $y1, 
                -tag  => 'type=drawingTmp',
            );
        }
        else
        {

Examples/GDS2Tool/gds2tool  view on Meta::CPAN

            round2Grid($x1,$G_xSnapGrid),
            round2Grid($y1,$G_ySnapGrid),
            ($#G_selected+1));
}
################################################################################

sub setCursor
{
    if ($G_mouseMode eq 'pan')
    {
        $G_canvas -> configure(-cursor => 'circle');
    }
    elsif ($G_mouseMode eq 'ruler')
    {
        $G_canvas -> configure(-cursor => 'pencil');
    }
    elsif ($G_mouseMode =~ m/zoom/)
    {
        $G_canvas -> configure(-cursor => 'iron_cross') if ($G_mouseMode eq 'zoomin');
        $G_canvas -> configure(-cursor => 'fleur')      if ($G_mouseMode eq 'zoomout');
    }
    else
    {
        $G_canvas -> configure(-cursor => 'arrow');
    }
}
################################################################################

sub showGridWindow
{
    if (! Exists($G_gridWindow))
    {
        $G_gridWindow = $MW -> Toplevel();
        $G_gridWindow -> title('GDS2Tool set1 grid window');



( run in 0.236 second using v1.01-cache-2.11-cpan-4d50c553e7e )