
destroy .nodeopt
toplevel .nodeopt

wm title .nodeopt "GOBLIN Node Display"
wm resizable .nodeopt 0 0

global goblinNodeStyle goblinNodeLabels goblinNodeColours
    
frame .nodeopt.buttons
button .nodeopt.buttons.done -text "Done" -command { \
    destroy .nodeopt
    InitDisplay
}
    
pack .nodeopt.buttons.done -side left -fill x -padx 3m
pack .nodeopt.buttons -padx 3m -pady 3m -side bottom

frame .nodeopt.options
pack .nodeopt.options -fill both -padx 10m -pady 4m

frame .nodeopt.options.nodeLabels
frame .nodeopt.options.nodeColours
frame .nodeopt.options.nodeStyle
pack .nodeopt.options.nodeLabels .nodeopt.options.nodeColours \
    .nodeopt.options.nodeStyle -side top -fill x -pady 5m


    label .nodeopt.options.nodeLabels.label -text "Node Labels:" -anchor w
    radiobutton .nodeopt.options.nodeLabels.noLabels -text "No Labels" \
        -variable goblinNodeLabels -value 0 -anchor w
    radiobutton .nodeopt.options.nodeLabels.indices -text "Node Indices" \
        -variable goblinNodeLabels -value 1 -anchor w
    radiobutton .nodeopt.options.nodeLabels.labels -text "Distance Labels" \
        -variable goblinNodeLabels -value 2 -anchor w
    radiobutton .nodeopt.options.nodeLabels.potentials -text "Potentials" \
        -variable goblinNodeLabels -value 3 -anchor w
    radiobutton .nodeopt.options.nodeLabels.colours -text "Colours" \
        -variable goblinNodeLabels -value 4 -anchor w
    radiobutton .nodeopt.options.nodeLabels.demands -text "Demands" \
        -variable goblinNodeLabels -value 5 -anchor w
    pack .nodeopt.options.nodeLabels.label \
        .nodeopt.options.nodeLabels.noLabels \
        .nodeopt.options.nodeLabels.indices \
        .nodeopt.options.nodeLabels.labels \
        .nodeopt.options.nodeLabels.potentials \
        .nodeopt.options.nodeLabels.colours \
        .nodeopt.options.nodeLabels.demands \
        -fill x

    label .nodeopt.options.nodeColours.label -text "Node Colours:" -anchor w
    radiobutton .nodeopt.options.nodeColours.uncoloured -text "Uncoloured" \
        -variable goblinNodeColours -value 0 -anchor w
    radiobutton .nodeopt.options.nodeColours.labels -text "Distance Labels" \
        -variable goblinNodeColours -value 1 -anchor w
    radiobutton .nodeopt.options.nodeColours.colours -text "Colours" \
        -variable goblinNodeColours -value 2 -anchor w
    radiobutton .nodeopt.options.nodeColours.demands -text "Demands" \
        -variable goblinNodeColours -value 3 -anchor w
    radiobutton .nodeopt.options.nodeColours.part -text "Partition" \
        -variable goblinNodeColours -value 4 -anchor w
    pack .nodeopt.options.nodeColours.label \
        .nodeopt.options.nodeColours.uncoloured \
        .nodeopt.options.nodeColours.colours \
        .nodeopt.options.nodeColours.demands \
        .nodeopt.options.nodeColours.labels \
        .nodeopt.options.nodeColours.part \
        -fill x

    label .nodeopt.options.nodeStyle.label -text "Node Style:" -anchor w
    radiobutton .nodeopt.options.nodeStyle.dots -text "Dots" \
        -variable goblinNodeStyle -value 0 -anchor w
    radiobutton .nodeopt.options.nodeStyle.circles -text "Circles" \
        -variable goblinNodeStyle -value 1 -anchor w
    radiobutton .nodeopt.options.nodeStyle.boxes -text "Boxes" \
        -variable goblinNodeStyle -value 2 -anchor w
    pack .nodeopt.options.nodeStyle.label \
        .nodeopt.options.nodeStyle.dots \
        .nodeopt.options.nodeStyle.circles \
        .nodeopt.options.nodeStyle.boxes \
        -fill x
