File: prop.tk

package info (click to toggle)
dstooltk 2.0-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,520 kB
  • ctags: 3,169
  • sloc: ansic: 27,185; tcl: 4,770; makefile: 588; sh: 81; csh: 7
file content (82 lines) | stat: -rw-r--r-- 1,888 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# prop.tk
#

proc prop(build) wname {
    global Model Prop

    build_Title $wname "Propagation"

    build_DismissButtonbar $wname dbbar "window(dismiss) prop"

    set cmd [build_CmdFrame $wname cmd]

    if {$Model(Mapping_Flag)} {

	build_PopupMenu $cmd alg "Parameters for backward iteration." \
		{} {} {}

    } else {

	build_PopupMenu $cmd alg "Integration algorithm:" Prop(Int_Num) \
	    prop(load_int) [array_to_listvalues Prop Algorithms]

    }

    set choices [build_StdFrame $cmd choices]
    set j 0
    for {set i 0} {$i < $Prop(N_Cfields)} {incr i} {
	build_Choicefield $choices cf$i $Prop(Cfields_Names,$i) Prop(Cfields,$i) \
	    [array_to_listvalues Prop Cfields_All_Choices $j \
		 [expr $j+$Prop(Cfields_Num_Choices,$i)-1]]
	set j [expr $j+$Prop(Cfields_Num_Choices,$i)]
    }
    while { [winfo exists $choices.cf$i] } {
	destroy $choices.cf$i
	incr i
    }

# Make sure there isn't a big space where choices used to be.  8/18/97 BAM 
    $choices configure -height 1
    pack $choices -fill x

    build_LabelEntryColumns $cmd le1 \
	[list label {} [array_to_list Prop Ifields_Names] ] \
	[list ientry {} [array_to_list Prop Ifields] ] \
	[list label {} [array_to_list Prop Dfields_Names] ] \
	[list dentry {} [array_to_list Prop Dfields] ]
    bind_LabelEntryColumns $cmd.le1 1 <Return> prop(update)
    bind_LabelEntryColumns $cmd.le1 3 <Return> prop(update)

    pack $cmd -fill both -expand 1

}

proc prop(enter) {} {
    pm_to_tcl_obj Prop
}

proc prop(leave) {} {
    prop(update)
}

proc prop(update) {} {
    tcl_to_pm_obj Prop
    pm_to_tcl_obj Prop
}

proc prop(load_int) {} {
    global Prop
    tcl_to_pm Prop
    pm EXEC Prop.Load_Int
    pm_to_tcl Prop
    prop(build) .prop
    message_show "$Prop(Name) integrator loaded."
}

proc prop(load_iter) {} {
    tcl_to_pm Prop
    pm EXEC Prop.Load_Iter
    pm_to_tcl Prop
    prop(build) .prop
}