(form "vgDataSelection" (size 58 20)
    (heading "VARIOGRAM CALCULATION"
    )

    (label
        (position 30 4)
        (text "Min value"
        )
    )
    (field "minval"
        (position 40 4)
        (display_length 10)
        (input allowed)
        (format real_8)
    )

    (label
        (position 30 5)
        (text "Max value"
        )
    )
    (field "maxval"
        (position 40 5)
        (display_length 10)
        (input allowed)
        (format real_8)
    )

    (field "fname"
        (position 12 17)
        (display_length 20.5)
        (max_length 256)
        (translate lower)
        (input allowed)
        (null allowed)
        (file output
            (extension trim "reports|*.not")
        )
        (default "")
        (help   "")
    )        
    (field "report_format"
      (position 12 17)
      (display_length 18)
      (input allowed)
      (null disallowed)
      (max_length 50)
      (value_in ".not - Surpac Note File"
                ".csv - Comma Separated (Spreadsheet)"
                ".htm - Hypertext Markup Language (Web)"
                ".html - Hypertext Markup Language (Web)"
                ".rtf - Rich Text Format (Microsoft Word)"
                ".pdf - Adobe Acrobat"
                ".ps - Postscript")
    )
    (field "display_report" (position 43 18)
      (display_length 2) (max_length 1) 
      (input allowed)
      (value_in "Y" "N")
      (default "N")
      (translate upper) (null disallowed)
    )
    
    (field "string_file"
        (position 26 25)
        (display_length 11)
        (input allowed)
        (null disallowed)
        (value_in "NONE" "TEXT" "BINARY")
    ) 

    (label 
        (position 2 7) 
        (text "Data Selection Windows"
        )
    )
    (field "search_type"
        (position 39 0)
        (display_length 7)
        (input allowed)
        (null disallowed)
        (value_in "Cone" "Pyramid")
        (default "Cone")
    )
    (scroll_block "windows"
        (position 2 9)
        (size 53 3)
        (extra 0 1)
        (scroll_size 51 3)
        (repeat interactive
            (grow 0 1)
            (instances 1
                (min 1)
                (max 100)
            )
        )
        (top
            (label
                (position 1 0)
                (text "Azimuth"
                )
            )
            (label
                (position 13 0)
                (text "Plunge"
                )
            )
            (label
                (position 26 0)
                (text "Spread"
                )
            )
            (label
                (position 39 0)
                (text "Spread limit"
                )
            )
        )
        (main
            (field "azimuth"
                (position 1 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (null disallowed)
                (low_bound 0)
                (high_bound 360)
            )
            (field "plunge"
                (position 13 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (null disallowed)
                (low_bound -90)
                (high_bound 90)
            )
            (field "spread"
                (position 26 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (null disallowed)
                (low_bound 0)
                (high_bound 90)
                (dependency (value "search_type") == "Cone")
            )

            (field "spr_limit"
                (position 39 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (low_bound 0)
                (dependency (value "search_type") == "Cone")
            )
            (field "horizontal_spread"
                (position 26 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (null disallowed)
                (low_bound 0)
                (high_bound 90)
                (dependency (value "search_type") == "Pyramid")
            )
             
            (field "horizontal_spr_limit"
                (position 39 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (low_bound 0)
                (dependency (value "search_type") == "Pyramid")
            )

            (field "vertical_spread"
                (position 26 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (null disallowed)
                (low_bound 0)
                (high_bound 90)
                (dependency (value "search_type") == "Pyramid")
            )

            (field "vertical_spr_limit"
                (position 39 0)
                (display_length 10)
                (input allowed)
                (format real_8)
                (low_bound 0)
                (dependency (value "search_type") == "Pyramid")
            )
            (field "chart_colour"
                (position 42 0)
                (display_length 10)
                (input allowed)
                (null disallowed)
                (default "black")
                (max_length 32)
            )
        )
    )

    (label
        (position 2 13)
        (text "Minimum:"
        )
    )

    (label 
        (position 10 13) 
        (text "X"
        )
    )
    (field "min0"
        (position 12 13)
        (display_length 10)
        (input allowed)
        (format real_8)
    )
    (label 
        (position 25 13) 
        (text "Y"
        )
    )
    (field "min1"
        (position 27 13)
        (display_length 10)
        (input allowed)
        (format real_8)
    )
    (label 
        (position 40 13) 
        (text "Z"
        )
    )
    (field "min2"
        (position 42 13)
        (display_length 10)
        (input allowed)
        (format real_8)
    )

    (label
        (position 2 14)
        (text "Maximum:"
        )
    )

    (label 
        (position 10 14) 
        (text "X"
        )
    )
    (field "max0"
        (position 12 14)
        (display_length 10)
        (input allowed)
        (format real_8)
    )
    (label 
        (position 25 14) 
        (text "Y"
        )
    )
    (field "max1"
        (position 27 14)
        (display_length 10)
        (input allowed)
        (format real_8)
    )
    (label 
        (position 40 14) 
        (text "Z"
        )
    )
    (field "max2"
        (position 42 14)
        (display_length 10)
        (input allowed)
        (format real_8)
    )

    (label 
        (position 2 16) 
        (text "Lag"
        )
    )
    (field "lag"
        (position 10 16)
        (display_length 10)
        (input allowed)
        (format real_8)
        (null disallowed)
    )
    (label 
        (position 2 17) 
        (text "Max Dist"
        )
    )
    (field "maxdist"
        (position 10 17)
        (display_length 10)
        (input allowed)
        (format real_8)
        (null disallowed)
    )

    (label
        (position 25 16)
        (text "Treat negatives as"
        )
    )
    (field "negative"
        (position 42 16)
        (display_length 11)
        (input allowed)
        (null disallowed)
        (value_in "ZEROES" "UNDEFINED" "NEGATIVES"
        )
        (default "NEGATIVES")
    )

    (field "lag_minimum"
      (position 10 17)
      (display_length 10)
      (input allowed)
      (format real_8)
      (null disallowed)
      (low_bound 0.1)
      (default "0.1")
    )

    (field "lag_maximum"
      (position 10 17)
      (display_length 10)
      (input allowed)
      (format real_8)
      (null disallowed)
      (low_bound 0.1)
    )

    (field "lag_increment"
      (position 10 17)
      (display_length 10)
      (input allowed)
      (format real_8)
      (null disallowed)
      (low_bound 0.1)
    )

    (default_buttons)
)
