CircuitLayout
view release on metacpan or search on metacpan
Examples/GDS2Tool/gds2tool view on Meta::CPAN
) -> pack(-side => 'left', -padx => 0, -pady => 5, -fill => 'x');
$G_gridWindow -> Button(
-anchor => 's',
-font => '-*-times-bold-r-normal--*-140-*-*-*-*-*-*',
-text => ' Set ',
-height => 1,
-width => 11,
-command => sub {
$G_canvas -> itemconfigure($G_majorGrid,-width => 0, -state => 'disabled');
$G_canvas -> itemconfigure($G_minorGrid,-width => 0, -state => 'disabled');
createMyGrid($G_canvas);
displayMyGrid($G_canvas);
},
-activebackground => LightBlueColor,
-activeforeground => WhiteColor,
) -> pack(-side=>'left');
$G_gridWindow -> Button(
-anchor => 's',
-text => ' Close ',
-command => sub { $G_gridWindow -> withdraw }
) -> pack(-side=>'left');
}
else
{
$G_gridWindow -> deiconify();
$G_gridWindow -> raise();
}
}
################################################################################
sub showViewWindow
{
if (! Exists($G_viewWindow))
{
$G_viewWindow = $MW -> Toplevel();
$G_viewWindow -> title('GDS2Tool full view window');
$G_viewWindow -> iconname('full view');
$G_canvas2 = $G_viewWindow -> WorldCanvas(-height => 300, -width => 500, -bg => BlackColor);
$G_canvas2 -> pack(
-expand => 'yes',
-fill => 'both',
);
$G_viewWindow -> Button(
-anchor => 's',
-text => ' Close ',
-command => sub { $G_viewWindow -> withdraw }
) -> pack(-side=>'bottom');
$G_canvas -> configure(-changeView => [\&changeView, $G_canvas2]); ## -configure appends bbox coords...
$G_canvas -> CanvasBind('<Configure>' => sub { $G_canvas2 -> viewAll; });
}
else
{
$G_viewWindow -> deiconify();
$G_viewWindow -> raise();
}
}
################################################################################
sub updateInfoText
{
my $append = shift;
my $text = shift;
if (Exists($G_infoWindow))
{
$G_infoTextArea -> delete('0.0', 'end') if (! $append);
$G_infoTextArea -> insert('end', "$text");
$G_infoTextArea -> update;
}
}
################################################################################
sub setColor
{
my $layer = shift;
my $type = shift;
my $currentColor = $G_layer{$layer}{$type};
print "$type color == $currentColor can not set yet...\n";
}
################################################################################
sub hideLayerWindow
{
$G_layerWindow -> withdraw;
}
################################################################################
sub showLayerWindow
{
if (! Exists($G_layerWindow))
{
$G_layerWindow = $MW -> Toplevel();
$G_layerWindow -> title('GDS2Tool layer window');
$G_layerWindow -> iconname('layers');
my $fgrid = $G_layerWindow -> Scrolled('Canvas',-scrollbars=>'sw');
#my $fgrid = $G_layerWindow -> Scrolled('Canvas',-scrollbars=>'sw',-height=>400,-width=>300);
#my $fgrid = $G_layerWindow -> Frame();
#my $fgrid = $fgrid -> Frame();
my @layerNums=();
my @layerNames=();
my @visibles=();
my @fillColors=();
my @outlineColors=();
$G_layerWindow -> Label(-text => "NOT READY") -> pack;
push @layerNums, $fgrid -> Label(-text => "layer");
push @layerNames, $fgrid -> Label(-text => "name");
push @visibles, $fgrid -> Label(-text => "visibility");
push @fillColors, $fgrid -> Label(-text => "fill color");
push @outlineColors, $fgrid -> Label(-text => "outline color");
foreach my $layer (keys %G_layer)
{
my $layerName = $G_layer{$layer}{'name'};
next if ($layerName eq 'unknown');
push @layerNames, $fgrid -> Label(-text => $layerName);
push @layerNums, $fgrid -> Label(-text => "$layer");
( run in 1.079 second using v1.01-cache-2.11-cpan-13bb782fe5a )