Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12486
Modified Files: Tag: desiredata desire.tk TODO ChangeLog Log Message: adding keyboard controls for IEMGUI and floatbox
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.159 retrieving revision 1.1.2.600.2.160 diff -C2 -d -r1.1.2.600.2.159 -r1.1.2.600.2.160 *** desire.tk 9 Jan 2007 17:11:20 -0000 1.1.2.600.2.159 --- desire.tk 11 Jan 2007 13:34:23 -0000 1.1.2.600.2.160 *************** *** 4138,4149 ****
def Canvas selection_move {dx dy} { ! foreach o $@selection { ! mset {x1 y1} [$o xy] ! if {[[$o class] <= Box]} { ! $o moveto [expr $x1+$dx] [expr $y1+$dy] ! } else { ! puts "selection_move: $o is not a Box, it's a [$o class]" } - } }
--- 4138,4150 ----
def Canvas selection_move {dx dy} { ! if {![$self editmode]} {return} ! foreach o $@selection { ! mset {x1 y1} [$o xy] ! if {[[$o class] <= Box]} { ! $o moveto [expr $x1+$dx] [expr $y1+$dy] ! } else { ! puts "selection_move: $o is not a Box, it's a [$o class]" ! } } }
*************** *** 4157,4190 **** switch -regexp -- $key { BackSpace|Delete|KP_Delete {$self delete_selection} ! Up {if {[llength $@selection]} {$self selection_move 0 -$motion} else {$self scroll y -$motion}} ! Down {if {[llength $@selection]} {$self selection_move 0 +$motion} else {$self scroll y +$motion}} ! Left {if {[llength $@selection]} {$self selection_move -$motion 0} else {$self scroll x -$motion}} ! Right {if {[llength $@selection]} {$self selection_move +$motion 0} else {$self scroll x +$motion}} Tab {$self tab_jump} ! Return { ! if {![llength $@keynav_iosel_i] && ![llength $@keynav_iosel_o]} { ! if {[llength $@selection] == 1} { ! if {[[$@selection class] <= TextBox]} { ! $@selection edit ! $self dehilite_io ! } ! } ! } else { ! foreach out_obj $@keynav_iosel_o { ! set from [$self children_idx $out_obj] ! set outlet [lindex $_($out_obj:ioselect) 0] ! foreach in_obj $@keynav_iosel_i { ! set to [$self children_idx $in_obj] ! set inlet [lindex $_($in_obj:ioselect) 0] ! $self connect [list $from $outlet $to $inlet] ! } ! } ! $self dehilite_io ! } } ! F1 { ! $self deselect_all } ! default {} } } --- 4158,4206 ---- switch -regexp -- $key { BackSpace|Delete|KP_Delete {$self delete_selection} ! Up {if {[llength $@selection]} {$self arrow_key 0 -$motion} else {$self scroll y -$motion}} ! Down {if {[llength $@selection]} {$self arrow_key 0 +$motion} else {$self scroll y +$motion}} ! Left {if {[llength $@selection]} {$self arrow_key -$motion 0} else {$self scroll x -$motion}} ! Right {if {[llength $@selection]} {$self arrow_key +$motion 0} else {$self scroll x +$motion}} Tab {$self tab_jump} ! Return {$self return_key $x $y $key $iso $shift} ! F1 {$self deselect_all} ! default {} ! } ! } ! ! def Canvas return_key {x y key iso f} { ! mset {type id detail} [$self identify_target $x $y $f] ! if {![llength $@keynav_iosel_i] && ![llength $@keynav_iosel_o]} { ! if {[llength $@selection] == 1} { ! mset {x1 y1} [$@selection xy] ! $self click_wrap $x1 $y1 1 $f ! $self unclick_wrap $x1 $y1 1 $f } ! } else { ! foreach out_obj $@keynav_iosel_o { ! set from [$self children_idx $out_obj] ! set outlet [lindex $_($out_obj:ioselect) 0] ! foreach in_obj $@keynav_iosel_i { ! set to [$self children_idx $in_obj] ! set inlet [lindex $_($in_obj:ioselect) 0] ! $self connect [list $from $outlet $to $inlet] ! } } ! $self dehilite_io ! } ! ! } ! ! def Canvas arrow_key {val1 val2} { ! if {![$self editmode]} { ! if {[llength $@selection] == 1} { ! if {[[[lindex $@selection 0] class] <= IEMGUI]} { ! $@selection key_incr $val1 $val2 ! } elseif {[[[lindex $@selection 0] class] == FloatBox]} { ! $@selection key_incr $val1 $val2 ! } ! } ! } else { ! $self selection_move $val1 $val2 } } *************** *** 5202,5206 **** set @text $text; #so that the text gets updated immediately netsend [list .$self float $text] ! [$self get_canvas] selection-= $self } } --- 5218,5222 ---- set @text $text; #so that the text gets updated immediately netsend [list .$self float $text] ! #[$self get_canvas] selection-= $self } } *************** *** 5251,5254 **** --- 5267,5276 ---- netsend [list .$self float [expr {0+$@text}]] ;# noserial } + + def AtomBox key_incr {val1 val2} { + set @text [expr $@text - $val2] + netsend [list .$self float [expr {0+$@text}]] + } + def SymbolBox motion {x y f target} {} class_new NumBox {Labeled IEMGUI AtomBox} *************** *** 5350,5353 **** --- 5372,5380 ---- }
+ def Radio key_incr {val1 val2} { + netsend [list .$self fout [expr $@on - $val2]] + } + + #def Radio unclick {x y f target} {$@canvas focus= ""}
*************** *** 5449,5452 **** --- 5476,5484 ---- }
+ def Slider key_incr {val1 val2} { + set @value [expr $@value - $val2] + netsend [list .$self float $@value] + } + def Slider calc {x y x1 y1} { set span [expr $@max-$@min]
Index: TODO =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/TODO,v retrieving revision 1.1.2.28.2.31 retrieving revision 1.1.2.28.2.32 diff -C2 -d -r1.1.2.28.2.31 -r1.1.2.28.2.32 *** TODO 10 Jan 2007 03:27:36 -0000 1.1.2.28.2.31 --- TODO 11 Jan 2007 13:34:25 -0000 1.1.2.28.2.32 *************** *** 22,26 **** [ ] gobj_changed3: no appendix in 0x807b620 (don't know how to reproduce yet) [ ] fix deleteing/closing Canvas ! [x] partically fixed (def Canvas del) [ ] server sends -> x806a3b8 delete twice [ ] fix deletion order --- 22,26 ---- [ ] gobj_changed3: no appendix in 0x807b620 (don't know how to reproduce yet) [ ] fix deleteing/closing Canvas ! [x] partially fixed (def Canvas del) [ ] server sends -> x806a3b8 delete twice [ ] fix deletion order
Index: ChangeLog =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/ChangeLog,v retrieving revision 1.1.4.11.2.13 retrieving revision 1.1.4.11.2.14 diff -C2 -d -r1.1.4.11.2.13 -r1.1.4.11.2.14 *** ChangeLog 9 Jan 2007 16:57:27 -0000 1.1.4.11.2.13 --- ChangeLog 11 Jan 2007 13:34:25 -0000 1.1.4.11.2.14 *************** *** 1,4 **** $Id$ ! Desire 0.40.pre6 (2006.01.06) (-r desiredata; ./configure && make) :
--- 1,4 ---- $Id$ ! Desire 0.40.pre6 (2006.01.06) (-r desiredata; ./configure && make) :
*************** *** 13,17 **** * PureUnity is now part of the DesireData project (but is designed to run also on Miller's 0.40). ! Desire 0.40.pre5 (2006.12.19) (-r desiredata; ./configure && make) :
--- 13,18 ---- * PureUnity is now part of the DesireData project (but is designed to run also on Miller's 0.40). ! * IEMGUI can now by controled with keyboard ! Desire 0.40.pre5 (2006.12.19) (-r desiredata; ./configure && make) :