small tix fix

This commit is contained in:
Gerhard Kitzler 2016-11-10 13:21:21 +01:00
parent 112b00ed29
commit 2a380690d1
2 changed files with 125 additions and 125 deletions

View File

@ -54,7 +54,7 @@ proc show_menu_help { entry } {
} }
tixBalloon .balloon -statusbar .helpline #tixBalloon .balloon -statusbar .helpline
proc set_control_help { control helpmsg } { proc set_control_help { control helpmsg } {
bind $control <Enter> "show_control_help {$helpmsg}" bind $control <Enter> "show_control_help {$helpmsg}"

View File

@ -1654,177 +1654,177 @@ proc visual_dialog { } {
proc reset_visual_dialog { } { # proc reset_visual_dialog { } {
set w .visoptions_dlg # set w .visoptions_dlg
if {[winfo exists .visoptions_dlg] == 1} { # if {[winfo exists .visoptions_dlg] == 1} {
destroy $w.scalfun $w.vecfun $w.evaluate $w.multidimcomp # destroy $w.scalfun $w.vecfun $w.evaluate $w.multidimcomp
destroy $w.imaginary $w.logscale $w.texframe.usetexture $w.texframe.lintexture # destroy $w.imaginary $w.logscale $w.texframe.usetexture $w.texframe.lintexture
destroy $w.texframe # destroy $w.texframe
destroy $w.invcolor $w.redrawperiodic # destroy $w.invcolor $w.redrawperiodic
destroy $w.bu -pady 5 # destroy $w.bu -pady 5
destroy $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes # destroy $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
checkbutton $w.imaginary -text "Imaginary Part" \ # checkbutton $w.imaginary -text "Imaginary Part" \
-variable visoptions.imaginary \ # -variable visoptions.imaginary \
-command { Ng_Vis_Set parameters; redraw } # -command { Ng_Vis_Set parameters; redraw }
frame $w.texframe # frame $w.texframe
checkbutton $w.texframe.usetexture -text "Use Textures (" \ # checkbutton $w.texframe.usetexture -text "Use Textures (" \
-variable visoptions.usetexture \ # -variable visoptions.usetexture \
-command { Ng_Vis_Set parameters; redraw } # -command { Ng_Vis_Set parameters; redraw }
checkbutton $w.texframe.lintexture -text "Linear )" \ # checkbutton $w.texframe.lintexture -text "Linear )" \
-variable visoptions.lineartexture \ # -variable visoptions.lineartexture \
-command { Ng_Vis_Set parameters; redraw } # -command { Ng_Vis_Set parameters; redraw }
checkbutton $w.invcolor -text "Inverse Color" \ # checkbutton $w.invcolor -text "Inverse Color" \
-variable visoptions.invcolor \ # -variable visoptions.invcolor \
-command { Ng_Vis_Set parameters; redraw } # -command { Ng_Vis_Set parameters; redraw }
checkbutton $w.logscale -text "Log Scale" \ # checkbutton $w.logscale -text "Log Scale" \
-variable visoptions.logscale \ # -variable visoptions.logscale \
-command { Ng_Vis_Set parameters; redraw } # -command { Ng_Vis_Set parameters; redraw }
checkbutton $w.redrawperiodic -text "Animate periodic" \ # checkbutton $w.redrawperiodic -text "Animate periodic" \
-variable visoptions.redrawperiodic \ # -variable visoptions.redrawperiodic \
-command { # -command {
redrawperiodic # redrawperiodic
Ng_Vis_Set parameters; # Ng_Vis_Set parameters;
redraw # redraw
} # }
tixOptionMenu $w.scalfun -label "Scalar Function: " \ # tixOptionMenu $w.scalfun -label "Scalar Function: " \
-options { # -options {
label.width 18 # label.width 18
label.anchor e # label.anchor e
menubutton.width 12 # menubutton.width 12
} # }
tixOptionMenu $w.vecfun -label "Vector Function: " \ # tixOptionMenu $w.vecfun -label "Vector Function: " \
-options { # -options {
label.width 18 # label.width 18
label.anchor e # label.anchor e
menubutton.width 12 # menubutton.width 12
} # }
$w.scalfun add command none -label None # $w.scalfun add command none -label None
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { # for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
set fname [Ng_Vis_Field getfieldname $i] # set fname [Ng_Vis_Field getfieldname $i]
set fcomp [Ng_Vis_Field getfieldcomponents $i] # set fcomp [Ng_Vis_Field getfieldcomponents $i]
if { $fcomp == 1 } { # if { $fcomp == 1 } {
$w.scalfun add command $fname.1 -label $fname # $w.scalfun add command $fname.1 -label $fname
} { # } {
for { set j 1 } { $j <= $fcomp } { incr j } { # for { set j 1 } { $j <= $fcomp } { incr j } {
$w.scalfun add command $fname.$j -label "$fname ($j)" # $w.scalfun add command $fname.$j -label "$fname ($j)"
} # }
$w.scalfun add command $fname.0 -label "func ($fname)" # $w.scalfun add command $fname.0 -label "func ($fname)"
} # }
} # }
$w.vecfun add command none -label None # $w.vecfun add command none -label None
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { # for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
set fname [Ng_Vis_Field getfieldname $i] # set fname [Ng_Vis_Field getfieldname $i]
set fcomp [Ng_Vis_Field getfieldcomponents $i] # set fcomp [Ng_Vis_Field getfieldcomponents $i]
set iscomplex [Ng_Vis_Field iscomplex $i] # set iscomplex [Ng_Vis_Field iscomplex $i]
set sdim [Ng_Vis_Field getdimension] # set sdim [Ng_Vis_Field getdimension]
if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] } # if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
if { ($fcomp == $sdim) || ($fcomp == 3) } { # if { ($fcomp == $sdim) || ($fcomp == 3) } {
$w.vecfun add command $fname -label $fname # $w.vecfun add command $fname -label $fname
} # }
} # }
$w.scalfun configure -variable visoptions.scalfunction # $w.scalfun configure -variable visoptions.scalfunction
$w.scalfun configure -command { Ng_Vis_Set parameters; redraw } # $w.scalfun configure -command { Ng_Vis_Set parameters; redraw }
$w.vecfun configure -variable visoptions.vecfunction # $w.vecfun configure -variable visoptions.vecfunction
$w.vecfun configure -command { Ng_Vis_Set parameters; redraw } # $w.vecfun configure -command { Ng_Vis_Set parameters; redraw }
# puts "sclfunction = ${visoptions.scalfunction}" # # puts "sclfunction = ${visoptions.scalfunction}"
tixOptionMenu $w.evaluate -label "Evaluate: " \ # tixOptionMenu $w.evaluate -label "Evaluate: " \
-options { # -options {
label.width 18 # label.width 18
label.anchor e # label.anchor e
menubutton.width 12 # menubutton.width 12
} # }
$w.evaluate add command abs -label "|.|" # $w.evaluate add command abs -label "|.|"
$w.evaluate add command abstens -label "|tensor|" # $w.evaluate add command abstens -label "|tensor|"
$w.evaluate add command mises -label "Mises" # $w.evaluate add command mises -label "Mises"
$w.evaluate add command main -label "Main" # $w.evaluate add command main -label "Main"
$w.evaluate configure -variable visoptions.evaluate # $w.evaluate configure -variable visoptions.evaluate
$w.evaluate configure -command { # $w.evaluate configure -command {
Ng_Vis_Set parameters; # Ng_Vis_Set parameters;
redraw # redraw
} # }
pack $w.scalfun $w.vecfun $w.evaluate # pack $w.scalfun $w.vecfun $w.evaluate
tixControl $w.multidimcomp -label "multidim-component: " -integer true \ # tixControl $w.multidimcomp -label "multidim-component: " -integer true \
-variable visoptions.multidimcomponent -min 0 \ # -variable visoptions.multidimcomponent -min 0 \
-command { Ng_Vis_Set parameters; redraw } \ # -command { Ng_Vis_Set parameters; redraw } \
-options { # -options {
entry.width 6 # entry.width 6
label.width 18 # label.width 18
label.anchor e # label.anchor e
} # }
pack $w.multidimcomp # pack $w.multidimcomp
pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic # pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic
pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes # pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes
frame $w.bu # frame $w.bu
pack $w.bu -pady 5 # pack $w.bu -pady 5
button $w.bu.showsol -text "Show Solution" -command { # button $w.bu.showsol -text "Show Solution" -command {
set selectvisual solution # set selectvisual solution
Ng_SetVisParameters # Ng_SetVisParameters
redraw # redraw
} # }
button $w.bu.clipping -text "Clipping" -command { # button $w.bu.clipping -text "Clipping" -command {
clippingdialog; # clippingdialog;
} # }
button $w.bu.fieldlines -text "Fieldlines" -command { # button $w.bu.fieldlines -text "Fieldlines" -command {
fieldlinesdialog; # fieldlinesdialog;
} # }
button $w.bu.lineplot -text "2D Lineplot" -command { # button $w.bu.lineplot -text "2D Lineplot" -command {
lineplotdialog; # lineplotdialog;
} # }
button $w.bu.done -text "Close" -command { # button $w.bu.done -text "Close" -command {
destroy .visoptions_dlg # destroy .visoptions_dlg
} # }
pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes # pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
wm withdraw $w # wm withdraw $w
wm deiconify $w # wm deiconify $w
} # }
} # }