Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24921
Modified Files: Tag: devel_0_39 desire.tk Log Message: fixed some bugs in ddrc editor and trying to get iemgui_choose_col and color_popup to work, not quite there yet....
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.189 retrieving revision 1.1.2.190 diff -C2 -d -r1.1.2.189 -r1.1.2.190 *** desire.tk 23 Apr 2006 10:16:59 -0000 1.1.2.189 --- desire.tk 25 Apr 2006 00:26:08 -0000 1.1.2.190 *************** *** 3334,3337 **** --- 3334,3338 ----
proc color_popup {self w name i} { + set old_w $w.$name set w $w.$name.popup if [winfo exists $w] {destroy $w} *************** *** 3341,3350 **** set c [lindex $preset_colors $i] $w add command -label " " \ ! -background "#$c" -foreground "#$c" \ -command [list color_popup_select $self $name [expr 0x$c]] } ! tk_popup $w \ ! [expr [winfo rootx .$self.$name]] \ ! [expr [winfo rooty .$self.$name]] 0 }
--- 3342,3349 ---- set c [lindex $preset_colors $i] $w add command -label " " \ ! -background "#$c" -activebackground "#$c" \ -command [list color_popup_select $self $name [expr 0x$c]] } ! tk_popup $w [expr [winfo rootx $old_w.preset] + 30] [expr [winfo rooty $old_w.preset]] }
*************** *** 3352,3359 **** set self [string trimleft $id .] global _ ! set c $_($self:$var) ! if {[string index $c 0]=="#"} {set c [string replace $c 0 0 0x]} set color [tk_chooseColor -title $title \ ! -initialcolor [format "#%6.6x" [expr $c&0xFFFFFF]]] if {$color != ""} { color_popup_select $self $var [expr [string replace $color 0 0 "0x"]&0xFFFFFF] --- 3351,3361 ---- set self [string trimleft $id .] global _ ! #set c $_($self:$var) ! set c 0xFFFFFF ! #if {[string index $c 0]=="#"} {set c [string replace $c 0 0 0x]} ! #set color [tk_chooseColor -title $title \ ! # -initialcolor [format "#%6.6x" [expr $c&0xFFFFFF]]] set color [tk_chooseColor -title $title \ ! -initialcolor [format "#%6.6x" $c]] if {$color != ""} { color_popup_select $self $var [expr [string replace $color 0 0 "0x"]&0xFFFFFF] *************** *** 3387,3390 **** --- 3389,3393 ---- } color { + puts "where ::: $f" frame $f label $f.label -text $label *************** *** 3392,3401 **** set c $_($self:$name) switch -regexp -- $c { ^# { set c 0x[string trimleft $c #] } } ! set c [expr $c & 0xFCFCFC] ! button $f.color -text " " -font {Courier 8} -width 10 -pady 2 \ -command [list iemgui_choose_col $w $name $label] \ -relief sunken -background [format #%6.6x $c] \ -highlightbackground [format #%6.6x $c] ! button $f.preset -text "..." -pady 2 -font {Helvetica 8} -command [list color_popup $self $w $name $i] pack $f.label $f.color $f.preset -side left --- 3395,3406 ---- set c $_($self:$name) switch -regexp -- $c { ^# { set c 0x[string trimleft $c #] } } ! #set c [expr $c & 0xFCFCFC] ! set c 0xFCFCFC ! button $f.color -text "text" -font {Courier 8} -width 10 -pady 2 \ -command [list iemgui_choose_col $w $name $label] \ -relief sunken -background [format #%6.6x $c] \ -highlightbackground [format #%6.6x $c] ! set i 10 ! puts "self : $self | w : $w | name : $name" button $f.preset -text "..." -pady 2 -font {Helvetica 8} -command [list color_popup $self $w $name $i] pack $f.label $f.color $f.preset -side left *************** *** 3421,3425 **** frame $f pack [label $f.label -text $label] -side left ! button $f.color_chooser -bg $look($name) -activebackground $look($name) -command "color_popup $f $look($name)" \ -width 17 pack $f.color_chooser -side left --- 3426,3430 ---- frame $f pack [label $f.label -text $label] -side left ! button $f.color_chooser -bg $look($name) -activebackground $look($name) -command "color_popup2 $f $look($name)" \ -width 17 pack $f.color_chooser -side left *************** *** 3474,3478 **** }
! proc color_popup {frame init_color} { set color [tk_chooseColor -initialcolor $init_color -title "Choose color"] puts "color :: $color" --- 3479,3483 ---- }
! proc color_popup2 {frame init_color} { set color [tk_chooseColor -initialcolor $init_color -title "Choose color"] puts "color :: $color" *************** *** 3770,3783 **** color selrect "selection box" section "" "poo" ! subsection "poo" "poo" ! color canvasbgedit "canvas background (edit mode)" ! color canvasbgrun "canvas background (run mode)" ! subsection "boo" "boo" ! color objectframe1 "objectbox color" ! color objectframe2 "objectbox color" ! color objectframe3 "objectbox color" ! color objectframe4 "objectbox highlight color" ! color objectbg "object background" ! color objectfg "object foreground" }
--- 3775,3779 ---- color selrect "selection box" section "" "poo" ! colors "iem" "col" }
*************** *** 3844,3849 **** switch $type { section { - set which_section $f.main.$section $self add_section [incr section] $desc set subsection 0 } --- 3840,3846 ---- switch $type { section { $self add_section [incr section] $desc + set which_section $f.main.$section + set which_self $self set subsection 0 } *************** *** 3855,3858 **** --- 3852,3856 ---- $subself page_select 1 set which_section .$subself.main.$subsection + set which_self $subself #properties_dialog $subself .$subself ClientPrefsDialog_ok client \ # [list [lindex $name 0] "$desc" subsection {}] *************** *** 3860,3876 **** alias {} radio { ! properties_dialog $self $f.main.$section ClientPrefsDialog_ok client \ [list [lindex $name 0] "$desc" choice {}] } color { ! #properties_dialog $self $f.main.$section ClientPrefsDialog_ok client \ # [list [lindex $name 0] "$desc" choice_color {}] ! properties_dialog $subself $which_section ClientPrefsDialog_ok client \ [list [lindex $name 0] "$desc" choice_color {}] } default { ! #properties_dialog $self $f.main.$section ClientPrefsDialog_ok \ # [list $name "$name: $desc" $type {}] ! properties_dialog $self $f.main.$section ClientPrefsDialog_ok client \ [list $name $desc $type {}] } --- 3858,3878 ---- alias {} radio { ! properties_dialog $which_self $which_section ClientPrefsDialog_ok client \ [list [lindex $name 0] "$desc" choice {}] } color { ! #properties_dialog $which_self $f.main.$section ClientPrefsDialog_ok client \ # [list [lindex $name 0] "$desc" choice_color {}] ! properties_dialog $which_self $which_section ClientPrefsDialog_ok client \ [list [lindex $name 0] "$desc" choice_color {}] } + colors { + properties_dialog $which_self $which_section ClientPrefsDialog_ok client \ + [list [lindex $name 0] "$desc" color {}] + } default { ! #properties_dialog $which_self $f.main.$section ClientPrefsDialog_ok \ # [list $name "$name: $desc" $type {}] ! properties_dialog $which_self $which_section ClientPrefsDialog_ok client \ [list $name $desc $type {}] }