Verilog-CodeGen

 view release on metacpan or  search on metacpan

scripts/gui.pl  view on Meta::CPAN

    $menu_file->command('-label' => 'Exit', '-command' => sub {close $sock;if($pid ne 'WRONG'){exec("kill -9 $pid")}else{exit(0)}},'foreground'=>'black','background'=>'grey','font'=>$normal,);

#==============================================================================

 $matrix[0][3] = $menu_bar->Label ('background' =>'grey')->grid('-row'=>0,'-column'=>3,'-sticky'=>'w',);

my $image=  $matrix[0][3]->Photo('-file'=>'GUI/rectangle_power_perl.gif');
 $matrix[0][3]->configure('-image'=>$image);


my $projectframe=$menu_bar->Frame('-background'=>'grey','-relief'=>'flat','-borderwidth'=>1,'-width'=>80)->grid('-row' => 0, '-column' => 1,'-columnspan'=>2,'-sticky'=>'w');
my $project = $projectframe->Label ('-text'=>'Design:', '-font' => $normal, '-background' =>'grey')->pack('-side' => 'left','-anchor'=>'w', '-fill' => 'x','padx'=>1,'pady'=>1);
$matrix[0][1] = $projectframe->Entry ('-width'   =>  15, '-font' => $normal,'foreground' => 'black','background' =>'white', )->pack('-side' => 'left','-anchor'=>'w', '-fill' => 'x','padx'=>1,'pady'=>1);
my $projectbutton = $projectframe->Button('-font' => $bold,'background' =>'grey','-text' => 'Set', '-command' => \&set_design)->pack('-side' => 'left','-anchor'=>'w', 'padx'=>1,'pady'=>1);

#==============================================================================
    # Device Object Code
 $matrix[1][0] = $menu_bar->Label ('-text'=>'Device Object Code', '-width'=>80, '-font' => $bold,'foreground' => 'black', '-background' =>'lightgrey',)->grid(
'-row' => 1, '-column' => 0,'-columnspan'=>4,'-sticky'=>'w');

 $matrix[2][3] = $menu_bar->Button('-width'=> 10, '-font' => $bold,'foreground' => 'black','background' =>'grey','-text' => 'Edit', '-command' => \&show_obj)->grid(
'-row' => 2,'-column'=> 3,'-sticky'=>'w');
 $matrix[2][2] = $menu_bar->Entry ('-width'   =>  20, '-font' => $normal,'foreground' => 'black','background' =>'white', )->grid(
'-row' => 2, '-column' => 2);

 $matrix[3][3] = $menu_bar->Button('-width'=> 10, '-font' => $bold,'foreground' => 'black','background' =>'grey','-text' => 'Parse', '-command' => \&debug)->grid(
'-row' => 3,'-column'=> 3,'-sticky'=>'w');

 $matrix[3][1] = $menu_bar->Label ('-text'=>'Show result', '-font' => $bold,'foreground' => 'black','background' =>'grey','-width'=>20,'-relief'=>'flat','-borderwidth'=>1,'-anchor'=>'w')->grid(
'-row' => 3, '-column' =>1,'-sticky'=>'w');
 $matrix[3][0] = $menu_bar->Checkbutton ('-variable'   => \$showdefault,
 '-font' => $normal,'foreground' => 'black','background' =>'grey','-width'=>0)->grid(
'-row' => 3, '-column' =>0,'-sticky'=>'e');
#==============================================================================
    # Device Library Module
 $matrix[4][0] = $menu_bar->Label ('-text'=>'Device Library Module', '-width' => 80, '-font' => $bold,'foreground' => 'black','background' =>'lightgrey',)->grid(
'-row' => 4, '-column' => 0,'-columnspan'=>4,'-sticky'=>'w');

 $matrix[5][0] = $menu_bar->Button('-width'=> 10, '-font' => $bold,'foreground' => 'black','background' =>'grey','-text' => 'Update', '-command' => \&update)->grid(
'-row' => 5,'-column'=>3,'-sticky'=>'w');

 $matrix[5][1] = $menu_bar->Label ('-text'=>'Show module', '-font' => $bold,'foreground' => 'black','background' =>'grey','-width'=>20,'-relief'=>'flat','-borderwidth'=>1,'-anchor'=>'w')->grid(
'-row' => 5, '-column' =>1,'-sticky'=>'w');
 $matrix[5][3] = $menu_bar->Checkbutton ('-variable'   => \$update,
 '-font' => $normal,'foreground' => 'black','background' =>'grey','-width'=>0)->grid(
'-row' => 5, '-column' =>0,'-sticky'=>'e');

#==============================================================================
    # Testbench Code
 $matrix[6][0] = $menu_bar->Label ('-text'=>'Testbench Code', '-width' => 80, '-font' => $bold,'foreground' => 'black','background' =>'lightgrey',)->grid(
'-row' => 6, '-column' => 0,'-columnspan'=>4);
#------------------------------------------------------------------------------
 $matrix[7][3] = $menu_bar->Button('-width'=> 10, '-font' => $bold,'foreground' => 'black','background' =>'grey','-text' => 'Edit', '-command' => \&edit_tb)->grid(
'-row' => 7 ,'-column'=>3,'-sticky'=>'w');
 $matrix[7][2] = $menu_bar->Entry ('-width'   =>  20, '-font' => $normal,'foreground' => 'black','background' =>'white',)->grid(
'-row' => 7, '-column' =>2);
 $matrix[7][1] = $menu_bar->Label ('-text'=>'Overwrite', '-font' => $bold,'foreground' => 'black','background' =>'grey', '-width'=> 20, '-relief'=>'flat','-borderwidth'=>1,'-anchor'=>'w',)->grid(
'-row' => 7, '-column' =>1,'-sticky'=>'w');
 $matrix[7][0] = $menu_bar->Checkbutton ('-variable'   => \$overwrite, '-font' => $normal,'foreground' => 'black','background' =>'grey','-width' => 0)->grid(
'-row' => 7, '-column' =>0,'-sticky'=>'e');
#------------------------------------------------------------------------------

scripts/gui.pl  view on Meta::CPAN

'-row' => 10, '-column' =>0,'-sticky'=>'e');

#=no_warnings
# $matrix[10][1] = $menu_bar->Label ('-text'=>'No warnings', '-font' => $bold,'foreground' => 'black','background' =>'grey','-width'=>20,'-relief'=>'flat','-borderwidth'=>1,'-anchor'=>'w',)->grid(
#'-row' => 10, '-column' =>1,'-sticky'=>'w');
# $matrix[10][0] = $menu_bar->Checkbutton ('-variable'   => \$nowarn, '-font' => $normal,'foreground' => 'black','background' =>'grey','-width'=>0,)->grid(
#'-row' => 10, '-column' =>0,'-sticky'=>'e');
#=cut
#------------------------------------------------------------------------------
 $matrix[12][0] = $menu_bar->Label ('-text'=>'Output log', '-width' => 80, '-font' => $bold,'foreground' => 'black','background' =>'lightgrey',)->grid(
'-row' => 12, '-column' => 0,'-columnspan'=>4);
#==============================================================================
# Console 
my $text_frame = $top->Frame('-background'=>'black', '-width'=>80)->pack('-side' => 'top', '-fill' => 'x');
#
 $text=$text_frame->Text('-foreground' => 'grey','-background'=>'black','-height'=>25, '-width'=>80)->pack('-side' => 'left', '-fill' => 'y');
 $text->tagConfigure('console', '-font' => $console,'foreground' => 'grey','background' =>'black',); 
my $scroll=$text_frame->Scrollbar('-background'=>'grey','-width'=>10,'-command' => ['yview', $text])->pack('-side' => 'right', '-fill' => 'y');
# Inform listbox about the scrollbar
$text->configure('-yscrollcommand' => ['set', $scroll]);



( run in 0.246 second using v1.01-cache-2.11-cpan-a5abf4f5562 )