Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16623
Modified Files: Tag: devel_0_39 desire.tk Log Message: added nested tabs for ddrc config gui, see class SubPagedDialog
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.185 retrieving revision 1.1.2.186 diff -C2 -d -r1.1.2.185 -r1.1.2.186 *** desire.tk 22 Apr 2006 17:30:48 -0000 1.1.2.185 --- desire.tk 23 Apr 2006 02:13:29 -0000 1.1.2.186 *************** *** 737,741 **** foreach {word1 word2 word3} $line { - puts "word:: $word1 | $word2 | $word3" set word1 [string replace $word1 0 0] --- 737,740 ---- *************** *** 743,753 **** look { set look($word2) $word3 ! puts "look($word2) $word3" } font { ! puts "settings for font" } default { ! puts "settings for something" } } --- 742,752 ---- look { set look($word2) $word3 ! #puts "look($word2) $word3" } font { ! #puts "settings for font" } default { ! #puts "settings for something" } } *************** *** 3422,3427 **** frame $f pack [label $f.label -text $label] -side left - - #button .$f.color_chooser -bg [tk_chooseColor -initialcolor gray -title "Choose color"] button $f.color_chooser -bg $look($name) -activebackground $look($name) -command "color_popup $f $look($name)" \ -width 17 --- 3421,3424 ---- *************** *** 3429,3432 **** --- 3426,3435 ---- } + subsection { + #frame $f + puts "path ===== $f" + label $f -text $label -bg "#0000aa" -fg "#ffff55" -font {helvetica -10 bold} + #$self add_subsection $f $name + } toggle { frame $f *************** *** 3561,3564 **** --- 3564,3608 ---- }
+ #def PagedDialog add_subsection {subsection text} { + # set f .$self.1 + # puts "sub :: $subsection" + # frame $subsection + # pack [button $subsection.butt -text $text \ + # -command bell] -side left -pady {4 4} + #} + + class_new SubPagedDialog {Dialog} + + def SubPagedDialog init {} { + #super + set f .$self + frame $f + pack [frame $f.bar] -fill x + pack [frame $f.main -borderwidth 1 -relief raised \ + -width 590 -height 300] -fill both -expand yes + pack $f + } + + def SubPagedDialog page_select {i} { + set f .$self + catch { + $f.bar.$@section configure -relief raised + place forget $f.main.$@section + pack $f.bar.$@section -pady {4 4} + } + set @section $i + place $f.main.$@section -x 0 -y 0 + $f.bar.$@section configure -relief sunken + pack $f.bar.$@section -pady {8 0} + } + + def SubPagedDialog add_section {section text} { + set f .$self + frame $f.main.$section + pack [button $f.bar.$section -text $text \ + -command [list $self page_select $section]] -side left -pady {4 4} + } + + set pdrc_options { section audio "Audio DSP" *************** *** 3700,3705 **** --- 3744,3751 ---- set ddrc_options { section "" "look" + subsection "canvas" "canvas" color canvasbgedit "canvas background (edit mode)" color canvasbgrun "canvas background (run mode)" + subsection "object" "object" color objectframe1 "objectbox color" color objectframe2 "objectbox color" *************** *** 3708,3719 **** color objectbg "object background" color objectfg "object foreground" ! color inletfg "inlet color" ! color outletfg "outlet color" color wirefg "wire color" color wirefg2 "wire highlight" color wiredash "wire dash" ! color selrect "selection box" ! ! }
--- 3754,3776 ---- color objectbg "object background" color objectfg "object foreground" ! subsection "wire" "wire" color wirefg "wire color" color wirefg2 "wire highlight" color wiredash "wire dash" ! subsection "others" "others" ! color inletfg "inlet color" ! color outletfg "outlet color" ! 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,3782 **** set f .$self.1 set section 0 foreach {type name desc} $ddrc_options { switch $type { void { set type toggle }} switch $type { ! section {$self add_section [incr section] $desc} alias {} radio { --- 3832,3854 ---- set f .$self.1 set section 0 + set subsection 0 foreach {type name desc} $ddrc_options { switch $type { void { set type toggle }} switch $type { ! section { ! set which_section $f.main.$section ! $self add_section [incr section] $desc ! set subsection 0 ! } ! subsection { ! #puts "|| $f.main.$section.$name ||" ! set subself $self.1.main.$section.subsections ! if {!$subsection} {SubPagedDialog new_as $subself} ! $subself add_section [incr subsection] $name ! $subself page_select 1 ! set which_section .$subself.main.$subsection ! #properties_dialog $subself .$subself ClientPrefsDialog_ok client \ ! # [list [lindex $name 0] "$desc" subsection {}] ! } alias {} radio { *************** *** 3785,3789 **** } color { ! properties_dialog $self $f.main.$section ClientPrefsDialog_ok client \ [list [lindex $name 0] "$desc" choice_color {}] } --- 3857,3863 ---- } 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 {}] }