From c5866f304210618979d03c561b1e3f6f83200bce Mon Sep 17 00:00:00 2001 From: ribet Date: Wed, 21 Mar 2007 10:19:39 +0000 Subject: Import initial --- exemples/StripAntiRecouvre.pm | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 exemples/StripAntiRecouvre.pm (limited to 'exemples/StripAntiRecouvre.pm') diff --git a/exemples/StripAntiRecouvre.pm b/exemples/StripAntiRecouvre.pm new file mode 100644 index 0000000..4e2c001 --- /dev/null +++ b/exemples/StripAntiRecouvre.pm @@ -0,0 +1,71 @@ +########################################################### +# UN STRIP Q'on peut Bouger par le CallSIGN ############### +########################################################### + +package StripAntiRecouvre; +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU GPL General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, +# or refer to http://www.gnu.org/copyleft/gpl.html +# + +use strict; + +use MTools; + +use vars qw /@ISA/; + +use MTools; +use MTools::MGroup; +use MTools::Comp::MMover; +use MTools::Comp::MInertie; +use MTools::GUI::MAntiRecouvrementGroup; +use Data::Dumper; + +BEGIN +{ + @ISA = qw /MTools::GUI::MAntiRecouvrementGroup/; +} + +sub new { + my ($class, $parent, $frame, %options) = @_; + my $self = new MTools::GUI::MAntiRecouvrementGroup ($parent, height => 91, width => 351, xmin => 0, ymin => 0, xmax=>800, ymax => 600); + bless $self, $class; + + $self -> recordProperty('callsign', $options{callsign}); + $self -> recordProperty('color', 'grey'); + + my $gp1 = new MTools::MGroup ($self); + my $gp2 = new MTools::MGroup ($self); + my $gp3 = new MTools::MGroup ($self); + my $gp4 = new MTools::MGroup ($self); + my $gp5 = new MTools::MGroup ($self); + $self -> {cadre} = minstanciate ("strip_approche_arrival.svg#cadre_strip", $gp1); + plink([$self, 'color'], [mfind($self->{cadre},'cadre'),'-fillcolor']); + $self -> {infosavion} = minstanciate ("strip_approche_arrival.svg#infosavion", $gp2); + $self -> {header} = minstanciate ("strip_approche_arrival.svg#header", $gp3); + $self -> {instruction_zone} = minstanciate ("strip_approche_arrival.svg#instruction_zone", $gp4); + $self -> {coordination_zone} = minstanciate ("strip_approche_arrival.svg#coordination_zone", $gp5); + $self -> {ecriture_zone} = minstanciate ("strip_approche_arrival.svg#ecriture_zone", $gp5); + $self -> {QFU_zone} = minstanciate ("strip_approche_arrival.svg#QFU_zone", $gp5); + $self -> {IAF_zone} = minstanciate ("strip_approche_arrival.svg#IAF_zone", $gp5); + + plink ([$self, 'callsign'], [mfind ($self->{header}, 'callsign'), '-text']); + mconfigure($self,'color',"RGB:FF/98/FF"); + $self -> {mover} = my $mover = new MTools::Comp::MMover($self, $self, 1); + $self -> {inertie} = new MTools::Comp::MInertie($self -> {mover}); + + return $self; +} + +1; -- cgit v1.1