(form "20320" (size 64 21)
    (heading "BLOCK MODEL ORE/WASTE DISCRIMINATION")

    (label 
        (position 2 3) 
        (text "Digging Zones")
    )
    (field "dz_type"
        (position 14 3)
        (display_length 13)
        (max_length 20)
        (input allowed)
        (null disallowed)
        (value_in "None" "Truck & Shovel" "Dragline")
        (default "None")
        )

    (label 
        (position 32 3) 
        (text "Maximise")
    )
    (field "objective"
        (position 40 3)
        (display_length 16)
        (max_length 20)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Ore Volume" "Ore Grade" "Contained Product")
        (default "Contained Product")
        )

    (field "dz_depth_label" 
        (position 2 4)
        (display_length 22)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "Depth to lower zone")
        (default "Depth to lower zone")
        (dependency (value "dz_type") == "Dragline")
    )
    (field "dz_depth"
        (position 19 4)
        (display_length 6)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (auto_next off)
        (default "0")
        (dependency (value "dz_type") == "Dragline")
        )

    (label 
        (position 20 6) 
        (text "Ore")
    )
    (label 
        (position 30 6) 
        (text "Waste")
    )

    (label 
        (position 2 7) 
        (text "Minimum thicknesses")
    )
    (field "ore_thick0"
        (position 20 7)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "waste_thick0"
        (position 30 7)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "ore_thick1"
        (position 20 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "ore_thick0")
        )
    )
    (field "waste_thick1"
        (position 30 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "waste_thick0")
        )
    )
    (field "ore_thick2"
        (position 20 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "ore_thick0")
        )
    )
    (field "waste_thick2"
        (position 30 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "waste_thick0")
        )
    )
    (field "upper_zone"
        (position 40 7) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "upper zone")
        (dependency (value "dz_type") != "None")
    )
    (field "middle_zone"
        (position 40 8) 
        (display_length 20)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "middle zone")
        (dependency (value "dz_type") != "None")
    )
    (field "lower_zone"
        (position 40 9) 
        (display_length 20)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "lower zone")
        (dependency (value "dz_type") != "None")
    )
    (label 
        (position 2 10) 
        (text "Attributes to composite ")
    )
    (label 
        (position 2 11) 
        (text "(list master first)")
    )
    (scroll_block "attributes"
        (position 2 13)
        (size 30 3)
        (extra 0 1)
        (scroll_size 30 50)
        (repeat interactive
            (grow 0 1)
            (instances 0
                (min 1)
                (max 50)
            )
        )
        (top
            (label
                (position 1 0)
                (text "Attribute")
            )
            (label
                (position 16 0)
                (text "Composite")
            )
        )
        (main
            (field "quality"
                (position 1 0)
                (display_length 12)
                (max_length "BM_MAX_ATT_NAME_LEN")
                (input allowed)
                )
            (field "comp_att"
                (position 16 0)
                (display_length 12)
                (max_length "BM_MAX_ATT_NAME_LEN")
                (input allowed)
                (auto_next off)
                )
        )
    )
    (label 
        (position 38 11) 
        (text "Cutoff")
    )
    (field "cutoff"
        (position 48 11)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )

    (label
        (position 35 13)
        (text "Ore attribute")
    )
    (field "ore_att"
        (position 48 13)
        (display_length 13)
        (max_length "BM_MAX_ATT_NAME_LEN")
        (input allowed)
        (null disallowed)
        )
    
    (label
        (position 35 14)
        (text "Ore Value")
    )
    (field "ore_val"
        (position 48 14)
        (display_length 13)
        (max_length 30)
        (input allowed)
        (null disallowed)
        )

    (label
        (position 35 15)
        (text "Waste Value")
    )
    (field "waste_val"
        (position 48 15)
        (display_length 13)
        (max_length 30)
        (input allowed)
        (null disallowed)
        )

    (label
        (position 2 17)
        (text "Direction of columns")
    )
    (field "axis"
        (position 22 17)
        (display_length 3)
        (input allowed)
        (null disallowed)
        (value_in "X" "Y" "Z" "-X" "-Y" "-Z")
        (default "-Z")
        )
    
    (label
        (position 2 18)
        (text "Constrain discrimination?")
    )
    (field "constrain"
        (position 22 18)
        (display_length 2)
        (max_length 3)
        (input allowed)
        (null disallowed)
        (value_in "Yes" "No")
        (default "Yes")
        )

    (field "dilute_ore_classes"
        (position 23 18)
        (display_length 2)
        (max_length 3)
        (input allowed)
        (null disallowed)
        (value_in "Yes" "No")
        (default "No")
     )

    (field "dilution_thick"
        (position 24 18)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )


    (field "secondary_att"
        (position 25 18)
        (display_length 13)
        (max_length "BM_MAX_ATT_NAME_LEN")
        (input allowed)
        (null allowed)
    )

    (field "percentage_att"
        (position 30 18)
        (display_length 13)
        (max_length "BM_MAX_ATT_NAME_LEN")
        (input allowed)
        (null allowed)
    )

   (scroll_block "classifications"
        (position 2 18)
        (size 30 3)
        (extra 0 1)
        (scroll_size 30 50)
        (repeat interactive
            (grow 0 1)
            (instances 0
                (min 1)
                (max 5)
            )
        )
        (main
            (field "classification"
                (position 1 0)
                (display_length 12)
                (max_length 30)
                (input disallowed)
                )
            (field "class_val"
                (position 16 0)
                (display_length 12)
                (max_length 30)
                (input allowed)
                (auto_next off)
                )
        )
    )

    (label
        (position 34 18)
        (text "REPORT_FILE_NAME")
    )
    (field "fname"
        (position 48 18)
        (display_length 18)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (file output
            (extension trim "reports|*.not")
        )
        (help   "REPORT_FILE_NAME_TIP"
        ))

    (field "report_format" (position 48 19) (display_length 16)
      (input allowed) (null allowed)
      (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"
                ".log - Surpac log file"))
    (default_buttons)
)
