package LauncherApp; use MyTk::MyTkApplication; @ISA = qw(MyTkApplication); use strict; #========================================== # パラメータ #========================================== my $nTotalButtons = 0; my $nButtonRow = 5; my $nButtonColumn = 3; my $ButtonWidth = 15; BEGIN { } sub new { my $class = shift; my $self = MyTkApplication->new(@_); my $this = bless $self, $class; $this->{'nButtonRow'} = $nButtonRow; $this->{'nButtonColumn'} = $nButtonColumn; $this->{'ButtonWidth'} = $ButtonWidth; $this->{'nTotalButtons'} = $nButtonRow * $nButtonColumn; return $this; } sub DESTROY { my $this = shift; $this->SUPER::DESTROY(@_); } sub OpenIniFile { my ($this, $ProgramPath) = @_; my $IniFile = $this->SUPER::OpenIniFile($ProgramPath); my @ScriptPaths; for(my $i = 1 ; ; $i++) { my $s= $IniFile->GetString("Script", "UserScript$i", ""); last unless($s); $s = Deps::MakePath($IniFile->MyDir(), $s, 0); #$this->print("Script$i: $s\n"); push(@ScriptPaths, $s); } $this->{'pScriptPathArray'} = \@ScriptPaths; return $IniFile; } sub nTotalButtons { return shift->{'nTotalButtons'}; } sub nButtonRow { return shift->{'nButtonRow'}; } sub nButtonColumn { return shift->{'nButtonColumn'}; } sub ButtonWidth { return shift->{'ButtonWidth'}; } sub ScriptPaths { my $this = shift; my $pScriptPathArray = $this->{'pScriptPathArray'}; return @$pScriptPathArray; } 1;