#============================================================ # EmulationWindow #============================================================ package EmulationWindow; use Common; @ISA = qw(Common); use strict; #============================================================ # 変数等取得、再定義関数 #============================================================ sub SetApplication { my ($this, $app) = @_; $this->{Application} = $app; $this->SetProgram( $app->Program() ); $this->SetTitle( $app->Title() ); return $this->{Application}; } sub MainWindow { return shift; } sub mw { return shift; } sub title { my ($this, $title) = @_; return $this->{Title} if(!defined $title); return $this->{Title} = $title; } sub SetBalloon($) { my ($this,$b)=@_; return $this->{Balloon} = $b; } sub GetBalloon() { return shift->{Balloon}; } sub MainMenu() { return shift->{MainMenu}; } sub update() {} sub InitWindow {} sub CreateMainMenu {} sub CreateMenu {} sub CreateWidgets {} sub ModifyMenu {} sub CreateToolBar {} sub CreateStatusBar {} sub FloatOnTop {} sub ShowWindow {} sub SetMinSize {} sub SetMaxSize {} sub Resizable {} sub IsValidGeometry {} sub SetGeometry {} sub GetGeometry {} sub SetIcon {} sub GetIcon {} sub CreateFont {} sub StatusBar {} sub WriteStatusBar { my ($this,$s,$p)=@_; return $this->App()->print("Status bar: $s\n"); } sub Close { my ($this) = @_; my $App = $this->{Application}; $App->{geometry} = $this->geometry() if($App); # $this->destroy(); } sub messageBox { my ($this, @a) = @_; my %hash; for(my $i = 0 ; $i < @a ; $i += 2) { $hash{$a[$i]} = $a[$i+1]; } $hash{-message} =~ s/[\r\n]/ /g; $hash{-type} =~ s/([A-Z])/ or $1/g; $hash{-type} =~ s/^ or //; print "\n"; print "*************************************\n"; print " $hash{-message} [$hash{-type}] >> "; my $ret = <>; Utils::DelSpace($ret); return $hash{-default} if($ret eq '' or $hash{-type} !~ /$ret/i); return $ret; } #============================================================ # コンストラクタ、デストラクタ #============================================================ sub new { my ($module) = @_; my $this = {}; bless $this; return $this; } sub DESTROY { my $this = shift; $this->SUPER::DESTROY(@_); } 1;