XML: Escape Sequences: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 5: Line 5:
   
   
'''\{fnt1}'''
'''\{fnt1}'''
  switch to the first alternate font specified as a child of the gauge text element  
  switch to the first alternate font size specified as a child of the gauge text element  
example:
<FormattedText X="255" Y="20"
      Font="Arial Bold" FontSize="14" LineSpacing="0"
      VerticalAdjust="Center" Adjust="Left"
      Color="White" Bright="Yes">
  <Color Value="Cyan"/>
  <Font FontSize="19"/>
  <String>DME  MODE  %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String>
</FormattedText>
   
   
'''\{fnt}'''
'''\{fnt}'''
Line 48: Line 58:
   
   
'''\{clr2}'''  
'''\{clr2}'''  
  switch to the second alternate color specified as a child of the gauge text element
  switch to the first alternate color specified as a child of the gauge text element
 
<FormattedText X="255" Y="20"
      Font="Arial Bold" FontSize="14" LineSpacing="0"
      VerticalAdjust="Center" Adjust="Left"
      Color="White" Bright="Yes">
  <Color Value="Cyan"/>
  <Font FontSize="19"/>
  <String>DME  MODE  %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String>
</FormattedText>
   
   
'''\{bck}'''  
'''\{bck}'''  
Line 70: Line 89:
   
   
'''\{ladj=L}'''
'''\{ladj=L}'''
  set horizontal text alignment to left.  (use ‘C’ for center or ‘R’ for right) '''Note: I've never gotten this to work!'''
  set horizontal text alignment to left.  (use ‘C’ for center or ‘R’ for right)  
'''''Note: I've never gotten this to work!'''''
   
   
'''\{line=240}'''
'''\{line=240}'''

Revision as of 00:20, 30 August 2009

The following list describes the XML Escape Sequences that may be used within a <String> statement:

\{tabs=50R,60C, 244L}

set 3 tab stops; the first is right-aligned, the second is centered, and last is left-aligned.

\{fnt1}

switch to the first alternate font size specified as a child of the gauge text element 

example:
<FormattedText X="255" Y="20" 
      Font="Arial Bold" FontSize="14" LineSpacing="0" 
      VerticalAdjust="Center" Adjust="Left" 
      Color="White" Bright="Yes">
  <Color Value="Cyan"/>
  
  <String>DME  MODE  %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String>
</FormattedText>

\{fnt}

return to the default font

\{up}

superscript

\{dn}

subscript

\{md}

normal (neither superscript nor subscript)

\{bo}

bold

\{ul}

underline

\{itl}

italic

\{strk}

strikeout

\{blnk}

blink

\{rev}

reverse background/foreground color for text

\{nr}

normal - clear all properties previously set.

\{lcl}

line color

\{blc}

background line color

\{clr2}

switch to the first alternate color specified as a child of the gauge text element
<FormattedText X="255" Y="20" 
      Font="Arial Bold" FontSize="14" LineSpacing="0" 
      VerticalAdjust="Center" Adjust="Left" 
      Color="White" Bright="Yes">
  <Color Value="Cyan"/>
  
  <String>DME  MODE  %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String>
</FormattedText>

\{bck}

background color

\{strk}

strikeout

\{dplo=M}

put a degrees symbol above the next character after the ‘=’ In this case a º will be placed over the M
for only a degrees symbol, leave a blank space in place of the M

\{dpl=XY}

make X superscript and Y subscript

\{lsp=23}

set line spacing to 23

\{lsp}

set line spacing to default

\{ladj=L}

set horizontal text alignment to left.  (use ‘C’ for center or ‘R’ for right) 
Note: I've never gotten this to work!

\{line=240}

draw a horizontal line with width 240

\{lmrg=20}

set the left margin to 20

\{rmrg=30}

set the right margin to 30

\{img1}

insert image #1 (a text element can have image children)