Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19074
Modified Files: Tag: devel_0_39 desire.tk Log Message: crosshair is now in ddrc editor
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.348 retrieving revision 1.1.2.349 diff -C2 -d -r1.1.2.348 -r1.1.2.349 *** desire.tk 16 Aug 2006 04:21:51 -0000 1.1.2.348 --- desire.tk 16 Aug 2006 12:22:38 -0000 1.1.2.349 *************** *** 947,955 ****
set scale(canned) [list 25 33 50 75 100 125 150 200 250 300 400] ! set crosshair(state) 1 ! set crosshair(snap) 1 #-----------------------------------------------------------------------------------# proc read_ddrc {} { ! global look set file [open "~/.ddrc" "RDONLY CREAT"] set dd_config [read $file] --- 947,955 ----
set scale(canned) [list 25 33 50 75 100 125 150 200 250 300 400] ! set crosshair(hairstate) 1 ! set crosshair(hairsnap) 1 #-----------------------------------------------------------------------------------# proc read_ddrc {} { ! global look crosshair set file [open "~/.ddrc" "RDONLY CREAT"] set dd_config [read $file] *************** *** 964,967 **** --- 964,971 ---- #puts "look($word2) $word3" } + crosshair { + set crosshair($word2) $word3 + #puts "look($word2) $word3" + } font { #puts "settings for font" *************** *** 1208,1212 **** global crosshair set @editmode [expr !$@editmode] ! if {$crosshair(state) && !$@editmode} {$self hide_crosshair} pd .$self editmode $@editmode } --- 1212,1216 ---- global crosshair set @editmode [expr !$@editmode] ! if {$crosshair(hairstate) && !$@editmode} {$self hide_crosshair} pd .$self editmode $@editmode } *************** *** 1945,1949 **** set canvas(current) $self set c .$self.c ! if {$crosshair(state) && $@editmode} {$self show_crosshair $x $y $target} if {$tooltip(visible)} { if {[expr [distance $tooltip(curpos) [list $x $y]] > 10]} { --- 1949,1953 ---- set canvas(current) $self set c .$self.c ! if {$crosshair(hairstate) && $@editmode} {$self show_crosshair $x $y $target} else {$self hide_crosshair} if {$tooltip(visible)} { if {[expr [distance $tooltip(curpos) [list $x $y]] > 10]} { *************** *** 4358,4362 **** #puts " action::: $@action" ! if {$crosshair(snap)} { if {$type == "object" | $type == "outlet" | $type == "inlet"} { if {$id != $self} { --- 4362,4366 ---- #puts " action::: $@action" ! if {$crosshair(hairsnap)} { if {$type == "object" | $type == "outlet" | $type == "inlet"} { if {$id != $self} { *************** *** 4778,4782 **** frame $f label $f.label -text $label ! checkbutton $f.toggle -variable _($self:name) } section { --- 4782,4788 ---- frame $f label $f.label -text $label ! checkbutton $f.toggle -variable _($self:$name) ! pack $f.label -side left ! pack $f.toggle -side left } section { *************** *** 5391,5394 **** --- 5397,5403 ---- key {load_meter latency_meter} key about + section others + crosshair hairstate + crosshair hairsnap }
*************** *** 5397,5401 ****
def* ClientPrefsDialog read {} { ! global ddrc_options ddrc_options_h cmdline look key set fd [open $cmdline(ddrcfilename) "RDONLY CREAT"] #set contents [split [string map {"\n" " "} [read $fd]] " "] --- 5406,5410 ----
def* ClientPrefsDialog read {} { ! global ddrc_options ddrc_options_h cmdline look key crosshair set fd [open $cmdline(ddrcfilename) "RDONLY CREAT"] #set contents [split [string map {"\n" " "} [read $fd]] " "] *************** *** 5422,5425 **** --- 5431,5435 ---- color {set look($item) $value} key {set key($item) $value} + crosshair {set crosshair($item) $value; set _($self:crosshair($item)) $value} default {incr i; set @$name [lindex $contents $i]} } *************** *** 5430,5434 ****
def* ClientPrefsDialog write {} { ! global ddrc_options ddrc_options_h cmdline look accels key set fd [open $cmdline(ddrcfilename) w] set check_key {} --- 5440,5444 ----
def* ClientPrefsDialog write {} { ! global ddrc_options ddrc_options_h cmdline look accels key crosshair set fd [open $cmdline(ddrcfilename) w] set check_key {} *************** *** 5464,5467 **** --- 5474,5481 ---- } + crosshair { + set crosshair($name) $_($self:$name) + puts $fd "$type $name $crosshair($name)" + } } } *************** *** 5471,5475 **** } def ClientPrefsDialog init {} { ! global ddrc_options look key $self read super reset cancel apply ok --- 5485,5489 ---- } def ClientPrefsDialog init {} { ! global ddrc_options look key crosshair $self read super reset cancel apply ok *************** *** 5527,5530 **** --- 5541,5551 ---- properties_dialog $self $which_section [list $name $name $type {}] } + crosshair { + set var ${name}path + #this stores the path to the widget on the gui editor. + set @$var $which_section.$name.color + set @$name $crosshair($name) + properties_dialog $self $which_section [list [lindex $name 0] [say $name] toggle {}] + } default { properties_dialog $self $which_section [list $name [say $name] $type {}]