
destroy .constant
toplevel .constant
wm title .constant "GOBLIN Prompt"
wm resizable .constant 0 0
grab .constant
     
global ThisGraph ThisLabel ThisValue
set ThisLabel "ucap"
set ThisValue ""

frame .constant.options
    label .constant.options.label -text "Labels:" -anchor w
    radiobutton .constant.options.ucap -text "Upper Bounds" \
        -variable ThisLabel -value "ucap" -anchor w
    radiobutton .constant.options.lcap -text "Lower Bounds" \
        -variable ThisLabel -value "lcap" -anchor w
    radiobutton .constant.options.length -text "Arc Lengths" \
        -variable ThisLabel -value "length" -anchor w
    radiobutton .constant.options.demand -text "Node Demands" \
        -variable ThisLabel -value "demand" -anchor w
    pack .constant.options.label .constant.options.ucap \
        .constant.options.lcap .constant.options.length \
        .constant.options.demand -side top -fill x
     
frame .constant.value
    label .constant.value.label -text "New Constant Value:" -anchor w
    entry .constant.value.value -textvariable ThisValue -bg white
    pack .constant.value.label .constant.value.value -side top -fill x

pack .constant.options .constant.value -padx 10m -pady 5m -side top -anchor w

     
frame .constant.buttons
pack .constant.buttons -padx 3m -pady 3m -side bottom

    button .constant.buttons.apply -text "Apply" -command { \
        if {$ThisValue!=""} {
            $ThisGraph set $ThisLabel $ThisValue
            PropagateModifications
            InitDisplay
        }
    }    

    button .constant.buttons.done -text "Done" -command { \
        destroy .constant
    }
    
    pack .constant.buttons.apply \
        .constant.buttons.done \
        -side left -fill x -padx 3m
