[PD-cvs] externals/miXed/test/toxy kb.wid,1.5,1.6 multiscale.wid,1.4,1.5 setup.wid,1.5,1.6

Krzysztof Czaja krzyszcz at users.sourceforge.net
Thu Jan 27 15:42:57 CET 2005


Update of /cvsroot/pure-data/externals/miXed/test/toxy
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23748/test/toxy

Modified Files:
	kb.wid multiscale.wid setup.wid 
Log Message:
cyclone alpha52 and toxy alpha15 (see notes.txt for cyclone, toxy and shared)

Index: kb.wid
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/test/toxy/kb.wid,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** kb.wid	21 Dec 2004 11:32:13 -0000	1.5
--- kb.wid	27 Jan 2005 14:42:54 -0000	1.6
***************
*** 209,215 ****
  ::toxy::kb .- .| . .#oct .#size
  
- # undo the "bind Canvas <1> {+focus %W}" from the setup.wid
- bind .- <FocusIn> {focus .^.c}
- 
  #@ new
  set ::toxy::kbchord(.|) {}
--- 209,212 ----

Index: setup.wid
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/test/toxy/setup.wid,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** setup.wid	21 Dec 2004 11:32:13 -0000	1.5
--- setup.wid	27 Jan 2005 14:42:54 -0000	1.6
***************
*** 1,3 ****
! package provide toxywidgets 0.1.0.14
  
  # LATER keep standard widget setup in a .tcl file (transfered into a .wiq), and
--- 1,3 ----
! package provide toxywidgets 0.1.0.15
  
  # LATER keep standard widget setup in a .tcl file (transfered into a .wiq), and
***************
*** 82,87 ****
  
  proc ::toxy::item_getconfig {path target} {
!     pd $target.rp _config $target.rp [$path cget -bg] \
! 	[winfo reqwidth $path] [winfo reqheight $path] \
  	[catch {$path config -state normal}]\;
  }
--- 82,94 ----
  
  proc ::toxy::item_getconfig {path target} {
!     set wd [winfo reqwidth $path]
!     set ht [winfo reqheight $path]
!     if {$wd < 2 || $ht < 2} {
! # LATER rethink
! 	update idletasks
! 	set wd [winfo width $path]
! 	set ht [winfo height $path]
!     }
!     pd $target.rp _config $target.rp [$path cget -bg] $wd $ht \
  	[catch {$path config -state normal}]\;
  }
***************
*** 186,190 ****
  
  proc ::toxy::master {path cvpath target} {
- # FIXME subitem handling in megawidgets
      bind $path <ButtonRelease> "::toxy::master_release $target $cvpath %X %Y %b"
      bind $path <1> "::toxy::item_click $target $cvpath %X %Y %b 0"
--- 193,196 ----
***************
*** 203,206 ****
--- 209,247 ----
      bind $path <Enter> "::toxy::item_inout $target 1"
      bind $path <Leave> "::toxy::item_inout $target 0"
+ 
+     if {[catch {$path config -state normal}] == 0} {
+ 	bind $path <<disable>> "$path config -state disabled"
+ 	bind $path <<enable>> "$path config -state normal"
+     }
+ 
+     if {[winfo class $path] == "Canvas"} {
+ # undo the "bind Canvas <1> {+focus %W}" from above
+ 	bind $path <FocusIn> "focus $cvpath"
+     }
+ }
+ 
+ # to be called explicitly from type initializer, LATER rethink
+ proc ::toxy::subwidget {path parent cvpath target} {
+     bind $path <ButtonRelease> "::toxy::master_release $target $cvpath %X %Y %b"
+     bind $path <1> "::toxy::item_click $target $cvpath %X %Y %b 0"
+     bind $path <Shift-1> "::toxy::item_click $target $cvpath %X %Y %b 1"
+     bind $path <Control-1> "::toxy::item_click $target $cvpath %X %Y %b 2"
+     bind $path <Control-Shift-1> "::toxy::item_click $target $cvpath %X %Y %b 3"
+     bind $path <Alt-1> "::toxy::item_click $target $cvpath %X %Y %b 4"
+     bind $path <Alt-Shift-1> "::toxy::item_click $target $cvpath %X %Y %b 5"
+     bind $path <Alt-Control-1> "::toxy::item_click $target $cvpath %X %Y %b 6"
+     bind $path <Alt-Control-Shift-1> \
+ 	"::toxy::item_click $target $cvpath %X %Y %b 7"
+     bind $path <3> "::toxy::item_click $target $cvpath %X %Y %b 8"
+ 
+     bind $path <Motion> "::toxy::master_motion $target $cvpath %X %Y"
+     bind $path <B1-Motion> "::toxy::master_motion $target $cvpath %X %Y"
+     bind $path <Enter> "::toxy::item_inout $target 1"
+     bind $path <Leave> "::toxy::item_inout $target 0"
+ 
+     if {[catch {$path config -state normal}] == 0} {
+ 	bind $parent <<disable>> "+$path config -state disabled"
+ 	bind $parent <<enable>> "+$path config -state normal"
+     }
  }
  

Index: multiscale.wid
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/test/toxy/multiscale.wid,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** multiscale.wid	21 Dec 2004 11:32:13 -0000	1.4
--- multiscale.wid	27 Jan 2005 14:42:54 -0000	1.5
***************
*** 36,41 ****
  	    set id [$path create window $px $py -width $dx -height $dy \
  		-anchor nw -window $path.s$ndx -tags $path.s$ndx]
! #	    ::toxy::master $path.s$ndx $path $cvpath $target
! 	    ::toxy::master $path.s$ndx $cvpath $target
  	    incr px $dx
  	}
--- 36,40 ----
  	    set id [$path create window $px $py -width $dx -height $dy \
  		-anchor nw -window $path.s$ndx -tags $path.s$ndx]
! 	    ::toxy::subwidget $path.s$ndx $path $cvpath $target
  	    incr px $dx
  	}
***************
*** 52,56 ****
  
  ::toxy::multiscale .- .^.c .| . .#n .#lo .#hi .#res .#dx .#dy .#bg
- 
- # undo the "bind Canvas <1> {+focus %W}" from the setup.wid
- bind .- <FocusIn> {focus .^.c}
--- 51,52 ----





More information about the Pd-cvs mailing list