proc levelset::installLevelSet2D { parent camera object color } { menubutton $parent.context.object -text "Object" -menu $parent.context.object.m -anchor w -bg $color set mobject [menu $parent.context.object.m -bg $color] $mobject add command -label "destroy" -command "evaluate {$object -destroy}"
menubutton $parent.context.graphics -text "Graphics" -menu $parent.context.graphics.m -anchor w -bg $color set mgraphics [menu $parent.context.graphics.m -bg $color -postcommand "set levelset::dnb \[$object -drawNB\]"] $mgraphics add checkbutton -label "display narrow band" -variable levelset::dnb -onvalue true -offvalue false -selectcolor black -command "evaluate \"$object -drawNB \$levelset::dnb\"" $mgraphics add command -label "0 level set color..." -command "set col \[interface::selectColor \[ $object -color\]\]; evaluate \"$object -color \[lindex \$col 0\] \[lindex \$col 1\] \[lindex \$col 2\] \"" $mgraphics add cascade -label "0 level set width" -menu $mgraphics.width menu $mgraphics.width -bg $color -tearoff 0 $mgraphics.width add command -label "1" -command "evaluate \"$object -width 1\"" $mgraphics.width add command -label "2" -command "evaluate \"$object -width 2\"" $mgraphics.width add command -label "3" -command "evaluate \"$object -width 3\"" $mgraphics.width add command -label "5" -command "evaluate \"$object -width 5\""
menubutton $parent.context.parameters -text "Parameters" -menu $parent.context.parameters.m -anchor w -bg $color set mparameters [menu $parent.context.parameters.m -bg $color] $mparameters add command -label "parameters..." -command "levelset::parameter $object $color"
pack $parent.context.object $parent.context.graphics $parent.context.parameters -side left
}
|