aboutsummaryrefslogtreecommitdiff
path: root/exemples/StripAntiRecouvre.pm
blob: 5c1bf0a95e83ad9f4261284c5eaa514b160a3b3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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::GUI::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::GUI::MGroup ($self);
	my $gp2 = new MTools::GUI::MGroup ($self);
	my $gp3 = new MTools::GUI::MGroup ($self);
	my $gp4 = new MTools::GUI::MGroup ($self);
	my $gp5 = new MTools::GUI::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;