Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20885
Modified Files: Tag: devel_0_39 desire.tk Log Message: added class_new bang, stil not sure if this is the right way a lot of guess work on fields2 variables to get it to draw bang.....
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.24 retrieving revision 1.1.2.25 diff -C2 -d -r1.1.2.24 -r1.1.2.25 *** desire.tk 4 Sep 2005 18:49:18 -0000 1.1.2.24 --- desire.tk 5 Sep 2005 05:57:43 -0000 1.1.2.25 *************** *** 879,883 **** {Comment {foo "pd %W text 0 ;"} "Ctrl+5"} {} ! {Bang {foo "pd %W bng 0 ;"} "Alt+b"} {Toggle {foo "pd %W toggle 0 ;"} "Alt+t"} {Number2 {foo "pd %W numbox 0 ;"} "Alt+n"} --- 879,883 ---- {Comment {foo "pd %W text 0 ;"} "Ctrl+5"} {} ! {Bang {bang_new} "Alt+b"} {Toggle {foo "pd %W toggle 0 ;"} "Alt+t"} {Number2 {foo "pd %W numbox 0 ;"} "Alt+n"} *************** *** 953,956 **** --- 953,957 ---- set canvas_id .x$canvas_id set offset_canvas [expr $offset_canvas + 1] + set _($canvas_id:obj_in_edit) 0
puts "new canvas id -> $canvas_id" *************** *** 1245,1248 **** --- 1246,1264 ---- } #-----------------------------------------------------------------------------------# + proc pdtk_canvas_altkey {name key iso} { + puts "pdtk_canvas_altkey::: $name $key $iso" + + set key [string tolower $key] + set topname [canvastosym $name] + puts pdtk_canvas_altkey + global accels + if {[info exists accels(alt+$key)]} { + set cmd $accels(alt+$key) + regsub -all %W $cmd $topname cmd + puts $cmd + eval $cmd + return} + } + #-----------------------------------------------------------------------------------#
proc foo {foo} { *************** *** 3412,3415 **** --- 3428,3462 ---- }
+ + #-----------------------------------------------------------------------------------# + + class_new bang { + + global offset _ + + set offset [expr $offset + 1] + set canvas $_(focus) + + set bang_id [format %x [expr 0x81168b0 - $offset]] + + puts "new object id -> $bang_id" + + set _($bang_id:w) 15 + set _($bang_id:rcv) 1 + set _($bang_id:snd) 1 + set _($bang_id:bcol) 20 + set _($bang_id:ldx) 17 + set _($bang_id:ldy) 0 + set _($bang_id:lab) bang + set _($bang_id:fstyle) 0 + set _($bang_id:fs) 10 + set _($bang_id:lcol) 13 + + + bang_draw $bang_id $canvas + + } + + #-----------------------------------------------------------------------------------# def bang draw {canvas} { set isnew [expr [llength [$canvas gettags ${self}BASE]] == 0]