#=============================================== # TkDVXa #=============================================== package TkDVXa; use Crystal::DVXa; use TkPlotModule; @ISA = qw(DVXa TkPlotModule); #公開したいサブルーチン #@EXPORT = qw(DelSpace Reduce01 MakePath RegExpQuote); use strict; use Utils; use MyTk::GraphFrameArray; use GraphData; use MyTk::TkGPGL; #============================================================ # 変数等取得関数 #============================================================ #sub SetCanvas { my($this,$can)=@_; return $this->{'Canvas'} = $can; } #sub Canvas { return shift->{'Canvas'}; } #sub GetGraphFrameArray { return shift->{'GraphFrameArray'}; } #============================================================ # コンストラクタ、デストラクタ #============================================================ sub new { my ($module, $app) = @_; # my ($module, $app, $canvas) = @_; my $this = {}; bless $this; $this->SetApplication($app); # $this->SetCanvas($canvas); return $this; } sub DESTROY { my $this = shift; $this->SUPER::DESTROY(@_); } #============================================================ # 継承クラスで定義しなおす関数 #============================================================ sub CheckFileType { my ($path) = @_; return DVXa::CheckFileType($path); } sub CreateGraphFrame { my ($this, $canvas) = @_; $canvas = $this->Canvas($canvas); # $this->SetCanvas($canvas) if($canvas); # $canvas = $this->Canvas() unless($canvas); my $App = $this->App(); my $font = $App->{'GraphFrameFont'}; my @font = split(/,/, $font) if($font); my $w = $canvas->width(); my $h = $canvas->height(); # Canvas, GraphFrameの初期化 my $FileType = $this->FileType(); if($FileType =~ /Fitting/i) { } } sub AssignGraphData { my ($this) = @_; $this->AdjustViewRange(); } sub AdjustViewRange { my ($this) = @_; } sub DeleteWidget { my ($this, $Frame) = @_; return undef unless($Frame); return 1; } sub AddWidget { my ($this, $Frame) = @_; return undef unless($Frame); return 1; } sub Draw { my ($this, $canvas) = @_; $canvas = $this->Canvas($canvas); # $canvas = $this->Canvas() unless($canvas); my $GPGL = new TkGPGL($this->App(), $canvas); $GPGL->SetFileName($this->FileName()); return $GPGL->Draw($canvas); } sub SetFileInfo { my ($this, $ListBox, $TextBox) = @_; return undef unless($ListBox); return undef unless($TextBox); $ListBox->ClearAll(); $TextBox->ClearText(); return 1; } 1;