## ctk: description Demo Args
## ctk: title Demo subroutine arg list
## ctk: application '' ''
## ctk: strict  0
## ctk: code  0
## ctk: testCode  1
## ctk: subroutineName useThisArgList
## ctk: autoExtractVariables  1
## ctk: autoExtract2Local  0
## ctk: modalDialogClassName DialogBox
## ctk: modal 1
## ctk: isolGeom 0
## ctk: version 4.011
## ctk: onDeleteWindow  sub{1}
## ctk: Toplevel  1
## ctk: argList -title , 'Demo argList', -labeltext => 'demo ArgList',-font => [-family,'Bradley Hand ITC',-size,16,-weight,'bold',-slant,'roman',-underline,0 ,-overstrike,0]
      
## ctk: 2008 04 15 - 16:37:07

## ctk: uselib start

## ctk: uselib end

use Tk;
 $mw=MainWindow->new(-title=>'Demo subroutine arg list');
## ctk: Globalvars

use vars qw/%args/;

## ctk: Globalvars end
&main::init();
my $answer = &main::useThisArgList($mw,-title , 'Demo argList', -labeltext => 'demo ArgList',-font => [-family,'Bradley Hand ITC',-size,16,-weight,'bold',-slant,'roman',-underline,0 ,-overstrike,0]
     );
print "\nanswer = '$answer'";
MainLoop;

sub useThisArgList {
my $hwnd = shift;
my (%args) = @_;
my $rv;
##
## ctk: Localvars
## ctk: Localvars end
##
my $mw = $hwnd->DialogBox(
	-title=> (exists $args{-title})? $args{-title}:'Demo subroutine arg list',
	 -buttons=> (exists $args{-buttons}) ? $args{-buttons} : ['OK','Cancel']);
$mw->protocol('WM_DELETE_WINDOW',sub{1});


## ctk: code generated by ctk_w version '4.011' 
## ctk: instantiate and display widgets 

$wr_002 = $mw -> Label ( -background , '#7df3ffffffff' , -justify , 'left' , -text , 'unit test linux' , -relief , 'flat'  ) -> pack(-side=>'top', -anchor=>'nw', -fill=>'x', -expand=>1);


$wr_001 = $mw -> Label ( -anchor , 'nw' , -justify , 'left' , -relief , 'flat' , -text , $args{-labeltext} , -font , $args{-font}  ) -> pack(-side=>'top', -anchor=>'nw', -fill=>'x', -expand=>1);


$wr_003 = $mw -> Button ( -background , '#ffff00000000' , -command , \&colorRed , -state , 'normal' , -text , 'Color arg label red'  ) -> pack(-anchor=>'nw', -side=>'top', -fill=>'x', -expand=>1);
$wr_003->configure(-bg => 'blue');

$wr_004 = $mw -> Button ( -background , '#0000ffffffff' , -command , \&do_exit , -state , 'normal' , -text , 'Exit'  ) -> pack(-side=>'top', -anchor=>'nw', -fill=>'x', -expand=>1);


## ctk: end of gened Tk-code

$rv =  $mw->Show();

 return $rv;

} ## end of useThisArgList 

## ctk: end of dialog code
## ctk: callbacks
sub init { 1 }
sub do_exit { 
exit(0)
}
sub colorRed {
	$wr_001->configure(-background => 'red');
}
## ctk: other code
## ctk: eof 2008 04 15 - 16:37:07
1;	## make perl compiler happy...

