File: contstate.tk

package info (click to toggle)
dstooltk 2.0-3
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 2,500 kB
  • ctags: 3,169
  • sloc: ansic: 27,185; tcl: 4,770; makefile: 587; sh: 70; csh: 7
file content (66 lines) | stat: -rw-r--r-- 1,654 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 
# contstate.tk
#

proc contstate(build) name {
    global Model Cont 

    build_Title $name "Continuation State"

    build_DismissButtonbar $name dbbar "window(dismiss) contstate" \
         {"Update selected point" contstate(update_selpt)}

    set cmd [build_CmdFrame $name cmd]

    build_LabelEntryColumnsScroll $cmd le0 150\
       [list label "" [drop_last_element [array_to_list Model Varb_Names] ] ] \
       [list dlabel "" [drop_last_element [array_to_list Cont Varb_Fc] ] ] \
       [list label "" [array_to_list Model Param_Names] ] \
       [list dlabel "" [array_to_list Cont Param_Fc] ] \
       [list label "" [array_to_list Model Funct_Names] ] \
       [list dlabel "" [array_to_list Cont Funct_Fc] ]  \
       [list dlabel "Eigenvalues" [drop_last_element [array_to_list Cont Ews]]]

# Make room for complex eigenvalue info
    $cmd.le0.c6.head configure -width 46

    pack $cmd -fill both -expand 1
    update
    contstate(enter)

}

proc contstate(enter) {} {
    global Model Cont

    pm EXEC Cont.GetState
    pm EXEC Cont.Get_Ews
    pm_to_tcl Cont

    # Blank out items not set
    set code $Cont(Set_Code)
    if {!($code&1)} {
        for {set i 0} {$i < $Model(Varb_Dim)} {incr i} {
            set Cont(Varb_Fc,$i) ""
            set Cont(Ews,$i) ""
        }
        for {set i 0} {$i < $Model(Funct_Dim)} {incr i} {
            set Cont(Funct_Fc,$i) ""
        }
    }
    if {!($code&2)} {
        for {set i 0} {$i < $Model(Param_Dim)} {incr i} {
            set Cont(Param_Fc,$i) ""
        }
    }

}


proc contstate(update_selpt) {} {
     global Cont

     pm EXEC Cont.CopyState
     pm_to_tcl Selected
}