Home
Categories
Dictionary
Download
Project Details
Changes Log
Who We Are
FAQ
License

SuperLayer: changing the Display size at runtime



It is possible to update the size of displays at runtime.

Overview

The display element has the following attributes:
  • "name" of the display (mandatory)
  • "id" of the display (int value, optional)
  • "width" and "height" of the display (optional)
  • "refWidth" and "refWeight" of the display (optional)
  • "x" and "y" of the display (optional)
  • "defaultLayout": the default Layout name (optional)
  • "isTransparent": indicates if the display is transparent (overrides the configs "isTransparent" property)
  • "isAlwaysOnTop": true if the display is on top of other windows on the desktop (overrides the configs "isAlwaysOnTop" property)
If:
  • The display element has the "refWidth" and "refWeight" attributes
  • The configs element "displayType" attribute has the "panel" value
Then it is possible to update the size of the display at runtime.

Configuration example

      <configs border="255,255,255" borderWidth="3" displayType="panel">
         <display id="1" name="display" refWidth="15000" refHeight="10000" defaultLayout="layout1">
            <layout name="layout1">
               <window name="Window1" >
                  <layer layerID="5" />                           
               </window>            
            </layout>            
            <layout name="layout2">
               <window name="Window1" type="oneOf">
                  <layer layerID="5" />  
                  <layer layerID="6" />                         
               </window>            
            </layout>         
         </display>  
      </configs>

Runtime

The "refWidth" and "refWeight" attributes specify the reference size of the display. The "width" and "height" attributes (if they are present) specify the current size of the display.

At runtime, it is possible to set the "A661_SIZE_X" and "A661_SIZE_Y" properties of the display to change its size:
  • The size of the display window will be updated
  • The content of ther display will be scaled to fit the display window"

Example

Suppose the following cockpit configuration:
      <cockpit appliID="1" layerID="1">
         <DFFiles>
            <df path="ARINC_WidgetSet1.xml" />
            <cockpitDF path="superLayer.xml" />
         </DFFiles>
         <windows>
            <windowDef name="Window" width="10000" height="10000" x="0" y="0"/>
         </windows>
         <configs border="255,255,255" borderWidth="3" displayType="panel" decorated="false">
            <display id="1" name="simple" refWidth="10000" refHeight="10000" defaultLayout="1" >
               <layout name="layout" id="1">
                  <window name="Window">
                     <layer layerID="56" />
                  </window>
               </layout>
            </display>
         </configs>
      </cockpit>
If we start the server, we have the following result:
superlayerdisplaysize
If we start the client and set the X and Y size to 5000:
superlayerdisplaysize2
We have the following result:
superlayerdisplaysize3

See also


Categories: cockpit | server | user

Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence