note
	description: "[
		The widget representing this port
		]"
	author: "Jimmy J. Johnson"

class
	NEW_HEBRIDES_WIDGET

inherit

--	GREEN_PORT_WIDGET
--		undefine
--			paint
--		redefine
--			create_interface_objects,
--			initialize,
--			position_widgets,
--			build_land
--		end

	ISLAND_PORT_WIDGET
		redefine
			create_interface_objects,
			position_widgets,
			build_land,
			rotation_amount
		end

create
	make

feature {NONE} -- Initialization

	create_interface_objects
			-- Initialize attributes
		do
			vanuatu := vanuatu_imp
			malekula := malekula_imp
			ambrym := ambrym_imp
			pentecost := pentecost_imp
			maewo := maewo_imp
			ambae := ambae_imp
			Precursor {ISLAND_PORT_WIDGET}
--			Precursor {GREEN_PORT_WIDGET}
		end

	position_widgets
			-- Move Current and contained widgets to correct
			-- location and set their their sizes
		do
--			Precursor {GREEN_PORT_WIDGET}
			Precursor {ISLAND_PORT_WIDGET}
--			marker.center_on_dot (dot)
			marker.set_x_y (dot.x, dot.y)
			scale_widget (land, 0.55)
			rotate_widget (land, 13.0)
			center_on (450, 511)
			translate_widget (land, -10, -32)
			translate_widget (name_mt, -1, -3)
			translate_widget (marker, 0, 7)
			bring_to_front (marker)
		end

	build_land
			-- Add widgets to Current
		do
			Precursor {ISLAND_PORT_WIDGET}
			land.extend (vanuatu)
			land.extend (malekula)
			land.extend (ambrym)
			land.extend (pentecost)
			land.extend (maewo)
			land.extend (ambae)
		end

feature -- Status report

	is_red: BOOLEAN = False
			-- Does Current represent a red (i.e. major) port?

feature {NONE} -- Implementation

	vanuatu: EV_MODEL_POLYGON
	malekula: EV_MODEL_POLYGON
	ambrym: EV_MODEL_POLYGON
	pentecost: EV_MODEL_POLYGON
	maewo: EV_MODEL_POLYGON
	ambae: EV_MODEL_POLYGON


feature {NONE} -- Implementation

	vanuatu_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (0, 0))
			Result.extend_point (create {EV_COORDINATE}.make_precise (0, -7.4074074074075043))
			Result.extend_point (create {EV_COORDINATE}.make_precise (2.9629629629630472, -11.259259259259238))
			Result.extend_point (create {EV_COORDINATE}.make_precise (4.7407407407408755, -9.7777777777778283))
			Result.extend_point (create {EV_COORDINATE}.make_precise (8.8888888888889142, -4.7407407407407618))
			Result.extend_point (create {EV_COORDINATE}.make_precise (11.851851851851961, 0.29629629629630472))
			Result.extend_point (create {EV_COORDINATE}.make_precise (11.851851851851961, 5.925925925925867))
			Result.extend_point (create {EV_COORDINATE}.make_precise (13.925925925925981, 13.037037037036953))
			Result.extend_point (create {EV_COORDINATE}.make_precise (18.074074074074247, 13.037037037036953))
			Result.extend_point (create {EV_COORDINATE}.make_precise (20.444444444444343, 10.666666666666629))
			Result.extend_point (create {EV_COORDINATE}.make_precise (19.851851851851961, 8.2962962962963047))
			Result.extend_point (create {EV_COORDINATE}.make_precise (21.333333333333371, 4.1481481481481524))
			Result.extend_point (create {EV_COORDINATE}.make_precise (19.851851851851961, 2.3703703703703241))
			Result.extend_point (create {EV_COORDINATE}.make_precise (23.407407407407618, 2.3703703703703241))
			Result.extend_point (create {EV_COORDINATE}.make_precise (29.03703703703718, 5.0370370370369528))
			Result.extend_point (create {EV_COORDINATE}.make_precise (24.888888888888914, 4.4444444444444571))
			Result.extend_point (create {EV_COORDINATE}.make_precise (25.777777777777715, 7.4074074074073906))
			Result.extend_point (create {EV_COORDINATE}.make_precise (24.592592592592609, 9.1851851851852189))
			Result.extend_point (create {EV_COORDINATE}.make_precise (26.370370370370438, 12.148148148148152))
			Result.extend_point (create {EV_COORDINATE}.make_precise (29.925925925925981, 11.555555555555543))
			Result.extend_point (create {EV_COORDINATE}.make_precise (32, 18.370370370370324))
			Result.extend_point (create {EV_COORDINATE}.make_precise (30.814814814814781, 21.629629629629676))
			Result.extend_point (create {EV_COORDINATE}.make_precise (34.074074074074247, 28.444444444444457))
			Result.extend_point (create {EV_COORDINATE}.make_precise (31.703703703703809, 31.407407407407391))
			Result.extend_point (create {EV_COORDINATE}.make_precise (34.666666666666742, 31.703703703703582))
			Result.extend_point (create {EV_COORDINATE}.make_precise (33.777777777777715, 34.962962962962933))
			Result.extend_point (create {EV_COORDINATE}.make_precise (33.481481481481524, 38.222222222222172))
			Result.extend_point (create {EV_COORDINATE}.make_precise (31.407407407407618, 41.48148148148141))
			Result.extend_point (create {EV_COORDINATE}.make_precise (26.666666666666742, 40))
			Result.extend_point (create {EV_COORDINATE}.make_precise (25.481481481481524, 37.333333333333371))
			Result.extend_point (create {EV_COORDINATE}.make_precise (28.148148148148152, 34.666666666666629))
			Result.extend_point (create {EV_COORDINATE}.make_precise (31.111111111111086, 34.666666666666629))
			Result.extend_point (create {EV_COORDINATE}.make_precise (26.962962962963047, 33.48148148148141))
			Result.extend_point (create {EV_COORDINATE}.make_precise (24, 34.370370370370324))
			Result.extend_point (create {EV_COORDINATE}.make_precise (17.481481481481524, 34.074074074074019))
			Result.extend_point (create {EV_COORDINATE}.make_precise (16.592592592592609, 36.148148148148152))
			Result.extend_point (create {EV_COORDINATE}.make_precise (14.814814814814781, 35.555555555555543))
			Result.extend_point (create {EV_COORDINATE}.make_precise (14.814814814814781, 37.333333333333371))
			Result.extend_point (create {EV_COORDINATE}.make_precise (10.370370370370438, 36.740740740740762))
			Result.extend_point (create {EV_COORDINATE}.make_precise (10.666666666666742, 34.370370370370324))
			Result.extend_point (create {EV_COORDINATE}.make_precise (7.4074074074076179, 30.51851851851859))
			Result.extend_point (create {EV_COORDINATE}.make_precise (5.9259259259259807, 25.777777777777715))
			Result.extend_point (create {EV_COORDINATE}.make_precise (3.8518518518519613, 24.296296296296305))
			Result.extend_point (create {EV_COORDINATE}.make_precise (3.8518518518519613, 15.407407407407391))
			Result.extend_point (create {EV_COORDINATE}.make_precise (3.8518518518519613, 9.1851851851852189))
			Result.extend_point (create {EV_COORDINATE}.make_precise (1.7777777777777146, 4.4444444444444571))
		end

	malekula_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (29.03703703703718, 58.962962962962933))
			Result.extend_point (create {EV_COORDINATE}.make_precise (29.62962962962979, 54.51851851851859))
			Result.extend_point (create {EV_COORDINATE}.make_precise (28.444444444444343, 50.074074074074019))
			Result.extend_point (create {EV_COORDINATE}.make_precise (32, 46.814814814814781))
			Result.extend_point (create {EV_COORDINATE}.make_precise (34.370370370370438, 49.777777777777715))
			Result.extend_point (create {EV_COORDINATE}.make_precise (35.555555555555543, 48.296296296296305))
			Result.extend_point (create {EV_COORDINATE}.make_precise (37.925925925925981, 53.037037037036953))
			Result.extend_point (create {EV_COORDINATE}.make_precise (39.703703703703809, 52.148148148148152))
			Result.extend_point (create {EV_COORDINATE}.make_precise (39.703703703703809, 55.703703703703582))
			Result.extend_point (create {EV_COORDINATE}.make_precise (42.962962962963047, 61.037037037036953))
			Result.extend_point (create {EV_COORDINATE}.make_precise (44.740740740740875, 57.48148148148141))
			Result.extend_point (create {EV_COORDINATE}.make_precise (45.333333333333371, 61.629629629629562))
			Result.extend_point (create {EV_COORDINATE}.make_precise (51.555555555555543, 66.074074074074019))
			Result.extend_point (create {EV_COORDINATE}.make_precise (57.185185185185219, 70.814814814814781))
			Result.extend_point (create {EV_COORDINATE}.make_precise (60.148148148148152, 74.666666666666629))
			Result.extend_point (create {EV_COORDINATE}.make_precise (59.555555555555543, 77.925925925925753))
			Result.extend_point (create {EV_COORDINATE}.make_precise (57.481481481481524, 76.444444444444343))
			Result.extend_point (create {EV_COORDINATE}.make_precise (57.481481481481524, 78.51851851851859))
			Result.extend_point (create {EV_COORDINATE}.make_precise (53.925925925925981, 78.222222222222172))
			Result.extend_point (create {EV_COORDINATE}.make_precise (51.851851851851961, 76.444444444444343))
			Result.extend_point (create {EV_COORDINATE}.make_precise (48, 77.333333333333371))
			Result.extend_point (create {EV_COORDINATE}.make_precise (49.185185185185219, 79.703703703703582))
			Result.extend_point (create {EV_COORDINATE}.make_precise (43.259259259259352, 81.777777777777715))
			Result.extend_point (create {EV_COORDINATE}.make_precise (40.296296296296418, 78.51851851851859))
			Result.extend_point (create {EV_COORDINATE}.make_precise (42.074074074074247, 75.851851851851848))
			Result.extend_point (create {EV_COORDINATE}.make_precise (37.925925925925981, 70.51851851851859))
			Result.extend_point (create {EV_COORDINATE}.make_precise (39.407407407407618, 63.407407407407391))
			Result.extend_point (create {EV_COORDINATE}.make_precise (36.148148148148152, 59.851851851851848))
			Result.extend_point (create {EV_COORDINATE}.make_precise (34.074074074074247, 61.037037037036953))
		end

	ambrym_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (63.407407407407618, 64.296296296296191))
			Result.extend_point (create {EV_COORDINATE}.make_precise (66.962962962963047, 62.814814814814781))
			Result.extend_point (create {EV_COORDINATE}.make_precise (69.333333333333371, 61.925925925925753))
			Result.extend_point (create {EV_COORDINATE}.make_precise (75.259259259259352, 56.8888888888888))
			Result.extend_point (create {EV_COORDINATE}.make_precise (77.03703703703718, 62.814814814814781))
			Result.extend_point (create {EV_COORDINATE}.make_precise (81.185185185185219, 66.666666666666629))
			Result.extend_point (create {EV_COORDINATE}.make_precise (81.777777777777715, 69.037037037036953))
			Result.extend_point (create {EV_COORDINATE}.make_precise (78.814814814814781, 70.51851851851859))
			Result.extend_point (create {EV_COORDINATE}.make_precise (75.851851851851961, 70.222222222222172))
			Result.extend_point (create {EV_COORDINATE}.make_precise (73.185185185185219, 72))
			Result.extend_point (create {EV_COORDINATE}.make_precise (68.444444444444343, 70.222222222222172))
			Result.extend_point (create {EV_COORDINATE}.make_precise (65.481481481481524, 67.555555555555543))
		end

	pentecost_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (73.481481481481524, 28.444444444444457))
			Result.extend_point (create {EV_COORDINATE}.make_precise (75.555555555555543, 27.259259259259238))
			Result.extend_point (create {EV_COORDINATE}.make_precise (76.740740740740875, 31.407407407407391))
			Result.extend_point (create {EV_COORDINATE}.make_precise (77.03703703703718, 36.444444444444457))
			Result.extend_point (create {EV_COORDINATE}.make_precise (79.111111111111086, 46.222222222222172))
			Result.extend_point (create {EV_COORDINATE}.make_precise (81.185185185185219, 50.370370370370324))
			Result.extend_point (create {EV_COORDINATE}.make_precise (76.740740740740875, 54.51851851851859))
			Result.extend_point (create {EV_COORDINATE}.make_precise (74.666666666666742, 53.629629629629562))
			Result.extend_point (create {EV_COORDINATE}.make_precise (75.555555555555543, 48.8888888888888))
			Result.extend_point (create {EV_COORDINATE}.make_precise (73.777777777777715, 43.851851851851848))
			Result.extend_point (create {EV_COORDINATE}.make_precise (73.481481481481524, 41.48148148148141))
			Result.extend_point (create {EV_COORDINATE}.make_precise (71.111111111111086, 38.814814814814781))
			Result.extend_point (create {EV_COORDINATE}.make_precise (72.888888888888914, 33.185185185185219))
		end

	maewo_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (67.851851851851961, 1.7777777777777146))
			Result.extend_point (create {EV_COORDINATE}.make_precise (71.111111111111086, 0.59259259259249575))
			Result.extend_point (create {EV_COORDINATE}.make_precise (73.777777777777715, 7.7037037037035816))
			Result.extend_point (create {EV_COORDINATE}.make_precise (74.074074074074247, 13.629629629629676))
			Result.extend_point (create {EV_COORDINATE}.make_precise (76.740740740740875, 16))
			Result.extend_point (create {EV_COORDINATE}.make_precise (75.259259259259352, 18.074074074074019))
			Result.extend_point (create {EV_COORDINATE}.make_precise (76.740740740740875, 21.333333333333371))
			Result.extend_point (create {EV_COORDINATE}.make_precise (75.555555555555543, 24.296296296296305))
			Result.extend_point (create {EV_COORDINATE}.make_precise (72, 24.8888888888888))
			Result.extend_point (create {EV_COORDINATE}.make_precise (71.407407407407618, 20.148148148148152))
			Result.extend_point (create {EV_COORDINATE}.make_precise (72, 16.8888888888888))
			Result.extend_point (create {EV_COORDINATE}.make_precise (69.62962962962979, 8.5925925925924957))
			Result.extend_point (create {EV_COORDINATE}.make_precise (69.03703703703718, 4.7407407407407618))
		end

	ambae_imp: EV_MODEL_POLYGON
			-- Make the polygon
		do
			create Result
				-- Points generated by Grabber application
			Result.extend_point (create {EV_COORDINATE}.make_precise (52.148148148148152, 26.666666666666629))
			Result.extend_point (create {EV_COORDINATE}.make_precise (55.111111111111086, 23.111111111111086))
			Result.extend_point (create {EV_COORDINATE}.make_precise (60.444444444444343, 20.444444444444457))
			Result.extend_point (create {EV_COORDINATE}.make_precise (65.185185185185219, 18.962962962962933))
			Result.extend_point (create {EV_COORDINATE}.make_precise (68.444444444444343, 19.555555555555543))
			Result.extend_point (create {EV_COORDINATE}.make_precise (66.074074074074247, 21.925925925925867))
			Result.extend_point (create {EV_COORDINATE}.make_precise (63.407407407407618, 24.592592592592496))
			Result.extend_point (create {EV_COORDINATE}.make_precise (60.740740740740875, 28.740740740740762))
			Result.extend_point (create {EV_COORDINATE}.make_precise (56.592592592592609, 28.148148148148152))
			Result.extend_point (create {EV_COORDINATE}.make_precise (54.222222222222172, 28.740740740740762))
		end

feature {NONE} -- Implementation

	rotation_amount: REAL_64 = -90.0
			-- Make the arrow point north-east

end
