[PD-cvs] pd/src desire.tk,1.1.2.254,1.1.2.255
Mathieu Bouchard
matju at users.sourceforge.net
Wed Jun 21 07:44:16 CEST 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2608
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
fixing focus and stuff
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.254
retrieving revision 1.1.2.255
diff -C2 -d -r1.1.2.254 -r1.1.2.255
*** desire.tk 20 Jun 2006 19:46:15 -0000 1.1.2.254
--- desire.tk 21 Jun 2006 05:44:14 -0000 1.1.2.255
***************
*** 1177,1182 ****
}
! def Canvas focus {} {return $@focus}
! def Canvas focus= {o} {set @focus $o}
#-----------------------------------------------------------------------------------#
--- 1177,1182 ----
}
! def Canvas focus {} {return $@focus}
! def Canvas focus= {o} {set @focus $o}
#-----------------------------------------------------------------------------------#
***************
*** 2068,2072 ****
def* Canvas paste_wires {} {
! global canvas _ clipboard
set i 0
--- 2068,2072 ----
def* Canvas paste_wires {} {
! global canvas clipboard
set i 0
***************
*** 2196,2206 ****
def* Canvas click {x y b f} {
- global canvas
- #set canvas(current) $self
if {[winfo exists .completion]} {
! puts "WARN!!!!! completion box exists................."
! raise .completion
! focus .completion.comp
! } else {
set c .$self.c
focus $c
--- 2196,2205 ----
def* Canvas click {x y b f} {
if {[winfo exists .completion]} {
! puts "WARN!!!!! completion box exists................."
! raise .completion
! focus .completion.comp
! return
! }
set c .$self.c
focus $c
***************
*** 2210,2214 ****
if {$@editmode && !($f&2)} {$self clickedit $x $y $b $f; return}
mset {type id} [$self identify_target $x $y $b $f "click"]
! if {![llength $id]} return
switch $type {
object {$id click $x $y $b $f}
--- 2209,2213 ----
if {$@editmode && !($f&2)} {$self clickedit $x $y $b $f; return}
mset {type id} [$self identify_target $x $y $b $f "click"]
! if {![llength $id]} {return}
switch $type {
object {$id click $x $y $b $f}
***************
*** 2216,2221 ****
default {error BORK}
}
- }
-
}
--- 2215,2218 ----
***************
*** 2312,2315 ****
--- 2309,2315 ----
def* Canvas unclick {x y b} {
+ set c .$self.c
+ set x [$c canvasx $x]
+ set y [$c canvasy $y]
if {$@editmode} {$self unclickedit $x $y %b} {$self unclickrun $x $y %b}
$self adjust_scrollbars
***************
*** 2357,2363 ****
def* Canvas key {x y key iso shift} {
! global OS _
set c .$self.c
$self hide_tooltip
switch $OS {
osx {
--- 2357,2369 ----
def* Canvas key {x y key iso shift} {
! set c .$self.c
! set x [$c canvasx $x]
! set y [$c canvasy $y]
! global OS
set c .$self.c
$self hide_tooltip
+ if {[$self focus] != ""} {
+ [$self focus] key $key $shift
+ }
switch $OS {
osx {
***************
*** 2930,2934 ****
def* MessageBox unclick {x y mod} {
! $@canvas focus= $@canvas
}
--- 2936,2940 ----
def* MessageBox unclick {x y mod} {
! $@canvas focus= ""
}
***************
*** 3123,3127 ****
properties_dialog $self .$self canvas_ok $props
pack [checkbutton .$self.graphme -text "graph on parent" \
! -variable _($self:graphme) -anchor w] -side top
#bind .$self.xscale.entry <KeyPress-Return> "canvas_ok $id"
#bind .$self.yscale.entry <KeyPress-Return> "canvas_ok $id"
--- 3129,3133 ----
properties_dialog $self .$self canvas_ok $props
pack [checkbutton .$self.graphme -text "graph on parent" \
! -variable @graphme -anchor w] -side top
#bind .$self.xscale.entry <KeyPress-Return> "canvas_ok $id"
#bind .$self.yscale.entry <KeyPress-Return> "canvas_ok $id"
***************
*** 3451,3455 ****
set @clicking 0
if {$@oval!=$@val} {
! $@canvas focus= $@canvas
.$@canvas.c itemconfigure ${self}BASE4 -fill $look(objectbg)
pd .$self float $@val
--- 3457,3461 ----
set @clicking 0
if {$@oval!=$@val} {
! $@canvas focus= ""
.$@canvas.c itemconfigure ${self}BASE4 -fill $look(objectbg)
pd .$self float $@val
***************
*** 3457,3461 ****
}
! def NumBox key {key shift} {
set c -1
catch {set c [format %c $key]}
--- 3463,3467 ----
}
! def* NumBox key {key shift} {
set c -1
catch {set c [format %c $key]}
***************
*** 3537,3543 ****
}
! def Radio unclick {x y mod} {
! $@canvas focus= $@canvas
! }
class_new Slider {BlueBox}
--- 3543,3547 ----
}
! def Radio unclick {x y mod} {$@canvas focus= ""}
class_new Slider {BlueBox}
***************
*** 3624,3628 ****
set @clicking 0
if {[lindex $@first 1] != $y} {
! $@canvas focus= $@canvas
$self draw
pd .$self float $@value
--- 3628,3632 ----
set @clicking 0
if {[lindex $@first 1] != $y} {
! $@canvas focus= ""
$self draw
pd .$self float $@value
***************
*** 3699,3704 ****
}
! def Bang unclick {x y b} {}
!
def Bang click {x y b f} {
$@canvas focus= $self
--- 3703,3707 ----
}
! def Bang unclick {x y b} {$@canvas focus= ""}
def Bang click {x y b f} {
$@canvas focus= $self
***************
*** 3761,3765 ****
global look
set @clicking 0
! $@canvas focus= $@canvas
}
--- 3764,3768 ----
global look
set @clicking 0
! $@canvas focus= ""
}
More information about the Pd-cvs
mailing list