Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20895
Modified Files: Tag: devel_0_39 desire.tk Log Message: PagedDialog uses Notebook
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.555 retrieving revision 1.1.2.556 diff -C2 -d -r1.1.2.555 -r1.1.2.556 *** desire.tk 17 Nov 2006 06:26:10 -0000 1.1.2.555 --- desire.tk 17 Nov 2006 06:55:46 -0000 1.1.2.556 *************** *** 6637,6645 **** def PagedDialog init {args} { eval [concat [list super] $args] ! set f .$self.1 ! frame $f ! pack [frame $f.bar] -fill x ! pack [frame $f.main -borderwidth 1 -relief raised -width 600 -height 350] -fill both -expand yes ! pack $f }
--- 6637,6642 ---- def PagedDialog init {args} { eval [concat [list super] $args] ! set @nb [Notebook new_as $self.1] ! pack .$@nb -expand 1 -fill both }
*************** *** 6649,6667 **** 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 PagedDialog page_select {i} { - set f .$self.1 - 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 ;# -width [winfo width $f.main] -height [winfo height $f.main] - $f.bar.$@section configure -relief sunken - pack $f.bar.$@section -pady {8 0} - } def Notebook page_select {i} { set f .$self --- 6646,6651 ---- *************** *** 6677,6687 **** }
- def PagedDialog add_section {section text} { - set f .$self.1 - frame $f.main.$section - pack [button $f.bar.$section -text $text -command [list $self page_select $section]] -side left -pady {4 4} - bind $f.bar.$section <Return> "$self page_select $section" - } - def Notebook add_section {section text} { set f .$self --- 6661,6664 ---- *************** *** 6818,6822 **** set f .$self.1 set section 0 ! foreach {type names} $pdrc_options { set label "" --- 6795,6799 ---- set f .$self.1 set section 0 ! foreach {type names} $pdrc_options { set label "" *************** *** 6832,6836 **** switch $type { void { set type toggle }} switch $type { ! section {$self add_section [incr section] [say $name]} choice {$self add $f.main.$section \ [list $name choice -choices [lrange $names 1 end]]} --- 6809,6813 ---- switch $type { void { set type toggle }} switch $type { ! section {$@nb add_section [incr section] [say $name]} choice {$self add $f.main.$section \ [list $name choice -choices [lrange $names 1 end]]} *************** *** 6838,6842 **** } } ! $self page_select 1 }
--- 6815,6819 ---- } } ! $@nb page_select 1 }
*************** *** 7021,7025 **** switch $type { section { ! $self add_section [incr section] [say $name] set which_section $f.main.$section set which_self $self --- 6998,7002 ---- switch $type { section { ! $@nb add_section [incr section] [say $name] set which_section $f.main.$section set which_self $self *************** *** 7028,7032 **** subsection { set subself $self.1.main.$section.subsections ! if {!$subsection} {Notebook new_as $subself} $subself add_section [incr subsection] [say $name] $subself page_select 1 --- 7005,7012 ---- subsection { set subself $self.1.main.$section.subsections ! if {!$subsection} { ! Notebook new_as $subself ! pack .$subself ! } $subself add_section [incr subsection] [say $name] $subself page_select 1 *************** *** 7039,7051 **** set str [string tolower $class$name] set str2 ${str}path - #puts " var $var" - #this stores the path to the widget on the gui editor. set @$str2 $which_section.$str.color - #puts " str2::: $@$str2" - #set @$name $look($name) - #set @$name $look($class:$name) set @$str $look($class:$name) - #puts "$str :::: $look($class:$name)" - #$self add $which_section [list [lindex $name 0] color] $self add $which_section [list $str color] } --- 7019,7024 ---- *************** *** 7057,7083 **** set str [string tolower $class$item] set str2 ${str}path - #set var ${item}path - #set @$item $key($item) set @$str $key($class:$item) - #puts " @$str //\ $key($class:$item)" - #set @$var $which_section.[string tolower [lindex $name 0]].[string tolower $item] - #set @$str2 $which_section.[string tolower [lindex $str 0]].[string tolower $str] set @$str2 $which_section.$str0.[string tolower $str] - #set @$str2 $which_section.[string tolower [lindex $name 0]].[string tolower $str] lappend l $str - #lappend l $name } - #$self add $which_section [list $name $type] $self add $which_section [list $l $type] - #$self add $which_section [list $l $type] } toggle { set str [string tolower $class$name] set str2 ${str}path - #set var ${name}path set @$str2 $which_section.$name.color - #this stores the path to the widget on the gui editor. - #set @$var $which_section.$name.color - #set @$name $crosshair($name) set @$str $look($class:$name) $self add $which_section [list [lindex $str 0] toggle] --- 7030,7043 ---- *************** *** 7093,7097 **** } } ! $self page_select 1 }
--- 7053,7057 ---- } } ! $@nb page_select 1 }