Changeset 1021 for branches/sandbox


Ignore:
Timestamp:
Oct 12, 2010 12:46:50 PM (10 years ago)
Author:
chlake
Message:

add disagl edit & viewer

Location:
branches/sandbox
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/distrest.tcl

    r1013 r1021  
    66#::sr_lookuplist1
    77#::sr_lookuplist2
    8 #::sr_top
     8#sr_top
    99#::sr_checkall
    1010#::sr_entryvar(choicenum)
     
    9393
    9494    #Activate Restraint Editor
    95     grid [button $editorbox.edit -text "Activate Distance \n Restraint Editor" -command SR_TEST] -column 0 -row 3 \
    96         -sticky sw -columnspan 2
     95    grid [button $editorbox.edit -text "Activate Restraint \n Editor" -command SR_TEST] -column 0 -row 4 \
     96        -columnspan 2 -pady 5
    9797        $editorbox.edit config -bg LightGreen -bd 6
     98
     99    grid [button $editorbox.search -text "Edit Search Distance \n Parameters" -command DA_Control_Panel] -column 0 -row 3 \
     100        -columnspan 2
     101        $editorbox.edit config -bd 4
    98102
    99103
     
    317321    pack $sr_rb -side top -fill both -expand 1
    318322
    319     foreach {::sr_top main side lbl} [MakeScrollTable $sr_rb] {}
     323    foreach {sr_top main side lbl} [MakeScrollTable $sr_rb] {}
    320324    set     ::contraintmainbox $main
    321325
    322     button $::sr_top.alabel1 -text "Atom 1 " -width 7   \
    323         -command "SR_Sort atom1 $main $::sr_top.alabel1 $::sr_top.alabel2 $::sr_top.dlabel1"
    324     button $::sr_top.alabel2 -text "Atom 2 " -width 7 \
    325         -command "SR_Sort atom2 $main $::sr_top.alabel1 $::sr_top.alabel2 $::sr_top.dlabel1"
    326     button $::sr_top.dlabel1 -text "Distance " -width 9 \
    327         -command "SR_Sort distance $main $::sr_top.alabel1 $::sr_top.alabel2 $::sr_top.dlabel1"
    328 
    329     grid $::sr_top.alabel1 -column 1 -row 2
    330     grid $::sr_top.alabel2 -column 2 -row 2
    331     grid $::sr_top.dlabel1 -column 3 -row 2
    332 
    333     label  $::sr_top.rlabel1 -text "Restraint"
    334     label  $::sr_top.rlabel2 -text "esd"
    335     grid $::sr_top.rlabel1 -column 4 -row 2 -padx 20
    336     grid $::sr_top.rlabel2 -column 5 -row 2 -padx 20
    337 
    338 
    339     button $::sr_top.rcon1   -text "Check All" -width 10 -command {
    340         set ::sr_checkall 1
    341         SR_Set_All_Check_Buttons
    342         grid forget $::sr_top.rcon1
    343         grid $::sr_top.rcon2 -column 6 -row 2 -padx 5
    344     }
    345 
    346     button $::sr_top.rcon2   -text "Clear All" -width 10 -command {
    347         set ::sr_checkall 0
    348         SR_Set_All_Check_Buttons
    349         grid forget $::sr_top.rcon2
    350         grid $::sr_top.rcon1 -column 6 -row 2 -padx 5
    351     }
    352 
    353     grid $::sr_top.rcon1   -column 6 -row 2 -padx 5
     326    button $sr_top.alabel1 -text "Atom 1 " -width 7   \
     327        -command "SR_Sort atom1 $main $sr_top.alabel1 $sr_top.alabel2 $sr_top.dlabel1"
     328    button $sr_top.alabel2 -text "Atom 2 " -width 7 \
     329        -command "SR_Sort atom2 $main $sr_top.alabel1 $sr_top.alabel2 $sr_top.dlabel1"
     330    button $sr_top.dlabel1 -text "Distance " -width 9 \
     331        -command "SR_Sort distance $main $sr_top.alabel1 $sr_top.alabel2 $sr_top.dlabel1"
     332
     333    grid $sr_top.alabel1 -column 1 -row 2
     334    grid $sr_top.alabel2 -column 2 -row 2
     335    grid $sr_top.dlabel1 -column 3 -row 2
     336
     337    label  $sr_top.rlabel1 -text "Restraint"
     338    label  $sr_top.rlabel2 -text "esd"
     339    grid $sr_top.rlabel1 -column 4 -row 2 -padx 20
     340    grid $sr_top.rlabel2 -column 5 -row 2 -padx 20
     341
     342
     343    button $sr_top.rcon1   -text "Check All" -width 10 -command "
     344        set ::sr_checkall 1;
     345        SR_Set_All_Check_Buttons;
     346        grid forget $sr_top.rcon1;
     347        grid $sr_top.rcon2 -column 6 -row 2 -padx 5;
     348    "
     349
     350    button $sr_top.rcon2   -text "Clear All" -width 10 -command "
     351        set ::sr_checkall 0;
     352        SR_Set_All_Check_Buttons;
     353        grid forget $sr_top.rcon2;
     354        grid $sr_top.rcon1 -column 6 -row 2 -padx 5;
     355    "
     356
     357    grid $sr_top.rcon1   -column 6 -row 2 -padx 5
    354358
    355359    #SR_Sort atom1 $main
     
    391395                                label $main.rdistance$i -text [lindex $rprint 8] -justify center -anchor center
    392396                                entry $main.restraint$i -width 8 -textvariable ::sr_restraintdist([lindex $rprint 13]) -takefocus 1
    393                                 bind  $main.restraint$i <KeyRelease> {SR_Validate_Soft %W distance}
     397                                      $main.restraint$i selection range 0 end
     398                                bind  $main.restraint$i <KeyRelease> {SR_Validate_Soft %W distance}
    394399                                entry $main.restesd$i -width 8 -textvariable ::sr_restraintesd([lindex $rprint 13]) -takefocus 1
     400                                      $main.restesd$i selection range 0 end
    395401                                bind  $main.restesd$i <KeyRelease> {SR_Validate_Soft %W esd}
    396402                                checkbutton $main.sr_crestraint$i -variable ::sr_crestraint([lindex $rprint 13])
     
    623629
    624630    entry  $srcb1.sr_dminvalue -width 8 -textvariable ::sr_dminvalue        -takefocus 1
     631           $srcb1.sr_dminvalue selection range 0 end
    625632    entry  $srcb1.sr_dmaxvalue -width 8 -textvariable ::sr_dmaxvalue        -takefocus 1
     633           $srcb1.sr_dmaxvalue selection range 0 end
    626634    entry  $srcb2.sr_rvalue    -width 8 -textvariable ::sr_rvalue           -takefocus 1
     635           $srcb2.sr_rvalue selection range 0 end
    627636    entry  $srcb2.sr_resd      -width 8 -textvariable ::sr_resd             -takefocus 1
     637           $srcb2.sr_resd selection range 0 end
    628638
    629639    bind  $srcb1.sr_dminvalue <KeyRelease> {SR_Validate_Soft %W dmin}
  • branches/sandbox/expgui

    r1019 r1021  
    155155# setting data range/excluded regions
    156156source [file join $expgui(scriptdir) exclinit.tcl]
     157# setup DISAGL viewer & editor
     158source [file join $expgui(scriptdir) disagledit.tcl]
     159source [file join $expgui(scriptdir) geo_viewer.tcl]
    157160#---------------------------------------------------------------------------
    158161# override options with locally defined values
  • branches/sandbox/gsascmds.tcl

    r1019 r1021  
    15171517proc rundisagl {} {
    15181518    global expgui txtvw tcl_version tcl_platform
     1519    # call up new DISAGL parm edit box
     1520    if {[DA_Control_Panel 1]} {return}
     1521    # Save the current exp file if needed
     1522    savearchiveexp
    15191523    if {$expgui(disaglSeparateBox)} {
    15201524        set root [file root $expgui(expfile)]
  • branches/sandbox/gsasmenu.tcl

    r930 r1021  
    8282        bijcalc
    8383        disagl
     84        disaglviewer
    8485        reflist
    8586        geometry
     
    197198    disagl      {rundisagl {
    198199        Distance/angle calculations}
     200    }
     201
     202    disaglviewer {Geo_Viewer {
     203        Show distances and angles in a nice format}
    199204    }
    200205
  • branches/sandbox/readexp.tcl

    r1020 r1021  
    882882            # for none delete the record & thats all folks
    883883            if {$value == "none"} {
    884                 catch {unset exparray($key)}
     884                catch {unset ::exparray($key)}
    885885                return
    886             }               
     886            }
    887887            if {[existsexp $key] == 0} {
    888888                makeexprec $key
     
    918918            # for none delete the record & thats all folks
    919919            if {$value == "none"} {
    920                 catch {unset exparray($key)}
     920                catch {unset ::exparray($key)}
    921921                return
    922             }               
     922            }
    923923            if {[existsexp $key] == 0} {
    924924                makeexprec $key
     
    953953        default {
    954954            set msg "Unsupported phaseinfo access: parm=$parm action=$action"
    955             tk_dialog .badexp "Error in readexp" $msg error 0 Exit 
     955            tk_dialog .badexp "Error in readexp" $msg error 0 Exit
    956956        }
    957957    }
     
    28362836        default {
    28372837            set msg "Unsupported AtmTypInfo access: parm=$parm action=$action"
    2838             tk_dialog .badexp "Error in readexp" $msg error 0 Exit 
     2838            tk_dialog .badexp "Error in readexp" $msg error 0 Exit
    28392839        }
    28402840    }
Note: See TracChangeset for help on using the changeset viewer.