<Gauge Name="Autopilot" Version="1.0">
   <Image Name="AP Background.bmp" Luminous="1"/>
 <!-- ========================= Switches ========================== -->

 <!-- ========================= AP Master ========================= -->
   <Element>
      <Position X="32" Y="22"/>
      <Select>
         <Value>(A:Autopilot master, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP On Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= FD Switch ========================= -->
   <Element>
      <Position X="208" Y="89"/>
      <Select>
         <Value>(A:Autopilot flight director active,bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP FD Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= Hdg Hold Switch =================== -->
   <Element>
      <Position X="91" Y="22"/>
      <Select>
         <Value>(A:Autopilot heading lock, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP Hdg Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= Alt Hold Switch =================== -->
   <Element>
      <Position X="151" Y="22"/>
      <Select>
         <Value>(A:Autopilot altitude lock, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP Alt Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= Airspeed Hold Switch ============== -->
   <Element>
      <Position X="209" Y="22"/>
      <Select>
         <Value>(A:Autopilot airspeed hold, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP Spd Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= Mach Hold Switch ================== -->
   <Element>
      <Position X="268" Y="22"/>
      <Select>
         <Value>(A:Autopilot mach hold, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP Mach Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= Nav Hold Switch ================== -->
   <Element>
      <Position X="326" Y="22"/>
      <Select>
         <Value>(A:Autopilot nav1 lock, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP Nav Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= Approach Hold Switch ============= -->
   <Element>
      <Position X="385" Y="22"/>
      <Select>
         <Value>(A:Autopilot approach hold, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP Apr Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
 <!-- ========================= Back Course Hold Switch ========== -->
   <Element>
      <Position X="444" Y="22"/>
      <Select>
         <Value>(A:Autopilot backcourse hold, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP BC Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
<!-- ========================= Level Hold Switch ================ -->
   <Element>
      <Position X="502" Y="22"/>
      <Select>
         <Value>(A:Autopilot wing leveler, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP Lvl Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
<!-- ========================= Yaw Damper Switch ================ -->
   <Element>
      <Position X="563" Y="22"/>
      <Select>
         <Value>(A:Autopilot yaw damper, bool)</Value>
         <Failures>
            <SYSTEM_ELECTRICAL_PANELS Action="0"/>
         </Failures>
         <Case Value="1">
            <Image Name="AP YD Switch.bmp" Bright="Yes"/>
         </Case>
      </Select>
   </Element>
<!-- ========================= Course Display ==================== -->
    <Element>
      <Position X="33" Y="82"/>
      <Text X="75" Y="31" Length="3" Adjust="Center" Font="Arial" Multiline="No" Color="White" BackgroundColor="transparent" Bright="Yes">
        <String>%((A:NAV1 OBS, degrees))%!03d!</String>
      </Text>
    </Element>
<!-- ========================= Heading Display =================== -->
    <Element>
      <Position X="122" Y="82"/>
      <Text X="75" Y="31" Length="3" Adjust="Center" Font="Arial" Multiline="No" Color="White" BackgroundColor="transparent" Bright="Yes">
        <String>%((A:Autopilot heading lock dir, degrees))%!03d!</String>
      </Text>
    </Element>
<!-- ========================= Altitude Display ================== -->
    <Element>
      <Position X="240" Y="82"/>
      <Text X="125" Y="31" Length="5" Adjust="Center" Font="Arial" Multiline="No" Color="White" BackgroundColor="transparent" Bright="Yes">
        <String>%((A:Autopilot altitude lock var, feet))%!05d!</String>
      </Text>
    </Element>
<!-- ========================= Vertical Speed Display ============ -->
    <Element>
      <Position X="341" Y="82"/>
      <Text X="125" Y="31" Length="5" Adjust="Right" Font="Arial" Multiline="No" Color="White" BackgroundColor="transparent" Bright="Yes">
        <String>%((A:Autopilot vertical hold var, ft/min))%!5.0f!</String>
      </Text>
    </Element>
<!-- ========================= Speed/Mach Display ================ -->
    <Element>
      <Position X="510" Y="82"/>
      <Text X="100" Y="31" Length="4" Adjust="Center" Font="Arial" Multiline="No" Color="White" BackgroundColor="transparent" Bright="Yes">
        <String>%((L:Mach-IAS select, bool))%{if}%((A:Autopilot mach hold var, mach))%!1.2f!%{else}%((A:Autopilot airspeed hold var,knots))%!03d!%{end}</String>
      </Text>
    </Element>
 <!-- ========================= Mouse Stuff ======================= -->
   <Mouse>
      <Area Left="29" Right="71" Top="18" Bottom="43">
      <Help ID="HELPID_GAUGE_AUTOPILOT_MASTER"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_MASTER"/>
         <Cursor Type="Hand"/>
         <Click Event="AP_MASTER"/>
      </Area>
     <Area Left="204" Right="247" Top="85" Bottom="112">
      <Help ID="HELPID_AUTOPILOT_FLIGHT_DIRECTOR_SWITCH"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_FLIGHT_DIRECTOR_SWITCH"/>
         <Cursor Type="Hand"/>
         <Click Event="TOGGLE_FLIGHT_DIRECTOR"/>
      </Area>
      <Area Left="87" Right="129" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_HEADING_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_HEADING_HOLD"/>
         <Cursor Type="Hand"/>
         <Click Event="AP_PANEL_HEADING_HOLD"/>
      </Area>
      <Area Left="145" Right="187" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_ALTITUDE_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_ALTITUDE_HOLD"/>
         <Cursor Type="Hand"/>
         <Click Event="AP_PANEL_ALTITUDE_HOLD"/>
      </Area>
      <Area Left="208" Right="247" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_SPEED_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_SPEED_HOLD"/>
         <Cursor Type="Hand"/>
         <Click>0 (&gt;L:Mach-IAS select, bool) 0 (&gt;K:AP_PANEL_SPEED_HOLD)</Click>
      </Area>
      <Area Left="267" Right="304" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_MACH_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_MACH_HOLD"/>
         <Cursor Type="Hand"/>
         <Click>1 (&gt;L:Mach-IAS select, bool) 0 (&gt;K:AP_PANEL_MACH_HOLD)</Click>
      </Area>
      <Area Left="324" Right="363" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_NAV_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_NAV_HOLD"/>
         <Cursor Type="Hand"/>
         <Click Event="AP_NAV1_HOLD"/>
      </Area>
      <Area Left="383" Right="422" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_APP_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_APP_HOLD"/>
         <Cursor Type="Hand"/>
         <Click Event="AP_APR_HOLD"/>
      </Area>
      <Area Left="442" Right="481" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_BC_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_BC_HOLD"/>
         <Cursor Type="Hand"/>
         <Click Event="AP_BC_HOLD"/>
      </Area>
      <Area Left="500" Right="539" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_WING_LEVELER"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_WING_LEVELER"/>
         <Cursor Type="Hand"/>
        <Click Event="AP_WING_LEVELER"/>
      </Area>
      <Area Left="561" Right="600" Top="18" Bottom="43">
      <Help ID="HELPID_AUTOPILOT_YAW_DAMP_HOLD"/>
      <Tooltip ID="TOOLTIPTEXT_AUTOPILOT_YAW_DAMP_HOLD"/>
         <Cursor Type="Hand"/>
        <Click Event="YAW_DAMPER_TOGGLE"/>
      </Area>
      <Area Left="42" Right="72" Top="86" Bottom="117">
        <Cursor Type="DownArrow"/>
        <Click Event="VOR1_OBI_DEC" Repeat="Yes"/>
      </Area>
      <Area Left="73" Right="102" Top="86" Bottom="117">
        <Cursor Type="UpArrow"/>
        <Click Event="VOR1_OBI_INC" Repeat="Yes"/>
      </Area>
      <Area Left="129" Right="158" Top="86" Bottom="117">
        <Cursor Type="DownArrow"/>
        <Click Event="HEADING_BUG_DEC" Repeat="Yes"/>
      </Area>
      <Area Left="159" Right="189" Top="86" Bottom="117">
        <Cursor Type="UpArrow"/>
        <Click Event="HEADING_BUG_INC" Repeat="Yes"/>
      </Area>
      <Area Left="252" Right="301" Top="86" Bottom="117">
        <Cursor Type="DownArrow"/>
        <Click Event="AP_ALT_VAR_DEC" Repeat="Yes"/>
      </Area>
      <Area Left="302" Right="352" Top="86" Bottom="117">
        <Cursor Type="UpArrow"/>
        <Click Event="AP_ALT_VAR_INC" Repeat="Yes"/>
      </Area>
      <Area Left="409" Right="438" Top="86" Bottom="117">
        <Cursor Type="DownArrow"/>
        <Click Event="AP_VS_VAR_DEC" Repeat="Yes"/>
      </Area>
      <Area Left="439" Right="469" Top="86" Bottom="117">
        <Cursor Type="UpArrow"/>
        <Click Event="AP_VS_VAR_INC" Repeat="Yes"/>
      </Area>
      <Area Left="530" Right="559" Top="86" Bottom="117">
        <Cursor Type="DownArrow"/>
        <Click Repeat="Yes">0 (L:Mach-IAS select, bool) if{ (>K:AP_MACH_VAR_DEC) } els{ (>K:AP_SPD_VAR_DEC) }</Click>
      </Area>
      <Area Left="560" Right="590" Top="86" Bottom="117">
        <Cursor Type="UpArrow"/>
        <Click Repeat="Yes">0 (L:Mach-IAS select, bool) if{ (>K:AP_MACH_VAR_INC) } els{ (>K:AP_SPD_VAR_INC) }</Click>
      </Area>

   </Mouse>
</Gauge>
