File: multiple.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 (101 lines) | stat: -rw-r--r-- 2,447 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#
# multiple.tk
#

proc multiple(build) name {

    build_Title $name "Multiple orbits"

    build_DismissButtonbar $name dbbar "window(dismiss) multiple" \
	{"Forwards" multiple(forwards) } \
	{"Continue" multiple(continue) } \
	{"Backwards" multiple(backwards)  }

    build_Buttonbar $name bb0 \
	{"Load multiple initial conditions" multiple(load) } \
	{"Copy final to initial" multiple(copy) }
    
    pack $name.bb0 -side bottom

    set cmd [build_CmdFrame $name cmd]

    build_LabelEntryColumns $cmd le0 \
	{text {} {"Images:"}} {ientry {} {Mult(Images)}}
    bind_LabelEntryColumns $cmd.le0 1 <Return> multiple(update)

    build_PopupMenu $cmd p1 "Transformation:" \
	Mult(Transformation) multiple(leave) [array_to_listvalues Mult T_Names]

    build_LabelEntryColumns $cmd le2 \
	{text {} {" and parameter:"}} {dentry {} {Mult(Trans_Param)}}
    bind_LabelEntryColumns $cmd.le2 1 <Return> multiple(update)

    build_Optionslist $cmd olist \
	{ "Points on boundary only" Mult(Load_Choice) }

    build_LabelEntryColumnsScroll $cmd le3 150\
	[list label " " [ concat \
			      [array_to_list Model Varb_Names] \
			      [array_to_list Model Param_Names] ] \
	    ] \
	[list dentry "Radius" [array_to_list Mult Radius] ] \
	[list ientry "Points" [array_to_list Mult Points] ]
    bind_LabelEntryColumns $cmd.le3 1 <Return> multiple(update)
    bind_LabelEntryColumns $cmd.le3 2 <Return> multiple(update)

    pack $cmd -fill both -expand 1
}

proc multiple(enter) {} {
    pm_to_tcl Mult
}

proc multiple(leave) {} {
    multiple(update)
}

proc multiple(update) {} {
    tcl_to_pm Mult
    pm_to_tcl Mult
}

proc multiple(copy) {} {
    multiple(update)
    Mult(Copy)
    tcl_to_pm Mult
    message_show "Multiple final copied to initial."
}

proc multiple(load) {} {
    global Mult

    multiple(update)
    pm EXEC Mult.Load
    pm_to_tcl Mult
    message_show "$Mult(Total) initial conditions loaded."
}

proc multiple(forwards) {} {
    begin_wait "Computing multiple forward orbits..."
    multiple(update)
    pm EXEC Mult.Forwards
    pm_to_tcl Memory Selected
    end_wait
}

proc multiple(continue) {} {
    begin_wait "Continuing multiple orbits..."
    multiple(update)
    pm EXEC Mult.Continue
    pm_to_tcl Memory Selected
    end_wait
}

proc multiple(backwards) {} {
    begin_wait "Computing multiple backward orbits..."
    multiple(update)
    pm EXEC Mult.Backwards
    pm_to_tcl Memory Selected
    end_wait
}