[PD-cvs] pd/src desire.tk,1.1.2.250,1.1.2.251

Mathieu Bouchard matju at users.sourceforge.net
Mon Jun 19 08:22:22 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
new class GraphPropertiesDialog
new class ArrayPropertiesDialog


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.250
retrieving revision 1.1.2.251
diff -C2 -d -r1.1.2.250 -r1.1.2.251
*** desire.tk	19 Jun 2006 06:09:28 -0000	1.1.2.250
--- desire.tk	19 Jun 2006 06:22:19 -0000	1.1.2.251
***************
*** 3169,3172 ****
--- 3169,3243 ----
  }
  
+ class_new GraphPropertiesDialog {Dialog}
+ 
+ def GraphPropertiesDialog apply {} {
+     pd ".$self dialog $@x1 $@y1 $@x2 $@y2 $@xpix $@ypix ;"
+ }
+ 
+ def GraphPropertiesDialog cancel {} {pd ".$self cancel ;"}
+ 
+ set properties(graph) {
+ 	x1    "x from: "        entry {-width 7}
+ 	x2    "x to: "          entry {-width 7}
+ 	xpix  "screen width: "  entry {-width 7}
+ 	y2    "y from: "        entry {-width 7}
+ 	y1    "y to: "          entry {-width 7}
+ 	ypix  "screen height: " entry {-width 7}
+ }
+ 
+ def GraphPropertiesDialog init {of} {
+     super $of
+     foreach var {x1 y1 x2 y2 xpix ypix} {set @$var $_($of:$var)}
+     wm title .$self "Graph"
+     pack [label .$self.label -text "GRAPH BOUNDS"] -side top
+     global properties
+     properties_dialog $self .$self graph_ok $properties(graph)
+     #.$self.xrangef.x2 select from 0
+     #.$self.xrangef.x2 select adjust end
+     #focus .$self.xrangef.x2
+ }
+ 
+ class_new ArrayPropertiesDialog {Dialog}
+ 
+ def ArrayPropertiesDialog apply {} {
+     set mofo $@name
+     if {[string index $mofo 0] == "$"} {
+        set mofo [string replace $mofo 0 0 #] }
+     pd ".$self arraydialog $mofo $@n $@saveit $@otherflag ;"
+ }
+ 
+ def ArrayPropertiesDialog cancel {} {pd ".$self cancel ;"}
+ 
+ def ArrayPropertiesDialog init {of} {
+     super $of
+     foreach var {name n saveit} {set @$var $_($of:$var)}
+     set @otherflag 0
+     wm title $id "[say array] [say popup_properties]"
+     set props {
+ 	name "name: " entry {}
+ 	n    "size: " entry {}
+     }
+     properties_dialog $self .$self array_ok $props
+ 
+     pack [checkbutton .$self.saveme -text "save contents" -variable @saveit -anchor w] -side top
+ 
+     if {$newone != 0} {
+ 	pack [frame .$self.radio] -side top
+ 	foreach {i label} {0 "in new graph" 1 "in last graph"} {
+ 		pack [radiobutton .$self.radio.radio$i -value $i -variable @otherflag -text $label] \
+ 			-side top -anchor w
+     	}
+     } else {
+     	pack [checkbutton .$self.deleteme -text "delete me" \
+ 	    -variable @otherflag -anchor w] -side top
+     }
+     if {$newone} {.$self.buttonframe.apply configure -state disabled}
+     bind .$self.name.entry <KeyPress-Return> "$self ok"
+     bind .$self.n.entry    <KeyPress-Return> "$self ok"
+     .$self.name.entry select from 0
+     .$self.name.entry select adjust end
+     focus .$self.name.entry
+ }
+ 
  class_new NumBox {Labeled Box}
  def* NumBox init {args} {





More information about the Pd-cvs mailing list