Revision: 54381 http://brlcad.svn.sourceforge.net/brlcad/?rev=54381&view=rev Author: bob1961 Date: 2013-02-11 16:58:16 +0000 (Mon, 11 Feb 2013) Log Message: ----------- Constrain sphere attribute edits to set a, b and c the same in Archer.
Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/SphereEditFrame.tcl Modified: brlcad/trunk/src/tclscripts/archer/SphereEditFrame.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/SphereEditFrame.tcl 2013-02-11 16:09:44 UTC (rev 54380) +++ brlcad/trunk/src/tclscripts/archer/SphereEditFrame.tcl 2013-02-11 16:58:16 UTC (rev 54381) @@ -33,11 +33,16 @@ constructor {args} {} destructor {} - #Override's for EllEditFrame public { + #Override's for EllEditFrame method createGeometry {obj} + method p {_obj args} } + protected { + method buildLowerPanel {} + } + private {} } @@ -51,6 +56,7 @@ $itk_component(ellType) configure -text "Sphere:" } + ::itcl::body SphereEditFrame::createGeometry {obj} { if {![GeometryEditFrame::createGeometry $obj]} { return @@ -64,6 +70,42 @@ } +::itcl::body SphereEditFrame::p {_obj args} { + if {[llength $args] != 1 || ![string is double $args]} { + return "Usage: p sf" + } + + switch -- $mEditMode \ + $setABC { + $::ArcherCore::application p_pscale $_obj abc $args + } + + return "" +} + + +# ------------------------------------------------------------ +# PROTECTED METHODS +# ------------------------------------------------------------ + +::itcl::body SphereEditFrame::buildLowerPanel {} { + set parent [$this childsite lower] + set row 0 + foreach attribute {ABC} { + itk_component add set$attribute { + ::ttk::radiobutton $parent.set_$attribute \ + -variable [::itcl::scope mEditMode] \ + -value [subst $[subst set$attribute]] \ + -text "Set $attribute" \ + -command [::itcl::code $this initEditState] + } {} + + grid $itk_component(set$attribute) -row $row -column 0 -sticky nsew + incr row + } +} + + # Local Variables: # mode: Tcl # tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits