application: fdrawgram [
  documentation: "Plots a cladogram- or phenogram-like rooted
                  tree diagram"
  groups: "Phylogeny:Tree drawing"
  batch: "no"
  embassy: "phylipnew"
]

section: input [
  information: "Input section"
  type: "page"
]

  string: fontfile [
    default: "font2"
    information: "Fontfile name"
    knowntype: "phylip font"
  ]

  tree: intreefile [
    parameter: "Y"
    knowntype: "newick"
    information: "Phylip tree file"
  ]

endsection: input

section: additional [
  information: "Additional section"
  type: "page"
]

endsection: additional

section: output [
  information: "Output section"
  type: "page"
]

  outfile: plotfile [
    parameter: "Y"
    knowntype: "drawgram output"
    information: "Phylip drawgram output file"
  ]

  boolean: grows [
    additional: "Y"
    default: "Y"
    information: "Tree grows horizontally"
  ]

  list: style [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Tree style"
    values: "c:cladogram (v-shaped); p:phenogram (branches are
             square); v:curvogram (branches are 1/4 out of an ellipse);
             e:eurogram (branches angle outward, then up); s:swooporam
             (branches curve outward then reverse); o:circular tree"
    information: "Tree style output"
    default: "c"
  ]

  list: plotter [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Plotter or printer"
    values: "l:Postscript printer file format; m:PICT format (for
             drawing programs); j:HP 75 DPI Laserjet PCL file format; s:HP
             150 DPI Laserjet PCL file format; y:HP 300 DPI Laserjet PCL file
             format; w:MS-Windows Bitmap; f:FIG 2.0 drawing program format;
             a:Idraw drawing program format; z:VRML Virtual Reality Markup
             Language file; n:PCX 640x350 file format (for drawing programs);
             p:PCX 800x600 file format (for drawing programs); q:PCX
             1024x768 file format (for drawing programs); k:TeKtronix 4010
             graphics terminal; x:X Bitmap format; v:POVRAY 3D rendering
             program file; r:Rayshade 3D rendering program file;
             h:Hewlett-Packard pen plotter (HPGL file format); d:DEC ReGIS
             graphics (VT240 terminal); e:Epson MX-80 dot-matrix printer;
             c:Prowriter/Imagewriter dot-matrix printer; t:Toshiba 24-pin
             dot-matrix printer; o:Okidata dot-matrix printer; b:Houston
             Instruments plotter; u:other (one you have inserted code for)"
    information: "Plotter or printer the tree will be drawn on"
    default: "l"
  ]

  list: previewer [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Previewing device"
    values: "n:Will not be previewed; I i:MSDOS graphics screen
             m:Macintosh screens; x:X Windows display; w:MS Windows display;
             k:TeKtronix 4010 graphics terminal; d:DEC ReGIS graphics (VT240
             terminal); o:Other (one you have inserted code for)"
    information: "Previewing device"
    default: "x"
  ]

  boolean: lengths [
    additional: "Y"
    default: "N"
    information: "Use branch lengths from user trees"
  ]

  float: labelrotation [
    additional: "@($(style)!=c)"
    information: "Angle of labels (0 degrees is horizontal for
                  a tree growing vertically)"
    default: "90.0"
    minimum: "0.0"
    maximum: "360.0"
  ]

  toggle: rescaled [
    additional: "Y"
    default: "Y"
    information: "Automatically rescale branch lengths"
  ]

  float: bscale [
    additional: "@(!$(rescaled))"
    default: "1.0"
    information: "Centimeters per unit branch length"
  ]

  float: treedepth [
    additional: "Y"
    default: "0.53"
    information: "Depth of tree as fraction of its breadth"
    minimum: "0.1"
    maximum: "100.0"
  ]

  float: stemlength [
    additional: "Y"
    default: "0.05"
    information: "Stem length as fraction of tree depth"
    minimum: "0.01"
    maximum: "100.0"
  ]

  float: nodespace [
    additional: "Y"
    default: "0.3333"
    information: "Character height as fraction of tip spacing"
    minimum: "0.1"
    maximum: "100.0"
  ]

  list: nodeposition [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Node position"
    values: "i:Intermediate between their immediate descendants;
             w:Weighted average of tip positions; c:Centered among their
             ultimate descendants; n:Innermost of immediate descendants; v:So
             tree is v shaped"
    information: "Position of interior nodes"
    default: "c"
  ]

  float: xmargin [
    additional: "@($(plotter)!=r)"
    default: "1.65"
    minimum: "0.1"
    information: "Horizontal margin (cm)"
  ]

  float: ymargin [
    additional: "@($(plotter)!=r)"
    default: "2.16"
    minimum: "0.1"
    information: "Vertical margin (cm)"
  ]

  float: xmarginray [
    additional: "@($(plotter)==r)"
    default: "1.65"
    minimum: "0.1"
    information: "Horizontal margin (pixels)"
  ]

  float: ymarginray [
    additional: "@($(plotter)==r)"
    default: "2.16"
    minimum: "0.1"
    information: "Vertical margin (pixels)"
  ]

  float: paperx [
    additional: "Y"
    default: "20.63750"
    information: "Paper width"
  ]

  float: papery [
    additional: "Y"
    default: "26.98750"
    information: "Paper height"
    minimum: "0.1"
  ]

  float: pagesheight [
    additional: "Y"
    default: "1"
    information: "Number of trees across height of page"
    minimum: "1"
  ]

  float: pageswidth [
    additional: "Y"
    default: "1"
    information: "Number of trees across width of page"
    minimum: "1"
  ]

  float: hpmargin [
    additional: "Y"
    default: "0.41275"
    information: "Horizontal overlap (cm)"
    minimum: "0.001"
  ]

  float: vpmargin [
    additional: "Y"
    default: "0.53975"
    information: "Vertical overlap (cm)"
    minimum: "0.001"
  ]

endsection: output
