Revision: 34217
          http://brlcad.svn.sourceforge.net/brlcad/?rev=34217&view=rev
Author:   bob1961
Date:     2009-04-14 17:46:50 +0000 (Tue, 14 Apr 2009)

Log Message:
-----------
Modified the TireWizard and the TankWizard to use ttk.

Modified Paths:
--------------
    brlcad/trunk/src/archer/plugins/Wizards/tankwizard/TankWizard.tcl
    brlcad/trunk/src/archer/plugins/Wizards/tirewizard/TireWizard.tcl

Modified: brlcad/trunk/src/archer/plugins/Wizards/tankwizard/TankWizard.tcl
===================================================================
--- brlcad/trunk/src/archer/plugins/Wizards/tankwizard/TankWizard.tcl   
2009-04-14 05:03:48 UTC (rev 34216)
+++ brlcad/trunk/src/archer/plugins/Wizards/tankwizard/TankWizard.tcl   
2009-04-14 17:46:50 UTC (rev 34217)
@@ -565,9 +565,9 @@
            -hscrollmode dynamic \
            -vscrollmode dynamic
     } {}
+    $itk_component(paramScroll) configure -background 
$ArcherCore::LABEL_BACKGROUND_COLOR
     set newParent [$itk_component(paramScroll) childsite]
 
-
     # Create frame for stuff not in a toggle arrow
     itk_component add paramNonArrowF {
        ::frame $newParent.nonArrowF
@@ -575,7 +575,7 @@
 
     # Create name entry field
     itk_component add paramNameL {
-       ::label $itk_component(paramNonArrowF).nameL \
+       ::ttk::label $itk_component(paramNonArrowF).nameL \
            -text "Name:" \
            -anchor e
     } {}
@@ -583,20 +583,19 @@
     #XXX wizardTop is temporarily hardwired
     #-state disabled
     itk_component add paramNameE {
-       ::entry $itk_component(paramNonArrowF).nameE \
-           -textvariable [::itcl::scope wizardTop] \
-           -disabledforeground black
+       ::ttk::entry $itk_component(paramNonArrowF).nameE \
+           -textvariable [::itcl::scope wizardTop]
     } {}
 
     # Create origin entry field
     itk_component add paramOriginL {
-       ::label $itk_component(paramNonArrowF).originL \
+       ::ttk::label $itk_component(paramNonArrowF).originL \
            -text "Origin:" \
            -anchor e
     } {}
 
     itk_component add paramOriginE {
-       ::entry $itk_component(paramNonArrowF).originE \
+       ::ttk::entry $itk_component(paramNonArrowF).originE \
            -textvariable [::itcl::scope wizardOrigin]
     } {}
 
@@ -643,41 +642,45 @@
 
 ::itcl::body TankWizard::buildCategoryView {parent} {
     itk_component add classL {
-       ::label $parent.classL -text "Class:" \
+       ::ttk::label $parent.classL -text "Class:" \
            -anchor e
     } {}
     itk_component add classCB {
-       iwidgets::combobox $parent.classCB
+       ::ttk::combobox $parent.classCB \
+           -state disabled \
+           -values $vehicleClasses
     } {}
-    eval $itk_component(classCB) insert list end \
+#    eval $itk_component(classCB) insert list end \
        $vehicleClasses
 
     itk_component add typeL {
-       ::label $parent.typeL -text "Type:" \
+       ::ttk::label $parent.typeL -text "Type:" \
            -anchor e
     } {}
     itk_component add typeCB {
-       iwidgets::combobox $parent.typeCB
+       ::ttk::combobox $parent.typeCB \
+           -state disabled \
+           -values $heavyGroundMobileTypes
     } {}
-    eval $itk_component(typeCB) insert list end \
+#    eval $itk_component(typeCB) insert list end \
        $heavyGroundMobileTypes
 
     # make initial selections
-    $itk_component(classCB) selection set 1
-    $itk_component(typeCB) selection set 0
+    $itk_component(classCB) set [lindex $vehicleClasses 1]
+    $itk_component(typeCB) set [lindex $heavyGroundMobileTypes 0]
 
     # set up callbacks
-    $itk_component(classCB) configure -selectioncommand [::itcl::code $this 
changeClass]
-    $itk_component(typeCB) configure -selectioncommand [::itcl::code $this 
changeType]
+#    $itk_component(classCB) configure -selectioncommand [::itcl::code $this 
changeClass]
+#    $itk_component(typeCB) configure -selectioncommand [::itcl::code $this 
changeType]
 
     # turn off editing
-    $itk_component(classCB) configure -editable false
-    $itk_component(typeCB) configure -editable false
+#    $itk_component(classCB) configure -editable false
+#    $itk_component(typeCB) configure -editable false
 
-    if {!$enableCategory} {
-       $itk_component(classCB) component arrowBtn configure -state disable
-       $itk_component(typeCB) component arrowBtn configure -state disable
-    }
+#    if {!$enableCategory} {
+#      $itk_component(classCB) component arrowBtn configure -state disable
+#      $itk_component(typeCB) component arrowBtn configure -state disable
+#    }
 
     # pack widgets
     set row 0
@@ -712,51 +715,51 @@
 
 ::itcl::body TankWizard::buildGunView {parent} {
     itk_component add gunLengthL {
-       ::label $parent.gunLengthL -text "Length:" \
+       ::ttk::label $parent.gunLengthL -text "Length:" \
            -anchor e
     } {}
     itk_component add gunLengthE {
-       ::entry $parent.gunLengthE -textvariable [::itcl::scope gunLength]
+       ::ttk::entry $parent.gunLengthE -textvariable [::itcl::scope gunLength]
     } {}
 
     itk_component add gunBaseInnerDiameterL {
-       ::label $parent.gunBaseInnerDiameterL -text "Inner Diameter (Base):" \
+       ::ttk::label $parent.gunBaseInnerDiameterL -text "Inner Diameter 
(Base):" \
            -anchor e
     } {}
     itk_component add gunBaseInnerDiameterE {
-       ::entry $parent.gunBaseInnerDiameterE -textvariable [::itcl::scope 
gunBaseInnerDiameter]
+       ::ttk::entry $parent.gunBaseInnerDiameterE -textvariable [::itcl::scope 
gunBaseInnerDiameter]
     } {}
 
     itk_component add gunEndInnerDiameterL {
-       ::label $parent.gunEndInnerDiameterL -text "Inner Diameter (End):" \
+       ::ttk::label $parent.gunEndInnerDiameterL -text "Inner Diameter (End):" 
\
            -anchor e
     } {}
     itk_component add gunEndInnerDiameterE {
-       ::entry $parent.gunEndInnerDiameterE -textvariable [::itcl::scope 
gunEndInnerDiameter]
+       ::ttk::entry $parent.gunEndInnerDiameterE -textvariable [::itcl::scope 
gunEndInnerDiameter]
     } {}
 
     itk_component add gunBaseOuterDiameterL {
-       ::label $parent.gunBaseOuterDiameterL -text "Outer Diameter (Base):" \
+       ::ttk::label $parent.gunBaseOuterDiameterL -text "Outer Diameter 
(Base):" \
            -anchor e
     } {}
     itk_component add gunBaseOuterDiameterE {
-       ::entry $parent.gunBaseOuterDiameterE -textvariable [::itcl::scope 
gunBaseOuterDiameter]
+       ::ttk::entry $parent.gunBaseOuterDiameterE -textvariable [::itcl::scope 
gunBaseOuterDiameter]
     } {}
 
     itk_component add gunEndOuterDiameterL {
-       ::label $parent.gunEndOuterDiameterL -text "Outer Diameter (End):" \
+       ::ttk::label $parent.gunEndOuterDiameterL -text "Outer Diameter (End):" 
\
            -anchor e
     } {}
     itk_component add gunEndOuterDiameterE {
-       ::entry $parent.gunEndOuterDiameterE -textvariable [::itcl::scope 
gunEndOuterDiameter]
+       ::ttk::entry $parent.gunEndOuterDiameterE -textvariable [::itcl::scope 
gunEndOuterDiameter]
     } {}
 
     itk_component add gunElevationL {
-       ::label $parent.gunElevationL -text "Elevation (DEG):" \
+       ::ttk::label $parent.gunElevationL -text "Elevation (DEG):" \
            -anchor e
     } {}
     itk_component add gunElevationE {
-       ::entry $parent.gunElevationE -textvariable [::itcl::scope gunElevation]
+       ::ttk::entry $parent.gunElevationE -textvariable [::itcl::scope 
gunElevation]
     } {}
 
     # pack widgets
@@ -784,27 +787,27 @@
 
 ::itcl::body TankWizard::buildHullView {parent} {
     itk_component add hullLengthL {
-       ::label $parent.lengthL -text "Length:" \
+       ::ttk::label $parent.lengthL -text "Length:" \
            -anchor e
     } {}
     itk_component add hullLengthE {
-       ::entry $parent.lengthE -textvariable [::itcl::scope hullLength]
+       ::ttk::entry $parent.lengthE -textvariable [::itcl::scope hullLength]
     } {}
 
     itk_component add hullWidthL {
-       ::label $parent.widthL -text "Width:" \
+       ::ttk::label $parent.widthL -text "Width:" \
            -anchor e
     } {}
     itk_component add hullWidthE {
-       ::entry $parent.widthE -textvariable [::itcl::scope hullWidth]
+       ::ttk::entry $parent.widthE -textvariable [::itcl::scope hullWidth]
     } {}
 
     itk_component add hullHeightL {
-       ::label $parent.heightL -text "Height:" \
+       ::ttk::label $parent.heightL -text "Height:" \
            -anchor e
     } {}
     itk_component add hullHeightE {
-       ::entry $parent.heightE -textvariable [::itcl::scope hullHeight]
+       ::ttk::entry $parent.heightE -textvariable [::itcl::scope hullHeight]
     } {}
 
     buildArrow $parent wheelWell "Wheel Well Cutout" buildWheelWellView
@@ -830,19 +833,19 @@
 
 ::itcl::body TankWizard::buildWheelWellView {parent} {
     itk_component add wwDepthL {
-       ::label $parent.depthL -text "Depth:" \
+       ::ttk::label $parent.depthL -text "Depth:" \
            -anchor e
     } {}
     itk_component add wwDepthE {
-       ::entry $parent.depthE -textvariable [::itcl::scope wwDepth]
+       ::ttk::entry $parent.depthE -textvariable [::itcl::scope wwDepth]
     } {}
 
     itk_component add wwHeightL {
-       ::label $parent.heightL -text "Height:" \
+       ::ttk::label $parent.heightL -text "Height:" \
            -anchor e
     } {}
     itk_component add wwHeightE {
-       ::entry $parent.heightE -textvariable [::itcl::scope wwHeight]
+       ::ttk::entry $parent.heightE -textvariable [::itcl::scope wwHeight]
     } {}
 
     # pack widgets
@@ -858,27 +861,27 @@
 
 ::itcl::body TankWizard::buildFrontSlopeView {parent} {
     itk_component add convHeightL {
-       ::label $parent.convHeightL -text "Convergance Height:" \
+       ::ttk::label $parent.convHeightL -text "Convergance Height:" \
            -anchor e
     } {}
     itk_component add convHeightE {
-       ::entry $parent.convHeightE -textvariable [::itcl::scope convHeight]
+       ::ttk::entry $parent.convHeightE -textvariable [::itcl::scope 
convHeight]
     } {}
 
     itk_component add upperOffsetL {
-       ::label $parent.upperOffsetL -text "Upper Offset:" \
+       ::ttk::label $parent.upperOffsetL -text "Upper Offset:" \
            -anchor e
     } {}
     itk_component add upperOffsetE {
-       ::entry $parent.upperOffsetE -textvariable [::itcl::scope upperOffset]
+       ::ttk::entry $parent.upperOffsetE -textvariable [::itcl::scope 
upperOffset]
     } {}
 
     itk_component add lowerOffsetL {
-       ::label $parent.lowerOffsetL -text "Lower Offset:" \
+       ::ttk::label $parent.lowerOffsetL -text "Lower Offset:" \
            -anchor e
     } {}
     itk_component add lowerOffsetE {
-       ::entry $parent.lowerOffsetE -textvariable [::itcl::scope lowerOffset]
+       ::ttk::entry $parent.lowerOffsetE -textvariable [::itcl::scope 
lowerOffset]
     } {}
 
     # pack widgets
@@ -897,67 +900,67 @@
 
 ::itcl::body TankWizard::buildTrackView {parent} {
     itk_component add trackWidthL {
-       ::label $parent.trackwidthL -text "Width:" \
+       ::ttk::label $parent.trackwidthL -text "Width:" \
            -anchor e
     } {}
     itk_component add trackWidthE {
-       ::entry $parent.trackWidthE -textvariable [::itcl::scope trackWidth]
+       ::ttk::entry $parent.trackWidthE -textvariable [::itcl::scope 
trackWidth]
     } {}
 
     itk_component add trackThicknessL {
-       ::label $parent.trackthicknessL -text "Thickness:" \
+       ::ttk::label $parent.trackthicknessL -text "Thickness:" \
            -anchor e
     } {}
     itk_component add trackThicknessE {
-       ::entry $parent.trackThicknessE -textvariable [::itcl::scope 
trackThickness]
+       ::ttk::entry $parent.trackThicknessE -textvariable [::itcl::scope 
trackThickness]
     } {}
 
     itk_component add trackClearanceL {
-       ::label $parent.trackclearanceL -text "Clearance:" \
+       ::ttk::label $parent.trackclearanceL -text "Clearance:" \
            -anchor e
     } {}
     itk_component add trackClearanceE {
-       ::entry $parent.trackClearanceE -textvariable [::itcl::scope 
trackClearance]
+       ::ttk::entry $parent.trackClearanceE -textvariable [::itcl::scope 
trackClearance]
     } {}
 
     itk_component add numRoadWheelsL {
-       ::label $parent.numRoadWheelsL -text "Number of Road Wheels:" \
+       ::ttk::label $parent.numRoadWheelsL -text "Number of Road Wheels:" \
            -anchor e
     } {}
     itk_component add numRoadWheelsE {
-       ::entry $parent.numRoadWheelsE -textvariable [::itcl::scope 
numRoadWheels]
+       ::ttk::entry $parent.numRoadWheelsE -textvariable [::itcl::scope 
numRoadWheels]
     } {}
 
     itk_component add roadWheelDiameterL {
-       ::label $parent.roadWheelDiameterL -text "Road Wheel Diameter:" \
+       ::ttk::label $parent.roadWheelDiameterL -text "Road Wheel Diameter:" \
            -anchor e
     } {}
     itk_component add roadWheelDiameterE {
-       ::entry $parent.roadWheelDiameterE -textvariable [::itcl::scope 
roadWheelDiameter]
+       ::ttk::entry $parent.roadWheelDiameterE -textvariable [::itcl::scope 
roadWheelDiameter]
     } {}
 
     itk_component add numIdlerWheelsL {
-       ::label $parent.numIdlerWheelsL -text "Number of Idler Wheels:" \
+       ::ttk::label $parent.numIdlerWheelsL -text "Number of Idler Wheels:" \
            -anchor e
     } {}
     itk_component add numIdlerWheelsE {
-       ::entry $parent.numIdlerWheelsE -textvariable [::itcl::scope 
numIdlerWheels]
+       ::ttk::entry $parent.numIdlerWheelsE -textvariable [::itcl::scope 
numIdlerWheels]
     } {}
 
     itk_component add idlerWheelDiameterL {
-       ::label $parent.idlerWheelDiameterL -text "Idler Wheel Diameter:" \
+       ::ttk::label $parent.idlerWheelDiameterL -text "Idler Wheel Diameter:" \
            -anchor e
     } {}
     itk_component add idlerWheelDiameterE {
-       ::entry $parent.idlerWheelDiameterE -textvariable [::itcl::scope 
idlerWheelDiameter]
+       ::ttk::entry $parent.idlerWheelDiameterE -textvariable [::itcl::scope 
idlerWheelDiameter]
     } {}
 
     itk_component add sprocketDiameterL {
-       ::label $parent.sprocketDiameterL -text "Drive Sprocket Diameter:" \
+       ::ttk::label $parent.sprocketDiameterL -text "Drive Sprocket Diameter:" 
\
            -anchor e
     } {}
     itk_component add sprocketDiameterE {
-       ::entry $parent.sprocketDiameterE -textvariable [::itcl::scope 
sprocketDiameter]
+       ::ttk::entry $parent.sprocketDiameterE -textvariable [::itcl::scope 
sprocketDiameter]
     } {}
 
     # pack widgets
@@ -991,59 +994,59 @@
 
 ::itcl::body TankWizard::buildTurretView {parent} {
     itk_component add turretLengthL {
-       ::label $parent.turretLengthL -text "Length:" \
+       ::ttk::label $parent.turretLengthL -text "Length:" \
            -anchor e
     } {}
     itk_component add turretLengthE {
-       ::entry $parent.turretLengthE -textvariable [::itcl::scope turretLength]
+       ::ttk::entry $parent.turretLengthE -textvariable [::itcl::scope 
turretLength]
     } {}
 
     itk_component add turretWidthL {
-       ::label $parent.turretwidthL -text "Width:" \
+       ::ttk::label $parent.turretwidthL -text "Width:" \
            -anchor e
     } {}
     itk_component add turretWidthE {
-       ::entry $parent.turretWidthE -textvariable [::itcl::scope turretWidth]
+       ::ttk::entry $parent.turretWidthE -textvariable [::itcl::scope 
turretWidth]
     } {}
 
     itk_component add turretHeightL {
-       ::label $parent.turretheightL -text "Height:" \
+       ::ttk::label $parent.turretheightL -text "Height:" \
            -anchor e
     } {}
     itk_component add turretHeightE {
-       ::entry $parent.turretHeightE -textvariable [::itcl::scope turretHeight]
+       ::ttk::entry $parent.turretHeightE -textvariable [::itcl::scope 
turretHeight]
     } {}
 
     itk_component add turretOffsetL {
-       ::label $parent.turretOffsetL -text "Offset:" \
+       ::ttk::label $parent.turretOffsetL -text "Offset:" \
            -anchor e
     } {}
     itk_component add turretOffsetE {
-       ::entry $parent.turretOffsetE -textvariable [::itcl::scope turretOffset]
+       ::ttk::entry $parent.turretOffsetE -textvariable [::itcl::scope 
turretOffset]
     } {}
 
     itk_component add turretFrontOffsetL {
-       ::label $parent.turretFrontOffsetL -text "Front Offset:" \
+       ::ttk::label $parent.turretFrontOffsetL -text "Front Offset:" \
            -anchor e
     } {}
     itk_component add turretFrontOffsetE {
-       ::entry $parent.turretFrontOffsetE -textvariable [::itcl::scope 
turretFrontOffset]
+       ::ttk::entry $parent.turretFrontOffsetE -textvariable [::itcl::scope 
turretFrontOffset]
     } {}
 
     itk_component add turretRearOffsetL {
-       ::label $parent.turretRearOffsetL -text "Rear Offset:" \
+       ::ttk::label $parent.turretRearOffsetL -text "Rear Offset:" \
            -anchor e
     } {}
     itk_component add turretRearOffsetE {
-       ::entry $parent.turretRearOffsetE -textvariable [::itcl::scope 
turretRearOffset]
+       ::ttk::entry $parent.turretRearOffsetE -textvariable [::itcl::scope 
turretRearOffset]
     } {}
 
     itk_component add turretSideOffsetL {
-       ::label $parent.turretSideOffsetL -text "SideOffset:" \
+       ::ttk::label $parent.turretSideOffsetL -text "SideOffset:" \
            -anchor e
     } {}
     itk_component add turretSideOffsetE {
-       ::entry $parent.turretSideOffsetE -textvariable [::itcl::scope 
turretSideOffset]
+       ::ttk::entry $parent.turretSideOffsetE -textvariable [::itcl::scope 
turretSideOffset]
     } {}
 
     # pack widgets
@@ -1074,88 +1077,89 @@
 
 ::itcl::body TankWizard::buildArmorView {parent} {
     itk_component add frontArmorL {
-       ::label $parent.frontArmorL -text "Front:" \
+       ::ttk::label $parent.frontArmorL -text "Front:" \
            -anchor e
     } {}
     itk_component add frontArmorCB {
-       iwidgets::combobox $parent.frontArmorCB \
+       ::ttk::combobox $parent.frontArmorCB \
+           -state readonly \
            -textvariable [::itcl::scope frontArmorType] \
-           -selectioncommand [::itcl::code $this setFrontArmorThickness]
-    } {
-       usual
-    }
-    eval $itk_component(frontArmorCB) insert list end \
+           -values $weaponTypes
+    } {}
+    bind $itk_component(frontArmorCB) <<ComboboxSelected>> [::itcl::code $this 
setFrontArmorThickness]
+#    eval $itk_component(frontArmorCB) insert list end \
        $weaponTypes
 
     itk_component add sideArmorL {
-       ::label $parent.sideArmorL -text "Side:" \
+       ::ttk::label $parent.sideArmorL -text "Side:" \
            -anchor e
     } {}
     itk_component add sideArmorCB {
-       iwidgets::combobox $parent.sideArmorCB \
+       ::ttk::combobox $parent.sideArmorCB \
+           -state readonly \
            -textvariable [::itcl::scope sideArmorType] \
-           -selectioncommand [::itcl::code $this setSideArmorThickness]
-    } {
-       usual
-    }
-    eval $itk_component(sideArmorCB) insert list end \
+           -values $weaponTypes
+    } {}
+    bind $itk_component(sideArmorCB) <<ComboboxSelected>> [::itcl::code $this 
setSideArmorThickness]
+#    eval $itk_component(sideArmorCB) insert list end \
        $weaponTypes
 
     itk_component add sponsonArmorL {
-       ::label $parent.sponsonArmorL -text "Sponson:" \
+       ::ttk::label $parent.sponsonArmorL -text "Sponson:" \
            -anchor e
     } {}
     itk_component add sponsonArmorCB {
-       iwidgets::combobox $parent.sponsonsArmorCB \
+       ::ttk::combobox $parent.sponsonsArmorCB \
+           -state readonly \
            -textvariable [::itcl::scope sponsonArmorType] \
-           -selectioncommand [::itcl::code $this setSponsonArmorThickness]
-    } {
-       usual
-    }
-    eval $itk_component(sponsonArmorCB) insert list end \
+           -values $weaponTypes
+    } {}
+    bind $itk_component(sponsonArmorCB) <<ComboboxSelected>> [::itcl::code 
$this setSponsonArmorThickness]
+
+#    eval $itk_component(sponsonArmorCB) insert list end \
        $weaponTypes
 
     itk_component add rearArmorL {
-       ::label $parent.rearArmorL -text "Rear:" \
+       ::ttk::label $parent.rearArmorL -text "Rear:" \
            -anchor e
     } {}
     itk_component add rearArmorCB {
-       iwidgets::combobox $parent.rearArmorCB \
+       ::ttk::combobox $parent.rearArmorCB \
+           -state readonly \
            -textvariable [::itcl::scope rearArmorType] \
-           -selectioncommand [::itcl::code $this setRearArmorThickness]
-    } {
-       usual
-    }
-    eval $itk_component(rearArmorCB) insert list end \
+           -values $weaponTypes
+    } {}
+    bind $itk_component(rearArmorCB) <<ComboboxSelected>> [::itcl::code $this 
setRearArmorThickness]
+#    eval $itk_component(rearArmorCB) insert list end \
        $weaponTypes
 
     itk_component add roofArmorL {
-       ::label $parent.roofArmorL -text "Roof:" \
+       ::ttk::label $parent.roofArmorL -text "Roof:" \
            -anchor e
     } {}
     itk_component add roofArmorCB {
-       iwidgets::combobox $parent.roofArmorCB \
+       ::ttk::combobox $parent.roofArmorCB \
+           -state readonly \
            -textvariable [::itcl::scope roofArmorType] \
-           -selectioncommand [::itcl::code $this setRoofArmorThickness]
-    } {
-       usual
-    }
-    eval $itk_component(roofArmorCB) insert list end \
+           -values $weaponTypes
+    } {}
+    bind $itk_component(roofArmorCB) <<ComboboxSelected>> [::itcl::code $this 
setRoofArmorThickness]
+#    eval $itk_component(roofArmorCB) insert list end \
        $weaponTypes
 
     # make initial selections
-    $itk_component(frontArmorCB) selection set 0
-    $itk_component(rearArmorCB) selection set 0
-    $itk_component(roofArmorCB) selection set 0
-    $itk_component(sideArmorCB) selection set 0
-    $itk_component(sponsonArmorCB) selection set 0
+#    $itk_component(frontArmorCB) set "7.62mm"
+#    $itk_component(rearArmorCB) set "7.62mm"
+#    $itk_component(roofArmorCB) set "7.62mm"
+#    $itk_component(sideArmorCB) set "7.62mm"
+#    $itk_component(sponsonArmorCB) set "7.62mm"
 
     # turn off editing
-    $itk_component(frontArmorCB) configure -editable false
-    $itk_component(rearArmorCB) configure -editable false
-    $itk_component(roofArmorCB) configure -editable false
-    $itk_component(sideArmorCB) configure -editable false
-    $itk_component(sponsonArmorCB) configure -editable false
+#    $itk_component(frontArmorCB) configure -editable false
+#    $itk_component(rearArmorCB) configure -editable false
+#    $itk_component(roofArmorCB) configure -editable false
+#    $itk_component(sideArmorCB) configure -editable false
+#    $itk_component(sponsonArmorCB) configure -editable false
 
     # pack widgets
     set row 0
@@ -1190,20 +1194,6 @@
 }
 
 ::itcl::body TankWizard::changeClass {} {
-    set curr [$itk_component(classCB) curselection]
-
-    $itk_component(typeCB) clear
-    set types [lindex $vehicleTypes $curr]
-    eval $itk_component(typeCB) insert list end $types
-
-    # temporarily turn on editing
-    $itk_component(typeCB) configure -editable true
-
-    # initialize selections
-    $itk_component(typeCB) selection set 0
-
-    # turn off editing
-    $itk_component(typeCB) configure -editable false
 }
 
 ::itcl::body TankWizard::changeType {} {
@@ -1211,17 +1201,17 @@
 
 ::itcl::body TankWizard::buildArrow {parent prefix text buildViewFunc} {
     itk_component add $prefix {
-       frame $parent.$prefix
+       ::ttk::frame $parent.$prefix
     } {}
     itk_component add $prefix\Arrow {
        ::swidgets::togglearrow $itk_component($prefix).arrow
     } {}
     itk_component add $prefix\Label {
-       label $itk_component($prefix).label -text $text \
+       ::ttk::label $itk_component($prefix).label -text $text \
            -anchor w
     } {}
     itk_component add $prefix\View {
-       frame $itk_component($prefix).$prefix\View
+       ::ttk::frame $itk_component($prefix).$prefix\View
     } {}
     $buildViewFunc $itk_component($prefix\View)
     grid $itk_component($prefix\Arrow) -row 0 -column 0 -sticky e

Modified: brlcad/trunk/src/archer/plugins/Wizards/tirewizard/TireWizard.tcl
===================================================================
--- brlcad/trunk/src/archer/plugins/Wizards/tirewizard/TireWizard.tcl   
2009-04-14 05:03:48 UTC (rev 34216)
+++ brlcad/trunk/src/archer/plugins/Wizards/tirewizard/TireWizard.tcl   
2009-04-14 17:46:50 UTC (rev 34217)
@@ -63,10 +63,10 @@
        variable tireWidth 215
        variable tireAspect 70
        variable treadPattern 1
-       variable treadPatternString Small
+       variable treadPatternString Car
        variable treadPatternCount 30
        variable treadType 1
-       variable treadTypeString "Car"
+       variable treadTypeString Small
        variable treadDepth 8
        variable createWheel 1
 
@@ -76,8 +76,11 @@
 
        method addWizardAttrs {obj {onlyTop 1}}
 
-       method setTreadPattern {_pattern _string}
-       method setTreadType {_type _string}
+       method setTreadPattern {}
+       method setTreadType {}
+
+       method setTreadPatternString {}
+       method setTreadTypeString {}
     }
 
     private {
@@ -139,6 +142,9 @@
            set $vname $val
        }
     }
+
+    setTreadPatternString
+    setTreadTypeString
 }
 
 ::itcl::body TireWizard::buildParameter {parent} {
@@ -154,165 +160,138 @@
            -hscrollmode dynamic \
            -vscrollmode dynamic
     } {}
+    $itk_component(paramScroll) configure -background 
$ArcherCore::LABEL_BACKGROUND_COLOR
     set newParent [$itk_component(paramScroll) childsite]
 
     # Create frame for stuff not in a toggle arrow
     itk_component add paramNonArrowF {
-       ::frame $newParent.nonArrowF
+       ::ttk::frame $newParent.nonArrowF
     } {}
 
     # Create name entry field
     itk_component add paramNameL {
-       ::label $itk_component(paramNonArrowF).nameL \
+       ::ttk::label $itk_component(paramNonArrowF).nameL \
            -text "Name:" \
            -anchor e
     } {}
     itk_component add paramNameE {
-       ::entry $itk_component(paramNonArrowF).nameE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).nameE \
            -textvariable [::itcl::scope wizardTop]
     } {}
 
     # Create rim diameter entry field
     itk_component add paramRimDiameterL {
-       ::label $itk_component(paramNonArrowF).rimDiameterL \
+       ::ttk::label $itk_component(paramNonArrowF).rimDiameterL \
            -text "Rim Diameter (in):" \
            -anchor e
     } {}
     itk_component add paramRimDiameterE {
-       ::entry $itk_component(paramNonArrowF).rimDiameterE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).rimDiameterE \
            -textvariable [::itcl::scope rimDiameter]
     } {}
 
     # Create rim width entry field
     itk_component add paramRimWidthL {
-       ::label $itk_component(paramNonArrowF).rimWidthL \
+       ::ttk::label $itk_component(paramNonArrowF).rimWidthL \
            -text "Rim Width (in):" \
            -anchor e
     } {}
     itk_component add paramRimWidthE {
-       ::entry $itk_component(paramNonArrowF).rimWidthE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).rimWidthE \
            -textvariable [::itcl::scope rimWidth]
     } {}
 
     # Create tire aspect entry field
     itk_component add paramTireAspectL {
-       ::label $itk_component(paramNonArrowF).tireAspectL \
+       ::ttk::label $itk_component(paramNonArrowF).tireAspectL \
            -text "Tire Aspect (%):" \
            -anchor e
     } {}
     itk_component add paramTireAspectE {
-       ::entry $itk_component(paramNonArrowF).tireAspectE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).tireAspectE \
            -textvariable [::itcl::scope tireAspect]
     } {}
 
     # Create tire thickness entry field
     itk_component add paramTireThicknessL {
-       ::label $itk_component(paramNonArrowF).tireThicknessL \
+       ::ttk::label $itk_component(paramNonArrowF).tireThicknessL \
            -text "Tire Thickness (mm):" \
            -anchor e
     } {}
     itk_component add paramTireThicknessE {
-       ::entry $itk_component(paramNonArrowF).tireThicknessE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).tireThicknessE \
            -textvariable [::itcl::scope tireThickness]
     } {}
 
     # Create tire width entry field
     itk_component add paramTireWidthL {
-       ::label $itk_component(paramNonArrowF).tireWidthL \
+       ::ttk::label $itk_component(paramNonArrowF).tireWidthL \
            -text "Tire Width (mm):" \
            -anchor e
     } {}
     itk_component add paramTireWidthE {
-       ::entry $itk_component(paramNonArrowF).tireWidthE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).tireWidthE \
            -textvariable [::itcl::scope tireWidth]
     } {}
 
     # Create tread depth entry field
     itk_component add paramTreadDepthL {
-       ::label $itk_component(paramNonArrowF).treadDepthL \
+       ::ttk::label $itk_component(paramNonArrowF).treadDepthL \
            -text "Tread Depth (mm):" \
            -anchor e
     } {}
     itk_component add paramTreadDepthE {
-       ::entry $itk_component(paramNonArrowF).treadDepthE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).treadDepthE \
            -textvariable [::itcl::scope treadDepth]
     } {}
 
     # Create tread count entry field
     itk_component add paramTreadCountL {
-       ::label $itk_component(paramNonArrowF).treadCountL \
+       ::ttk::label $itk_component(paramNonArrowF).treadCountL \
            -text "Tread Count:" \
            -anchor e
     } {}
     itk_component add paramTreadCountE {
-       ::entry $itk_component(paramNonArrowF).treadCountE \
-           -borderwidth 1 \
+       ::ttk::entry $itk_component(paramNonArrowF).treadCountE \
            -textvariable [::itcl::scope treadPatternCount]
     } {}
 
     # Create tread pattern entry field
     itk_component add paramTreadPatternL {
-       ::label $itk_component(paramNonArrowF).treadPatternL \
+       ::ttk::label $itk_component(paramNonArrowF).treadPatternL \
            -text "Tread Pattern:" \
            -anchor e
     } {}
     itk_component add paramTreadPatternCB {
-       cadwidgets::ComboBox $itk_component(paramNonArrowF).treadPatternCB \
-           -entryvariable [::itcl::scope treadPatternString] \
-           -state disabled
+       ::ttk::combobox $itk_component(paramNonArrowF).treadPatternCB \
+           -textvariable [::itcl::scope treadPatternString] \
+           -state readonly \
+           -values {Car Truck}
     } {}
-    $itk_component(paramTreadPatternCB) add command \
-       -command "[::itcl::code $this setTreadPattern] 1 Small" \
-       -label Small
-    $itk_component(paramTreadPatternCB) add command \
-       -command "[::itcl::code $this setTreadPattern] 2 Large" \
-       -label Large
-    $itk_component(paramTreadPatternCB) entryConfigure -disabledforeground 
#000000
-    grid forget [$itk_component(paramTreadPatternCB) component label]
-    [$itk_component(paramTreadPatternCB) component entry] configure 
-borderwidth 1
-    [$itk_component(paramTreadPatternCB) component frame] configure 
-borderwidth 1
-    [$itk_component(paramTreadPatternCB) component menubutton] configure 
-borderwidth 1
 
     # Create tread type radiobox
     itk_component add paramTreadTypeL {
-       ::label $itk_component(paramNonArrowF).treadTypeL \
+       ::ttk::label $itk_component(paramNonArrowF).treadTypeL \
            -text "Tread Type:" \
            -anchor e
     } {}
     itk_component add paramTreadTypeCB {
-       cadwidgets::ComboBox $itk_component(paramNonArrowF).treadTypeCB \
-           -entryvariable [::itcl::scope treadTypeString] \
-           -state disabled
+       ::ttk::combobox $itk_component(paramNonArrowF).treadTypeCB \
+           -textvariable [::itcl::scope treadTypeString] \
+           -state readonly \
+           -values {Small Large}
     } {}
-    $itk_component(paramTreadTypeCB) add command \
-       -command "[::itcl::code $this setTreadType] 1 Car" \
-       -label Car
-    $itk_component(paramTreadTypeCB) add command \
-       -command "[::itcl::code $this setTreadType] 2 Truck" \
-       -label Truck
-    $itk_component(paramTreadTypeCB) entryConfigure -disabledforeground #000000
-    grid forget [$itk_component(paramTreadTypeCB) component label]
-    [$itk_component(paramTreadTypeCB) component entry] configure -borderwidth 1
-    [$itk_component(paramTreadTypeCB) component frame] configure -borderwidth 1
-    [$itk_component(paramTreadTypeCB) component menubutton] configure 
-borderwidth 1
 
     # Create empty label
     itk_component add emptyL {
-       ::label $itk_component(paramNonArrowF).emptyL \
+       ::ttk::label $itk_component(paramNonArrowF).emptyL \
            -text "" \
            -anchor e
     } {}
 
     # Create "Create Wheel" checkbutton
     itk_component add paramCreateWheelCB {
-       ::checkbutton $itk_component(paramNonArrowF).createWheelCB \
+       ::ttk::checkbutton $itk_component(paramNonArrowF).createWheelCB \
            -text "Create Wheel" \
            -variable [::itcl::scope createWheel]
     } {}
@@ -355,19 +334,9 @@
        -row $row -stick nsew
     grid columnconfigure $itk_component(paramNonArrowF) 1 -weight 1
 
-    itk_component add paramEmpty {
-       frame $newParent.paramEmpty
-    } {
-       usual
-    }
-
     set row 0
     grid $itk_component(paramNonArrowF) \
        -row $row -column 0 -sticky nsew
-    incr row
-    grid $itk_component(paramEmpty) \
-       -row $row -column 0 -sticky nsew
-    grid rowconfigure $newParent $row -weight 1
     grid columnconfigure $newParent 0 -weight 1
 
     grid $itk_component(paramScroll) -row 0 -column 0 -sticky nsew
@@ -391,16 +360,50 @@
     }
 }
 
-::itcl::body TireWizard::setTreadPattern {_pattern _string} {
-    set treadPattern $_pattern
-    set treadPatternString $_string
+::itcl::body TireWizard::setTreadPattern {} {
+    switch -- $treadPatternString {
+       Car {
+           set treadPattern 1
+       }
+       Truck {
+           set treadPattern 2
+       }
+    }
 }
 
-::itcl::body TireWizard::setTreadType {_type _string} {
-    set treadType $_type
-    set treadTypeString $_string
+::itcl::body TireWizard::setTreadType {} {
+    switch -- $treadTypeString {
+       Small {
+           set treadType 1
+       }
+       Large {
+           set treadType 2
+       }
+    }
 }
 
+::itcl::body TireWizard::setTreadPatternString {} {
+    switch -- $treadPattern {
+       1 {
+           set treadPatternString Car
+       }
+       2 {
+           set treadPatternString Truck
+       }
+    }
+}
+
+::itcl::body TireWizard::setTreadTypeString {} {
+    switch -- $treadType {
+       1 {
+           set treadTypeString Small
+       }
+       2 {
+           set treadTypeString Large
+       }
+    }
+}
+
 ::itcl::body TireWizard::drawTire {} {
     $archersGed configure -autoViewEnable 0
     $archersGed draw $wizardTop
@@ -411,6 +414,9 @@
 ::itcl::body TireWizard::buildTire {} {
     SetWaitCursor $archer
 
+    setTreadPattern
+    setTreadType
+
     $archer pluginUpdateStatusBar "Building Tire..."
     $archer pluginUpdateSaveMode 1
     $archer pluginUpdateProgressBar 0.2
@@ -431,7 +437,6 @@
             treadPatternCount $treadPatternCount \
             treadType $treadType \
             createWheel $createWheel]
-
     $archersGed tire \
        -s $maxSideWallRadius \
        -D $rimDiameter \


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to