[brlcad-commits] SF.net SVN: brlcad:[34081] brlcad/trunk/src
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <bo...@us...> - 2009-03-26 13:45:01
|
Revision: 34081 http://brlcad.svn.sourceforge.net/brlcad/?rev=34081&view=rev Author: bob1961 Date: 2009-03-26 13:44:39 +0000 (Thu, 26 Mar 2009) Log Message: ----------- Modify bwish and archer to NOT use BLT. Modified Paths: -------------- brlcad/trunk/src/archer/archer brlcad/trunk/src/bwish/Makefile.am brlcad/trunk/src/bwish/cadAppInit.c brlcad/trunk/src/bwish/main.c brlcad/trunk/src/tclscripts/archer/Archer.tcl brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl brlcad/trunk/src/tclscripts/archer/bgerror.tcl brlcad/trunk/src/tclscripts/archer/cursor.tcl Modified: brlcad/trunk/src/archer/archer =================================================================== --- brlcad/trunk/src/archer/archer 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/archer/archer 2009-03-26 13:44:39 UTC (rev 34081) @@ -77,16 +77,6 @@ # } #} -# stupid blt needs blt_library to be set (must be done AFTER loading BLT...) -set blt_library [file normalize [file join [bu_brlcad_root "lib"] blt2.4]] -if {![file exists $blt_library]} { - set blt_library [file normalize [file join [bu_brlcad_data "src"] other blt library]] -} -if {![file exists $blt_library]} { - puts "ERROR: Unable to initialize Archer resources" - exit 1 -} - # load archer guts if { [catch {package require Archer 1.0} _initialized] } { puts "$_initialized" Modified: brlcad/trunk/src/bwish/Makefile.am =================================================================== --- brlcad/trunk/src/bwish/Makefile.am 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/bwish/Makefile.am 2009-03-26 13:44:39 UTC (rev 34081) @@ -29,7 +29,6 @@ blib_LIBS = \ ${TCLCAD} \ ${DM} \ - ${BLT} \ ${ITK} \ ${ITCL} \ ${TK} \ Modified: brlcad/trunk/src/bwish/cadAppInit.c =================================================================== --- brlcad/trunk/src/bwish/cadAppInit.c 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/bwish/cadAppInit.c 2009-03-26 13:44:39 UTC (rev 34081) @@ -37,7 +37,6 @@ # include "itk.h" # include "dm.h" # include "fb.h" -# include "blt.h" #endif #include "bu.h" @@ -71,12 +70,6 @@ bu_log("Itk_Init ERROR:\n%s\n", Tcl_GetStringResult(interp)); return TCL_ERROR; } - -/* Initialize BLT */ - if (Blt_Init(interp) == TCL_ERROR) { - bu_log("Blt_Init ERROR:\n%s\n", Tcl_GetStringResult(interp)); - return TCL_ERROR; - } #endif #ifdef IMPORT_ITCL Modified: brlcad/trunk/src/bwish/main.c =================================================================== --- brlcad/trunk/src/bwish/main.c 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/bwish/main.c 2009-03-26 13:44:39 UTC (rev 34081) @@ -72,7 +72,6 @@ int init_tk = 1; int init_itcl = 1; int init_itk = 1; - int init_blt = 1; /* a two-pass init loop. the first pass just tries default init * routines while the second calls tclcad_auto_path() to help it @@ -149,19 +148,6 @@ } Tcl_StaticPackage(interp, "Itk", Itk_Init, (Tcl_PackageInitProc *) NULL); init_itk=0; - - /* Initialize BLT */ - Tcl_ResetResult(interp); - if (init_blt && Blt_Init(interp) == TCL_ERROR) { - if (!try_auto_path) { - try_auto_path=1; - continue; - } - bu_log("Blt_Init ERROR:\n%s\n", Tcl_GetStringResult(interp)); - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "BLT", Blt_Init, (Tcl_PackageInitProc *) NULL); - init_blt=0; #endif /* don't actually want to loop forever */ Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2009-03-26 13:44:39 UTC (rev 34081) @@ -843,9 +843,9 @@ wm geometry $dialog 400x400 # Event bindings - bind $dialog <Enter> "raise $dialog" - bind $dialog <Configure> "raise $dialog" - bind $dialog <FocusOut> "raise $dialog" +# bind $dialog <Enter> "raise $dialog" +# bind $dialog <Configure> "raise $dialog" +# bind $dialog <FocusOut> "raise $dialog" $dialog center $w $dialog activate @@ -961,7 +961,7 @@ } if {[info exists itk_component(ged)]} { - SetWaitCursor + SetWaitCursor $this set savedUnits [$itk_component(ged) units -s] $itk_component(ged) units in $itk_component(ged) configure -autoViewEnable 0 @@ -1097,7 +1097,7 @@ $itk_component(ged) attachObservers $itk_component(ged) refreshAll $itk_component(ged) configure -autoViewEnable 1 - SetNormalCursor + SetNormalCursor $this } } @@ -1126,6 +1126,7 @@ } ::itcl::body Archer::Load {_target} { + SetWaitCursor $this if {$mNeedSave} { $itk_component(saveDialog) center [namespace tail $this] if {[$itk_component(saveDialog) activate]} { @@ -1208,9 +1209,7 @@ showGroundPlane # refresh tree contents - SetWaitCursor refreshTree 0 - SetNormalCursor } else { applyPreferences doLighting @@ -1220,6 +1219,7 @@ set mDefaultBindingMode $ROTATE_MODE beginViewRotate } + SetNormalCursor $this } ::itcl::body Archer::updateTheme {} { @@ -1688,7 +1688,7 @@ ################################### Miscellaneous Section ################################### ::itcl::body Archer::archerWrapper {cmd eflag hflag sflag tflag args} { - SetWaitCursor + SetWaitCursor $this if {$eflag} { set optionsAndArgs [eval dbExpand $args] @@ -1714,7 +1714,7 @@ } if {[catch {eval gedCmd $cmd $options $expandedArgs} ret]} { - SetNormalCursor + SetNormalCursor $this return $ret } @@ -1727,7 +1727,7 @@ if {$tflag} { catch {refreshTree} } - SetNormalCursor + SetNormalCursor $this return $ret } @@ -1760,75 +1760,22 @@ set parent [$itk_component(aboutDialog) childsite] itk_component add aboutDialogTabs { - blt::tabnotebook $parent.tabs \ - -side bottom \ - -relief flat \ - -tiers 99 \ - -tearoff 0 \ - -gap 3 \ - -width 0 \ - -height 0 \ - -outerpad 0 \ - -highlightthickness 1 \ - -selectforeground black + ttk::notebook $parent.tabs } {} - $itk_component(aboutDialogTabs) configure \ - -highlightcolor [$itk_component(aboutDialogTabs) cget -background] \ - -borderwidth 0 \ - -font $mFontText - $itk_component(aboutDialogTabs) insert end -text "About" -stipple gray25 - $itk_component(aboutDialogTabs) insert end -text "License" -stipple gray25 - $itk_component(aboutDialogTabs) insert end -text "Acknowledgements" -stipple gray25 - # About Info - # set aboutImg [image create photo -file [file join $env(ARCHER_HOME) $brlcadDataPath tclscripts archer images aboutArcher.png]] set aboutImg [image create photo -file [file join $brlcadDataPath tclscripts archer images aboutArcher.png]] itk_component add aboutInfo { ::label $itk_component(aboutDialogTabs).aboutInfo \ -image $aboutImg } {} - set aboutTabIndex 0 - $itk_component(aboutDialogTabs) tab configure $aboutTabIndex \ - -window $itk_component(aboutInfo) \ - -fill both - - - # License Info - itk_component add licenseDialogTabs { - blt::tabnotebook $itk_component(aboutDialogTabs).tabs \ - -side top \ - -relief flat \ - -tiers 99 \ - -tearoff 0 \ - -gap 3 \ - -width 0 \ - -height 0 \ - -outerpad 0 \ - -highlightthickness 1 \ - -selectforeground black - } {} - $itk_component(licenseDialogTabs) configure \ - -highlightcolor [$itk_component(licenseDialogTabs) cget -background] \ - -borderwidth 0 \ - -font $mFontText - $itk_component(licenseDialogTabs) insert end -text "BRL-CAD" -stipple gray25 - - incr aboutTabIndex - $itk_component(aboutDialogTabs) tab configure $aboutTabIndex \ - -window $itk_component(licenseDialogTabs) \ - -fill both - - set licenseTabIndex -1 - # BRL-CAD License Info - # set fd [open [file join $env(ARCHER_HOME) $brlcadDataPath COPYING] r] set fd [open [file join $brlcadDataPath COPYING] r] set mBrlcadLicenseInfo [read $fd] close $fd itk_component add brlcadLicenseInfo { - ::iwidgets::scrolledtext $itk_component(licenseDialogTabs).brlcadLicenseInfo \ + ::iwidgets::scrolledtext $itk_component(aboutDialogTabs).brlcadLicenseInfo \ -wrap word \ -hscrollmode dynamic \ -vscrollmode dynamic \ @@ -1839,12 +1786,6 @@ $itk_component(brlcadLicenseInfo) insert 0.0 $mBrlcadLicenseInfo $itk_component(brlcadLicenseInfo) configure -state disabled - incr licenseTabIndex - $itk_component(licenseDialogTabs) tab configure $licenseTabIndex \ - -window $itk_component(brlcadLicenseInfo) \ - -fill both - - # Acknowledgement Info # set fd [open [file join $env(ARCHER_HOME) $brlcadDataPath doc archer_ack.txt] r] set fd [open [file join $brlcadDataPath doc archer_ack.txt] r] @@ -1862,10 +1803,9 @@ $itk_component(ackInfo) insert 0.0 $mAckInfo $itk_component(ackInfo) configure -state disabled - incr aboutTabIndex - $itk_component(aboutDialogTabs) tab configure $aboutTabIndex \ - -window $itk_component(ackInfo) \ - -fill both + $itk_component(aboutDialogTabs) add $itk_component(aboutInfo) -text "About" + $itk_component(aboutDialogTabs) add $itk_component(brlcadLicenseInfo) -text "License" + $itk_component(aboutDialogTabs) add $itk_component(ackInfo) -text "Acknowledgements" # Version Info itk_component add versionInfo { @@ -2024,6 +1964,8 @@ grid rowconfigure $oglParent 0 -weight 1 grid columnconfigure $oglParent 0 -weight 1 + + $itk_component(preferenceTabs) add $itk_component(displayLF) -text "Display" } @@ -2417,31 +2359,33 @@ grid rowconfigure $parent 0 -weight 1 grid columnconfigure $parent 0 -weight 1 + + $itk_component(preferenceTabs) add $itk_component(generalLF) -text "General" } ::itcl::body Archer::buildGroundPlanePreferences {} { - itk_component add groundPlaneF { - ::iwidgets::Labeledframe $itk_component(preferenceTabs).groundPlaneF \ + itk_component add groundPlaneLF { + ::iwidgets::Labeledframe $itk_component(preferenceTabs).groundPlaneLF \ -labeltext "Ground Plane Settings" \ -labelpos nw \ -borderwidth 2 \ -relief groove } - set parent [$itk_component(groundPlaneF) childsite] - itk_component add groundPlaneF2 { + set parent [$itk_component(groundPlaneLF) childsite] + itk_component add groundPlaneF { ::frame $parent.groundPlaneF } {} itk_component add groundPlaneSizeL { - ::label $itk_component(groundPlaneF2).sizeL \ + ::label $itk_component(groundPlaneF).sizeL \ -anchor e \ -text "Square Size:" } {} set hbc [$itk_component(groundPlaneSizeL) cget -background] itk_component add groundPlaneSizeE { - ::entry $itk_component(groundPlaneF2).sizeE \ + ::entry $itk_component(groundPlaneF).sizeE \ -width 12 \ -background $SystemWindow \ -highlightbackground $hbc \ @@ -2450,19 +2394,19 @@ -vcmd [::itcl::code $this validateDouble %P] } {} itk_component add groundPlaneSizeUnitsL { - ::label $itk_component(groundPlaneF2).sizeUnitsL \ + ::label $itk_component(groundPlaneF).sizeUnitsL \ -anchor e \ -text "mm" } {} itk_component add groundPlaneIntervalL { - ::label $itk_component(groundPlaneF2).intervalL \ + ::label $itk_component(groundPlaneF).intervalL \ -anchor e \ -text "Line Interval:" } {} set hbc [$itk_component(groundPlaneIntervalL) cget -background] itk_component add groundPlaneIntervalE { - ::entry $itk_component(groundPlaneF2).intervalE \ + ::entry $itk_component(groundPlaneF).intervalE \ -width 12 \ -background $SystemWindow \ -highlightbackground $hbc \ @@ -2471,19 +2415,19 @@ -vcmd [::itcl::code $this validateDouble %P] } {} itk_component add groundPlaneIntervalUnitsL { - ::label $itk_component(groundPlaneF2).intervalUnitsL \ + ::label $itk_component(groundPlaneF).intervalUnitsL \ -anchor e \ -text "mm" } {} - buildComboBox $itk_component(groundPlaneF2) \ + buildComboBox $itk_component(groundPlaneF) \ groundPlaneMajorColor \ majorColor \ mGroundPlaneMajorColorPref \ "Major Color:" \ $mColorListNoTriple - buildComboBox $itk_component(groundPlaneF2) \ + buildComboBox $itk_component(groundPlaneF) \ groundPlaneMinorColor \ minorColor \ mGroundPlaneMinorColorPref \ @@ -2506,10 +2450,12 @@ grid $itk_component(groundPlaneMinorColorF) -column 1 -row $i -sticky ew set i 0 - grid $itk_component(groundPlaneF2) -column 0 -row $i -sticky nw + grid $itk_component(groundPlaneF) -column 0 -row $i -sticky nw grid rowconfigure $parent 0 -weight 1 grid columnconfigure $parent 0 -weight 1 + + $itk_component(preferenceTabs) add $itk_component(groundPlaneLF) -text "Ground Plane" } @@ -2599,20 +2545,20 @@ ::itcl::body Archer::buildModelAxesPreferences {} { - itk_component add modelAxesF { - ::iwidgets::Labeledframe $itk_component(preferenceTabs).modelAxesF \ + itk_component add modelAxesLF { + ::iwidgets::Labeledframe $itk_component(preferenceTabs).modelAxesLF \ -labeltext "Model Axes Settings" \ -labelpos nw \ -borderwidth 2 \ -relief groove } - set parent [$itk_component(modelAxesF) childsite] - itk_component add modelAxesF2 { + set parent [$itk_component(modelAxesLF) childsite] + itk_component add modelAxesF { ::frame $parent.modelAxesF } {} - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesSize \ size \ mModelAxesSizePref \ @@ -2621,30 +2567,30 @@ "View (1x)" "View (2x)" "View (4x)" "View (8x)"} # itk_component add modelAxesPositionL { - # ::label $itk_component(modelAxesF2).positionL \ + # ::label $itk_component(modelAxesF).positionL \ # -text "Position:" # } # itk_component add modelAxesPositionF { - # ::frame $itk_component(modelAxesF2).positionF + # ::frame $itk_component(modelAxesF).positionF # } {} # _build_model_axes_position $itk_component(modelAxesPositionF) - buildModelAxesPosition $itk_component(modelAxesF2) + buildModelAxesPosition $itk_component(modelAxesF) - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesLineWidth \ lineWidth \ mModelAxesLineWidthPref \ "Line Width:" \ {1 2 3} - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesColor \ color \ mModelAxesColorPref \ "Axes Color:" \ $mColorList - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesLabelColor \ labelColor \ mModelAxesLabelColorPref \ @@ -2652,12 +2598,12 @@ $mColorListNoTriple itk_component add modelAxesTickIntervalL { - ::label $itk_component(modelAxesF2).tickIntervalL \ + ::label $itk_component(modelAxesF).tickIntervalL \ -text "Tick Interval:" } {} set hbc [$itk_component(modelAxesTickIntervalL) cget -background] itk_component add modelAxesTickIntervalE { - ::entry $itk_component(modelAxesF2).tickIntervalE \ + ::entry $itk_component(modelAxesF).tickIntervalE \ -textvariable [::itcl::scope mModelAxesTickIntervalPref] \ -validate key \ -validatecommand [::itcl::code $this validateTickInterval %P] \ @@ -2665,42 +2611,42 @@ -highlightbackground $hbc } {} - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesTicksPerMajor \ ticksPerMajor \ mModelAxesTicksPerMajorPref \ "Ticks Per Major:" \ {2 3 4 5 6 8 10 12} - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesTickThreshold \ tickThreshold \ mModelAxesTickThresholdPref \ "Tick Threshold:" \ {4 8 16 32 64} - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesTickLength \ tickLength \ mModelAxesTickLengthPref \ "Tick Length:" \ {2 4 8 16} - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesTickMajorLength \ tickMajorLength \ mModelAxesTickMajorLengthPref \ "Major Tick Length:" \ {2 4 8 16} - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesTickColor \ tickColor \ mModelAxesTickColorPref \ "Tick Color:" \ $mColorListNoTriple - buildComboBox $itk_component(modelAxesF2) \ + buildComboBox $itk_component(modelAxesF) \ modelAxesTickMajorColor \ tickMajorColor \ mModelAxesTickMajorColorPref \ @@ -2754,10 +2700,12 @@ grid $itk_component(modelAxesTickMajorColorF) -column 1 -row $i -sticky ew set i 0 - grid $itk_component(modelAxesF2) -column 0 -row $i -sticky nw + grid $itk_component(modelAxesF) -column 0 -row $i -sticky nw grid rowconfigure $parent 0 -weight 1 grid columnconfigure $parent 0 -weight 1 + + $itk_component(preferenceTabs) add $itk_component(modelAxesLF) -text "Model Axes" } @@ -2907,47 +2855,14 @@ set parent [$itk_component(preferencesDialog) childsite] itk_component add preferenceTabs { - blt::tabnotebook $parent.tabs \ - -side left \ - -relief flat \ - -tiers 99 \ - -tearoff 0 \ - -gap 3 \ - -width 0 \ - -height 0 \ - -selectforeground black + ttk::notebook $parent.tabs } {} - $itk_component(preferenceTabs) insert end -text "General" -stipple gray25 - $itk_component(preferenceTabs) insert end -text "Model Axes" -stipple gray25 - $itk_component(preferenceTabs) insert end -text "View Axes" -stipple gray25 - $itk_component(preferenceTabs) insert end -text "Ground Plane" -stipple gray25 - $itk_component(preferenceTabs) insert end -text "Display" -stipple gray25 - - set i 0 buildGeneralPreferences - $itk_component(preferenceTabs) tab configure $i \ - -window $itk_component(generalLF) -fill both - - incr i buildModelAxesPreferences - $itk_component(preferenceTabs) tab configure $i \ - -window $itk_component(modelAxesF) -fill both - - incr i buildViewAxesPreferences - $itk_component(preferenceTabs) tab configure $i \ - -window $itk_component(viewAxesF) -fill both - - incr i buildGroundPlanePreferences - $itk_component(preferenceTabs) tab configure $i \ - -window $itk_component(groundPlaneF) -fill both - - incr i buildDisplayPreferences - $itk_component(preferenceTabs) tab configure $i \ - -window $itk_component(displayLF) -fill both pack $itk_component(preferenceTabs) -expand yes -fill both @@ -3239,48 +3154,48 @@ ::itcl::body Archer::buildViewAxesPreferences {} { - itk_component add viewAxesF { - ::iwidgets::Labeledframe $itk_component(preferenceTabs).viewAxesF \ + itk_component add viewAxesLF { + ::iwidgets::Labeledframe $itk_component(preferenceTabs).viewAxesLF \ -labeltext "View Axes Settings" \ -labelpos nw \ -borderwidth 2 \ -relief groove } - set parent [$itk_component(viewAxesF) childsite] - itk_component add viewAxesF2 { + set parent [$itk_component(viewAxesLF) childsite] + itk_component add viewAxesF { ::frame $parent.viewAxesF } {} - buildComboBox $itk_component(viewAxesF2) \ + buildComboBox $itk_component(viewAxesF) \ viewAxesSize \ size \ mViewAxesSizePref \ "Size:" \ {Small Medium Large X-Large} - buildComboBox $itk_component(viewAxesF2) \ + buildComboBox $itk_component(viewAxesF) \ viewAxesPosition \ position \ mViewAxesPositionPref \ "Position:" \ {Center "Upper Left" "Upper Right" "Lower Left" "Lower Right"} - buildComboBox $itk_component(viewAxesF2) \ + buildComboBox $itk_component(viewAxesF) \ viewAxesLineWidth \ lineWidth \ mViewAxesLineWidthPref \ "Line Width:" \ {1 2 3} - buildComboBox $itk_component(viewAxesF2) \ + buildComboBox $itk_component(viewAxesF) \ viewAxesColor \ color \ mViewAxesColorPref \ "Axes Color:" \ $mColorList - buildComboBox $itk_component(viewAxesF2) \ + buildComboBox $itk_component(viewAxesF) \ viewAxesLabelColor \ labelColor \ mViewAxesLabelColorPref \ @@ -3304,17 +3219,19 @@ grid $itk_component(viewAxesLabelColorF) -column 1 -row $i -sticky ew set i 0 - grid $itk_component(viewAxesF2) -column 0 -row $i -sticky nw + grid $itk_component(viewAxesF) -column 0 -row $i -sticky nw grid rowconfigure $parent 0 -weight 1 grid columnconfigure $parent 0 -weight 1 + + $itk_component(preferenceTabs) add $itk_component(viewAxesLF) -text "View Axes" } ::itcl::body Archer::doAboutArcher {} { - bind $itk_component(aboutDialog) <Enter> "raise $itk_component(aboutDialog)" - bind $itk_component(aboutDialog) <Configure> "raise $itk_component(aboutDialog)" - bind $itk_component(aboutDialog) <FocusOut> "raise $itk_component(aboutDialog)" +# bind $itk_component(aboutDialog) <Enter> "raise $itk_component(aboutDialog)" +# bind $itk_component(aboutDialog) <Configure> "raise $itk_component(aboutDialog)" +# bind $itk_component(aboutDialog) <FocusOut> "raise $itk_component(aboutDialog)" $itk_component(aboutDialog) center [namespace tail $this] $itk_component(aboutDialog) activate @@ -6012,9 +5929,9 @@ # wm geometry $dialog "500x500" # Event bindings - bind $dialog <Enter> "raise $dialog" - bind $dialog <Configure> "raise $dialog" - bind $dialog <FocusOut> "raise $dialog" +# bind $dialog <Enter> "raise $dialog" +# bind $dialog <Configure> "raise $dialog" +# bind $dialog <FocusOut> "raise $dialog" $dialog center $w $dialog activate Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2009-03-26 13:44:39 UTC (rev 34081) @@ -40,6 +40,7 @@ if {![info exists parentClass]} { set parentClass itk::Toplevel set inheritFromToplevel 1 + set cursorWaitCount 0 # if {$tcl_platform(platform) == "windows"} { # set parentClass itk::Toplevel @@ -635,23 +636,8 @@ set parent [$itk_component(hpane) childsite bottomView] itk_component add advancedTabs { - blt::tabnotebook $parent.tabs \ - -relief flat \ - -tiers 99 \ - -tearoff 1 \ - -gap 3 \ - -width 0 \ - -height 0 \ - -outerpad 0 \ - -highlightthickness 1 \ - -selectforeground black + ttk::notebook $parent.tabs } {} - $itk_component(advancedTabs) configure \ - -highlightcolor [$itk_component(advancedTabs) cget -background] \ - -borderwidth 0 \ - -font $mFontText - $itk_component(advancedTabs) insert end -text "Command" -stipple gray25 - $itk_component(advancedTabs) insert end -text "History" -stipple gray25 itk_component add cmd { Command $itk_component(advancedTabs).cmd \ @@ -662,12 +648,6 @@ -prompt2 "% " -result_color black -cmd_color red } {} - set i 0 - $itk_component(advancedTabs) tab configure $i \ - -window $itk_component(cmd) \ - -fill both - incr i - itk_component add history { ::iwidgets::scrolledtext $itk_component(advancedTabs).history \ -relief sunken -borderwidth 2 \ @@ -675,10 +655,10 @@ -scrollmargin 2 -visibleitems 80x15 \ -textbackground $SystemWindow } {} - $itk_component(advancedTabs) tab configure $i \ - -window $itk_component(history) \ - -fill both [$itk_component(history) component text] configure -state disabled + + $itk_component(advancedTabs) add $itk_component(cmd) -text "Command" + $itk_component(advancedTabs) add $itk_component(history) -text "History" } # vertical panes @@ -1046,7 +1026,7 @@ return } - SetWaitCursor + SetWaitCursor $this if {$eflag} { set optionsAndArgs [eval dbExpand $args] @@ -1072,7 +1052,7 @@ } if {[catch {eval gedCmd $cmd $options $expandedArgs} ret]} { - SetNormalCursor + SetNormalCursor $this return $ret } @@ -1085,7 +1065,7 @@ if {$tflag} { catch {refreshTree} } - SetNormalCursor + SetNormalCursor $this return $ret } @@ -1542,6 +1522,7 @@ set mLastSelectedDir [file dirname $target] } + ::update Load $target } @@ -1673,7 +1654,7 @@ set mNeedSave 1 updateSaveMode - SetWaitCursor + SetWaitCursor $this gedCmd kill $comp set select [$itk_component(tree) selection get] @@ -1702,18 +1683,18 @@ set parent [$itk_component(tree) query -parent $element] $itk_component(tree) remove $element $parent refreshTree - SetNormalCursor + SetNormalCursor $this } ::itcl::body ArcherCore::doCopyOrMove {top comp cmd} { set mNeedSave 1 updateSaveMode - SetWaitCursor + SetWaitCursor $this set comp2 [string trim [$top.entry get]] wm withdraw $top gedCmd $cmd $comp refreshTree - SetNormalCursor + SetNormalCursor $this destroy $top } @@ -2194,7 +2175,7 @@ ::itcl::body ArcherCore::render {node state trans updateTree {wflag 1}} { if {$wflag} { - SetWaitCursor + SetWaitCursor $this } set savePwd "" @@ -2275,7 +2256,7 @@ } if {$wflag} { - SetNormalCursor + SetNormalCursor $this } } @@ -2384,7 +2365,7 @@ } ::itcl::body ArcherCore::doLighting {} { - SetWaitCursor + SetWaitCursor $this if {$mZClipMode != $ZCLIP_NONE} { gedCmd zclip_all $mLighting @@ -2393,7 +2374,7 @@ gedCmd zbuffer_all $mLighting gedCmd light_all $mLighting - SetNormalCursor + SetNormalCursor $this } ::itcl::body ArcherCore::doViewReset {} { @@ -2853,6 +2834,7 @@ # GENERAL # ------------------------------------------------------------ ::itcl::body ArcherCore::Load {target} { + SetWaitCursor $this if {$mNeedSave} { $itk_component(saveDialog) center [namespace tail $this] if {[$itk_component(saveDialog) activate]} { @@ -2933,9 +2915,7 @@ deleteTargetOldCopy # refresh tree contents - SetWaitCursor refreshTree 0 - SetNormalCursor } else { doLighting } @@ -2945,6 +2925,7 @@ set mDefaultBindingMode $ROTATE_MODE beginViewRotate } + SetNormalCursor $this } ::itcl::body ArcherCore::GetUserCmds {} { @@ -3799,7 +3780,7 @@ } if {$wflag} { - SetWaitCursor + SetWaitCursor $this } set optionsAndArgs [eval dbExpand $args] @@ -3815,7 +3796,7 @@ if {[catch {eval gedCmd draw $options $tobjects} ret]} { gedCmd configure -primitiveLabels {} refreshTree - SetNormalCursor + SetNormalCursor $this return $ret } @@ -3823,7 +3804,7 @@ gedCmd configure -primitiveLabels {} refreshTree if {$wflag} { - SetNormalCursor + SetNormalCursor $this } return $ret @@ -3850,7 +3831,7 @@ return } - SetWaitCursor + SetWaitCursor $this set optionsAndArgs [eval dbExpand $args] set options [lindex $optionsAndArgs 0] @@ -3864,14 +3845,14 @@ if {[catch {eval gedCmd erase $tobjects} ret]} { gedCmd configure -primitiveLabels {} refreshTree - SetNormalCursor + SetNormalCursor $this return $ret } gedCmd configure -primitiveLabels {} refreshTree - SetNormalCursor + SetNormalCursor $this } ::itcl::body ArcherCore::erase_all {args} { Modified: brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/tclscripts/archer/CombEditFrame.tcl 2009-03-26 13:44:39 UTC (rev 34081) @@ -51,9 +51,9 @@ # variable mMaterial "" variable mInherit "" - method buildGeneralGUI {parent tabs ti} - method buildShaderGUI {parent tabs ti} - method buildTreeGUI {parent tabs ti} + method buildGeneralGUI {} + method buildShaderGUI {} + method buildTreeGUI {} # Override what's in GeometryEditFrame method updateGeometryIfMod {} @@ -71,32 +71,12 @@ set parent [childsite upper] itk_component add tabs { - blt::tabnotebook $parent.tabs \ - -relief flat \ - -tiers 99 \ - -tearoff 0 \ - -gap 3 \ - -width 0 \ - -height 0 \ - -outerpad 2 \ - -highlightthickness 1 \ - -selectforeground black + ttk::notebook $parent.tabs } {} - $itk_component(tabs) configure \ - -highlightcolor [$itk_component(tabs) cget -background] \ - -borderwidth 0 \ - -font [list $ArcherCore::SystemWindowFont 8] - $itk_component(tabs) insert end -text "General" -stipple gray25 - $itk_component(tabs) insert end -text "Shader" -stipple gray25 - $itk_component(tabs) insert end -text "Tree" -stipple gray25 - set parent $itk_component(tabs) - set ti 0 - buildGeneralGUI $parent $itk_component(tabs) $ti - incr ti - buildShaderGUI $parent $itk_component(tabs) $ti - incr ti - buildTreeGUI $parent $itk_component(tabs) $ti + buildGeneralGUI + buildShaderGUI + buildTreeGUI pack $itk_component(tabs) -expand yes -fill both @@ -264,9 +244,9 @@ # PROTECTED METHODS # ------------------------------------------------------------ -::itcl::body CombEditFrame::buildGeneralGUI {parent tabs tabIndex} { +::itcl::body CombEditFrame::buildGeneralGUI {} { itk_component add combGeneralF { - ::frame $parent.combgeneralf + ::frame $itk_component(tabs).combgeneralf } {} set parent $itk_component(combGeneralF) @@ -446,16 +426,11 @@ -row $row \ -sticky nsew grid columnconfigure $parent 1 -weight 1 - pack $itk_component(combGeneralF) -expand yes -fill x -anchor n + # pack $itk_component(combGeneralF) -expand yes -fill both # pack $parent -expand yes -fill x -anchor n # grid columnconfigure [namespace tail $this] 1 -weight 1 - $tabs tab configure $tabIndex \ - -window $itk_component(combGeneralF) \ - -fill x \ - -anchor n - # Set up bindings bind $itk_component(combIdE) <Return> [::itcl::code $this updateGeometryIfMod] bind $itk_component(combAirE) <Return> [::itcl::code $this updateGeometryIfMod] @@ -471,24 +446,24 @@ # bind $itk_component(combMaterialE) <Return> [::itcl::code $this updateGeometryIfMod] # bind $itk_component(combInheritE) <Return> [::itcl::code $this updateGeometryIfMod] + + $itk_component(tabs) add $itk_component(combGeneralF) -text "General" } -::itcl::body CombEditFrame::buildShaderGUI {parent tabs ti} { +::itcl::body CombEditFrame::buildShaderGUI {} { itk_component add combShader { - ::ShaderEdit $parent.shader \ + ::ShaderEdit $itk_component(tabs).shader \ -shaderChangedCallback [::itcl::code $this updateGeometryIfMod] } {} - $tabs tab configure $ti \ - -window $itk_component(combShader) \ - -fill both - # bind $itk_component(combShaderE) <Return> [::itcl::code $this updateGeometryIfMod] + + $itk_component(tabs) add $itk_component(combShader) -text "Shader" } -::itcl::body CombEditFrame::buildTreeGUI {parent tabs ti} { +::itcl::body CombEditFrame::buildTreeGUI {} { itk_component add combTreeF { - ::frame $parent.treef + ::frame $itk_component(tabs).treef } {} set parent $itk_component(combTreeF) @@ -502,17 +477,13 @@ grid $itk_component(combTreeT) \ -row 0 \ -sticky nsew - # pack $itk_component(combTreeT) -expand yes -fill both - pack $itk_component(combTreeF) -expand yes -fill both - $tabs tab configure $ti \ - -window $itk_component(combTreeF) \ - -fill both - # bind $itk_component(combTreeT) <Leave> [::itcl::code $this updateGeometryIfMod] # bind $itk_component(combTreeT) <Return> [::itcl::code $this updateGeometryIfMod] # bind $itk_component(combTreeT) <FocusOut> [::itcl::code $this updateGeometryIfMod] bind $itk_component(combTreeT) <KeyRelease> [::itcl::code $this updateGeometryIfMod] + + $itk_component(tabs) add $itk_component(combTreeF) -text "Tree" } ::itcl::body CombEditFrame::updateGeometryIfMod {} { Modified: brlcad/trunk/src/tclscripts/archer/bgerror.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/bgerror.tcl 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/tclscripts/archer/bgerror.tcl 2009-03-26 13:44:39 UTC (rev 34081) @@ -487,8 +487,8 @@ # Make sure the wait cursor is unlocked if [info exists App::gui] { $App::gui SetStatusString + SetNormalCursor $App::gui } - SetNormalCursor } SAVE { # already handled by bgerrorSave procedure Modified: brlcad/trunk/src/tclscripts/archer/cursor.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/cursor.tcl 2009-03-26 06:37:24 UTC (rev 34080) +++ brlcad/trunk/src/tclscripts/archer/cursor.tcl 2009-03-26 13:44:39 UTC (rev 34081) @@ -29,22 +29,7 @@ #*** ############################################################## -if {$tcl_platform(os) == "Windows NT"} { - package require BLT -} else { - # For the moment, leave it this way for - # all other platforms. - #package require blt - package require BLT -} -# avoid a pkg_index error about ::blt:: being unknown -namespace eval blt {} - -if {![info exists ::blt::cursorWaitCount]} { - set ::blt::cursorWaitCount 0 -} - # PROCEDURE: SetWaitCursor # # Changes the cursor for all of the GUI's widgets to the wait cursor. @@ -55,25 +40,16 @@ # Results: # None # -proc SetWaitCursor {} { - incr ::blt::cursorWaitCount +proc SetWaitCursor {_w} { + incr ::ArcherCore::cursorWaitCount - if {1 < $::blt::cursorWaitCount} { + if {1 < $::ArcherCore::cursorWaitCount} { # Already in cursor wait mode return } - update idletasks - set children [winfo children .] - foreach kid $children { - if {![catch {$kid isa "::itk::Toplevel"} result]} { - switch -- $result { - "1" {catch {blt::busy $kid}} - } - } - } - blt::busy . - update + $_w configure -cursor watch + ::update idletasks } # PROCEDURE: SetNormalCursor @@ -86,29 +62,15 @@ # Results: # None # -proc SetNormalCursor {} { - incr ::blt::cursorWaitCount -1 - if {$::blt::cursorWaitCount < 0} { - # Already in cursor normal mode - set ::blt::cursorWaitCount 0 - return - } +proc SetNormalCursor {_w} { + incr ::ArcherCore::cursorWaitCount -1 - if {$::blt::cursorWaitCount != 0} { + if {$::ArcherCore::cursorWaitCount != 0} { return } - update idletasks - set children [winfo children .] - foreach kid $children { - if {![catch {$kid isa "::itk::Toplevel"} result]} { - switch -- $result { - "1" {catch {blt::busy release $kid}} - } - } - } - blt::busy release . - update + $_w configure -cursor {} + ::update idletasks } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |