Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20335
Modified Files: Tag: devel_0_39 desire.tk Log Message: capitalization of client classnames
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.176 retrieving revision 1.1.2.177 diff -C2 -d -r1.1.2.176 -r1.1.2.177 *** desire.tk 22 Apr 2006 03:17:29 -0000 1.1.2.176 --- desire.tk 22 Apr 2006 03:28:26 -0000 1.1.2.177 *************** *** 311,315 **** ################## set up main window #########################
! #class_new Client {Menuable view} class_new Client {Menuable}
--- 311,315 ---- ################## set up main window #########################
! #class_new Client {Menuable View} class_new Client {Menuable}
*************** *** 524,528 **** }
! # a menuable must be a view class_new Menuable {} def* Menuable init {args} { --- 524,528 ---- }
! # a menuable must be a View class_new Menuable {} def* Menuable init {args} { *************** *** 767,779 ****
#-----------------------------------------------------------------------------------# ! class_new view {Observable Thing}
! # normally ninlets/noutlets should be in class "box", but server-side isn't smart enough ! def view ninlets= {v} {set @ninlets $v} ! def view noutlets= {v} {set @noutlets $v} ! def view ninlets {} {return $@ninlets} ! def view noutlets {} {return $@noutlets}
! def view init {} { set @selected? 0 set @ninlets 1 --- 767,779 ----
#-----------------------------------------------------------------------------------# ! class_new View {Observable Thing}
! # normally ninlets/noutlets should be in class "Box", but server-side isn't smart enough ! def View ninlets= {v} {set @ninlets $v} ! def View noutlets= {v} {set @noutlets $v} ! def View ninlets {} {return $@ninlets} ! def View noutlets {} {return $@noutlets}
! def View init {} { set @selected? 0 set @ninlets 1 *************** *** 782,786 **** }
! def view item {suffix type coords args} { set c .$@canvas.c set ss $self$suffix --- 782,786 ---- }
! def View item {suffix type coords args} { set c .$@canvas.c set ss $self$suffix *************** *** 794,816 **** }
! def view item_delete {{suffix all}} { switch -- $suffix { all {.$@canvas.c delete $self } default {.$@canvas.c delete $self$suffix}}}
! def* view draw {} {}
! def* view delete {} {$self erase; $self _delete; io_erase $self} ! def* view erase {} {$self item_delete} ! def* view click {args} {} ! #def* view clickedit {args} {} ! def* view unclick {args} {} ! def* view unclickedit {args} {} ! def* view motion {args} {} ! def* view motionedit {args} {} ! def view selected? {} {return $@selected?} ! def view selected?= {x} {set @selected? $x; $self changed}
! #def* view clickedit {x y butt key in_selection selection} { #handles the shift click #if {($f&1) && !$already} {post "add to selection?"; return} --- 794,816 ---- }
! def View item_delete {{suffix all}} { switch -- $suffix { all {.$@canvas.c delete $self } default {.$@canvas.c delete $self$suffix}}}
! def* View draw {} {}
! def* View delete {} {$self erase; $self _delete; io_erase $self} ! def* View erase {} {$self item_delete} ! def* View click {args} {} ! #def* View clickedit {args} {} ! def* View unclick {args} {} ! def* View unclickedit {args} {} ! def* View motion {args} {} ! def* View motionedit {args} {} ! def View selected? {} {return $@selected?} ! def View selected?= {x} {set @selected? $x; $self changed}
! #def* View clickedit {x y butt key in_selection selection} { #handles the shift click #if {($f&1) && !$already} {post "add to selection?"; return} *************** *** 830,834 ****
! def* view select {state} { set ostate [$self selected?] set @selected? $state --- 830,834 ----
! def* View select {state} { set ostate [$self selected?] set @selected? $state *************** *** 836,840 **** }
! def view xy {} { # if {[info exists focus(createdby)]} { # switch $focus(createdby) { --- 836,840 ---- }
! def View xy {} { # if {[info exists focus(createdby)]} { # switch $focus(createdby) { *************** *** 850,864 **** }
! #def view connect {} { #}
! # in the future, one view may have several canvases. (??) # this would mean that the following proc will have to die. ! def* view canvas {} {return $@canvas} ! def* view canvas= {c} {set @canvas $c}
#-----------------------------------------------------------------------------------#
! class_new Canvas {Menuable view}
#def Canvas close {} {pd $self menuclose 0} --- 850,864 ---- }
! #def View connect {} { #}
! # in the future, one View may have several canvases. (??) # this would mean that the following proc will have to die. ! def* View canvas {} {return $@canvas} ! def* View canvas= {c} {set @canvas $c}
#-----------------------------------------------------------------------------------#
! class_new Canvas {Menuable View}
#def Canvas close {} {pd $self menuclose 0} *************** *** 1289,1295 ****
#-----------------------------------------------------------------------------------# ! class_new textbox {box}
! def* textbox draw {} { # TEXT = the text label # text = the input text field --- 1289,1295 ----
#-----------------------------------------------------------------------------------# ! class_new TextBox {Box}
! def* TextBox draw {} { # TEXT = the text label # text = the input text field *************** *** 1301,1308 **** puts "!!!!edit = $@edit!!!!" if {$@edit} { - set t .$@canvas.c.${self}text $t configure -width [expr [string length $@text]+1] ! } { $self item TEXT text [l+ {2 2} [list $x1 $y1]] \ -font $font(str) -text $@text -fill $look(objectfg) -anchor nw --- 1301,1307 ---- puts "!!!!edit = $@edit!!!!" if {$@edit} { set t .$@canvas.c.${self}text $t configure -width [expr [string length $@text]+1] ! } { $self item TEXT text [l+ {2 2} [list $x1 $y1]] \ -font $font(str) -text $@text -fill $look(objectfg) -anchor nw *************** *** 1314,1318 **** def Canvas obj_in_edit= {v} {set @obj_in_edit $v}
! def* textbox edit {} { global look font if {$@edit} {return} --- 1313,1317 ---- def Canvas obj_in_edit= {v} {set @obj_in_edit $v}
! def* TextBox edit {} { global look font if {$@edit} {return} *************** *** 1343,1347 **** }
! def* textbox key {widget x y key iso shift} { after 0 "$self after_key $widget" switch -- $key { --- 1342,1346 ---- }
! def* TextBox key {widget x y key iso shift} { after 0 "$self after_key $widget" switch -- $key { *************** *** 1350,1354 **** }
! def* textbox after_key {widget} { $widget configure -state normal set @text [$widget get 1.0 1.end] --- 1349,1353 ---- }
! def* TextBox after_key {widget} { $widget configure -state normal set @text [$widget get 1.0 1.end] *************** *** 1357,1361 **** }
! def* textbox update_size {} { global font look set @textwidth [expr $font(padx)+$font(width)*([string length $@text]+$@edit)] --- 1356,1360 ---- }
! def* TextBox update_size {} { global font look set @textwidth [expr $font(padx)+$font(width)*([string length $@text]+$@edit)] *************** *** 1368,1374 **** #-----------------------------------------------------------------------------------
! class_new objectbox {textbox}
! def* objectbox init {args} { super global font look --- 1367,1373 ---- #-----------------------------------------------------------------------------------
! class_new ObjectBox {TextBox}
! def ObjectBox init {args} { super global font look *************** *** 1388,1392 **** }
! def* objectbox draw {} { $self update_size set xs $@xs --- 1387,1391 ---- }
! def* ObjectBox draw {} { $self update_size set xs $@xs *************** *** 1414,1418 **** }
! def* objectbox unedit {} { if {!$@edit} {return} set @edit 0 --- 1413,1417 ---- }
! def* ObjectBox unedit {} { if {!$@edit} {return} set @edit 0 *************** *** 1428,1448 **** }
! def objectbox click {args} { puts "$self is being clicked in run mode" }
! def objectbox unclick {args} { puts "$self is being unclicked in run mode" }
! def objectbox unclickedit {args} { puts "$self is being unclicked in edit mode $args" }
! def objectbox motionedit {args} { #puts "motions in $self in edit mode" }
! #def objectbox motion {args} { # puts "motions in $self in edit mode" #} --- 1427,1447 ---- }
! def ObjectBox click {args} { puts "$self is being clicked in run mode" }
! def ObjectBox unclick {args} { puts "$self is being unclicked in run mode" }
! def ObjectBox unclickedit {args} { puts "$self is being unclicked in edit mode $args" }
! def ObjectBox motionedit {args} { #puts "motions in $self in edit mode" }
! #def ObjectBox motion {args} { # puts "motions in $self in edit mode" #} *************** *** 1576,1580 **** }
! def* view move {dx dy} { mset {x y} [$self xy] set @x1 [expr $@x1+$dx] --- 1575,1579 ---- }
! def* View move {dx dy} { mset {x y} [$self xy] set @x1 [expr $@x1+$dx] *************** *** 1690,1694 ****
#-----------------------------------------------------------------------------------# ! class_new StatusBar {view}
def StatusBar widget {} {return .$@canvas.stat} --- 1689,1693 ----
#-----------------------------------------------------------------------------------# ! class_new StatusBar {View}
def StatusBar widget {} {return .$@canvas.stat} *************** *** 2039,2068 ****
#-----------------------------------------------------------------------------------# ! class_new box {view}
! def* box init {args} { super set @wires {} - }
! def* box connect_out {} { ! }
! def* box connect_in {} { ! }
! def* box draw {} { ! }
! def box bbox {} { mset {x y} [$self xy] list $x $y [expr $x+$@xs] [expr $y+$@ys] }
! def* box draw_wires {} { puts "wires:$@wires" --- 2038,2063 ----
#-----------------------------------------------------------------------------------# ! class_new Box {View}
! def* Box init {args} { super set @wires {} }
! def* Box connect_out {} { }
! def* Box connect_in {} { }
! def* Box draw {} { }
! def Box bbox {} { mset {x y} [$self xy] list $x $y [expr $x+$@xs] [expr $y+$@ys] }
! def* Box draw_wires {} { puts "wires:$@wires" *************** *** 2073,2077 **** }
! def* box delete_wire {wire} { set find [lsearch $@wires $wire] if { $find != -1} { --- 2068,2072 ---- }
! def* Box delete_wire {wire} { set find [lsearch $@wires $wire] if { $find != -1} { *************** *** 2080,2084 **** }
! def* box move {dx dy} { global _ super $dx $dy --- 2075,2079 ---- }
! def* Box move {dx dy} { global _ super $dx $dy *************** *** 2092,2096 ****
! def* box clickedit {x y butt key in_selection selection} { #handles the shift click #if {($f&1) && !$already} {post "add to selection?"; return} --- 2087,2091 ----
! def* Box clickedit {x y butt key in_selection selection} { #handles the shift click #if {($f&1) && !$already} {post "add to selection?"; return} *************** *** 2110,2114 ****
# type is i or o ! def box hilite_io {type x y} { global look mset {x1 y1 x2 y2} [$self bbox] --- 2105,2109 ----
# type is i or o ! def Box hilite_io {type x y} { global look mset {x1 y1 x2 y2} [$self bbox] *************** *** 2127,2133 **** } #-----------------------------------------------------------------------------------# ! class_new wire {view}
! def* wire init {canvas from outno to inno} { super global _ --- 2122,2128 ---- } #-----------------------------------------------------------------------------------# ! class_new Wire {View}
! def* Wire init {canvas from outno to inno} { super global _ *************** *** 2150,2154 **** }
! def* wire draw {} { global look #set thick 2 --- 2145,2149 ---- }
! def* Wire draw {} { global look #set thick 2 *************** *** 2185,2189 **** }
! def* wire select {flag} { global look if {$flag} {set colour $look(wirefg2)} {set colour $look(wirefg)} --- 2180,2184 ---- }
! def* Wire select {flag} { global look if {$flag} {set colour $look(wirefg2)} {set colour $look(wirefg)} *************** *** 2191,2195 **** }
! def wire update {source outlet target inlet kind} { set @source $source set @outlet $outlet --- 2186,2190 ---- }
! def Wire update {source outlet target inlet kind} { set @source $source set @outlet $outlet *************** *** 2200,2204 **** }
! def wire delete {} { set c .$@canvas.c $@obj1 delete_wire $self --- 2195,2199 ---- }
! def Wire delete {} { set c .$@canvas.c $@obj1 delete_wire $self *************** *** 2277,2284 ****
# @pdclass {@_class} ! set classinfo(obj) {objectbox} ! set classinfo(msg) {messagebox} ! set classinfo(tgl) {toggle} ! set classinfo(bng) {bang} set classinfo(nbx) {numbox} set classinfo(hsl) {slider} --- 2272,2279 ----
# @pdclass {@_class} ! set classinfo(obj) {ObjectBox} ! set classinfo(msg) {MessageBox} ! set classinfo(tgl) {Toggle} ! set classinfo(bng) {Bang} set classinfo(nbx) {numbox} set classinfo(hsl) {slider} *************** *** 2318,2322 **** puts "_($x:text) : $_($x:text)" } ! set _($x:_class) objectbox } #puts "+++++++ class:$_($x:_class) ++++++" --- 2313,2317 ---- puts "_($x:text) : $_($x:text)" } ! set _($x:_class) ObjectBox } #puts "+++++++ class:$_($x:_class) ++++++" *************** *** 2349,2353 **** #} switch -- _($x:_class) { ! objectbox { set _($x:text) [lrange $d $i end] set _($x:valid) 0 --- 2344,2348 ---- #} switch -- _($x:_class) { ! ObjectBox { set _($x:text) [lrange $d $i end] set _($x:valid) 0 *************** *** 2382,2388 **** }
! class_new messagebox {textbox}
! def* messagebox init {args} { puts "!!!!!! args:$args" super --- 2377,2383 ---- }
! class_new MessageBox {TextBox}
! def* MessageBox init {args} { puts "!!!!!! args:$args" super *************** *** 2394,2398 **** }
! def* messagebox draw {} { $self update_size global look --- 2389,2393 ---- }
! def* MessageBox draw {} { $self update_size global look *************** *** 2410,2414 **** }
! def* messagebox unedit {} { if {!$@edit} {return} set @edit 0 --- 2405,2409 ---- }
! def* MessageBox unedit {} { if {!$@edit} {return} set @edit 0 *************** *** 2424,2428 **** }
! def messagebox bang {flag} { global look $canvas itemconfigure ${self}BASE -fill \ --- 2419,2423 ---- }
! def MessageBox bang {flag} { global look $canvas itemconfigure ${self}BASE -fill \ *************** *** 2430,2435 **** }
! class_new atombox {view} ! def atombox draw {} { global look mset {x1 y1} [$self xy] --- 2425,2430 ---- }
! class_new AtomBox {View} ! def AtomBox draw {} { global look mset {x1 y1} [$self xy] *************** *** 2444,2448 **** }
! class_new comment {view} def comment draw {xs ys ins outs} { if {[llength [$canvas gettags $self]] != 0} {} --- 2439,2443 ---- }
! class_new comment {View} def comment draw {xs ys ins outs} { if {[llength [$canvas gettags $self]] != 0} {} *************** *** 2450,2457 **** }
! class_new bluebox {labeled box} ! #class_new bluebox {box labeled}
! def* bluebox draw {} { global look super --- 2445,2452 ---- }
! class_new BlueBox {labeled Box} ! #class_new BlueBox {Box labeled}
! def* BlueBox draw {} { global look super *************** *** 2469,2477 **** }
! def* bluebox motionedit {args} { #puts "motions in $self in edit mode" }
! class_new numbox {labeled box} def* numbox init {args} { eval [concat [list super] $args] --- 2464,2472 ---- }
! def* BlueBox motionedit {args} { #puts "motions in $self in edit mode" }
! class_new numbox {labeled Box} def* numbox init {args} { eval [concat [list super] $args] *************** *** 2599,2603 **** }
! class_new radio {bluebox} def radio orient {} { switch $@pdclass { --- 2594,2598 ---- }
! class_new radio {BlueBox} def radio orient {} { switch $@pdclass { *************** *** 2653,2657 **** }
! class_new slider {bluebox} def slider orient {} { switch $@pdclass { --- 2648,2652 ---- }
! class_new slider {BlueBox} def slider orient {} { switch $@pdclass { *************** *** 2771,2776 ****
#-----------------------------------------------------------------------------------# ! class_new bang {bluebox} ! def bang init {args} { puts "!!!!!! args:$args" super --- 2766,2771 ----
#-----------------------------------------------------------------------------------# ! class_new Bang {BlueBox} ! def Bang init {args} { puts "!!!!!! args:$args" super *************** *** 2778,2787 **** }
! def bang bbox {} { mset {x1 y1} [$self xy] list $x1 $y1 [expr $x1+$@w] [expr $y1+$@w] }
! def bang draw {} { super mset {x1 y1 x2 y2} [$self bbox] --- 2773,2782 ---- }
! def Bang bbox {} { mset {x1 y1} [$self xy] list $x1 $y1 [expr $x1+$@w] [expr $y1+$@w] }
! def Bang draw {} { super mset {x1 y1 x2 y2} [$self bbox] *************** *** 2792,2805 **** }
! def bang click {x y b f} {pd .$self bang; $self bang}
! def bang bang {} { .$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@fcol]] after 100 [list .$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@bcol]]] }
! class_new toggle {bluebox}
! def toggle init {args} { puts "!!!!!! args:$args" super --- 2787,2800 ---- }
! def Bang click {x y b f} {pd .$self bang; $self bang}
! def Bang bang {} { .$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@fcol]] after 100 [list .$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@bcol]]] }
! class_new Toggle {BlueBox}
! def Toggle init {args} { puts "!!!!!! args:$args" super *************** *** 2808,2817 **** }
! def toggle bbox {} { mset {x1 y1} [$self xy] list $x1 $y1 [expr $x1+$@w] [expr $y1+$@w] }
! def toggle draw {} { super mset {x1 y1 x2 y2} [$self bbox] --- 2803,2812 ---- }
! def Toggle bbox {} { mset {x1 y1} [$self xy] list $x1 $y1 [expr $x1+$@w] [expr $y1+$@w] }
! def Toggle draw {} { super mset {x1 y1 x2 y2} [$self bbox] *************** *** 2830,2846 **** }
! def toggle erase {} { # io_erase $self # $@canvas delete ${self}BUT ${self}LABEL ${self}X1 ${self}X2 }
! def* toggle click {x y b f} { pd x$self bang if {!$@on} {set @on 1} {set @on 0} ! puts "toggle state:$@on" $self draw }
! class_new vu {view}
set vu_col { --- 2825,2841 ---- }
! def Toggle erase {} { # io_erase $self # $@canvas delete ${self}BUT ${self}LABEL ${self}X1 ${self}X2 }
! def* Toggle click {x y b f} { pd x$self bang if {!$@on} {set @on 1} {set @on 0} ! puts "Toggle state:$@on" $self draw }
! class_new vu {View}
set vu_col { *************** *** 2920,2924 **** }
! class_new dropper {view} def dropper draw {} { set isnew [expr [llength [$@canvas gettags ${self}BASE]] == 0] --- 2915,2919 ---- }
! class_new dropper {View} def dropper draw {} { set isnew [expr [llength [$@canvas gettags ${self}BASE]] == 0] *************** *** 2943,2947 **** def dropper erase {} {destroy $@canvas.${self}DROP; super}
! class_new cnv {labeled view} def cnv draw {} { mset {x1 y1} [$self xy] --- 2938,2942 ---- def dropper erase {} {destroy $@canvas.${self}DROP; super}
! class_new cnv {labeled View} def cnv draw {} { mset {x1 y1} [$self xy] *************** *** 3307,3311 **** ############ completions
! def textbox propose_completions {} { global class_list if {![info exists class_list]} { --- 3302,3306 ---- ############ completions
! def TextBox propose_completions {} { global class_list if {![info exists class_list]} {