Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22351
Modified Files: Tag: devel_0_39 desire.tk Log Message: fixed a few small things from my old code
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.62 retrieving revision 1.1.2.63 diff -C2 -d -r1.1.2.62 -r1.1.2.63 *** desire.tk 17 Sep 2005 19:15:03 -0000 1.1.2.62 --- desire.tk 18 Sep 2005 02:00:12 -0000 1.1.2.63 *************** *** 782,786 ****
set canvasmenu(put) { ! {Object {objectbox_new} "Ctrl+1"} {Message {pd "%W msg 0 ;"} "Ctrl+2"} {Number {pd "%W floatatom 0 ;"} "Ctrl+3"} --- 782,786 ----
set canvasmenu(put) { ! {Object {pd "%W obj 0 ;"} "Ctrl+1"} {Message {pd "%W msg 0 ;"} "Ctrl+2"} {Number {pd "%W floatatom 0 ;"} "Ctrl+3"} *************** *** 1223,1227 **** $self draw $canvas set t .x$canvas.c.${self}text ! text $t -height 1 -width [llength $@text] -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ -font [format -*-courier-medium--normal--%d-* $font_size] --- 1223,1227 ---- $self draw $canvas set t .x$canvas.c.${self}text ! text $t -height 1 -width [string length $@text] -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ -font [format -*-courier-medium--normal--%d-* $font_size] *************** *** 1324,1332 **** global font set _($canvas:obj_in_edit_old) $self set @isnew 0 set @selected? 1 set old_obj_name [.x$canvas.c itemcget ${self}TEXT -text] .x$canvas.c delete ${self}TEXT ! text_create $self .x$canvas.c $font(size) $old_obj_name }
--- 1324,1355 ---- global font set _($canvas:obj_in_edit_old) $self + set _($canvas:obj_in_edit) 1 set @isnew 0 set @selected? 1 set old_obj_name [.x$canvas.c itemcget ${self}TEXT -text] .x$canvas.c delete ${self}TEXT ! text_create $self $canvas $font(size) $old_obj_name ! } ! ! def objectbox click {args} { ! puts "$self is being clicked in run mode" ! } ! ! def objectbox clickedit {args} { ! puts "$self is being clicked in edit mode" ! } ! ! def objectbox unclick {args} { ! puts "$self is being unclicked in run mode" ! } ! ! def objectbox unclickedit {args} { ! puts "$self is being unclicked in [lindex $args 0] edit mode" ! $self edit [lindex $args 0] ! #objectbox_edit ! } ! ! def objectbox motionedit {args} { ! puts "motions in $self in edit mode" }
*************** *** 1510,1514 **** set tags [$c gettags [lindex [$c find overlapping \ [expr $cx-2] [expr $cy-2] [expr $cx+2] [expr $cy+2]] end]] ! foreach {type id} [$self identify_target $cx $cy -1 -1 "click"] {} switch $type { object { --- 1533,1537 ---- set tags [$c gettags [lindex [$c find overlapping \ [expr $cx-2] [expr $cy-2] [expr $cx+2] [expr $cy+2]] end]] ! foreach {type id} [$self identify_target $cx $cy -1 -1 "g"] {} switch $type { object { *************** *** 1627,1635 **** --- 1650,1661 ---- default { if {$@editmode} { + puts "clicked on black space and in edit mode" # my object edit mode code begins --chun if {[info exists @obj_in_edit]} { + puts "and some object is being edited" if {$@obj_in_edit > 0} { [lindex $@selection 0] complete $self set @obj_in_edit 0 + puts "competing it!" } }