Changeset 118
- Timestamp:
- Dec 4, 2009 5:00:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 1999/11/16 15:45:40 to 1999/11/16 15:59:22
- Property rcs:lines changed from +13 -3 to +39 -46
- Property rcs:rev changed from 1.20 to 1.21
r117 r118 7 7 # need to change heading and button label depending on where getExpFileName 8 8 # is called from 9 #10 # fixup documentation and you are done!11 9 # 12 10 # global background editing & profile work differently: should both … … 74 72 set liveplot(legend) 1 75 73 set expgui(filesort) 1 74 set expgui(initstring) {} 76 75 #============================================================================= 77 76 # Store names of profile terms. … … 125 124 # commands for adding phases, histograms & atoms 126 125 source [file join $expgui(scriptdir) addcmds.tcl] 126 # get the notebook widget if not using Tix 127 if {!$expgui(havetix)} {source $expgui(scriptdir)/notebook.tcl} 127 128 #--------------------------------------------------------------------------- 128 129 # override options with locally defined values … … 319 320 set expgui(curhist) {} 320 321 } 321 if !$expgui(havetix) { 322 RaisePage lsFrame 323 } else { 324 .n raise lsPane 325 set expgui(pagenow) lsFrame 326 } 322 RaisePage lsFrame 327 323 if {[CountHistory] > 100} { 328 324 DeleteHistoryRecords "This .EXP file has [CountHistory] history records\nErasing most will speed EXPGUI" … … 980 976 foreach pair $expgui(GlobalModeAllDisable) { 981 977 if {$expgui(pagenow) == [lindex $pair 0]} { 982 if !$expgui(havetix) { 983 RaisePage lsFrame 984 } else { 985 .n raise lsPane 986 set expgui(pagenow) lsFrame 987 } 978 RaisePage lsFrame 988 979 } 989 980 eval [lindex $pair 1] -state disabled … … 2279 2270 if $expgui(havetix) { 2280 2271 pack [tixNoteBook .n] -expand yes -fill both 2281 .n add ls Pane -label "LS Controls" -underline 02282 .n pageconfigure ls Pane -raisecmd \2272 .n add lsFrame -label "LS Controls" 2273 .n pageconfigure lsFrame -raisecmd \ 2283 2274 "set expgui(pagenow) lsFrame; SetupExtractHist" 2284 2275 lappend expgui(frameactionlist) "lsFrame SetupExtractHist" 2285 .n add phasePane -label "Phase" -underline 02276 .n add phasePane -label "Phase" 2286 2277 .n pageconfigure phasePane -raisecmd \ 2287 2278 "set expgui(pagenow) phaseFrame; DisplayAllAtoms noreset" 2288 2279 # lappend expgui(frameactionlist) "phaseFrame {DisplayAllAtoms noreset}" 2289 .n add histPane -label "Histogram" -underline 02280 .n add histPane -label "Histogram" 2290 2281 .n pageconfigure histPane -raisecmd \ 2291 2282 "set expgui(pagenow) histFrame; DisplayHistogram" 2292 2283 lappend expgui(frameactionlist) "histFrame DisplayHistogram" 2293 2284 lappend expgui(GlobalModeAllDisable) "histFrame {.n pageconfigure histPane}" 2294 .n add fracPane -label "Scaling" -underline 62285 .n add fracPane -label "Scaling" 2295 2286 .n pageconfigure fracPane -raisecmd \ 2296 2287 "set expgui(pagenow) fracFrame; DisplayFrac" 2297 2288 lappend expgui(frameactionlist) "fracFrame DisplayFrac" 2298 .n add profPane -label Profile -underline 12289 .n add profPane -label Profile 2299 2290 .n pageconfigure profPane -raisecmd \ 2300 2291 "set expgui(pagenow) profFrame; DisplayProfile" … … 2306 2297 set expgui(fracFrame) [.n subwidget fracPane] 2307 2298 set expgui(profFrame) [.n subwidget profPane] 2308 set expgui(lsFrame) [.n subwidget ls Pane]2299 set expgui(lsFrame) [.n subwidget lsFrame] 2309 2300 } else { 2310 pack [frame .frmbar] -side top -anchor w2311 pack [frame .n]-anchor w -fill both -expand yes2301 Notebook:create .n -pages {lsFrame phaseFrame histFrame fracFrame profFrame} 2302 pack .n -anchor w -fill both -expand yes 2312 2303 foreach item {lsFrame phaseFrame histFrame fracFrame profFrame} \ 2313 2304 page {"LS Controls" Phase Histogram Scaling Profile } { 2314 pack [button .frmbar.$item -text $page -bd 2 \ 2315 -command "RaisePage $item"] -side left 2316 set expgui($item) [frame .n.$item -relief flat] 2305 set expgui($item) [Notebook:frame .n $item] 2306 Notebook:pageconfig .n $item -command "InitPage $item" -title $page 2317 2307 } 2318 2308 lappend expgui(frameactionlist) "lsFrame SetupExtractHist" … … 2321 2311 lappend expgui(frameactionlist) "fracFrame DisplayFrac" 2322 2312 lappend expgui(frameactionlist) "profFrame DisplayProfile" 2323 lappend expgui(GlobalModeAllDisable) "histFrame {.frmbar.histFrame config}" 2324 lappend expgui(GlobalModeAllDisable) "profFrame {.frmbar.profFrame config}" 2325 } 2326 2327 # this is used in the non-tix notebook to bring up the selected frame 2313 set expgui(GlobalModeAllDisable) {} 2314 lappend expgui(GlobalModeAllDisable) "histFrame {Notebook:pageconfig .n histFrame}" 2315 lappend expgui(GlobalModeAllDisable) "profFrame {Notebook:pageconfig .n profFrame}" 2316 } 2317 2318 # this is used to bring up the selected frame 2328 2319 proc RaisePage {nextpage} { 2329 2320 global expgui 2321 if $expgui(havetix) { 2322 .n raise $nextpage 2323 set expgui(pagenow) $nextpage 2324 } else { 2325 Notebook:raise .n $nextpage 2326 InitPage $nextpage 2327 } 2328 } 2329 # this is only called when Tix is not present 2330 proc InitPage {nextpage} { 2331 global expgui 2330 2332 set expgui(pagenow) $nextpage 2331 foreach item {phaseFrame histFrame fracFrame profFrame lsFrame} {2332 if {$item == $nextpage} {2333 .frmbar.$item config -relief flat2334 } else {2335 .frmbar.$item config -relief raised2336 }2337 }2338 # forget all other pages2339 foreach child [pack slaves .n] {2340 pack forget $child2341 }2342 pack .n.$nextpage -anchor w -fill both -expand yes2343 2333 foreach set $expgui(frameactionlist) { 2344 2334 if {$expgui(pagenow) == [lindex $set 0]} [lindex $set 1] 2345 2335 } 2346 2336 } 2337 2347 2338 #---------------------------------------------------------------------------- 2348 2339 #\/ \/ \/ \/ \/ \/ \/ BEGINNING OF PHASE PANE CODE \/ \/ \/ \/ \/ \/ \/ \/ \/ … … 3030 3021 } 3031 3022 3032 if !$expgui(havetix) { 3033 RaisePage lsFrame 3034 } else { 3035 .n raise lsPane 3036 set expgui(pagenow) lsFrame 3037 } 3023 # execute any local commands for final initialization 3024 eval $expgui(initstring) 3025 3026 # resize the notebook to fit all the tabs and the largest page 3027 if {!$expgui(havetix)} { 3028 Notebook:resize .n 3029 } 3030 RaisePage lsFrame 3038 3031 if {[CountHistory] > 100} { 3039 3032 DeleteHistoryRecords "This .EXP file has [CountHistory] history records\nErasing most will speed EXPGUI"
Note: See TracChangeset
for help on using the changeset viewer.