[PD-cvs] pd/src desire.tk,1.1.2.158,1.1.2.159

Mathieu Bouchard matju at users.sourceforge.net
Sun Apr 16 08:42:38 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4504a

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
renamed canvas -> Canvas because of future name clash


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.158
retrieving revision 1.1.2.159
diff -C2 -d -r1.1.2.158 -r1.1.2.159
*** desire.tk	16 Apr 2006 06:37:42 -0000	1.1.2.158
--- desire.tk	16 Apr 2006 06:42:36 -0000	1.1.2.159
***************
*** 854,863 ****
  #-----------------------------------------------------------------------------------#
  
! class_new canvas {menuable view}
  
! #def canvas close  {} {pd $self menuclose 0}
! def canvas save   {} {$self checkgeometry; pd .$self menusave}
! def canvas saveas {} {$self checkgeometry; pd .$self menusaveas}
! def canvas print  {} {
      set filename [tk_getSaveFile -initialfile pd.ps -defaultextension .ps \
         -filetypes { {{postscript} {.ps}} }]
--- 854,863 ----
  #-----------------------------------------------------------------------------------#
  
! class_new Canvas {menuable view}
  
! #def Canvas close  {} {pd $self menuclose 0}
! def Canvas save   {} {$self checkgeometry; pd .$self menusave}
! def Canvas saveas {} {$self checkgeometry; pd .$self menusaveas}
! def Canvas print  {} {
      set filename [tk_getSaveFile -initialfile pd.ps -defaultextension .ps \
         -filetypes { {{postscript} {.ps}} }]
***************
*** 865,869 ****
  }
  
! def* canvas eval% {code} {
  	regsub -all %X $code $@current_x code
  	regsub -all %Y $code $@current_y code
--- 865,869 ----
  }
  
! def* Canvas eval% {code} {
  	regsub -all %X $code $@current_x code
  	regsub -all %Y $code $@current_y code
***************
*** 972,977 ****
  #-----------------------------------------------------------------------------------#
  # check or uncheck the "edit" menu item
! def canvas editmode {} {return $@editmode}
! def canvas editmode= {mode} {
      global look edit_toggle
      set @editmode $mode
--- 972,977 ----
  #-----------------------------------------------------------------------------------#
  # check or uncheck the "edit" menu item
! def Canvas editmode {} {return $@editmode}
! def Canvas editmode= {mode} {
      global look edit_toggle
      set @editmode $mode
***************
*** 982,988 ****
  }
  
! def* canvas getscroll {args} {}
  
! def canvas close {} {
  	pd .$self menuclose 0
  	$self fix_window_menu
--- 982,988 ----
  }
  
! def* Canvas getscroll {args} {}
  
! def Canvas close {} {
  	pd .$self menuclose 0
  	$self fix_window_menu
***************
*** 992,1000 ****
  #-----------------------------------------------------------------------------------#
  
! def canvas atomically {proc} {$@history atomically $proc}
! def canvas undo {} {$@history undo}
! def canvas redo {} {$@history redo}
  
! def* canvas init {{width 400} {height 300} {geometry +0+0} {editable 1}} {
      super
      global pd_opendir pd_tearoff OS cmdline focus look
--- 992,1000 ----
  #-----------------------------------------------------------------------------------#
  
! def Canvas atomically {proc} {$@history atomically $proc}
! def Canvas undo {} {$@history undo}
! def Canvas redo {} {$@history redo}
  
! def* Canvas init {{width 400} {height 300} {geometry +0+0} {editable 1}} {
      super
      global pd_opendir pd_tearoff OS cmdline focus look
***************
*** 1055,1069 ****
  }
  
! def  canvas focus {} {return $@focus}
! def  canvas focus= {o}   {set @focus $o}
  
  #-----------------------------------------------------------------------------------#
  
! def canvas bind {eventtype selector args} {
      set c .$self.c
      bind $c $eventtype [concat [list $self $selector] $args \; $self statusbar_draw %x %y]
  }
  
! def canvas new_binds {} {
      global OS
      set c .$self.c
--- 1055,1069 ----
  }
  
! def  Canvas focus {} {return $@focus}
! def  Canvas focus= {o}   {set @focus $o}
  
  #-----------------------------------------------------------------------------------#
  
! def Canvas bind {eventtype selector args} {
      set c .$self.c
      bind $c $eventtype [concat [list $self $selector] $args \; $self statusbar_draw %x %y]
  }
  
! def Canvas new_binds {} {
      global OS
      set c .$self.c
***************
*** 1123,1130 ****
  }
  
! def canvas scroll {axis diff} {.$self.c [list $axis]view scroll $diff units}
! def canvas reload {} {pd ".$self map 0; .$self map 1"}
  
! def canvas redraw {} {
      $self changed
      foreach x $@children {$x changed}
--- 1123,1130 ----
  }
  
! def Canvas scroll {axis diff} {.$self.c [list $axis]view scroll $diff units}
! def Canvas reload {} {pd ".$self map 0; .$self map 1"}
  
! def Canvas redraw {} {
      $self changed
      foreach x $@children {$x changed}
***************
*** 1132,1136 ****
  }
  
! def canvas new_menubar {editable} {
      set name .$self
      global pd_opendir pd_tearoff OS cmdline
--- 1132,1136 ----
  }
  
! def Canvas new_menubar {editable} {
      set name .$self
      global pd_opendir pd_tearoff OS cmdline
***************
*** 1221,1225 ****
  }
  
! def canvas editmodeswitch {args} {
      set @editmode [expr !$@editmode]
      pd .$self editmode $@editmode
--- 1221,1225 ----
  }
  
! def Canvas editmodeswitch {args} {
      set @editmode [expr !$@editmode]
      pd .$self editmode $@editmode
***************
*** 1228,1232 ****
  # correct edit menu, enabling or disabling undo/redo
  # LATER also cut/copy/paste
! def canvas fix_edit_menu {} {
      return ;# hehe
      set e .$self.m.edit
--- 1228,1232 ----
  # correct edit menu, enabling or disabling undo/redo
  # LATER also cut/copy/paste
! def Canvas fix_edit_menu {} {
      return ;# hehe
      set e .$self.m.edit
***************
*** 1248,1257 ****
  #this just tells whether an object is part of the selection, that is, what usually 
  #make objects turn blue.
! def canvas selection_include? {member} {
      set i [lsearch $@selection $member]
      return [expr $i>=0]
  }
  
! def canvas draw {} {
  
  }
--- 1248,1257 ----
  #this just tells whether an object is part of the selection, that is, what usually 
  #make objects turn blue.
! def Canvas selection_include? {member} {
      set i [lsearch $@selection $member]
      return [expr $i>=0]
  }
  
! def Canvas draw {} {
  
  }
***************
*** 1316,1321 ****
  }
  
! def canvas obj_in_edit {} {return @obj_in_edit}
! def canvas obj_in_edit= {v} {set @obj_in_edit $v}
  
  def* textbox edit {} {
--- 1316,1321 ----
  }
  
! def Canvas obj_in_edit {} {return @obj_in_edit}
! def Canvas obj_in_edit= {v} {set @obj_in_edit $v}
  
  def* textbox edit {} {
***************
*** 1383,1389 ****
  }
  
! def canvas selection   {}     {return  @selection}
! def canvas selection=  {objs} {set     @selection $objs}
! def canvas selection+= {objs} {
  	set @selection [concat [lwithout $@selection $objs] $objs]
  }
--- 1383,1389 ----
  }
  
! def Canvas selection   {}     {return  @selection}
! def Canvas selection=  {objs} {set     @selection $objs}
! def Canvas selection+= {objs} {
  	set @selection [concat [lwithout $@selection $objs] $objs]
  }
***************
*** 1450,1458 ****
  
  #-----------------------------------------------------------------------------------#
! def* canvas window_title {title} {wm title .$self $title}
! #def* canvas add {i obj} {lset @children $i $obj}
! #def* canvas del {i}     {lset @children $i ""}
  
! def* canvas children= {children} {
  	# think of the children!!!
  	puts "-----------------------------------------------"
--- 1450,1458 ----
  
  #-----------------------------------------------------------------------------------#
! def* Canvas window_title {title} {wm title .$self $title}
! #def* Canvas add {i obj} {lset @children $i $obj}
! #def* Canvas del {i}     {lset @children $i ""}
  
! def* Canvas children= {children} {
  	# think of the children!!!
  	puts "-----------------------------------------------"
***************
*** 1464,1468 ****
  }
  
! def* canvas add {obj} {
  	set i [lsearch $@children $obj]
  	if {!$i} {lappend @children $obj}
--- 1464,1468 ----
  }
  
! def* Canvas add {obj} {
  	set i [lsearch $@children $obj]
  	if {!$i} {lappend @children $obj}
***************
*** 1471,1475 ****
  }
  
! def* canvas del {obj} {
  	set i [lsearch $@children $obj]
  	if {$i} {set @children [lreplace $@children $i $i]}
--- 1471,1475 ----
  }
  
! def* Canvas del {obj} {
  	set i [lsearch $@children $obj]
  	if {$i} {set @children [lreplace $@children $i $i]}
***************
*** 1477,1481 ****
  }
  
! def* canvas wires= {wires2} {
  	puts "-----------------------------------------wires!!"
  	global _ 
--- 1477,1481 ----
  }
  
! def* Canvas wires= {wires2} {
  	puts "-----------------------------------------wires!!"
  	global _ 
***************
*** 1503,1507 ****
  }
  
! def* canvas wires_new {whoout outno whoin inno} {
  	# @wires_pair is a workaround for looking up the wire id with {0 1 1 0} format
  	# i moved calling wire_new here instead of where it was (canvas wires=) 
--- 1503,1507 ----
  }
  
! def* Canvas wires_new {whoout outno whoin inno} {
  	# @wires_pair is a workaround for looking up the wire id with {0 1 1 0} format
  	# i moved calling wire_new here instead of where it was (canvas wires=) 
***************
*** 1513,1519 ****
  }
  
! def* canvas wires {} {return $@wires}
  
! def canvas delete_selection {} {
  	global _
  	set c .$self.c
--- 1513,1519 ----
  }
  
! def* Canvas wires {} {return $@wires}
  
! def Canvas delete_selection {} {
  	global _
  	set c .$self.c
***************
*** 1541,1545 ****
  }
  
! def canvas delete_wire {} {
  	global _
  	
--- 1541,1545 ----
  }
  
! def Canvas delete_wire {} {
  	global _
  	
***************
*** 1585,1589 ****
  }
  
! def canvas motion {x y mods state} {
      global font
      global tooltip look
--- 1585,1589 ----
  }
  
! def Canvas motion {x y mods state} {
      global font
      global tooltip look
***************
*** 1665,1669 ****
  
  #-----------------------------------------------------------------------------------#
! def canvas identify_target {x y b f label} {
      set c .$self.c
      set stack [lreverse [$c find overlapping \
--- 1665,1669 ----
  
  #-----------------------------------------------------------------------------------#
! def Canvas identify_target {x y b f label} {
      set c .$self.c
      set stack [lreverse [$c find overlapping \
***************
*** 1717,1724 ****
  }
  
! def canvas statusbar_draw {x y} {$@statusbar draw $x $y}
! def canvas action {} {return $@action}
! def canvas wire_from {} {return $@wire_from}
! def canvas wire_to   {} {return $@wire_to}
  
  def statusbar draw {x y} {
--- 1717,1724 ----
  }
  
! def Canvas statusbar_draw {x y} {$@statusbar draw $x $y}
! def Canvas action {} {return $@action}
! def Canvas wire_from {} {return $@wire_from}
! def Canvas wire_to   {} {return $@wire_to}
  
  def statusbar draw {x y} {
***************
*** 1749,1753 ****
  
  #-----------------------------------------------------------------------------------#
! def* canvas click_on_wire {x y b f} {
  	puts "click on wire!!!"
  	#set c .$self.c
--- 1749,1753 ----
  
  #-----------------------------------------------------------------------------------#
! def* Canvas click_on_wire {x y b f} {
  	puts "click on wire!!!"
  	#set c .$self.c
***************
*** 1761,1770 ****
  }
  
! def* canvas select_all {} {
  	foreach o $@children {$o selected?= 0}
  	set @selection $@children
  }
  
! def* canvas deselect_all {} {
  	#puts "selection:$@selection"
  	foreach o $@selection {$o selected?= 0}
--- 1761,1770 ----
  }
  
! def* Canvas select_all {} {
  	foreach o $@children {$o selected?= 0}
  	set @selection $@children
  }
  
! def* Canvas deselect_all {} {
  	#puts "selection:$@selection"
  	foreach o $@selection {$o selected?= 0}
***************
*** 1776,1780 ****
  }
  
! def* canvas clickedit {x y b f} {
  	global look
  	set c .[$self canvas].c
--- 1776,1780 ----
  }
  
! def* Canvas clickedit {x y b f} {
  	global look
  	set c .[$self canvas].c
***************
*** 1830,1834 ****
  }
  
! def* canvas click {x y b f} {
      set c .$self.c
      focus $c
--- 1830,1834 ----
  }
  
! def* Canvas click {x y b f} {
      set c .$self.c
      focus $c
***************
*** 1846,1850 ****
  }
  
! def* canvas unclickedit {x y b} {
      global look 
      set c .$self.c
--- 1846,1850 ----
  }
  
! def* Canvas unclickedit {x y b} {
      global look 
      set c .$self.c
***************
*** 1936,1944 ****
  }
  
! def* canvas unclickrun {x y b} {
  
  }
  
! def* canvas unclick {x y b} {
      if {$@editmode} {$self unclickedit $x $y %b} {$self unclickrun $x $y %b}
      $self adjust_scrollbars
--- 1936,1944 ----
  }
  
! def* Canvas unclickrun {x y b} {
  
  }
  
! def* Canvas unclick {x y b} {
      if {$@editmode} {$self unclickedit $x $y %b} {$self unclickrun $x $y %b}
      $self adjust_scrollbars
***************
*** 1947,1951 ****
  }
  
! def canvas adjust_scrollbars {} {
      set c .$self.c
      set size [$c bbox all]
--- 1947,1951 ----
  }
  
! def Canvas adjust_scrollbars {} {
      set c .$self.c
      set size [$c bbox all]
***************
*** 1963,1967 ****
  }
  
! def* canvas notice {origin args} {
      eval [concat [list $self child_changed $origin] $args]
  }
--- 1963,1967 ----
  }
  
! def* Canvas notice {origin args} {
      eval [concat [list $self child_changed $origin] $args]
  }
***************
*** 1971,1975 ****
  set lastcanvasconfiguration ""
  
! def canvas checkgeometry {} {
      set topname .$self
      set boo [winfo geometry $topname.c]
--- 1971,1975 ----
  set lastcanvasconfiguration ""
  
! def Canvas checkgeometry {} {
      set topname .$self
      set boo [winfo geometry $topname.c]
***************
*** 1985,1989 ****
  #-----------------------------------------------------------------------------------#
  
! def canvas key {x y key iso shift} {
      global OS _
      set c .$self.c
--- 1985,1989 ----
  #-----------------------------------------------------------------------------------#
  
! def Canvas key {x y key iso shift} {
      global OS _
      set c .$self.c
***************
*** 2031,2035 ****
  #-----------------------------------------------------------------------------------#
  
! def canvas keyup {x y key iso shift} {
      set canvas .$self.c
      if {$iso != ""} {scan $iso %c key}
--- 2031,2035 ----
  #-----------------------------------------------------------------------------------#
  
! def Canvas keyup {x y key iso shift} {
      set canvas .$self.c
      if {$iso != ""} {scan $iso %c key}
***************
*** 2292,2296 ****
  set classinfo(hdl)     $classinfo(hradio)
  set classinfo(vdl)     $classinfo(hradio)
! set classinfo(canvas)  {canvas}
  set classinfo(cnv)     {cnv}
  
--- 2292,2296 ----
  set classinfo(hdl)     $classinfo(hradio)
  set classinfo(vdl)     $classinfo(hradio)
! set classinfo(canvas)  {Canvas}
  set classinfo(cnv)     {cnv}
  
***************
*** 3179,3183 ****
  set tooltip(text) ""
  
! def canvas show_tooltip {x y text} {
  	global tooltip
  	if {$tooltip(visible) && [string compare $text $tooltip(text)==0]} {return}
--- 3179,3183 ----
  set tooltip(text) ""
  
! def Canvas show_tooltip {x y text} {
  	global tooltip
  	if {$tooltip(visible) && [string compare $text $tooltip(text)==0]} {return}
***************
*** 3202,3206 ****
  }
  
! def canvas hide_tooltip {} {
  	global tooltip
  	set c .$self.c
--- 3202,3206 ----
  }
  
! def Canvas hide_tooltip {} {
  	global tooltip
  	set c .$self.c
***************
*** 3642,3661 ****
  set manager [Manager_new]
  
! # ideally:
! #def Class post_hierarchy {{i 0}} {
! #  post %*s%s [expr $i*2] "" $self
! #  foreach sub $@subclasses {
! #    $sub post_hierarchy [expr $i+1]
! #  }
! #}
! #Thing post_hierarchy
! 
! proc post_hierarchy {class {i 0}} {
!   global _
!   post %*s%s [expr $i*4] "" $class
!   foreach sub $_($class:subclasses) {
!     post_hierarchy $sub [expr $i+1]
    }
  }
! post_hierarchy Thing
! 
--- 3642,3650 ----
  set manager [Manager_new]
  
! def Class post_hierarchy {{i 0}} {
!   post %*s%s [expr $i*2] "" $self
!   foreach sub $@subclasses {
!     $sub post_hierarchy [expr $i+1]
    }
  }
! Thing post_hierarchy





More information about the Pd-cvs mailing list