Changeset 323 for trunk/expgui


Ignore:
Timestamp:
Dec 4, 2009 5:04:08 PM (14 years ago)
Author:
toby
Message:

# on 2000/10/12 21:40:40, toby did:
implement optional EXPTOOL output
Change action for unsaved changes in whenidle to Save As
Add help pointers
Exchange locations of Replace Phase & Add Phase buttons so that "Add Phass"
is always displayed
new WWW help commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 2000/10/04 20:35:17 to 2000/10/12 21:40:40
    • Property rcs:lines changed from +72 -53 to +97 -68
    • Property rcs:rev changed from 1.36 to 1.37
    r306 r323  
    6868# default for autoexec load = off
    6969set expgui(autoexpload) 0
     70# default for show EXPTOOL output = off
     71set expgui(showexptool) 0
    7072# save the name of the wish executable
    7173set wishshell [info nameofexecutable]
     
    107109set expgui(gsasdir) [file dirname $expgui(scriptdir)]
    108110set expgui(gsasexe) [file join $expgui(gsasdir) exe]
     111set expgui(docdir) [file join $expgui(scriptdir) doc]
    109112#----------------------------------------------------------------
    110113lappend auto_path $expgui(scriptdir)
     
    406409        puts $fp "set expgui(autoexpload) $expgui(autoexpload)"
    407410    }
     411    puts $fp "set expgui(showexptool) $expgui(showexptool)"
    408412    close $fp
    409413}
     
    453457            set expgui(expModifiedLast) [file mtime $expgui(expfile)]
    454458        } elseif {$ans == 2} {
    455             savearchiveexp
     459            SaveAsFile
    456460        }
    457461    }
     
    479483    wm protocol $w WM_DELETE_WINDOW { }
    480484    wm transient $w .
     485    bind $w <Key-F1> "MakeWWWHelp expguierr.html Overwrite"
     486    pack [button $w.help -text Help -bg yellow \
     487            -command "MakeWWWHelp expguierr.html Overwrite"] \
     488            -side top -anchor e
    481489    frame $w.bot
    482490    pack $w.bot -side bottom
     
    670678    if {[file executable $expgui(exptool)] && \
    671679            [llength $expmap(phaselist)]} {
    672         pack [button $expgui(phaseFrame).top.ps.10 -text "Add Phase" \
    673                 -padx 1.5m -command MakeAddPhaseBox] -side left
     680        pack [button $expgui(phaseFrame).top.ps.10 \
     681                -text "Replace" -command MakeReplacePhaseBox \
     682                ] -side left
    674683    }
    675684}
     
    22492258
    22502259    set expgui(temp) {}
    2251     pack [frame $w.b] -side top
    2252     pack [button $w.b.2 -text Set -command "destroy $w"] -side left
    2253     pack [button $w.b.3 -text Quit \
    2254             -command "QuitEditBackground $w"] -side left
     2260    pack [frame $w.b -bg beige] -fill x -expand yes -side top
     2261    grid [button $w.b.2 -text Set -command "destroy $w"] -row 0 -column 1
     2262    grid [button $w.b.3 -text Quit \
     2263            -command "QuitEditBackground $w"] -row 0 -column 2
     2264    grid [button $w.b.help -text Help -bg yellow \
     2265            -command "MakeWWWHelp expgui3.html EditBackground"] \
     2266            -row 0 -column 4
     2267    grid columnconfig $w.b 0 -weight 1
     2268    grid columnconfig $w.b 3 -weight 1
     2269    bind $w <Key-F1> "MakeWWWHelp expgui3.html EditBackground"
    22552270    bind $w <Return> "destroy $w"
    22562271
     
    23882403
    23892404
    2390     pack [frame $w.b] -side top
     2405    pack [frame $w.b -bg beige] -fill x -expand yes -side top
    23912406    pack [button $w.b.2 -text Set -command "destroy $w"] -side left
    23922407    pack [button $w.b.3 -text Quit -command "set expgui(temp) {}; destroy $w"] -side left
     2408    pack [button $w.b.help -text Help -bg yellow \
     2409            -command "MakeWWWHelp expgui3.html EditParm"] -side right
     2410    bind $w <Key-F1> "MakeWWWHelp expgui3.html EditParm"
    23932411    bind $w <Return> "destroy $w"
    23942412
     
    24612479        if {$col > 6} {set col -1; incr row}
    24622480    }
    2463     pack [frame $w.b] -side top
    2464     pack [button $w.b.2 -text Set \
     2481    pack [frame $w.b -bg beige] -fill x -expand yes -side top
     2482    grid [button $w.b.2 -text Set \
    24652483            -command "SetEditProfile [list $entrylist] [list $phaselist] \
    2466             [list $histlist] $w"] -side left
    2467     pack [button $w.b.3 -text Quit \
    2468             -command "QuitEditProfile $w [list $entrylist]"] -side left
    2469     bind $w <Return> "destroy $w"
     2484            [list $histlist] $w"] -row 0 -column 1
     2485    grid [button $w.b.3 -text Quit \
     2486            -command "QuitEditProfile $w [list $entrylist]"] -row 0 -column 2
     2487    grid [button $w.b.help -text Help -bg yellow \
     2488            -command "MakeWWWHelp expgui5.html GlobalEdit"] \
     2489            -row 0 -column 4
     2490    grid columnconfig $w.b 0 -weight 1
     2491    grid columnconfig $w.b 3 -weight 1
     2492    bind $w <Key-F1> "MakeWWWHelp expgui5.html GlobalEdit"
     2493    bind $w <Return> "QuitEditProfile $w [list $entrylist]"
    24702494
    24712495    # force the window to stay on top
     
    25272551pack [frame .bar -relief raised -bd 2 -bg beige] -fill x -side top -anchor n
    25282552
    2529 # Creating the notebook with 5 panes: Phase, Histogram, Scaling, Profile
    2530 # & LS controls
    2531 # 0 name,
    2532 # 1 title
    2533 # 2 create command
    2534 # 3 raise command
    2535 # 4 disable page in global mode (0/1)
     2553# Creating the notebook and panes
     2554
     2555# create an array element describing each notebook page (used with BW only)
     2556# element 0 -- pane name
     2557#         1 -- Label on frame
     2558#         2 -- initialization command
     2559#         3 -- update command
     2560#         4 -- 0/1 Use 1 if pane should be disabled in when all histograms
     2561#                are selected in global mode, 0 otherwise
     2562#         5 -- Web page for pane
     2563#         6 -- name anchor on Web page for pane
     2564set expgui(notebookpagelist) {
     2565    {lsFrame     "LS Controls" \
     2566            "" \
     2567            SetupExtractHist \
     2568            0  expgui1.html ""}
     2569    {phaseFrame   Phase        \
     2570            "" \
     2571            "SelectOnePhase \$expgui(curPhase); DisplayAllAtoms noreset" \
     2572            0  expgui2.html ""}
     2573    {histFrame    Histogram \
     2574            MakeHistPane \
     2575            DisplayHistogram \
     2576            1  expgui3.html ""}
     2577    {fracFrame    Scaling \
     2578            MakeScalingPane \
     2579            DisplayFrac \
     2580            0  expgui4.html ""}
     2581    {profFrame    Profile \
     2582            MakeProfilePane \
     2583            DisplayProfile \
     2584            1  expgui5.html ""}
     2585    {consFrame    Constraints \
     2586            "source [file join $expgui(scriptdir) atomcons.tcl]; MakeConstraintsPane" \
     2587            DisplayConstraintsPane \
     2588            0  expgui6.html ""}
     2589    {orientFrame  "MD Pref Orient" \
     2590            MakeOrientPane \
     2591            DisplayOrient \
     2592            0  expgui7.html MD}
     2593    {odfFrame  "SH Pref Orient" \
     2594            "source [file join $expgui(scriptdir) odf.tcl]; MakeODFPane" \
     2595            DisplayODFPane \
     2596            0  expgui7.html ODF}
     2597}
    25362598
    25372599if $expgui(haveBW) {
    25382600    pack [NoteBook .n -bd 2] -expand yes -fill both
    2539     # create an array element describing each notebook page
    2540     # element 0 -- pane name
    2541     #         1 -- Label on frame
    2542     #         2 -- initialization command
    2543     #         3 -- update command
    2544     #         4 -- 0/1 Use 1 if pane should be disabled in when all histograms
    2545     #                are selected in global mode, 0 otherwise
    2546     set expgui(notebookpagelist) {
    2547         {lsFrame     "LS Controls" \
    2548                 "" \
    2549                 SetupExtractHist \
    2550                 0}
    2551         {phaseFrame   Phase        \
    2552                 "" \
    2553                 "SelectOnePhase \$expgui(curPhase); DisplayAllAtoms noreset" \
    2554                 0}
    2555         {histFrame    Histogram \
    2556                 MakeHistPane \
    2557                 DisplayHistogram \
    2558                 1}
    2559         {fracFrame    Scaling \
    2560                 MakeScalingPane \
    2561                 DisplayFrac \
    2562                 0}
    2563         {profFrame    Profile \
    2564                 MakeProfilePane \
    2565                 DisplayProfile \
    2566                 1}
    2567         {consFrame    Constraints \
    2568                 "source [file join $expgui(scriptdir) atomcons.tcl]; MakeConstraintsPane" \
    2569                 DisplayConstraintsPane \
    2570                 0}
    2571         {orientFrame  "MD Pref Orient" \
    2572                 MakeOrientPane \
    2573                 DisplayOrient \
    2574                 0}
    2575         {odfFrame  "SH Pref Orient" \
    2576                 "source [file join $expgui(scriptdir) odf.tcl]; MakeODFPane" \
    2577                 DisplayODFPane \
    2578                 0}
    2579     }
    25802601    foreach item $expgui(notebookpagelist) {
    25812602        set frm [lindex $item 0]
     
    27062727            -column 1 -row 0 -rowspan 2
    27072728    if [file executable $expgui(exptool)] {
    2708         grid [button $frameLatt.newp -text Replace\nPhase \
    2709                 -command MakeReplacePhaseBox] \
    2710                 -column 0 -row 0 -rowspan 2 -sticky w
     2729        grid [button $expgui(phaseFrame).frameLatt.newp \
     2730                -text "Add\nPhase" -padx 1.5m -command MakeAddPhaseBox \
     2731                ] -column 0 -row 0 -rowspan 2 -sticky w
    27112732    }
    27122733    grid columnconfig $frameLatt  1 -weight 1
     
    31873208menu $expgui(fm).help.menu
    31883209$expgui(fm).help.menu add command -command showhelp -underline 0 \
    3189         -label "Help on Command"
     3210        -label "Help Summary"
     3211$expgui(fm).help.menu add command -command MakeWWWHelp  \
     3212        -label "Help on current pane"
     3213$expgui(fm).help.menu add command -command "MakeWWWHelp menu" \
     3214        -label "Help on menu"
    31903215foreach c {h H} {bind . <Alt-$c> [list showhelp]}
     3216# define help actions
     3217bind . <Key-F1> MakeWWWHelp
    31913218$expgui(fm).help.menu add command -label "About..." -command About
    31923219
     
    32673294                -variable expgui(autoexpload)
    32683295    }
     3296    $expgui(fm).option.menu  add checkbutton -label "Show EXPTOOL output" \
     3297                -variable expgui(showexptool)
    32693298}
    32703299
Note: See TracChangeset for help on using the changeset viewer.