1
0
Fork 0

Initial Direct To page - non-functional.

This commit is contained in:
Stuart Buchanan 2018-01-26 19:06:06 +00:00
parent 0b1fc9b904
commit da252c8a18
54 changed files with 1340 additions and 190 deletions

View file

@ -0,0 +1,617 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1024px"
height="768px"
viewBox="0 0 1024 768"
version="1.1"
id="SVGRoot"
inkscape:version="0.91 r13725"
sodipodi:docname="DirectTo.svg">
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#ffffff"
borderopacity="0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.989583"
inkscape:cx="963.35035"
inkscape:cy="168.45634"
inkscape:document-units="px"
inkscape:current-layer="DirectToGroup"
showgrid="true"
inkscape:window-width="2495"
inkscape:window-height="1416"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-bbox="true"
inkscape:snap-others="true"
inkscape:snap-to-guides="true"
inkscape:bbox-paths="false"
inkscape:snap-nodes="true"
inkscape:snap-page="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid4269" />
</sodipodi:namedview>
<defs
id="defs7962" />
<metadata
id="metadata7965">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="DirectToGroup">
<g
id="DirectToGroup"
inkscape:label="#g9755">
<path
style="opacity:1;fill:#1a3030;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 698.99609,58.498047 0,684.503903 325.00391,0 0,-684.503903 -325.00391,0 z M 705.5,279.93359 l 314.4277,0 0,322.2793 -314.4277,0 0,-322.2793 z"
id="rect4230"
inkscape:connector-curvature="0" />
<rect
y="102.92673"
x="704.92676"
height="94.646538"
width="315.14658"
id="rect9743"
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
y="623.27563"
x="704.77563"
height="39.448742"
width="315.44876"
id="rect9747"
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
y="93.154411"
x="720.15442"
height="19.691175"
width="139.19115"
id="rect9753"
style="opacity:1;fill:#1a3030;fill-opacity:1;fill-rule:nonzero;stroke:#fffcfa;stroke-width:1.30882514;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text9749"
y="108"
x="725"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="108"
x="725"
id="tspan9751"
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed'">IDENT, FACILITY, CITY</tspan></text>
<rect
style="opacity:1;fill:#1a3030;fill-opacity:1;fill-rule:nonzero;stroke:#fffcfa;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4150"
width="34.834621"
height="20.334629"
x="719.8327"
y="268.3327" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:15px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="725"
y="283.5"
id="text4152"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4154"
x="725"
y="283.5">MAP</tspan></text>
<rect
y="613.95667"
x="719.98303"
height="20.033949"
width="74.533913"
id="rect4156"
style="opacity:1;fill:#1a3030;fill-opacity:1;fill-rule:nonzero;stroke:#fffcfa;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text4158"
y="628.97363"
x="725"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:15px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="628.97363"
x="725"
sodipodi:role="line"
id="tspan4162">LOCATION</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="711.10352"
y="136.96484"
id="DirectToID"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan4168"
x="711.10352"
y="136.96484">KSFO</tspan></text>
<text
sodipodi:linespacing="125%"
id="DirectToName"
y="161.86719"
x="711.10352"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
inkscape:label="#text4170"><tspan
y="161.86719"
x="711.10352"
id="tspan4172"
sodipodi:role="line">SAN FRANCISCO INTERNATIONAL</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="947.97852"
y="137.80469"
id="DirectToCity"
sodipodi:linespacing="125%"
inkscape:label="#text4174"><tspan
sodipodi:role="line"
id="tspan4176"
x="947.97852"
y="137.80469">CITY</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="711.10352"
y="186.96484"
id="DirectToRegion"
sodipodi:linespacing="125%"
inkscape:label="#text4198"><tspan
sodipodi:role="line"
id="tspan4200"
x="711.10352"
y="186.96484">REGION</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToID0"
y="136.96484"
x="711.10352"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="136.96484"
x="711.10352"
id="tspan4227"
sodipodi:role="line">K</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="722.25781"
y="136.96484"
id="DirectToID1"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan4232"
x="722.25781"
y="136.96484">S</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToID2"
y="137.08984"
x="732.99805"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="137.08984"
x="732.99805"
id="tspan4236"
sodipodi:role="line">F</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="743.24805"
y="136.96484"
id="DirectToID3"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan4240"
x="743.24805"
y="136.96484">O</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="829.43481"
y="77.353516"
id="text3449"
sodipodi:linespacing="125%"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed'"
sodipodi:role="line"
id="tspan3451"
x="829.43481"
y="77.353516">DIRECT TO</tspan></text>
<rect
y="219.41809"
x="705.27161"
height="38.310284"
width="315.45676"
id="rect3453"
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="711.10352"
y="248"
id="DirectToVNVAlt"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan3515"
x="711.10352"
y="248">00000</tspan></text>
<rect
y="208.35518"
x="719.85516"
height="20.289667"
width="39.789661"
id="rect3455"
style="opacity:1;fill:#1a3030;fill-opacity:1;fill-rule:nonzero;stroke:#fffcfa;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text3457"
y="223.5"
x="725"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:15px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="223.5"
x="725"
id="tspan3459"
sodipodi:role="line">VNV</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="738.52539"
y="248"
id="DirectToVNVAlt3"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan3495"
x="738.52539"
y="248">0</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToVNVAlt2"
y="248"
x="729.38477"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="248"
x="729.38477"
id="tspan3499"
sodipodi:role="line">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="720.24414"
y="248"
id="DirectToVNVAlt1"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan3503"
x="720.24414"
y="248">0</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToVNVAlt0"
y="248"
x="711.10352"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="248"
x="711.10352"
id="tspan3507"
sodipodi:role="line">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="747.66602"
y="248"
id="DirectToVNVAlt4"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan3511"
x="747.66602"
y="248">0</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToVNVAltFt"
y="248"
x="756.52344"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="248"
x="756.52344"
id="tspan3519"
sodipodi:role="line">ft</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="946.23047"
y="248"
id="text3521"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
x="946.23047"
y="248"
id="tspan3525">-</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToVNVOffset"
y="248"
x="956.47461"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="248"
x="956.47461"
sodipodi:role="line"
id="tspan3533">00</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="956.47461"
y="248"
id="DirectToVNVOffset0"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
id="tspan3539"
sodipodi:role="line"
x="956.47461"
y="248">0</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToVNVOffset1"
y="248"
x="965.61523"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="248"
x="965.61523"
sodipodi:role="line"
id="tspan3543">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="711.10352"
y="652.80469"
id="text3549"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan3551"
x="711.10352"
y="652.80469">BRG</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToLocationBRG"
y="652.80469"
x="760.69336"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="652.80469"
x="760.69336"
id="tspan3555"
sodipodi:role="line">189</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="928.75"
y="652.80469"
id="DirectToLocationDIS"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan3559"
x="928.75"
y="652.80469">12.3</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="text3565"
y="652.80469"
x="883.65234"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="652.80469"
x="883.65234"
id="tspan3567"
sodipodi:role="line">DIS</tspan></text>
<rect
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4369"
width="125.15188"
height="39.651882"
x="704.67407"
y="692.33423" />
<rect
style="opacity:1;fill:#1a3030;fill-opacity:1;fill-rule:nonzero;stroke:#fffcfa;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4371"
width="74.533913"
height="20.033949"
x="719.98303"
y="683.11682" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:15px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="725"
y="698.13379"
id="text4373"
sodipodi:linespacing="125%"><tspan
id="tspan4375"
sodipodi:role="line"
x="725"
y="698.13379">COURSE</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="743.75"
y="721.96484"
id="DirectToCourse"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan4383"
x="743.75"
y="721.96484">000</tspan></text>
<rect
y="703.95667"
x="857.39319"
height="20.033949"
width="74.533913"
id="rect4393"
style="opacity:1;fill:#1a3030;fill-opacity:1;fill-rule:nonzero;stroke:#fffcfa;stroke-width:2;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="DirectToActivate"
y="718.97363"
x="862.41016"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:15px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#fffcfa;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
inkscape:label="#text4395"><tspan
y="718.97363"
x="862.41016"
sodipodi:role="line"
id="tspan4397">ACTIVATE?</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToCourse0"
y="721.96484"
x="743.75"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="721.96484"
x="743.75"
sodipodi:role="line"
id="tspan4508">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="752.89062"
y="721.96484"
id="DirectToCourse1"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
id="tspan4514"
sodipodi:role="line"
x="752.89062"
y="721.96484">0</tspan></text>
<text
inkscape:label="#text4166"
sodipodi:linespacing="125%"
id="DirectToCourse2"
y="721.96484"
x="762.03125"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="721.96484"
x="762.03125"
sodipodi:role="line"
id="tspan4518">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:Sans;-inkscape-font-specification:Sans;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="985"
y="248"
id="text4223"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4225"
x="985"
y="248">nm</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:20px;line-height:125%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow Condensed';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#80ffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="975.98633"
y="248"
id="text4227"
sodipodi:linespacing="125%"
inkscape:label="#text4166"><tspan
sodipodi:role="line"
id="tspan4229"
x="975.98633"
y="248">nm</tspan></text>
<rect
y="578.49768"
x="952.49768"
height="24.004704"
width="68.004707"
id="rect8420"
style="display:inline;opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.99528456;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
sodipodi:linespacing="0%"
inkscape:label="RangeDisplay"
transform="scale(0.95485857,1.0472755)"
id="DirectToRangeDisplay"
y="570.83734"
x="1033.2169"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:11.80263901px;line-height:0%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow, Condensed';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:#31ffff;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
style="font-size:17.21218109px;line-height:1.25;fill:#31ffff;fill-opacity:1"
y="570.83734"
x="1033.2169"
id="tspan5131-3-5-3"
sodipodi:role="line">Zoom nm</tspan></text>
<rect
style="display:inline;opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4265"
width="75.057129"
height="19.057156"
x="945.47144"
y="279.47144" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:condensed;font-size:11.80263901px;line-height:0%;font-family:'Liberation Sans Narrow';-inkscape-font-specification:'Liberation Sans Narrow, Condensed';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:#31ffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
x="1029.4486"
y="281.5152"
id="text4267"
transform="scale(0.95485858,1.0472755)"
inkscape:label="RangeDisplay"
sodipodi:linespacing="0%"><tspan
sodipodi:role="line"
id="tspan4269"
x="1029.4486"
y="281.5152"
style="font-size:17.21218109px;line-height:1.25;fill:#31ffff;fill-opacity:1;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none">NORTH UP</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 35 KiB

View file

@ -12,7 +12,7 @@ var ActiveFlightPlanNarrow =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.ActiveFlightPlanNarrowController.new(obj, svg); obj.setController(fg1000.ActiveFlightPlanNarrowController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var ActiveFlightPlanNarrow =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var ActiveFlightPlanWide =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.ActiveFlightPlanWideController.new(obj, svg); obj.setController(fg1000.ActiveFlightPlanWideController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var ActiveFlightPlanWide =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var AirportApproach =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.AirportApproachController.new(obj, svg); obj.setController(fg1000.AirportApproachController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var AirportApproach =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var AirportArrival =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.AirportArrivalController.new(obj, svg); obj.setController(fg1000.AirportArrivalController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var AirportArrival =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var AirportDeparture =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.AirportDepartureController.new(obj, svg); obj.setController(fg1000.AirportDepartureController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var AirportDeparture =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var AirportDirectory =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.AirportDirectoryController.new(obj, svg); obj.setController(fg1000.AirportDirectoryController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var AirportDirectory =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -40,10 +40,10 @@ var AirportInfo =
# .size is the number of characters of data entry # .size is the number of characters of data entry
# .chars is the set of characters, used to scroll through using the small # .chars is the set of characters, used to scroll through using the small
# FMS knob. # FMS knob.
obj.airportEntry = PFD.DataEntryElement.new(obj.pageName, svg, "ID", "", 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); obj.airportEntry = PFD.DataEntryElement.new(obj.pageName, svg, "ID", "", 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
# TODO: Implement search by name - not currently supported. # TODO: Implement search by name - not currently supported.
# obj.airportNameEntry = PFD.DataEntryElement.new(obj.pageName, svg, "Name", ???, "ABCDEFGHIJKLMNOPQRSTUVWXYZ "); # obj.airportNameEntry = PFD.DataEntryElement.new(obj.pageName, svg, "Name", ???, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ");
obj.runwaySelect = PFD.ScrollElement.new(obj.pageName, svg, "Runway", ["36","18"]); # Dummy values obj.runwaySelect = PFD.ScrollElement.new(obj.pageName, svg, "Runway", ["36","18"]); # Dummy values
@ -62,7 +62,6 @@ var AirportInfo =
# The Airport Chart # The Airport Chart
obj.AirportChart = obj._group.createChild("map"); obj.AirportChart = obj._group.createChild("map");
obj.AirportChart.setController("Static position", "main"); obj.AirportChart.setController("Static position", "main");
var controller = obj.AirportChart.getController();
# Initialize a range and screen resolution. Setting a range # Initialize a range and screen resolution. Setting a range
# to 4nm means we pick up a good set of surrounding fixes # to 4nm means we pick up a good set of surrounding fixes
@ -86,8 +85,7 @@ var AirportInfo =
type.vis ); type.vis );
} }
obj.setController(fg1000.AirportInfoController.new(obj, svg));
obj.controller = fg1000.AirportInfoController.new(obj, svg);
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
@ -95,7 +93,8 @@ var AirportInfo =
}, },
displayAirport : func(apt_info) { displayAirport : func(apt_info) {
# Display a given airport # Display a given airport
me.AirportChart.getController().setPosition(apt_info.lat,apt_info.lon); me.AirportChart.getController().setPosition(apt_info.lat, apt_info.lon);
me.AirportChart.update();
me.airportEntry.setValue(apt_info.id); me.airportEntry.setValue(apt_info.id);
me.setTextElement("Usage", "PUBLIC"); me.setTextElement("Usage", "PUBLIC");
me.setTextElement("Name", string.uc(apt_info.name)); me.setTextElement("Name", string.uc(apt_info.name));
@ -183,6 +182,7 @@ var AirportInfo =
setZoom : func(zoom, label) { setZoom : func(zoom, label) {
# Set the zoom level for the airport chart display # Set the zoom level for the airport chart display
me.AirportChart.setScreenRange(zoom); me.AirportChart.setScreenRange(zoom);
me.AirportChart.update();
me.setTextElement("Zoom", label); me.setTextElement("Zoom", label);
}, },
@ -203,12 +203,12 @@ var AirportInfo =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
# Softkey menus # Softkey menus
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {

View file

@ -189,9 +189,22 @@ var AirportInfoController =
# Initial airport is our current location. # Initial airport is our current location.
# Needs to be done here as the data provider may not be set up when # Needs to be done here as the data provider may not be set up when
# we are created. # we are created.
var current_apt = me.getAirport("airport");
# Use Emesary to get the airport
var notification = notifications.PFDEventNotification.new(
"MFD",
1,
notifications.PFDEventNotification.NavData,
{Id: "NearestAirports", Value: id});
var response = me._transmitter.NotifyAll(notification);
var retval = notification.EventParameter.Value;
if ((! me._transmitter.IsFailed(response)) and (size(retval) > 0)) {
var current_apt = retval[0];
me.setAirport(current_apt.id); me.setAirport(current_apt.id);
} }
}
}, },
offdisplay : func() { offdisplay : func() {
me.DeRegisterWithEmesary(); me.DeRegisterWithEmesary();
@ -206,9 +219,10 @@ var AirportInfoController =
{Id: "AirportByID", Value: id}); {Id: "AirportByID", Value: id});
var response = me._transmitter.NotifyAll(notification); var response = me._transmitter.NotifyAll(notification);
var retval = notification.EventParameter.Value;
if (! me._transmitter.IsFailed(response)) { if ((! me._transmitter.IsFailed(response)) and (size(retval) > 0)) {
return notification.EventParameter.Value; return retval[0];
} else { } else {
return nil; return nil;
} }

View file

@ -12,7 +12,7 @@ var AirportWeather =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.AirportWeatherController.new(obj, svg); obj.setController(fg1000.AirportWeatherController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var AirportWeather =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Checklist1 =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.Checklist1Controller.new(obj, svg); obj.setController(fg1000.Checklist1Controller.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Checklist1 =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Checklist2 =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.Checklist2Controller.new(obj, svg); obj.setController(fg1000.Checklist2Controller.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Checklist2 =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Checklist3 =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.Checklist3Controller.new(obj, svg); obj.setController(fg1000.Checklist3Controller.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Checklist3 =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Checklist4 =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.Checklist4Controller.new(obj, svg); obj.setController(fg1000.Checklist4Controller.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Checklist4 =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Checklist5 =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.Checklist5Controller.new(obj, svg); obj.setController(fg1000.Checklist5Controller.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Checklist5 =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -0,0 +1,157 @@
# DirectTo page
#
# Technically this is supposed to be an overlay page, sitting on top of
# whatever page the user was on already. However, to simplify implementation,
# we will assume that the user was on the Map page, and simply display the
# NavigationMap page underneath.
var DirectTo =
{
new : func (mfd, myCanvas, device, svg)
{
var obj = {
parents : [
DirectTo,
MFDPage.new(mfd, myCanvas, device, svg, "DirectTo", "DIRECT TO")
],
symbols : {},
};
obj.crsrIdx = 0;
# Dynamic text elements in the SVG file. In the SVG these have an "DirectTo" prefix.
textelements = [
"Name",
"City",
"Region",
"LocationBRG",
"LocationDIS",
"RangeDisplay"
];
obj.addTextElements(textelements);
obj._SVGGroup.setInt("z-index", 9);
# Data Entry information. Keyed from the name of the element, which must
# be one of the textelements above. Each data element maps to a set of
# text elements in the SVG of the form [PageName][TextElement]{0...n}, each
# representing a single character for data entry.
#
# .size is the number of characters of data entry
# .chars is the set of characters, used to scroll through using the small
# FMS knob.
obj.IDEntry = PFD.DataEntryElement.new(obj.pageName, svg, "ID", "", 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
obj.VNVAltEntry = PFD.DataEntryElement.new(obj.pageName, svg, "VNVAlt", "", 5, "0123456789");
obj.VNVOffsetEntry = PFD.DataEntryElement.new(obj.pageName, svg, "VNVOffset", "", 2, "0123456789");
obj.CourseEntry = PFD.DataEntryElement.new(obj.pageName, svg, "Course", "", 3, "0123456789");
obj.Activate = PFD.TextElement.new(obj.pageName, svg, "Activate", "ACTIVATE");
# The Airport Chart
obj.DirectToChart = obj._group.createChild("map");
obj.DirectToChart.setInt("z-index", 100);
obj.DirectToChart.setController("Static position", "main");
# Initialize a range and screen resolution. Setting a range
# to 15nm means we pick up a good set of surrounding fixes
# We will use the screen range for zooming.
obj.DirectToChart.setRange(8.0);
obj.DirectToChart.setScreenRange(300/2.0);
obj.DirectToChart.setTranslation(1045, 485);
obj.DirectToChart.set("clip-frame", canvas.Element.LOCAL);
obj.DirectToChart.set("clip", "rect(-160px, 160px, 160px, -160px)");
var r = func(name,vis=1,zindex=nil) return caller(0)[0];
foreach(var type; [r('APT'),r('DME'),r('VOR'),r('NDB'),r('FIX')] ) {
obj.DirectToChart.addLayer(canvas.SymbolLayer,
type.name,
10,
obj.Styles.getStyle(type.name),
obj.Options.getOption(type.name),
type.vis );
}
foreach(var type; [ r('STAMEN')]) {
obj.DirectToChart.addLayer(factory: canvas.OverlayLayer, type_arg: type.name,
priority: 9,
style: obj.Styles.getStyle(type.name),
options: obj.Options.getOption(type.name),
visible: 1);
}
obj.setController(fg1000.DirectToController.new(obj, svg));
return obj;
},
displayDestination : func(destination) {
if (destination != nil) {
# Display a given location
debug.dump(destination);
me.DirectToChart.setVisible(1);
me.DirectToChart.getController().setPosition(destination.lat,destination.lon);
me.setTextElement("Name", string.uc(destination.name));
me.setTextElement("City", "CITY");
me.setTextElement("Region", "REGION");
me.setTextElement("LocationBRG", "" ~ sprintf("%03d", destination.course));
me.setTextElement("LocationDIS", sprintf("%d", destination.range_nm) ~ "nm");
me.IDEntry.setValue(destination.id);
me.VNVAltEntry.setValue("00000");
me.VNVOffsetEntry.setValue("00");
me.CourseEntry.setValue("" ~ sprintf("%03d", destination.course));
} else {
me.DirectToChart.setVisible(1);
me.setTextElement("Name", "");
me.setTextElement("City", "");
me.setTextElement("Region", "");
me.setTextElement("LocationBRG", "_");
me.setTextElement("LocationDIS", "_");
me.IDEntry.setValue("____");
me.VNVAltEntry.setValue("00000");
me.VNVOffsetEntry.setValue("00");
me.CourseEntry.setValue(0);
}
},
setRange : func(range, label) {
me.DirectToChart.setRange(range);
me.DirectToChart.update();
me.setTextElement("RangeDisplay", label);
},
# Clear any cursor, highlights. Used when exiting from CRSR mode
resetCRSR : func() {
me.airportEntry.unhighlightElement();
me.runwaySelect.unhighlightElement();
me.freqSelect.hideCRSR();
},
offdisplay : func() {
me._group.setVisible(0);
me.getController().offdisplay();
me.mfd.NavigationMap.offdisplay(0);
},
ondisplay : func() {
me._group.setVisible(1);
# Display a false title, as underneath we're showing the navigation map.
me.mfd.setPageTitle("MAP - NAVIGATION MAP");
me.getController().ondisplay();
# The DirectTo pages displays over the NavigationMap. This is a hack
# as the page should just magically sit ontop of whatever page the user was
# on. However, we also need to disable the NavMap's own controller so there's
# no confusion.
me.mfd.NavigationMap.ondisplay(0);
},
# When the Direct To display is enabled, nothing is displayed on the softkeys.
topMenu : func(device, pg, menuitem) {
pg.clearMenu();
pg.resetMenuColors();
device.updateMenus();
},
};

View file

@ -0,0 +1,240 @@
# DirectTo Controller
var DirectToController =
{
# Vertical ranges, and labels.
# Unlike some other map displays, we keep the range constant at 4nm an change
# the ScreenRange to zoom in. Otherwise as we zoom in, the center of the
# runways moves out of the range of the display and they are not drawn.
# Ranges are scaled to the display height with range 1 displaying 4nm vertically.
# 2000nm = 12,152,000ft.
RANGES : [{range: 500/6076.12, label: "500ft"},
{range: 750/6076.12, label: "750ft"},
{range: 1000/6076.12, label: "1000ft"},
{range: 1500/6076.12, label: "1500ft"},
{range: 2000/6076.12, label: "2000ft"},
{range: 0.5, label: "0.5nm"},
{range: 0.75, label: "0.75nm"},
{range: 1, label: "1nm"},
{range: 2, label: "2nm"},
{range: 3, label: "3nm"},
{range: 4, label: "4nm"},
{range: 6, label: "6nm"},
{range: 8, label: "8nm"},
{range: 10, label: "10nm"},
{range: 12, label: "12nm"},
{range: 15, label: "15nm"},
{range: 20, label: "20nm"},
{range: 25, label: "25nm"},
{range: 30, label: "30nm"},
{range: 40, label: "40nm"},
{range: 50, label: "50nm"},
{range: 75, label: "75nm"},
{range: 100, label: "100nm"},
{range: 200, label: "200nm"},
{range: 500, label: "500nm"},
{range: 1000, label: "1000nm"},
{range: 1500, label: "1500nm"},
{range: 2000, label: "2000nm"}, ],
new : func (page, svg)
{
var obj = { parents : [ DirectToController, MFDPageController.new(page)] };
obj.id = "";
obj.page = page;
obj.current_zoom = 7;
obj.setZoom(obj.current_zoom);
obj._cursorElements = [
obj.page.IDEntry,
obj.page.VNVAltEntry,
obj.page.VNVOffsetEntry,
obj.page.CourseEntry,
obj.page.Activate
];
# -1 indicates nothing selected at present
obj._selectedElement = -1;
return obj;
},
setCursorElement : func(value) {
if (me._selectedElement != -1) {
# Unhighlight the current element, if one is highlighted
me._cursorElements[me._selectedElement ].unhighlightElement();
}
if (value < 0) value = 0;
if (value > (size(me._cursorElements) -1)) value = size(me._cursorElements) -1;
me._selectedElement = value;
me._cursorElements[me._selectedElement].highlightElement();
},
nextCursorElement : func(value) {
var incr_or_decr = (value > 0) ? 1 : -1;
me.setCursorElement(me._selectedElement + incr_or_decr);
},
# Control functions for Input
zoomIn : func() {
me.setZoom(me.current_zoom -1);
},
zoomOut : func() {
me.setZoom(me.current_zoom +1);
},
handleRange : func(val)
{
var incr_or_decr = (val > 0) ? 1 : -1;
me.setZoom(me.current_zoom + incr_or_decr);
},
setZoom : func(zoom) {
if ((zoom < 0) or (zoom > (size(me.RANGES) - 1))) return;
me.current_zoom = zoom;
me.page.setRange(me.RANGES[zoom].range, me.RANGES[zoom].label);
},
handleCRSR : func() {
# No effect, but shouldn't be passed to underlying page?
return emesary.Transmitter.ReceiptStatus_Finished;
},
handleFMSInner : func(value) {
if (me._selectedElement == -1) {
# TODO: handle display of waypoint submenu on anti-clockwise initial rotation!
# If no element is selected, then the inner FMS knob selects the ID field
me.nextCursorElement(1);
}
me._cursorElements[me._selectedElement].incrSmall(value);
return emesary.Transmitter.ReceiptStatus_Finished;
},
handleFMSOuter : func(value) {
if (me._selectedElement == -1) {
# If no element is selected, then the Outer FMS knob has no effect
return emesary.Transmitter.ReceiptStatus_Finished;
}
if (me._cursorElements[me._selectedElement].isInEdit()) {
me._cursorElements[me._selectedElement].incrLarge(value);
} else {
me.nextCursorElement(value);
}
return emesary.Transmitter.ReceiptStatus_Finished;
},
handleEnter : func(value) {
if (me._selectedElement == -1) {
# If no element is selected, then the ENT key has no effect
return emesary.Transmitter.ReceiptStatus_Finished;
}
# If we're on the Activate button, then set up the DirectTo and hide the
# page. We're finished
if (me._cursorElements[me._selectedElement] == me.page.Activate) {
var mappage = me._page.getMFD().getPage("NavigationMap");
assert(mappage != nil, "Unable to find NavigationMap page");
me._page.getDevice().selectPage(mappage);
return emesary.Transmitter.ReceiptStatus_Finished;
}
# If we're editing an element, complete the data entry.
if (me._cursorElements[me._selectedElement].isInEdit()) {
me._cursorElements[me._selectedElement].enterElement();
}
if (me._cursorElements[me._selectedElement] == me.page.IDEntry) {
# We've finished entering an ID, so load it.
var destination = me.getDestination(me.page.IDEntry.getValue());
if (destination != nil) {
# set the course and distance to the destination if required
var (course, dist) = courseAndDistance(destination);
var d = {
id: destination.id,
name: destination.name,
lat: destination.lat,
lon: destination.lon,
course : course,
range_nm : dist,
};
me.page.displayDestination(d);
}
}
# Determine where to highlight next. In most cases, we go straight to ACTIVATE.
# The exception is the VNV Alt field which goes to the VNV Distance field;
if (me._cursorElements[me._selectedElement] == me.page.VNVAltEntry) {
# VNV DIS entry is the next element
me.nextCursorElement(1);
} else {
# ACTIVATE is the last element of the group
me.setCursorElement(size(me._cursorElements) - 1);
}
return emesary.Transmitter.ReceiptStatus_Finished;
},
handleClear : func(value) {
var mappage = me._page.getMFD().getPage("NavigationMap");
assert(mappage != nil, "Unable to find NavigationMap page");
me._page.getDevice().selectPage(mappage);
return emesary.Transmitter.ReceiptStatus_Finished;
},
handleSoftKey : func(key) {
# DirectTo has no softkeys, but if the user presses one from the underlying
# page we should switch outselves off.
me.page.setVisible(0);
return emesary.Transmitter.ReceiptStatus_OK;
},
# Reset controller if required when the page is displayed or hidden
ondisplay : func() {
me.RegisterWithEmesary();
for (var i = 0; i < size(me._cursorElements); i = i+1) {
me._cursorElements[i].unhighlightElement();
}
me.setCursorElement(0);
me.page.IDEntry.setValue("KHAF");
var destination = me.getDestination(me.page.IDEntry.getValue());
if (destination != nil) {
# set the course and distance to the destination if required
var (course, dist) = courseAndDistance(destination);
var d = {
id: destination.id,
name: destination.name,
lat: destination.lat,
lon: destination.lon,
course : course,
range_nm : dist,
};
me.page.displayDestination(d);
}
},
offdisplay : func() {
me.DeRegisterWithEmesary();
},
getDestination : func(id) {
# Use Emesary to get the destination
var notification = notifications.PFDEventNotification.new(
"MFD",
1,
notifications.PFDEventNotification.NavData,
{Id: "NavDataByID", Value: id});
var response = me._transmitter.NotifyAll(notification);
var retval = notification.EventParameter.Value;
if ((! me._transmitter.IsFailed(response)) and (size(retval) > 0)) {
return retval[0];
} else {
return nil;
}
},
};

View file

@ -0,0 +1,28 @@
# DirectTo Options
var DirectToOptions =
{
new : func() {
var obj = { parents : [DirectToOptions] };
obj.Options= {};
obj.loadOptions();
return obj;
},
getOption : func(type) {
return me.Options[type];
},
setOption : func(type, name, value) {
me.Options[type][name] = value;
},
loadOptions : func() {
me.clearOptions();
me.Options.APS = {};
},
clearOptions : func() {
me.Options = {};
},
};

View file

@ -0,0 +1,28 @@
# DirectTo Styles
var DirectToStyles =
{
new : func() {
var obj = { parents : [ DirectToStyles ]};
obj.Styles = {};
obj.loadStyles();
return obj;
},
getStyle : func(type) {
return me.Styles[type];
},
setStyle : func(type, name, value) {
me.Styles[type][name] = value;
},
loadStyles : func() {
me. clearStyles();
me.Styles.XXX = {};
},
clearStyles : func() {
me.Styles = {};
},
};

View file

@ -10,7 +10,7 @@ var EIS =
], ],
}; };
obj.controller = fg1000.EISController.new(obj, svg); obj.setController(fg1000.EISController.new(obj, svg));
obj.addTextElements(["RPMDisplay", "MBusVolts", "EBusVolts", "EngineHours"]); obj.addTextElements(["RPMDisplay", "MBusVolts", "EBusVolts", "EngineHours"]);
@ -109,11 +109,11 @@ var EIS =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.controller.ondisplay(); me.getController().ondisplay();
}, },

View file

@ -12,7 +12,7 @@ var FlightPlanCatalog =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.FlightPlanCatalogController.new(obj, svg); obj.setController(fg1000.FlightPlanCatalogController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var FlightPlanCatalog =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var GPSStatus =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.GPSStatusController.new(obj, svg); obj.setController(fg1000.GPSStatusController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var GPSStatus =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -37,13 +37,29 @@ getNearestAirports : func()
return apts; return apts;
}, },
# Find a specific airport by ID # Find a specific airport by ID. Return an array of airport objects
getAirportById : func(id) getAirportById : func(id)
{ {
var apt = airportinfo(id); var apt = findAirportsByICAO(id, "airport");
return apt; return apt;
}, },
# Find an arbritrary piece of nav data by ID. This searches based on the
# current location and returns an array of objects that match the id.
getNavDataById : func (id)
{
# Check for airport first
var navdata = findAirportsByICAO(id, "airport");
# Check for Navaids.
if (size(navdata) == 0) navdata = findNavaidsByID(id);
# Check for fix.
if (size(navdata) == 0) navdata = findFixesByID(id);
return navdata;
},
RegisterWithEmesary : func() RegisterWithEmesary : func()
{ {
if (me._recipient == nil){ if (me._recipient == nil){
@ -68,6 +84,11 @@ RegisterWithEmesary : func()
notification.EventParameter.Value = apt; notification.EventParameter.Value = apt;
return emesary.Transmitter.ReceiptStatus_Finished; return emesary.Transmitter.ReceiptStatus_Finished;
} }
if (id == "NavDataByID") {
var navdata = controller.getNavDataById(notification.EventParameter.Value);
notification.EventParameter.Value = navdata;
return emesary.Transmitter.ReceiptStatus_Finished;
}
} }
} }
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;

View file

@ -12,7 +12,7 @@ var IntersectionInfo =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.IntersectionInfoController.new(obj, svg); obj.setController(fg1000.IntersectionInfoController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var IntersectionInfo =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -52,7 +52,8 @@ var MFDPages = [
"NearestVOR", "NearestVOR",
"NearestUserWPT", "NearestUserWPT",
"NearestFrequencies", "NearestFrequencies",
"NearestAirspaces" "NearestAirspaces",
"DirectTo", # display at the top of the stack
]; ];
foreach (var page; MFDPages) { foreach (var page; MFDPages) {
@ -71,6 +72,7 @@ var MFD =
EIS : nil, EIS : nil,
NavigationMap: nil, NavigationMap: nil,
Surround : nil, Surround : nil,
_pageList : {}
}; };
obj.ConfigStore = fg1000.ConfigStore.new(); obj.ConfigStore = fg1000.ConfigStore.new();
@ -109,18 +111,22 @@ var MFD =
# Controller for the header and display on the bottom left which allows selection # Controller for the header and display on the bottom left which allows selection
# of page groups and individual pages using the FMS controller. # of page groups and individual pages using the FMS controller.
obj.Surround = fg1000.Surround.new(obj, myCanvas, obj._MFDDevice, obj._svg); obj.Surround = fg1000.Surround.new(obj, myCanvas, obj._MFDDevice, obj._svg);
obj.SurroundController = obj.Surround.controller; obj.SurroundController = obj.Surround.getController();
# Engine Information System. A special case as it's always displayed on the MFD. # Engine Information System. A special case as it's always displayed on the MFD.
obj.EIS = obj.Surround.addPage("EIS", fg1000.EIS.new(obj, myCanvas, obj._MFDDevice, obj._svg)); obj.EIS = fg1000.EIS.new(obj, myCanvas, obj._MFDDevice, obj._svg);
obj.addPage("EIS", obj.EIS);
# The NavigationMap page is a special case, as it is displayed with the Nearest... pages as an overlay # The NavigationMap page is a special case, as it is displayed with the Nearest... pages as an overlay
obj.NavigationMap = obj.Surround.addPage("NavigationMap", fg1000.NavigationMap.new(obj, myCanvas, obj._MFDDevice, obj._svg)); obj.NavigationMap = fg1000.NavigationMap.new(obj, myCanvas, obj._MFDDevice, obj._svg);
obj.addPage("NavigationMap", obj.NavigationMap);
obj.NavigationMap.topMenu(obj._MFDDevice, obj.NavigationMap, nil); obj.NavigationMap.topMenu(obj._MFDDevice, obj.NavigationMap, nil);
# Now load the other pages normally;
foreach (var page; MFDPages) { foreach (var page; MFDPages) {
if ((page != "NavigationMap") and (page != "EIS")) { if ((page != "NavigationMap") and (page != "EIS")) {
var code = "obj.Surround.addPage(\"" ~ page ~ "\", fg1000." ~ page ~ ".new(obj, myCanvas, obj._MFDDevice, obj._svg));"; #var code = "obj.Surround.addPage(\"" ~ page ~ "\", fg1000." ~ page ~ ".new(obj, myCanvas, obj._MFDDevice, obj._svg));";
var code = "obj.addPage(\"" ~ page ~ "\", fg1000." ~ page ~ ".new(obj, myCanvas, obj._MFDDevice, obj._svg));";
var addPageFn = compile(code); var addPageFn = compile(code);
addPageFn(); addPageFn();
} }
@ -147,5 +153,14 @@ var MFD =
setPageTitle: func(title) setPageTitle: func(title)
{ {
me._pageTitle.setText(title); me._pageTitle.setText(title);
} },
addPage : func(name, page)
{
me._pageList[name] = page;
},
getPage : func(name)
{
return me._pageList[name];
},
}; };

View file

@ -25,6 +25,7 @@ new : func (mfd, myCanvas, device, SVGGroup, pageName, title)
_SVGGroup : SVGGroup, _SVGGroup : SVGGroup,
parents : [ MFDPage, device.addPage(title, pageName ~ "Group") ], parents : [ MFDPage, device.addPage(title, pageName ~ "Group") ],
_symbols : {}, _symbols : {},
_controller : nil,
}; };
obj.device = device; obj.device = device;
@ -37,7 +38,7 @@ new : func (mfd, myCanvas, device, SVGGroup, pageName, title)
createStylesAndOptions(); createStylesAndOptions();
# Need to display this underneath the softkeys, EIS, header. # Need to display this underneath the softkeys, EIS, header.
obj._group.set("z-index", -10.0); obj._group.setInt("z-index", -10.0);
obj._group.setVisible(0); obj._group.setVisible(0);
return obj; return obj;
@ -75,4 +76,18 @@ resetMenuColors : func() {
} }
}, },
getController : func() {
return me._controller;
},
setController : func (controller) {
me._controller = controller;
},
getDevice : func() {
return me.device;
},
getMFD : func() {
return me.mfd;
},
}; };

View file

@ -52,10 +52,23 @@ handleComFreqTransferHold : func (value) { return me.page.mfd.SurroundController
handleComVol : func (value) { return me.page.mfd.SurroundController.handleComVol(value); }, handleComVol : func (value) { return me.page.mfd.SurroundController.handleComVol(value); },
handleComVolToggle : func (value) { return me.page.mfd.SurroundController.handleComVolToggle(value); }, handleComVolToggle : func (value) { return me.page.mfd.SurroundController.handleComVolToggle(value); },
handleDTO : func (value) { return emesary.Transmitter.ReceiptStatus_NotProcessed; }, # DTO button brings up the DirectTo Page.
handleDTO : func (value) {
var dtopage = me._page.getMFD().getPage("DirectTo");
assert(dtopage != nil, "Unable to find the DirectTo page.");
me._page.getDevice().selectPage(dtopage);
return emesary.Transmitter.ReceiptStatus_Finished;
},
handleFPL : func (value) { return emesary.Transmitter.ReceiptStatus_NotProcessed; }, handleFPL : func (value) { return emesary.Transmitter.ReceiptStatus_NotProcessed; },
handleClear : func (value) { return emesary.Transmitter.ReceiptStatus_NotProcessed; }, handleClear : func (value) { return emesary.Transmitter.ReceiptStatus_NotProcessed; },
handleClearHold : func (value) { return me.page.mfd.SurroundController.handleClearHold(value); },
# Holding the Clear button goes straight to the Navigation Map page.
handleClearHold : func (value) {
var mappage = me._page.getMFD().getPage("NavigationMap");
assert(mappage != nil, "Unable to find NavigationMap page");
me._page.getDevice().selectPage(mappage);
return emesary.Transmitter.ReceiptStatus_Finished;
},
# By default, the FMS knobs will select a new page. # By default, the FMS knobs will select a new page.
handleFMSOuter : func (value) { return me.page.mfd.SurroundController.handleFMSOuter(value); }, handleFMSOuter : func (value) { return me.page.mfd.SurroundController.handleFMSOuter(value); },
@ -153,7 +166,6 @@ RegisterWithEmesary : func()
me._transmitter.Register(me._recipient); me._transmitter.Register(me._recipient);
me._registered = 1; me._registered = 1;
}, },
DeRegisterWithEmesary : func() DeRegisterWithEmesary : func()

View file

@ -12,7 +12,7 @@ var NDBInfo =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.NDBInfoController.new(obj, svg); obj.setController(fg1000.NDBInfoController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var NDBInfo =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -56,22 +56,28 @@ var NavigationMap =
var r = func(name,vis=1,zindex=nil) return caller(0)[0]; var r = func(name,vis=1,zindex=nil) return caller(0)[0];
# TODO: we'll need some z-indexing here, right now it's just random # TODO: we'll need some z-indexing here, right now it's just random
foreach(var type; [r('GRID'),r('DTO',0),r('TFC',0),r('APT'),r('DME'),r('VOR'),r('NDB'),r('FIX',0),r('RTE'),r('WPT'),r('FLT'),r('WXR',0),r('APS')] ) { foreach(var type; [r('GRID'),r('DTO',0),r('TFC',0),r('APT'),r('DME'),r('VOR'),r('NDB'),r('FIX',0),r('RTE'),r('WPT'),r('FLT'),r('WXR',0),r('APS')] ) {
obj.MFDMap.addLayer(factory: canvas.SymbolLayer, type_arg: type.name, obj.MFDMap.addLayer(
visible: type.vis, priority: 4, factory: canvas.SymbolLayer,
type_arg: type.name,
priority: 4,
style: obj.Styles.getStyle(type.name), style: obj.Styles.getStyle(type.name),
options: obj.Options.getOption(type.name) ); options: obj.Options.getOption(type.name),
visible: type.vis);
} }
foreach(var type; [ r('STAMEN_terrain'),r('STAMEN'), r('OpenAIP') ]) { foreach(var type; [ r('STAMEN_terrain'),r('STAMEN'), r('OpenAIP') ]) {
obj.MFDMap.addLayer(factory: canvas.OverlayLayer, type_arg: type.name, obj.MFDMap.addLayer(
visible: 0, priority: 1, factory: canvas.OverlayLayer,
type_arg: type.name,
priority: 1,
style: obj.Styles.getStyle(type.name), style: obj.Styles.getStyle(type.name),
options: obj.Options.getOption(type.name) ); options: obj.Options.getOption(type.name),
visible: 0);
} }
#obj.topMenu(device, obj, nil); #obj.topMenu(device, obj, nil);
obj.controller = fg1000.NavigationMapController.new(obj, svg); obj.setController(fg1000.NavigationMapController.new(obj, svg));
return obj; return obj;
}, },
@ -93,7 +99,7 @@ var NavigationMap =
setScreenRange : func(range) { setScreenRange : func(range) {
me.MFDMap.setScreenRange(range); me.MFDMap.setScreenRange(range);
}, },
offdisplay : func() { offdisplay : func(controller=1) {
me._group.setVisible(0); me._group.setVisible(0);
# Reset the menu colours. Shouldn't have to do this here, but # Reset the menu colours. Shouldn't have to do this here, but
@ -103,9 +109,9 @@ var NavigationMap =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); if (controller == 1) me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func(controller=1) {
me._group.setVisible(1); me._group.setVisible(1);
# Center the map's origin, modified to take into account the surround. # Center the map's origin, modified to take into account the surround.
@ -118,7 +124,7 @@ var NavigationMap =
me._labelsPartial.setVisible(0); me._labelsPartial.setVisible(0);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); if (controller == 1) me.getController().ondisplay();
}, },
# Display functions when we're displaying the NavigationMap as part of another # Display functions when we're displaying the NavigationMap as part of another
@ -133,11 +139,11 @@ var NavigationMap =
me._labelsFull.setVisible(0); me._labelsFull.setVisible(0);
me._labelsPartial.setVisible(1); me._labelsPartial.setVisible(1);
#me.controller.ondisplayPartial(); #me.getController().ondisplayPartial();
}, },
offdisplayPartial : func() { offdisplayPartial : func() {
me._group.setVisible(0); me._group.setVisible(0);
#me.controller.offdisplayPartial(); #me.getController().offdisplayPartial();
}, },
# Softkey assigments. For some pages (notably the NEAREST pages) # Softkey assigments. For some pages (notably the NEAREST pages)
@ -150,7 +156,7 @@ var NavigationMap =
pg.resetMenuColors(); pg.resetMenuColors();
pg.addMenuItem(0, "ENGINE", pg, pg.mfd.EIS.engineMenu); pg.addMenuItem(0, "ENGINE", pg, pg.mfd.EIS.engineMenu);
pg.addMenuItem(2, "MAP", pg, pg.mfd.NavigationMap.mapMenu); pg.addMenuItem(2, "MAP", pg, pg.mfd.NavigationMap.mapMenu);
pg.addMenuItem(8, "DCLTR", pg, func(dev, pg, mi) { pg.mfd.NavigationMap.controller.incrDCLTR(dev, mi); } ); pg.addMenuItem(8, "DCLTR", pg, func(dev, pg, mi) { pg.getController().incrDCLTR(dev, mi); } );
#pg.addMenuItem(9, "SHW CHRT", pg); # Optional #pg.addMenuItem(9, "SHW CHRT", pg); # Optional
#pg.addMenuItem(10, "CHKLIST", pg); # Optional #pg.addMenuItem(10, "CHKLIST", pg); # Optional
device.updateMenus(); device.updateMenus();
@ -160,22 +166,22 @@ var NavigationMap =
pg.clearMenu(); pg.clearMenu();
pg.resetMenuColors(); pg.resetMenuColors();
pg.addMenuItem(0, "TRAFFIC", pg, pg.addMenuItem(0, "TRAFFIC", pg,
func(dev, pg, mi) { pg.mfd.NavigationMap.controller.toggleLayer("TFC"); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().toggleLayer("TFC"); device.updateMenus(); }, # callback
func(svg, mi) { pg.mfd.NavigationMap.display_toggle(device, svg, mi, "TFC"); } func(svg, mi) { pg.mfd.NavigationMap.display_toggle(device, svg, mi, "TFC"); }
); );
pg.addMenuItem(1, "PROFILE", pg); pg.addMenuItem(1, "PROFILE", pg);
pg.addMenuItem(2, "TOPO", pg, pg.addMenuItem(2, "TOPO", pg,
func(dev, pg, mi) { pg.mfd.NavigationMap.controller.toggleLayer("STAMEN"); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().toggleLayer("STAMEN"); device.updateMenus(); }, # callback
func(svg, mi) { pg.mfd.NavigationMap.display_toggle(device, svg, mi, "STAMEN"); } func(svg, mi) { pg.mfd.NavigationMap.display_toggle(device, svg, mi, "STAMEN"); }
); );
pg.addMenuItem(3, "TERRAIN", pg, pg.addMenuItem(3, "TERRAIN", pg,
func(dev, pg, mi) { pg.mfd.NavigationMap.controller.toggleLayer("STAMEN_terrain"); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().toggleLayer("STAMEN_terrain"); device.updateMenus(); }, # callback
func(svg, mi) { pg.mfd.NavigationMap.display_toggle(device, svg, mi, "STAMEN_terrain"); } func(svg, mi) { pg.mfd.NavigationMap.display_toggle(device, svg, mi, "STAMEN_terrain"); }
); );
pg.addMenuItem(4, "AIRWAYS", pg, func(dev, pg, mi) { pg.mfd.NavigationMap.controller.incrAIRWAYS(dev, mi); } ); pg.addMenuItem(4, "AIRWAYS", pg, func(dev, pg, mi) { pg.getController().incrAIRWAYS(dev, mi); } );
#pg.addMenuItem(5, "STRMSCP", pg); Optional #pg.addMenuItem(5, "STRMSCP", pg); Optional
#pg.addMenuItem(6, "PRECIP", pg); Optional, or NEXRAD #pg.addMenuItem(6, "PRECIP", pg); Optional, or NEXRAD
#pg.addMenuItem(7, "XM LTNG", pg); Optional, or DL LTNG #pg.addMenuItem(7, "XM LTNG", pg); Optional, or DL LTNG
@ -189,7 +195,7 @@ var NavigationMap =
# on whether a particular layer is enabled or not. # on whether a particular layer is enabled or not.
display_toggle : func(device, svg, mi, layer) { display_toggle : func(device, svg, mi, layer) {
var bg_name = sprintf("SoftKey%d-bg",mi.menu_id); var bg_name = sprintf("SoftKey%d-bg",mi.menu_id);
if (me.controller.isEnabled(layer)) { if (me.getController().isEnabled(layer)) {
device.svg.getElementById(bg_name).setColorFill(0.5,0.5,0.5); device.svg.getElementById(bg_name).setColorFill(0.5,0.5,0.5);
svg.setColor(0.0,0.0,0.0); svg.setColor(0.0,0.0,0.0);
} else { } else {

View file

@ -10,7 +10,7 @@ var NearestAirports =
], ],
}; };
obj.controller = fg1000.NearestAirportsController.new(obj, svg); obj.setController(fg1000.NearestAirportsController.new(obj, svg));
# Dynamic elements. There are 4 different sets of dynamic elements: # Dynamic elements. There are 4 different sets of dynamic elements:
# #
@ -70,7 +70,7 @@ var NearestAirports =
# Indicate which group is selected by colour of the softkeys # Indicate which group is selected by colour of the softkeys
display_toggle : func(device, svg, mi, group) { display_toggle : func(device, svg, mi, group) {
var bg_name = sprintf("SoftKey%d-bg",mi.menu_id); var bg_name = sprintf("SoftKey%d-bg",mi.menu_id);
if (me.controller.getSelectedGroup() == group) { if (me.getController().getSelectedGroup() == group) {
device.svg.getElementById(bg_name).setColorFill(0.5,0.5,0.5); device.svg.getElementById(bg_name).setColorFill(0.5,0.5,0.5);
svg.setColor(0.0,0.0,0.0); svg.setColor(0.0,0.0,0.0);
} else { } else {
@ -107,10 +107,10 @@ var NearestAirports =
# there's not currently an obvious other location to do so. # there's not currently an obvious other location to do so.
me.resetMenuColors(); me.resetMenuColors();
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me.controller.ondisplay(); me.getController().ondisplay();
# The Nearest... pages use the underlying navigation map. # The Nearest... pages use the underlying navigation map.
me.mfd.NavigationMap.ondisplayPartial(); me.mfd.NavigationMap.ondisplayPartial();
@ -212,7 +212,7 @@ var NearestAirports =
me.approachSelect.setValues(approachList); me.approachSelect.setValues(approachList);
# Display the DTO line to the airport # Display the DTO line to the airport
me.mfd.NavigationMap.controller.setDTOLineTarget(apt.lat, apt.lon); me.mfd.NavigationMap.getController().setDTOLineTarget(apt.lat, apt.lon);
}, },
updateRunwayInfo : func(rwy_info) { updateRunwayInfo : func(rwy_info) {
if (rwy_info != nil ) { if (rwy_info != nil ) {
@ -243,22 +243,22 @@ var NearestAirports =
pg.addMenuItem(0, "ENGINE", pg, pg.mfd.EIS.engineMenu); pg.addMenuItem(0, "ENGINE", pg, pg.mfd.EIS.engineMenu);
pg.addMenuItem(2, "MAP", pg, pg.mfd.NavigationMap.mapMenu); pg.addMenuItem(2, "MAP", pg, pg.mfd.NavigationMap.mapMenu);
pg.addMenuItem(4, "APT", pg, pg.addMenuItem(4, "APT", pg,
func(dev, pg, mi) { pg.controller.selectAirports(); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().selectAirports(); device.updateMenus(); }, # callback
func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.APT); } func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.APT); }
); );
pg.addMenuItem(5, "RNWY", pg, pg.addMenuItem(5, "RNWY", pg,
func(dev, pg, mi) { pg.controller.selectRunways(); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().selectRunways(); device.updateMenus(); }, # callback
func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.RNWY); } func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.RNWY); }
); );
pg.addMenuItem(6, "FREQ", pg, pg.addMenuItem(6, "FREQ", pg,
func(dev, pg, mi) { pg.controller.selectFrequencies(); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().selectFrequencies(); device.updateMenus(); }, # callback
func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.FREQ); } func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.FREQ); }
); );
pg.addMenuItem(7, "APR", pg, pg.addMenuItem(7, "APR", pg,
func(dev, pg, mi) { pg.controller.selectApproaches(); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().selectApproaches(); device.updateMenus(); }, # callback
func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.APR); } func(svg, mi) { pg.display_toggle(device, svg, mi, NearestAirportsController.UIGROUP.APR); }
); );

View file

@ -168,10 +168,10 @@ var NearestAirportsController =
me._currentGroup = NearestAirportsController.UIGROUP.NONE; me._currentGroup = NearestAirportsController.UIGROUP.NONE;
me.RegisterWithEmesary(); me.RegisterWithEmesary();
me.getAirports(); me.getAirports();
me.page.mfd.NavigationMap.controller.enableDTO(1); me.page.mfd.NavigationMap.getController().enableDTO(1);
}, },
offdisplay : func() { offdisplay : func() {
me.page.mfd.NavigationMap.controller.enableDTO(0); me.page.mfd.NavigationMap.getController().enableDTO(0);
me.DeRegisterWithEmesary(); me.DeRegisterWithEmesary();
}, },

View file

@ -12,7 +12,7 @@ var NearestAirspaces =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.NearestAirspacesController.new(obj, svg); obj.setController(fg1000.NearestAirspacesController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var NearestAirspaces =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var NearestFrequencies =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.NearestFrequenciesController.new(obj, svg); obj.setController(fg1000.NearestFrequenciesController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var NearestFrequencies =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var NearestIntersections =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.NearestIntersectionsController.new(obj, svg); obj.setController(fg1000.NearestIntersectionsController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var NearestIntersections =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var NearestNDB =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.NearestNDBController.new(obj, svg); obj.setController(fg1000.NearestNDBController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var NearestNDB =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var NearestUserWPT =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.NearestUserWPTController.new(obj, svg); obj.setController(fg1000.NearestUserWPTController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var NearestUserWPT =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var NearestVOR =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.NearestVORController.new(obj, svg); obj.setController(fg1000.NearestVORController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var NearestVOR =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var StoredFlightPlan =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.StoredFlightPlanController.new(obj, svg); obj.setController(fg1000.StoredFlightPlanController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var StoredFlightPlan =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Stormscope =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.StormscopeController.new(obj, svg); obj.setController(fg1000.StormscopeController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Stormscope =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -99,8 +99,6 @@ var Surround =
obj._selectedPageGroup = 0; obj._selectedPageGroup = 0;
obj._selectedPage = 0; obj._selectedPage = 0;
# List of pages to be controllers. Keys are the pages in PAGE_GROUPS;
obj._pageList = {};
obj._elements = {}; obj._elements = {};
foreach (var pageGroup; PAGE_GROUPS) { foreach (var pageGroup; PAGE_GROUPS) {
@ -128,7 +126,7 @@ var Surround =
obj.hideMenu(); obj.hideMenu();
obj.controller = fg1000.SurroundController.new(obj, svg); obj.setController(fg1000.SurroundController.new(obj, svg));
return obj; return obj;
}, },
@ -241,21 +239,17 @@ var Surround =
} }
}, },
addPage : func(name, page) getCurrentPage : func()
{ {
me._pageList[name] = page; var currentpage = PAGE_GROUPS[me._selectedPageGroup].pages[me._selectedPage];
}, return me.getMFD().getPage(currentpage);
getPage : func(name)
{
return me._pageList[name];
}, },
# Function to change a page based on the selection # Function to change a page based on the selection
loadPage : func() loadPage : func()
{ {
var pageToLoad = PAGE_GROUPS[me._selectedPageGroup].pages[me._selectedPage]; var pageToLoad = PAGE_GROUPS[me._selectedPageGroup].pages[me._selectedPage];
var page = me._pageList[pageToLoad]; var page = me.getMFD().getPage(pageToLoad);
assert(page != nil, "Unable to find page " ~ pageToLoad); assert(page != nil, "Unable to find page " ~ pageToLoad);
me.device.selectPage(page); me.device.selectPage(page);

View file

@ -318,11 +318,6 @@ var SurroundController =
handleComVolToggle : func (value) { handleComVolToggle : func (value) {
}, },
# Holding the Clear button goes straight to the Navigation Map page.
handleClearHold : func (value) {
me._page.device.selectPage(me._page.getPage("NavigationMap"));
},
# These methods are slightly unusual in that they are called by other # These methods are slightly unusual in that they are called by other
# controllers when the CRSR is not active. Hence they aren't referenced # controllers when the CRSR is not active. Hence they aren't referenced
# in the RegisterWithEmesary call below. # in the RegisterWithEmesary call below.
@ -352,7 +347,7 @@ var SurroundController =
transmitter = emesary.GlobalTransmitter; transmitter = emesary.GlobalTransmitter;
if (me._recipient == nil){ if (me._recipient == nil){
me._recipient = emesary.Recipient.new("PageGroupController_" ~ me._page.device.designation); me._recipient = emesary.Recipient.new("SurroundController_" ~ me._page.device.designation);
var pfd_obj = me._page.device; var pfd_obj = me._page.device;
var controller = me; var controller = me;
me._recipient.Receive = func(notification) me._recipient.Receive = func(notification)

View file

@ -12,7 +12,7 @@ var SystemStatus =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.SystemStatusController.new(obj, svg); obj.setController(fg1000.SystemStatusController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var SystemStatus =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var TAWSB =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.TAWSBController.new(obj, svg); obj.setController(fg1000.TAWSBController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var TAWSB =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Template =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.TemplateController.new(obj, svg); obj.setController(fg1000.TemplateController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Template =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -54,24 +54,24 @@ var TrafficMap =
type.vis ); type.vis );
} }
obj.controller = fg1000.TrafficMapController.new(obj, svg); obj.setController(fg1000.TrafficMapController.new(obj, svg));
var topMenu = func(device, pg, menuitem) { var topMenu = func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();
resetMenuColors(device); resetMenuColors(device);
pg.addMenuItem(4, "STANDBY", pg, pg.addMenuItem(4, "STANDBY", pg,
func(dev, pg, mi) { pg.controller.setOperate(0); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().setOperate(0); device.updateMenus(); }, # callback
func(svg, mi) { display_toggle(device, svg, mi, "STANDBY"); } func(svg, mi) { display_toggle(device, svg, mi, "STANDBY"); }
); );
pg.addMenuItem(5, "OPERATE", pg, pg.addMenuItem(5, "OPERATE", pg,
func(dev, pg, mi) { pg.controller.setOperate(1); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().setOperate(1); device.updateMenus(); }, # callback
func(svg, mi) { display_toggle(device, svg, mi, "OPERATE"); } func(svg, mi) { display_toggle(device, svg, mi, "OPERATE"); }
); );
pg.addMenuItem(6, "TEST", pg, func(dev, pg, mi) { printf("Traffic Map TEST mode not implemented yet."); }, nil); pg.addMenuItem(6, "TEST", pg, func(dev, pg, mi) { printf("Traffic Map TEST mode not implemented yet."); }, nil);
pg.addMenuItem(7, "FLT ID", pg, pg.addMenuItem(7, "FLT ID", pg,
func(dev, pg, mi) { pg.controller.toggleFlightID(); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().toggleFlightID(); device.updateMenus(); }, # callback
func(svg, mi) { display_toggle(device, svg, mi, "FLT ID"); } func(svg, mi) { display_toggle(device, svg, mi, "FLT ID"); }
); );
@ -83,21 +83,21 @@ var TrafficMap =
pg.clearMenu(); pg.clearMenu();
resetMenuColors(device); resetMenuColors(device);
pg.addMenuItem(4, "ABOVE", pg, pg.addMenuItem(4, "ABOVE", pg,
func(dev, pg, mi) { pg.controller.setAlt("ABOVE"); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().setAlt("ABOVE"); device.updateMenus(); }, # callback
func(svg, mi) { display_toggle(device, svg, mi, "ABOVE"); } func(svg, mi) { display_toggle(device, svg, mi, "ABOVE"); }
); );
pg.addMenuItem(5, "NORMAL", pg, pg.addMenuItem(5, "NORMAL", pg,
func(dev, pg, mi) { pg.controller.setAlt("NORMAL"); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().setAlt("NORMAL"); device.updateMenus(); }, # callback
func(svg, mi) { display_toggle(device, svg, mi, "NORMAL"); } func(svg, mi) { display_toggle(device, svg, mi, "NORMAL"); }
); );
pg.addMenuItem(6, "BELOW", pg, pg.addMenuItem(6, "BELOW", pg,
func(dev, pg, mi) { pg.controller.setAlt("BELOW"); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().setAlt("BELOW"); device.updateMenus(); }, # callback
func(svg, mi) { display_toggle(device, svg, mi, "BELOW"); } func(svg, mi) { display_toggle(device, svg, mi, "BELOW"); }
); );
pg.addMenuItem(7, "UNREST", pg, pg.addMenuItem(7, "UNREST", pg,
func(dev, pg, mi) { pg.controller.setAlt("UNREST"); device.updateMenus(); }, # callback func(dev, pg, mi) { pg.getController().setAlt("UNREST"); device.updateMenus(); }, # callback
func(svg, mi) { display_toggle(device, svg, mi, "UNREST"); } func(svg, mi) { display_toggle(device, svg, mi, "UNREST"); }
); );
@ -110,7 +110,7 @@ var TrafficMap =
# on whether a particular layer is enabled or not. # on whether a particular layer is enabled or not.
var display_toggle = func(device, svg, mi, layer) { var display_toggle = func(device, svg, mi, layer) {
var bg_name = sprintf("SoftKey%d-bg",mi.menu_id); var bg_name = sprintf("SoftKey%d-bg",mi.menu_id);
if (obj.controller.isEnabled(layer)) { if (obj.getController().isEnabled(layer)) {
device.svg.getElementById(bg_name).setColorFill(0.5,0.5,0.5); device.svg.getElementById(bg_name).setColorFill(0.5,0.5,0.5);
svg.setColor(0.0,0.0,0.0); svg.setColor(0.0,0.0,0.0);
} else { } else {
@ -170,11 +170,11 @@ var TrafficMap =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
}; };

View file

@ -12,7 +12,7 @@ var TripPlanning =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.TripPlanningController.new(obj, svg); obj.setController(fg1000.TripPlanningController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var TripPlanning =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var UserWPTInfo =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.UserWPTInfoController.new(obj, svg); obj.setController(fg1000.UserWPTInfoController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var UserWPTInfo =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var Utility =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.UtilityController.new(obj, svg); obj.setController(fg1000.UtilityController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var Utility =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var VORInfo =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.VORInfoController.new(obj, svg); obj.setController(fg1000.VORInfoController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var VORInfo =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var WeatherDataLink =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.WeatherDataLinkController.new(obj, svg); obj.setController(fg1000.WeatherDataLinkController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var WeatherDataLink =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var XMInfo =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.XMInfoController.new(obj, svg); obj.setController(fg1000.XMInfoController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var XMInfo =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -12,7 +12,7 @@ var XMRadio =
obj.topMenu(device, obj, nil); obj.topMenu(device, obj, nil);
obj.controller = fg1000.XMRadioController.new(obj, svg); obj.setController(fg1000.XMRadioController.new(obj, svg));
return obj; return obj;
}, },
@ -26,12 +26,12 @@ var XMRadio =
me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0); me.device.svg.getElementById(name ~ "-bg").setColorFill(0.0,0.0,0.0);
me.device.svg.getElementById(name).setColor(1.0,1.0,1.0); me.device.svg.getElementById(name).setColor(1.0,1.0,1.0);
} }
me.controller.offdisplay(); me.getController().offdisplay();
}, },
ondisplay : func() { ondisplay : func() {
me._group.setVisible(1); me._group.setVisible(1);
me.mfd.setPageTitle(me.title); me.mfd.setPageTitle(me.title);
me.controller.ondisplay(); me.getController().ondisplay();
}, },
topMenu : func(device, pg, menuitem) { topMenu : func(device, pg, menuitem) {
pg.clearMenu(); pg.clearMenu();

View file

@ -99,6 +99,7 @@ var MFDGUI =
# creating the top-level/root group which will contain all other elements/group # creating the top-level/root group which will contain all other elements/group
obj.myCanvas = obj.window.createCanvas(); obj.myCanvas = obj.window.createCanvas();
obj.myCanvas.set("name", "MFD");
obj.root = obj.myCanvas.createGroup(); obj.root = obj.myCanvas.createGroup();
var nasal_dir = getprop("/sim/fg-root") ~ "/Aircraft/Instruments-3d/FG1000/Nasal/"; var nasal_dir = getprop("/sim/fg-root") ~ "/Aircraft/Instruments-3d/FG1000/Nasal/";
@ -119,7 +120,7 @@ var MFDGUI =
# produces sharper results and perhaps better performance # produces sharper results and perhaps better performance
obj.mfd = fg1000.MFD.new(obj.myCanvas); obj.mfd = fg1000.MFD.new(obj.myCanvas);
obj.mfd._svg.setTranslation(186,45); obj.mfd._svg.setTranslation(186,45);
obj.mfd._svg.set("z-index", 150); #obj.mfd._svg.set("z-index", 150);
} else { } else {
# If we're using some scaling factor, then we create it as an image raster # If we're using some scaling factor, then we create it as an image raster
# which scales everything for us nicely. # which scales everything for us nicely.

View file

@ -332,6 +332,13 @@ var PFD_Device =
p.setVisible(1); p.setVisible(1);
me.current_page = p; me.current_page = p;
}, },
# Return the current selected page.
getCurrentPage : func()
{
return me.current_page;
},
# #
# ensure that the menus are display correctly for the current page. # ensure that the menus are display correctly for the current page.
updateMenus : func updateMenus : func