diff --git a/ng/csgeom.tcl b/ng/csgeom.tcl index b8cab4d1..d3b1c7d3 100644 --- a/ng/csgeom.tcl +++ b/ng/csgeom.tcl @@ -49,7 +49,7 @@ proc geometryoptionsdialog { } { frame $w.fac pack $w.fac -pady 5 - label $w.fac.lab -text "Facets:"; + ttk::label $w.fac.lab -text "Facets:"; entry $w.fac.ent -width 8 -relief sunken \ -textvariable geooptions.facets pack $w.fac.lab $w.fac.ent -side left @@ -57,14 +57,14 @@ proc geometryoptionsdialog { } { frame $w.det pack $w.det -pady 5 - label $w.det.lab -text "Detail:"; + ttk::label $w.det.lab -text "Detail:"; entry $w.det.ent -width 8 -relief sunken \ -textvariable geooptions.detail pack $w.det.lab $w.det.ent -side left frame $w.cox pack $w.cox -pady 5 - label $w.cox.lab -text "min/max x:"; + ttk::label $w.cox.lab -text "min/max x:"; entry $w.cox.ent1 -width 8 -relief sunken \ -textvariable geooptions.minx entry $w.cox.ent2 -width 8 -relief sunken \ @@ -74,7 +74,7 @@ proc geometryoptionsdialog { } { frame $w.coy pack $w.coy -pady 5 - label $w.coy.lab -text "min/max y:"; + ttk::label $w.coy.lab -text "min/max y:"; entry $w.coy.ent1 -width 8 -relief sunken \ -textvariable geooptions.miny entry $w.coy.ent2 -width 8 -relief sunken \ @@ -84,7 +84,7 @@ proc geometryoptionsdialog { } { frame $w.coz pack $w.coz -pady 5 - label $w.coz.lab -text "min/max z:"; + ttk::label $w.coz.lab -text "min/max z:"; entry $w.coz.ent1 -width 8 -relief sunken \ -textvariable geooptions.minz entry $w.coz.ent2 -width 8 -relief sunken \ @@ -110,10 +110,10 @@ proc geometryoptionsdialog { } { pack $w.bu -fill x -ipady 3 - button $w.bu.app -text "Apply" -command { + ttk::button $w.bu.app -text "Apply" -command { Ng_GeometryOptions set } - button $w.bu.ok -text "Done" -command { + ttk::button $w.bu.ok -text "Done" -command { Ng_GeometryOptions set destroy .geometry_dlg } @@ -159,8 +159,8 @@ proc editprimitivedialog2 { name } { Ng_GetPrimitiveData $name classname valuelist - label $w.lab1 -text "Primitive Name: $name"; - label $w.lab2 -text "Primitive Class: $classname"; + ttk::label $w.lab1 -text "Primitive Name: $name"; + ttk::label $w.lab2 -text "Primitive Class: $classname"; pack $w.lab1 $w.lab2 -fill x -pady 1m -padx 5m frame $w.specific -relief groove @@ -178,7 +178,7 @@ proc editprimitivedialog2 { name } { frame $w.specific.f$cnt pack $w.specific.f$cnt -side top -anchor ne - label $w.specific.f$cnt.lab -text "$field" + ttk::label $w.specific.f$cnt.lab -text "$field" entry $w.specific.f$cnt.ent -textvariable dataval($cnt) \ -width 6 -relief sunken pack $w.specific.f$cnt.ent $w.specific.f$cnt.lab -side right @@ -189,11 +189,11 @@ proc editprimitivedialog2 { name } { pack $w.specific - button $w.cancel -text "cancel" -command { + ttk::button $w.cancel -text "cancel" -command { destroy $w } - button $w.ok -text "ok" -command { + ttk::button $w.ok -text "ok" -command { set valuelist "" set cnt 0 @@ -245,8 +245,8 @@ proc editprimitivedialog { } { foreach el $primlist { $w.frame.list insert end $el } - button $w.cancel -text "cancel" -command { destroy $w } - button $w.ok -text "ok" -command { + ttk::button $w.cancel -text "cancel" -command { destroy $w } + ttk::button $w.ok -text "ok" -command { set name [.ep_dlg.frame.list get active] puts "name=($name)" destroy $w @@ -285,7 +285,7 @@ proc newprimitivedialog { } { set name "" frame $w.f1 pack $w.f1 -pady 2m - label $w.f1.lab -text "Primitive Name: "; + ttk::label $w.f1.lab -text "Primitive Name: "; entry $w.f1.ent -width 5 -relief sunken \ -textvariable name pack $w.f1.lab $w.f1.ent -side left @@ -301,13 +301,13 @@ proc newprimitivedialog { } { $w.frame.list insert 0 sphere cylinder plane cone brick $w.frame.list activate 0 - button $w.ok -text "ok" -command { + ttk::button $w.ok -text "ok" -command { Ng_CreatePrimitive [$w.frame.list get active] $name destroy $w editprimitivedialog2 $name } - button $w.cancel -text "cancel" -command { + ttk::button $w.cancel -text "cancel" -command { destroy $w } @@ -339,11 +339,11 @@ proc newsoliddialog { } { set name "" frame $w.f1 - label $w.f1.lab -text "Solid Name: "; + ttk::label $w.f1.lab -text "Solid Name: "; entry $w.f1.ent -width 5 -relief sunken \ -textvariable name $w.f1.ent delete 0 end - button $w.f1.getsel -text "Get Selected" -command { + ttk::button $w.f1.getsel -text "Get Selected" -command { $w.f1.ent delete 0 end $w.f1.ent insert 0 [$w.f3.list get active] $w.bu.get invoke @@ -363,7 +363,7 @@ proc newsoliddialog { } { $w.f3.list insert end $el } frame $w.f2 - label $w.f2.lab -text "Solid Description: "; + ttk::label $w.f2.lab -text "Solid Description: "; pack $w.f2.lab @@ -377,15 +377,15 @@ proc newsoliddialog { } { frame $w.bu - button $w.bu.close -text "close" -command { + ttk::button $w.bu.close -text "close" -command { destroy $w } - button $w.bu.get -text "get data" -command { + ttk::button $w.bu.get -text "get data" -command { Ng_GetSolidData $name val } - button $w.bu.set -text "set data" -command { + ttk::button $w.bu.set -text "set data" -command { Ng_SetSolidData $name $val } @@ -437,17 +437,17 @@ proc toplevelproperties { w solname surfname } { } { toplevel $w - label $w.lab1 -text "Red" + ttk::label $w.lab1 -text "Red" scale $w.scale1 -orient horizontal -length 300 -from 0 -to 1 \ -resolution 0.01 -tickinterval 0.2 \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(red) - label $w.lab2 -text "Green" + ttk::label $w.lab2 -text "Green" scale $w.scale2 -orient horizontal -length 300 -from 0 -to 1 \ -resolution 0.01 -tickinterval 0.2 \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(green) - label $w.lab3 -text "Blue" + ttk::label $w.lab3 -text "Blue" scale $w.scale3 -orient horizontal -length 300 -from 0 -to 1 \ -resolution 0.01 -tickinterval 0.2 \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(blue) @@ -469,7 +469,7 @@ proc toplevelproperties { w solname surfname } { frame $w.bu pack $w.bu -fill x - button $w.bu.ok -text "Ok" -command "destroy .tlprop_dlg" + ttk::button $w.bu.ok -text "Ok" -command "destroy .tlprop_dlg" pack $w.bu.ok -expand yes wm withdraw $w @@ -544,17 +544,17 @@ proc topleveldialog { } { frame $w.bu - button $w.bu.close -text "close" -command { + ttk::button $w.bu.close -text "close" -command { destroy $w } - button $w.bu.addsol -text "Add Solid" -command { + ttk::button $w.bu.addsol -text "Add Solid" -command { set solname [$w.sol.list get active] Ng_TopLevel set $solname "" Ng_ParseGeometry $w.topl.list insert end $solname } - button $w.bu.addsurf -text "Add Surface" -command { + ttk::button $w.bu.addsurf -text "Add Surface" -command { set solname [$w.sol.list get active] set surfname [$w.sul.list get active] Ng_TopLevel set $solname $surfname @@ -563,7 +563,7 @@ proc topleveldialog { } { $w.topl.list insert end "$surfname on $solname" } - button $w.bu.remsol -text "Remove" -command { + ttk::button $w.bu.remsol -text "Remove" -command { set solname [$w.topl.list get active] set surfname "" if { [llength $solname] == 3 } { @@ -575,7 +575,7 @@ proc topleveldialog { } { $w.topl.list delete active } - button $w.bu.prop -text "Properties" -command { + ttk::button $w.bu.prop -text "Properties" -command { set solname [$w.topl.list get active] set surfname "" if { [llength $solname] == 3 } { @@ -644,12 +644,12 @@ proc topleveldialog2 { } { frame $w.bu - button $w.bu.close -text "close" -command { + ttk::button $w.bu.close -text "close" -command { destroy .tl2_dlg } - button $w.bu.prop -text "Properties" -command { + ttk::button $w.bu.prop -text "Properties" -command { set solname [.tl2_dlg.topl.list get active] set surfname "" if { [llength $solname] == 2 } { diff --git a/ng/dialog.tcl b/ng/dialog.tcl index 91ac9df0..1842897d 100644 --- a/ng/dialog.tcl +++ b/ng/dialog.tcl @@ -320,7 +320,7 @@ proc meshingoptionsdialog { } { pack $f.msf.btn -side left -anchor s -padx 4 -pady 4 - label $f.lab -text "Additional mesh size restrictions:" + ttk::label $f.lab -text "Additional mesh size restrictions:" #csg-meshsize options @@ -1816,9 +1816,9 @@ proc bcpropdialog { } { frame $w.face -borderwidth 3 pack $w.face -fill x - label $w.face.lab -text "face index:" - label $w.face.ent -text 1 -padx 4 - button $w.face.next -text "next" -command { + ttk::label $w.face.lab -text "face index:" + ttk::label $w.face.ent -text 1 -padx 4 + ttk::button $w.face.next -text "next" -command { set w .bcprop_dlg; set facenr [$w.face.ent cget -text] if {$facenr == [Ng_BCProp getnfd]} { @@ -1834,7 +1834,7 @@ proc bcpropdialog { } { redraw } - button $w.face.prev -text "prev" -command { + ttk::button $w.face.prev -text "prev" -command { set w .bcprop_dlg; set facenr [$w.face.ent cget -text] if {$facenr == 1} { @@ -1856,13 +1856,13 @@ proc bcpropdialog { } { frame $w.bc -borderwidth 3 pack $w.bc -fill x - label $w.bc.lab -text "bc property:" + ttk::label $w.bc.lab -text "bc property:" entry $w.bc.ent -width 5 -relief sunken - button $w.bc.but -text "change" -command { + ttk::button $w.bc.but -text "change" -command { set w .bcprop_dlg; Ng_BCProp setbc [$w.face.ent cget -text] [$w.bc.ent get]; } - button $w.bc.but2 -text "all" -command { + ttk::button $w.bc.but2 -text "all" -command { set w .bcprop_dlg; Ng_BCProp setall [$w.bc.ent get]; } @@ -1870,15 +1870,15 @@ proc bcpropdialog { } { frame $w.bcname -borderwidth 3 pack $w.bcname -fill x - label $w.bcname.lab -text "bc name:" - label $w.bcname.ent -text "-" + ttk::label $w.bcname.lab -text "bc name:" + ttk::label $w.bcname.ent -text "-" pack $w.bcname.lab $w.bcname.ent -side left -expand yes frame $w.bu pack $w.bu -fill x -ipady 3 - button $w.bu.close -text "Close" -command { destroy .bcprop_dlg } + ttk::button $w.bu.close -text "Close" -command { destroy .bcprop_dlg } pack $w.bu.close -expand yes -side left @@ -1938,37 +1938,37 @@ proc currmeshcoloursdialog { } { $w.facecols.list insert end $hel } frame $w.bu1 -borderwidth 3 - button $w.bu1.showonly -text "show only" -command { + ttk::button $w.bu1.showonly -text "show only" -command { Ng_CurrentFaceColours showonly [.currmeshcolours_dlg.facecols.list curselection] redraw } - button $w.bu1.hideonly -text "hide only" -command { + ttk::button $w.bu1.hideonly -text "hide only" -command { Ng_CurrentFaceColours hideonly [.currmeshcolours_dlg.facecols.list curselection] redraw } - button $w.bu1.showalso -text "show" -command { + ttk::button $w.bu1.showalso -text "show" -command { Ng_CurrentFaceColours showalso [.currmeshcolours_dlg.facecols.list curselection] redraw } - button $w.bu1.hidealso -text "hide" -command { + ttk::button $w.bu1.hidealso -text "hide" -command { Ng_CurrentFaceColours hidealso [.currmeshcolours_dlg.facecols.list curselection] redraw } pack $w.bu1.showonly $w.bu1.hideonly $w.bu1.showalso $w.bu1.hidealso -expand yes -fill x -padx 2 -pady 2 -side left frame $w.bu2 - button $w.bu2.showall -text "show all" -command { + ttk::button $w.bu2.showall -text "show all" -command { Ng_CurrentFaceColours showall redraw } - button $w.bu2.hideall -text "hide all" -command { + ttk::button $w.bu2.hideall -text "hide all" -command { Ng_CurrentFaceColours hideall redraw } pack $w.bu2.showall $w.bu2.hideall -expand yes -fill x -padx 2 -pady 2 -side left frame $w.bu3 - button $w.bu3.close -text "close" -command { + ttk::button $w.bu3.close -text "close" -command { destroy .currmeshcolours_dlg } pack $w.bu3.close -expand yes -fill x -pady 3 -side right @@ -2008,9 +2008,9 @@ proc surfacemeshsizedialog { } { frame $w.face -borderwidth 3 pack $w.face -fill x -padx 5 - label $w.face.lab -text "face index:" - label $w.face.ent -text 1 -padx 4 - button $w.face.next -text "next" -command { + ttk::label $w.face.lab -text "face index:" + ttk::label $w.face.ent -text 1 -padx 4 + ttk::button $w.face.next -text "next" -command { set w .surfacemeshsize_dlg; set facenr [$w.face.ent cget -text] if {$facenr == [Ng_SurfaceMeshSize getnfd]} { @@ -2026,7 +2026,7 @@ proc surfacemeshsizedialog { } { redraw } - button $w.face.prev -text "prev" -command { + ttk::button $w.face.prev -text "prev" -command { set w .surfacemeshsize_dlg; set facenr [$w.face.ent cget -text] if {$facenr == 1} { @@ -2048,13 +2048,13 @@ proc surfacemeshsizedialog { } { frame $w.sms -borderwidth 3 pack $w.sms -fill x - label $w.sms.lab -text "max mesh size:" + ttk::label $w.sms.lab -text "max mesh size:" entry $w.sms.ent -width 8 -relief sunken - button $w.sms.but -text "change" -command { + ttk::button $w.sms.but -text "change" -command { set w .surfacemeshsize_dlg; Ng_SurfaceMeshSize setsurfms [$w.face.ent cget -text] [$w.sms.ent get]; } - button $w.sms.but2 -text "all" -command { + ttk::button $w.sms.but2 -text "all" -command { set w .surfacemeshsize_dlg; Ng_SurfaceMeshSize setall [$w.sms.ent get]; } @@ -2063,7 +2063,7 @@ proc surfacemeshsizedialog { } { frame $w.bu pack $w.bu -fill x -ipady 3 - button $w.bu.close -text "Close" -command { destroy .surfacemeshsize_dlg } + ttk::button $w.bu.close -text "Close" -command { destroy .surfacemeshsize_dlg } pack $w.bu.close -expand yes -side left @@ -2106,14 +2106,14 @@ proc METISdialog { } { frame $w.b -borderwidth 0 pack $w.a $w.b - label $w.a.lab -text "Number of partitions:" + ttk::label $w.a.lab -text "Number of partitions:" entry $w.a.ent -textvariable w.parts -width 4 -relief sunken - button $w.b.start -text "Start METIS" -command { + ttk::button $w.b.start -text "Start METIS" -command { Ng_Metis ${w.parts} redraw } - button $w.b.cancel -text "Cancel" -command { destroy .metis_dlg } + ttk::button $w.b.cancel -text "Cancel" -command { destroy .metis_dlg } pack $w.a.lab $w.a.ent -side left -expand yes pack $w.b.start $w.b.cancel -side left @@ -2213,8 +2213,8 @@ proc stloptionsdialog { } { # -fill x - button $w.bu.apply -text "Apply" -command { redraw; Ng_GenerateMesh 1 2} - button $w.bu.cancle -text "Done" -command { destroy .stlopts_dlg } + ttk::button $w.bu.apply -text "Apply" -command { redraw; Ng_GenerateMesh 1 2} + ttk::button $w.bu.cancle -text "Done" -command { destroy .stlopts_dlg } pack $w.bu.cancle $w.bu.apply -side left -expand yes @@ -2556,13 +2556,13 @@ proc stldoctordialog { } { # button $f.edg2.addlonglines -text "make long lines candidates (% of diam)" -command {Ng_STLDoctor addlonglines; redraw} - label $f.edg2.lab -text "length (%):" + ttk::label $f.edg2.lab -text "length (%):" scale $f.edg2.sc -orient horizontal -length 200 -from 0 -to 100 \ -resolution 0.5 \ -variable stldoctor.longlinefact # button $f.edg2.deletedirtyedges -text "make dirty edges candidates" -command {Ng_STLDoctor deletedirtyedges; redraw} - button $f.edg2.undoedge -text "undo last edge change" -command {Ng_STLDoctor undoedgechange; redraw} + ttk::button $f.edg2.undoedge -text "undo last edge change" -command {Ng_STLDoctor undoedgechange; redraw} # pack $f.edg2.addlonglines $f.edg2.deletedirtyedges -expand yes # pack $f.edg2.lab $f.edg2.sc -side left @@ -2820,7 +2820,7 @@ proc qualityviewdialog { show } { pack $w.bu # -fill x - button $w.close -text "Close" \ + ttk::button $w.close -text "Close" \ -command { wm withdraw .qualityview_dlg set viewqualityplot 0 @@ -2891,11 +2891,11 @@ proc memusedialog { show } { $c create text 562 90 -text "4 GB" -anchor n -font $plotFont - frame $w.bu + ttk::frame $w.bu pack $w.bu # -fill x - button $w.close -text "Close" \ + ttk::button $w.close -text "Close" \ -command { wm withdraw .memuse_dlg set memuseplot 0 @@ -2956,11 +2956,11 @@ proc STLinfodialog { show } { $c create line 100 250 400 250 -width 2 $c create line 100 250 100 50 -width 2 - frame $w.bu + ttk::frame $w.bu pack $w.bu # -fill x - button $w.close -text "Close" \ + ttk::button $w.close -text "Close" \ -command { wm withdraw .STLinfo_dlg #set STLinfoopen 0 @@ -3049,7 +3049,7 @@ proc printwarning { textvar } { set w .$w toplevel $w message $w.mes -aspect 2000 -text "WARNING:\n$textvar" - button $w.done -text "Done" -command "destroy $w" + ttk::button $w.done -text "Done" -command "destroy $w" pack $w.mes pack $w.done wm withdraw $w diff --git a/ng/menustat.tcl b/ng/menustat.tcl index bfb7c749..f678126a 100644 --- a/ng/menustat.tcl +++ b/ng/menustat.tcl @@ -820,7 +820,7 @@ ttk::frame .bubar #-relief raised -bd 2 pack .bubar -side top -fill x -button .bubar.testb -text "Test" -command { Ng_SaveGeometry } +ttk::button .bubar.testb -text "Test" -command { Ng_SaveGeometry } ttk::button .bubar.surfm -text "Generate Mesh" -command \ { .ngmenu.mesh invoke "Generate Mesh"; @@ -947,7 +947,7 @@ proc selvis_monitor { name args } { # # ##################################################### -label .helpline -text "None" +ttk::label .helpline -text "None" pack forget .helpline -side bottom -fill x ttk::frame .statbar -relief flat diff --git a/ng/nghelp.tcl b/ng/nghelp.tcl index 6fab0d46..d669a0ef 100644 --- a/ng/nghelp.tcl +++ b/ng/nghelp.tcl @@ -97,11 +97,11 @@ proc sensitivehelpdialog { show } { pack $w.scroll -side right -fill y pack $w.text -expand yes -fill both - frame $w.bu + ttk::frame $w.bu pack $w.bu # -fill x - button $w.close -text "Close" \ + ttk::button $w.close -text "Close" \ -command { wm withdraw .senshelp_dlg set showsensitivehelp 0