
destroy .extract
toplevel .extract
wm title .extract "GOBLIN Extract"
wm resizable .extract 0 0
     
global ThisGraph ThisStructure
set ThisStructure "subgraph"

frame .extract.options
pack .extract.options -padx 10m -pady 5m -side top -anchor w

    label .extract.options.label -text "Desired Structure:" -anchor w
    radiobutton .extract.options.trees -text "Trees" \
        -variable ThisStructure -value "trees" -anchor w
    radiobutton .extract.options.cut -text "Cut" \
        -variable ThisStructure -value "cut" -anchor w
    radiobutton .extract.options.bipartition -text "Bipartition" \
        -variable ThisStructure -value "bipartition" -anchor w
    radiobutton .extract.options.matching -text "Matching" \
        -variable ThisStructure -value "matching" -anchor w
    radiobutton .extract.options.cycles -text "Cycles" \
        -variable ThisStructure -value "cycles" -anchor w
    pack .extract.options.label .extract.options.trees \
        .extract.options.cut .extract.options.bipartition \
        .extract.options.matching .extract.options.cycles \
        -side top -fill x
     
frame .extract.buttons
pack .extract.buttons -padx 3m -pady 3m -side bottom

    button .extract.buttons.go -text "Go" -command { \
        $ThisGraph extract $ThisStructure
        PropagateModifications
        InitDisplay
        destroy .extract
    }    

    button .extract.buttons.cancel -text "Cancel" -command { \
        destroy .extract
    }
    
    pack .extract.buttons.go \
        .extract.buttons.cancel \
        -side left -fill x -padx 3m
