Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6449
Modified Files: Tag: impd_0_37 u_main.tk Log Message: set global default font to {Helvetica -12} set global borderwidth to 1 added plus/minus buttons to listeners (Tcl/Ruby)
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.1.1.4.2.7.4.21 retrieving revision 1.1.1.4.2.7.4.22 diff -C2 -d -r1.1.1.4.2.7.4.21 -r1.1.1.4.2.7.4.22 *** u_main.tk 24 Mar 2004 04:03:01 -0000 1.1.1.4.2.7.4.21 --- u_main.tk 25 Mar 2004 02:38:31 -0000 1.1.1.4.2.7.4.22 *************** *** 11,22 **** #option add *backgroundPixmap /usr/share/themes/BrushedMetalBlue/gtk/brushed-dark.xpm widgetDefault #option add *backgroundPixmap /home/matju/brushed-dark.gif widgetDefault ! option add *Menu*font {helvetica 9} ! #option add *background #000000 ! #option add *foreground #ffffff ! option add *Menu*borderWidth 1 ! option add *Menu*pady 42 ! option add *Button*borderWidth 1 ! option add *Checkbutton*borderWidth 1 ! option add *Radiobutton*borderWidth 1 option add *Checkbutton*selectColor #dd3000 option add *Radiobutton*selectColor #dd3000 --- 11,21 ---- #option add *backgroundPixmap /usr/share/themes/BrushedMetalBlue/gtk/brushed-dark.xpm widgetDefault #option add *backgroundPixmap /home/matju/brushed-dark.gif widgetDefault ! #option add *Menu*font {Helvetica -12} ! option add *font {Helvetica -12} ! option add *borderWidth 1 ! #option add *Menu*borderWidth 1 ! #option add *Button*borderWidth 1 ! #option add *Checkbutton*borderWidth 1 ! #option add *Radiobutton*borderWidth 1 option add *Checkbutton*selectColor #dd3000 option add *Radiobutton*selectColor #dd3000 *************** *** 75,82 **** ################## set up main window ######################### menu .mbar - canvas .dummy -height 2p -width 6c
frame .controls ! pack .controls .dummy -side top -fill x menu .mbar.file -tearoff $pd_tearoff; .mbar add cascade -label "File" -menu .mbar.file menu .mbar.find -tearoff $pd_tearoff; .mbar add cascade -label "Find" -menu .mbar.find --- 74,80 ---- ################## set up main window ######################### menu .mbar
frame .controls ! pack .controls -side top -fill x menu .mbar.file -tearoff $pd_tearoff; .mbar add cascade -label "File" -menu .mbar.file menu .mbar.find -tearoff $pd_tearoff; .mbar add cascade -label "Find" -menu .mbar.find *************** *** 99,115 **** set ctrls_outlevel 0
! frame .controls.switches ! checkbutton .controls.switches.audiobutton -text "Compute Audio" \ ! -variable ctrls_audio_on -anchor w \ ! -command {pd "pd dsp $ctrls_audio_on ;"} ! checkbutton .controls.switches.meterbutton -text "Peak Meters" \ ! -variable ctrls_meter_on -anchor w \ ! -command {pd "pd meters $ctrls_meter_on ;"} ! ! pack .controls.switches.meterbutton .controls.switches.audiobutton -side top
- frame .controls.inout foreach z {in out} { ! set f .controls.inout.$z frame $f frame $f.1 -borderwidth 2 -relief ridge --- 97,111 ---- set ctrls_outlevel 0
! proc pdtk_pd_meters {indb outdb inclip outclip} { ! global ctrls_inlevel ctrls_outlevel ! set ctrls_inlevel $indb ! set ctrls_outlevel $outdb ! foreach {z clip} [list in $inclip out $outclip] { ! .controls.$z.1.clip configure -background [if {$clip==1} {list red} {list grey}] ! } ! }
foreach z {in out} { ! set f .controls.$z frame $f frame $f.1 -borderwidth 2 -relief ridge *************** *** 124,133 **** }
! button .controls.dio -text "DIO\nerrors" -command {pd "pd audiostatus ;"}
! #pack .controls.switches -side bottom -pady 12 ! pack .controls.inout -side left -padx 14 ! pack .controls.switches -side left -pady 12 ! pack .controls.dio -side right -padx 20
bind . <Control-Key> {pdtk_pd_ctrlkey %W %K 0} --- 120,144 ---- }
! proc pdtk_pd_dsp {value} { ! global ctrls_audio_on ! if {$value == "ON"} {set ctrls_audio_on 1} else {set ctrls_audio_on 0} ! }
! proc pdtk_pd_dio {red} { ! .controls.dio configure -background red -activebackground [if {$red==1} {list red} {list lightgrey}] ! } ! ! frame .controls.switches ! foreach {w x y z} { ! audiobutton "Compute Audio" ctrls_audio_on {pd "pd dsp $ctrls_audio_on ;"} ! meterbutton "Peak Meters" ctrls_meter_on {pd "pd meters $ctrls_meter_on ;"} ! } { ! checkbutton .controls.switches.$w -text $x -variable $y -anchor w -command $z ! pack .controls.switches.$w -side top ! } ! ! button .controls.switches.dio -text "DIO Errors" -command {pd "pd audiostatus ;"} ! pack .controls.switches.dio ! pack .controls.switches -side left
bind . <Control-Key> {pdtk_pd_ctrlkey %W %K 0} *************** *** 139,143 ****
wm title . "Pd" - #. configure -menu .mbar -width 200 -height 150 . configure -menu .mbar
--- 150,153 ---- *************** *** 489,493 ****
toplevel $name ! label $name.label -text {find...} entry $name.entry -textvariable find_string pack $name.label $name.entry -side top --- 499,503 ----
toplevel $name ! label $name.label -text "Find..." entry $name.entry -textvariable find_string pack $name.label $name.entry -side top *************** *** 706,709 **** --- 716,724 ---- bind $name.c <Motion> "+stat_pos_update $name %x %y" } + + bind $name.c <Button-4> "$name.c yview scroll -1 units" + bind $name.c <Button-5> "$name.c yview scroll +1 units" + #image create photo lena -file "/home/matju/lena.ppm" + #$name.c create image 0 0 -image lena -anchor nw }
*************** *** 1556,1577 **** }
- ##################### DSP ON/OFF, METERS, DIO ERROR ################### - proc pdtk_pd_dsp {value} { - global ctrls_audio_on - if {$value == "ON"} {set ctrls_audio_on 1} else {set ctrls_audio_on 0} - } - - proc pdtk_pd_meters {indb outdb inclip outclip} { - global ctrls_inlevel ctrls_outlevel - set ctrls_inlevel $indb - .controls.inout.in.clip configure -background [if {$inclip==1} {list red} {list grey}] - set ctrls_outlevel $outdb - .controls.inout.out.clip configure -background [if {$outclip==1} {list red} {list grey}] - } - - proc pdtk_pd_dio {red} { - .controls.dio configure -background red -activebackground [if {$red==1} {list red} {list lightgrey}] - } - ############# text editing from the "edit" menu ################### set edit_number 1 --- 1571,1574 ---- *************** *** 1936,1946 **** ############ evaluator
! proc listener_new {self name} { global _ set _($self:hist) {} set _($self:histi) 0 frame $self label $self.label -text "$name: " entry $self.entry -width 40 pack $self.label -side left pack $self.entry -side left -fill x -expand yes --- 1933,1951 ---- ############ evaluator
! image create bitmap icon_plus -data "#define z_width 7\n#define z_height 7 ! static unsigned char z_bits[] = { 8,8,8,127,8,8,8 };" ! image create bitmap icon_minus -data "#define z_width 7\n#define z_height 7 ! static unsigned char z_bits[] = { 0,0,0,127,0,0,0 };" ! ! proc listener_new {self name command} { global _ set _($self:hist) {} set _($self:histi) 0 + set _($self:command) $command frame $self + button $self.expander -image icon_plus -command "listener_expand $self" label $self.label -text "$name: " entry $self.entry -width 40 + pack $self.expander -side left pack $self.label -side left pack $self.entry -side left -fill x -expand yes *************** *** 1948,1953 **** --- 1953,1984 ---- bind $self.entry <Up> "listener_up $self" bind $self.entry <Down> "listener_down $self" + bind $self.entry <Return> $command + } + + proc listener_expand {self} { + global _ + set text [$self.entry get] + destroy $self.entry + text $self.entry -width 40 -height 8 + $self.entry insert 0.0 $text + pack $self.entry -side left -fill x -expand yes + $self.expander configure -image icon_minus -command "listener_unexpand $self" + #bind $self.entry <Alt-Return> $_($self:command) }
+ proc listener_unexpand {self} { + global _ + set text [$self.entry get 0.0 end] + regsub "\n$" $text "" text + destroy $self.entry + entry $self.entry -width 40 + $self.entry insert 0 $text + pack $self.entry -side left -fill x -expand yes + $self.expander configure -image icon_plus -command "listener_expand $self" + bind $self.entry <Up> "listener_up $self" + bind $self.entry <Down> "listener_down $self" + bind $self.entry <Return> $_($self:command) + } + proc listener_up {self} { global _ *************** *** 1982,1987 **** after 1 { if {$cmdline(console) != 0} { ! listener_new .tcl "Tcl" ! bind .tcl.entry <Return> {tcl_eval} }}
--- 2013,2017 ---- after 1 { if {$cmdline(console) != 0} { ! listener_new .tcl "Tcl" {tcl_eval} }}