File: contcolors.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 (45 lines) | stat: -rw-r--r-- 1,292 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
# 
# contcolors.tk
#

proc contcolors(build) name {
    global DsColor Color 

    if [winfo exists .contcolors.cmd] {
        return
    }
   
    build_Title $name "Continuation Colors"
    set cmd [build_CmdFrame $name cmd]
 
    set DsColor(pick_color) [ pm GET Color.Pick_Color_Choice ]
    dscolor(update)

 
#    set lastcolor [expr [array size DsColor]-2]
#    set bifcolors [list 0 1 2 [expr $lastcolor-2] [expr $lastcolor-1] $lastcolor]
#    puts $bifcolors

# Build structure
    build_LabelEntryColumns $cmd lec0 \
	[list text {} [list "Equilibrium point: Source" "Equilibrium point: Saddle" \
		"Equilibrium point: Sink" "Saddle Node Bifurcation" \
		"Resonant Saddle Node Bifurcation" \
		"Hopf Bifurcation" "Degenerate Hopf bifurcation"]] \
        [list text {} [list "  " "  " "  " "  " "  " "  " "  "]] 

# Now, change background colors for the left entries
    for {set i 0} {$i<$Color(Sys_Colormap_Size)} {incr i} {
        $cmd.lec0.c1.$i configure -background $DsColor($i)
        }
    for {set i 0} {$i<$Color(Cont_Colormap_Size)} {incr i} {
 	$cmd.lec0.c1.[expr $Color(Sys_Colormap_Size)+$i] configure -background $DsColor($Color(Cont_Colors,$i))
    	}

    build_DismissButtonbar $cmd dbbar "window(dismiss) contcolors"
   
    pack $cmd -fill x
    pm_to_tcl 
}