[PD-cvs] pd/src g_all_guis.c,1.1.1.4.2.4.2.25,1.1.1.4.2.4.2.26 g_all_guis.h,1.1.1.4.2.2.2.21,1.1.1.4.2.2.2.22 g_bang.c,1.1.1.3.2.2.2.22,1.1.1.3.2.2.2.23 g_dropper.c,1.1.2.14,1.1.2.15 g_hdial.c,1.1.1.4.2.2.2.20,1.1.1.4.2.2.2.21 g_hslider.c,1.1.1.3.2.2.2.22,1.1.1.3.2.2.2.23 g_mycanvas.c,1.1.1.3.2.2.2.12,1.1.1.3.2.2.2.13 g_numbox.c,1.1.1.4.2.2.2.17,1.1.1.4.2.2.2.18 g_toggle.c,1.1.1.3.2.2.2.18,1.1.1.3.2.2.2.19 g_vumeter.c,1.1.1.3.2.2.2.16,1.1.1.3.2.2.2.17 u_main.tk,1.1.1.4.2.7.4.60,1.1.1.4.2.7.4.61 u_object.tk,1.1.2.34,1.1.2.35

Mathieu Bouchard matju at users.sourceforge.net
Tue May 4 09:15:52 CEST 2004


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

Modified Files:
      Tag: impd_0_37
	g_all_guis.c g_all_guis.h g_bang.c g_dropper.c g_hdial.c 
	g_hslider.c g_mycanvas.c g_numbox.c g_toggle.c g_vumeter.c 
	u_main.tk u_object.tk 
Log Message:
rewrote property dialogs (part 4: bugfix)


Index: g_toggle.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v
retrieving revision 1.1.1.3.2.2.2.18
retrieving revision 1.1.1.3.2.2.2.19
diff -C2 -d -r1.1.1.3.2.2.2.18 -r1.1.1.3.2.2.2.19
*** g_toggle.c	3 May 2004 21:18:39 -0000	1.1.1.3.2.2.2.18
--- g_toggle.c	4 May 2004 07:15:49 -0000	1.1.1.3.2.2.2.19
***************
*** 103,107 ****
  static void toggle_nonzero(t_toggle *x, t_floatarg f) {if (f) x->x_nonzero = f;}
  
! static void toggle_reload(t_toggle *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
--- 103,107 ----
  static void toggle_nonzero(t_toggle *x, t_floatarg f) {if (f) x->x_nonzero = f;}
  
! static void toggle_reload(t_toggle *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
***************
*** 120,123 ****
--- 120,124 ----
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 130,134 ****
      x->x_on=0.0;
      outlet_new((t_text *)x, &s_float);
!     toggle_reload(x,argc,argv);
      return x;
  }
--- 131,135 ----
      x->x_on=0.0;
      outlet_new((t_text *)x, &s_float);
!     toggle_reload(x,0,argc,argv);
      return x;
  }

Index: g_hdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v
retrieving revision 1.1.1.4.2.2.2.20
retrieving revision 1.1.1.4.2.2.2.21
diff -C2 -d -r1.1.1.4.2.2.2.20 -r1.1.1.4.2.2.2.21
*** g_hdial.c	3 May 2004 21:18:38 -0000	1.1.1.4.2.2.2.20
--- g_hdial.c	4 May 2004 07:15:49 -0000	1.1.1.4.2.2.2.21
***************
*** 224,228 ****
  static void radio_single_change(t_radio *x) {x->x_change = 0;}
  
! static void radio_reload(t_radio *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
--- 224,228 ----
  static void radio_single_change(t_radio *x) {x->x_change = 0;}
  
! static void radio_reload(t_radio *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
***************
*** 237,240 ****
--- 237,241 ----
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 253,257 ****
      x->x_on_old = x->x_on = y->x_loadinit ? x->x_on : 0;
      outlet_new(&y->x_obj, &s_list);
!     radio_reload(x,argc,argv);
      return x;
  }
--- 254,258 ----
      x->x_on_old = x->x_on = y->x_loadinit ? x->x_on : 0;
      outlet_new(&y->x_obj, &s_list);
!     radio_reload(x,0,argc,argv);
      return x;
  }

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.1.1.4.2.7.4.60
retrieving revision 1.1.1.4.2.7.4.61
diff -C2 -d -r1.1.1.4.2.7.4.60 -r1.1.1.4.2.7.4.61
*** u_main.tk	4 May 2004 04:52:22 -0000	1.1.1.4.2.7.4.60
--- u_main.tk	4 May 2004 07:15:49 -0000	1.1.1.4.2.7.4.61
***************
*** 1252,1260 ****
      set self [string trimleft $id .]
      global _
!     set _($self:$var) [expr $_($self:$var) & 0xFCFCFC]
      set color [tk_chooseColor -title $title \
! 	    -initialcolor [format "#%6.6x" $_($self:$var)]]
      if {$color != ""} {
! 	color_popup_select $self $var [expr [string replace $color 0 0 "0x"] & 0xFCFCFC]
      }
  }
--- 1252,1261 ----
      set self [string trimleft $id .]
      global _
!     set c $_($self:$var)
!     if {[string index $c 0]=="#"} {set c [string replace $c 0 0 0x]}
      set color [tk_chooseColor -title $title \
! 	    -initialcolor [format "#%6.6x" [expr $c&0xFFFFFF]]]
      if {$color != ""} {
! 	color_popup_select $self $var [expr [string replace $color 0 0 "0x"]&0xFFFFFF]
      }
  }
***************
*** 1599,1602 ****
--- 1600,1609 ----
  }
  
+ proc encode_symbol {s} {
+     if {[string length $s]==0} {set s "empty"}
+     if {[string index $s 0]=="$"} {set s [string replace $s 0 0 #] }
+     return $s
+ }
+ 
  proc iemgui_apply {id} {
      global _
***************
*** 1608,1621 ****
  #!!!    iemgui_sched_rng $id
  #!!!    iemgui_clip_fontsize $id
-     if {$_($self:snd) == ""} {set snd "empty"} {set snd $_($self:snd)}
-     if {$_($self:rcv) == ""} {set rcv "empty"} {set rcv $_($self:rcv)}
-     if {$_($self:lab) == ""} {set lab "empty"} {set lab $_($self:lab)}
-     if {[string index $snd 0] == "$"} { set snd [string replace $snd 0 0 #] }
-     if {[string index $rcv 0] == "$"} { set rcv [string replace $rcv 0 0 #] }
-     if {[string index $lab 0] == "$"} { set lab [string replace $lab 0 0 #] }
      set l "$id reload"
      global fields
      foreach field [lrange $fields($_($self:class)) 5 end] {
! 	lappend l $_($self:$field)
      }
      pd "$l ;"
--- 1615,1628 ----
  #!!!    iemgui_sched_rng $id
  #!!!    iemgui_clip_fontsize $id
      set l "$id reload"
+     set _($self:isa) [expr $_($self:loadbang) | ($_($self:scale)<<20) ]
      global fields
      foreach field [lrange $fields($_($self:class)) 5 end] {
!         set v $_($self:$field)
! 	switch -regexp -- $field {
! 		snd|rcv|lab {set v [encode_symbol $v]}
! 		.col        {set v [unparse_color $v]}
! 	}
! 	lappend l $v
      }
      pd "$l ;"
***************
*** 1633,1637 ****
  	catch {set val $_($obj:$var); switch -- $val { empty {set val ""}}; set _($self:$var) $val}
      }
!     foreach var {w h hold break ldx ldy fstyle fs is_log steady min max} {
  	catch {set _($self:$var) $_($obj:$var)}
      }
--- 1640,1644 ----
  	catch {set val $_($obj:$var); switch -- $val { empty {set val ""}}; set _($self:$var) $val}
      }
!     foreach var {w h hold break ldx ldy fstyle fs is_log steady min max on nonzero val change log_height hh} {
  	catch {set _($self:$var) $_($obj:$var)}
      }
***************
*** 1640,1643 ****
--- 1647,1651 ----
      }
      set _($self:loadbang) [expr $_($obj:isa) & 1]
+     set _($self:scale) [expr ($_($obj:isa)>>20) & 1]
      set _($self:class) $_($obj:class)
      puts "pdtk_iemgui_dialog $id ..."
***************
*** 2775,2779 ****
  set look(canvasbgedit) #dddddd
  set look(wirefg) #888888
! set look(sliderbg) #bbe4ff
  set look(inletfg) #ff0000
  set look(outletfg) #ff0000
--- 2783,2789 ----
  set look(canvasbgedit) #dddddd
  set look(wirefg) #888888
! #set look(sliderbg) #bbe4ff
! set look(sliderbg) #ccebff
! #set look(sliderbg) #ddf2ff
  set look(inletfg) #ff0000
  set look(outletfg) #ff0000

Index: g_all_guis.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v
retrieving revision 1.1.1.4.2.4.2.25
retrieving revision 1.1.1.4.2.4.2.26
diff -C2 -d -r1.1.1.4.2.4.2.25 -r1.1.1.4.2.4.2.26
*** g_all_guis.c	3 May 2004 21:18:38 -0000	1.1.1.4.2.4.2.25
--- g_all_guis.c	4 May 2004 07:15:49 -0000	1.1.1.4.2.4.2.26
***************
*** 320,323 ****
--- 320,324 ----
  	va_list val;
  	va_start(val,fmt);
+ 	fprintf(stderr,"argc=%d argv=%08x fmt=%s\n",argc,argv,fmt);
  	for (i=0; i<argc; i++) {
  		switch (fmt[i]) {
***************
*** 386,390 ****
  	return 1;
  err:
!         /*post("WARNING: pd_scanargs failed; fmt=%s, i=%d",fmt,i);*/
  	return 0;
  }
--- 387,391 ----
  	return 1;
  err:
!         post("WARNING: pd_scanargs failed; fmt=%s, i=%d",fmt,i);
  	return 0;
  }

Index: g_mycanvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_mycanvas.c,v
retrieving revision 1.1.1.3.2.2.2.12
retrieving revision 1.1.1.3.2.2.2.13
diff -C2 -d -r1.1.1.3.2.2.2.12 -r1.1.1.3.2.2.2.13
*** g_mycanvas.c	3 May 2004 21:18:38 -0000	1.1.1.3.2.2.2.12
--- g_mycanvas.c	4 May 2004 07:15:49 -0000	1.1.1.3.2.2.2.13
***************
*** 81,85 ****
  }
  
! static void my_canvas_reload(t_my_canvas *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
--- 81,85 ----
  }
  
! static void my_canvas_reload(t_my_canvas *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
***************
*** 98,101 ****
--- 98,102 ----
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 110,114 ****
      y->x_w=100;
      y->x_h=60;
!     my_canvas_reload(x,argc,argv);
      return x;
  }
--- 111,115 ----
      y->x_w=100;
      y->x_h=60;
!     my_canvas_reload(x,0,argc,argv);
      return x;
  }

Index: g_all_guis.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v
retrieving revision 1.1.1.4.2.2.2.21
retrieving revision 1.1.1.4.2.2.2.22
diff -C2 -d -r1.1.1.4.2.2.2.21 -r1.1.1.4.2.2.2.22
*** g_all_guis.h	3 May 2004 21:18:39 -0000	1.1.1.4.2.2.2.21
--- g_all_guis.h	4 May 2004 07:15:49 -0000	1.1.1.4.2.2.2.22
***************
*** 21,26 ****
  /*#define IEM_FSTYLE_FLAGS_ALL 0x007fffff*/
  /*#define IEM_INIT_ARGS_ALL    0x01ffffff*/
- /*#define IEM_GUI_OLD_SND_FLAG 1*/
- /*#define IEM_GUI_OLD_RCV_FLAG 2*/
  #define IEMGUI_MAX_NUM_LEN 32
  
--- 21,24 ----
***************
*** 34,38 ****
      int x_h,   x_w;
      int x_ldx, x_ldy;
-     /* obsolete : char x_font[16];*/
      /* formerly x_isa: */
      unsigned int x_loadinit:1, x_scale:1, x_flashed:1, x_locked:1;
--- 32,35 ----
***************
*** 40,45 ****
      unsigned int x_rcv_able:1, x_snd_able:1, x_selected:1, x_finemoved:1,
  	x_put_in2out:1, x_change:1, x_lin0_log1:1, x_steady:1;
!     int x_font_style;
!     int x_fontsize;
      int x_fcol, x_bcol, x_lcol; /* foreground, background, label colors */
      t_symbol *x_snd, *x_rcv, *x_lab; /* send, receive, label symbols */
--- 37,41 ----
      unsigned int x_rcv_able:1, x_snd_able:1, x_selected:1, x_finemoved:1,
  	x_put_in2out:1, x_change:1, x_lin0_log1:1, x_steady:1;
!     int x_font_style, x_fontsize;
      int x_fcol, x_bcol, x_lcol; /* foreground, background, label colors */
      t_symbol *x_snd, *x_rcv, *x_lab; /* send, receive, label symbols */

Index: u_object.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/u_object.tk,v
retrieving revision 1.1.2.34
retrieving revision 1.1.2.35
diff -C2 -d -r1.1.2.34 -r1.1.2.35
*** u_object.tk	4 May 2004 05:17:16 -0000	1.1.2.34
--- u_object.tk	4 May 2004 07:15:49 -0000	1.1.2.35
***************
*** 25,32 ****
  	regsub {;$} $c {} c
  	if {$c<0} {
! 		set r [expr (((~$c)>>12)&63)*255/63]
! 		set g [expr (((~$c)>> 6)&63)*255/63]
! 		set b [expr (((~$c)>> 0)&63)*255/63]
! 		return [format #%02x%02x%02x $r $g $b]
  	} {
  		global preset_colors2
--- 25,35 ----
  	regsub {;$} $c {} c
  	if {$c<0} {
! 		set c [expr ~$c]
! 		set r [expr round((($c>>12)&63)*255/63)]
! 		set g [expr round((($c>> 6)&63)*255/63)]
! 		set b [expr round((($c>> 0)&63)*255/63)]
! 		set foo [format #%02x%02x%02x $r $g $b]
! 		#puts $foo
! 		return $foo
  	} {
  		global preset_colors2
***************
*** 35,38 ****
--- 38,51 ----
  }
  
+ proc unparse_color {c} {
+ 	if {[string index $c 0]=="#"} {set c [string replace $c 0 0 0x]}
+ 	set r [expr round((($c>>16)&255)*63/255)]
+ 	set g [expr round((($c>> 8)&255)*63/255)]
+ 	set b [expr round((($c>> 0)&255)*63/255)]
+ 	set foo [expr ~0[format %02o%02o%02o $r $g $b]]
+ 	#puts "$r $g $b $foo"
+ 	return $foo
+ }
+ 
  ############ data transfer
  
***************
*** 351,354 ****
--- 364,368 ----
  	global look
  	global _
+ 	if {![info exists _($self:buf)]} {set _($self:buf) ""}
  	foreach {x1 y1} [object_xy $self $canvas] {}
  	set xs [expr 4+10*$_($self:w)]
***************
*** 370,373 ****
--- 384,388 ----
  	#shadow_draw $self $canvas $points
  	set points2 [list $x1 $y1 [expr $x1+$half] [expr $y1+$half] $x1 $y2]
+ 	puts "numbox_draw $self $canvas"
  	if {$isnew} {
  		$canvas create polygon $points -tag ${self}BASE \
***************
*** 390,393 ****
--- 405,410 ----
  	io_draw $self $canvas $x1 $y1 $xs $ys $ins $outs
  	label_draw $self $canvas
+ 	set _($self:clickevent) numbox_clickevent
+ 	set _($self:keyevent) numbox_keyevent
  }
  
***************
*** 406,410 ****
  	set f $_($self:val)
  	set is_exp 0
! 
  	set buf [format %g $f]
  	set bufsize [string length buf]
--- 423,428 ----
  	set f $_($self:val)
  	set is_exp 0
! 	puts "numbox_ftoa $_($self:buf)"
! 	if {[string length $_($self:buf)]>0} {return $_($self:buf)}
  	set buf [format %g $f]
  	set bufsize [string length buf]
***************
*** 444,447 ****
--- 462,479 ----
  }
  
+ proc numbox_clickevent {self canvas x y b f} {
+ 	#set can [trimleft [trimright $canvas .c] .]
+ 	canvas_grab $canvas $self
+ }
+ 
+ proc numbox_keyevent {self canvas key shift} {
+     global _
+     set c [format %c $key]
+     switch -regexp -- $c {
+         [0-9] {set _($self:buf) "$_($self:buf)$c"; puts $_($self:buf); numbox_draw $self $canvas}
+ 	default {puts "numbox_keyevent $key"}
+     }
+ }
+ 
  proc comment_draw {self canvas xs ys ins outs} {
  	if {[llength [$canvas gettags $self]] != 0} {}
***************
*** 595,609 ****
  		set x3 [expr $x1+$xs-$thick/2-2]
  		set eighth [expr round($ys/8-1)]
! 		.x81f0e88.c create line $x3 $y1 $x3 [expr $y1+$ys] \
! 		  -dash [list 1 $eighth 1 $eighth] -width $thick \
! 		  -fill [darker $look(sliderbg)]
  	} else {
  		set thick [clamp [expr $ys/3] 1 5]
  		set y3 [expr $y1+$ys-$thick/2-2]
  		set eighth [expr $xs/8]
! 		.x81f0e88.c create line $x1 $y3 [expr $x1+$xs] $y3 \
! 		  -dash [list 1 $eighth 1 $eighth] -width $thick \
! 		  -fill [darker $look(sliderbg)]
  	}
  }
  
--- 627,638 ----
  		set x3 [expr $x1+$xs-$thick/2-2]
  		set eighth [expr round($ys/8-1)]
! 		set coords [list $x3 $y1 $x3 [expr $y1+$ys]]
  	} else {
  		set thick [clamp [expr $ys/3] 1 5]
  		set y3 [expr $y1+$ys-$thick/2-2]
  		set eighth [expr $xs/8]
! 		set coords [list $x1 $y3 [expr $x1+$xs] $y3]
  	}
+ 	$canvas create line $coords -dash [list 1 $eighth 1 $eighth] -width $thick -fill [darker $look(sliderbg)]
  }
  

Index: g_vumeter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vumeter.c,v
retrieving revision 1.1.1.3.2.2.2.16
retrieving revision 1.1.1.3.2.2.2.17
diff -C2 -d -r1.1.1.3.2.2.2.16 -r1.1.1.3.2.2.2.17
*** g_vumeter.c	3 May 2004 21:18:39 -0000	1.1.1.3.2.2.2.16
--- g_vumeter.c	4 May 2004 07:15:49 -0000	1.1.1.3.2.2.2.17
***************
*** 157,161 ****
  }
  
! static void vu_reload(t_vu *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
--- 157,161 ----
  }
  
! static void vu_reload(t_vu *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
***************
*** 168,171 ****
--- 168,172 ----
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if(y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 186,190 ****
      vu_check_height(x, y->x_h);
      inlet_new(&y->x_obj, &y->x_obj.ob_pd, &s_float, gensym("ft1"));
!     vu_reload(x,argc,argv);
      return x;
  }
--- 187,191 ----
      vu_check_height(x, y->x_h);
      inlet_new(&y->x_obj, &y->x_obj.ob_pd, &s_float, gensym("ft1"));
!     vu_reload(x,0,argc,argv);
      return x;
  }

Index: g_hslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v
retrieving revision 1.1.1.3.2.2.2.22
retrieving revision 1.1.1.3.2.2.2.23
diff -C2 -d -r1.1.1.3.2.2.2.22 -r1.1.1.3.2.2.2.23
*** g_hslider.c	3 May 2004 21:18:38 -0000	1.1.1.3.2.2.2.22
--- g_hslider.c	4 May 2004 07:15:49 -0000	1.1.1.3.2.2.2.23
***************
*** 190,194 ****
  }
  
! static void slider_reload(t_slider *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
--- 190,194 ----
  }
  
! static void slider_reload(t_slider *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
***************
*** 209,212 ****
--- 209,213 ----
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if(y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 222,226 ****
      y->x_binbufindex = 6;
      outlet_new(&y->x_obj, &s_float);
!     slider_reload(x,argc,argv);
      return x;
  }
--- 223,227 ----
      y->x_binbufindex = 6;
      outlet_new(&y->x_obj, &s_float);
!     slider_reload(x,0,argc,argv);
      return x;
  }

Index: g_dropper.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/g_dropper.c,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -C2 -d -r1.1.2.14 -r1.1.2.15
*** g_dropper.c	4 May 2004 05:17:16 -0000	1.1.2.14
--- g_dropper.c	4 May 2004 07:15:49 -0000	1.1.2.15
***************
*** 66,70 ****
  }
  
! static void dropper_reload(t_dropper *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
--- 66,70 ----
  }
  
! static void dropper_reload(t_dropper *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
***************
*** 81,84 ****
--- 81,85 ----
      if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
      iemgui_constrain(y);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 90,94 ****
      y->x_locked = 0;
      outlet_new((t_text *)x, &s_symbol);
!     dropper_reload(x,argc,argv);
      return x;
  }
--- 91,95 ----
      y->x_locked = 0;
      outlet_new((t_text *)x, &s_symbol);
!     dropper_reload(x,0,argc,argv);
      return x;
  }

Index: g_bang.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v
retrieving revision 1.1.1.3.2.2.2.22
retrieving revision 1.1.1.3.2.2.2.23
diff -C2 -d -r1.1.1.3.2.2.2.22 -r1.1.1.3.2.2.2.23
*** g_bang.c	3 May 2004 21:18:38 -0000	1.1.1.3.2.2.2.22
--- g_bang.c	4 May 2004 07:15:49 -0000	1.1.1.3.2.2.2.23
***************
*** 123,133 ****
  static void bng_tick_lck(t_bng *x) {x->x_gui.x_locked = 0;}
  
! static void bng_reload(t_bng *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
      y->x_binbufindex = 4;
!     int isa=0, ftbreak=250, fthold=50;
      if (!pd_scanargs(argc,argv,"iiiiaaaiiiiccc",
! 	&y->x_w,&fthold,&ftbreak,&isa,&y->x_snd,&y->x_rcv,&y->x_lab,
  	&y->x_ldx,&y->x_ldy,&y->x_font_style,&y->x_fontsize,
  	&y->x_bcol,&y->x_fcol,&y->x_lcol)) return;
--- 123,133 ----
  static void bng_tick_lck(t_bng *x) {x->x_gui.x_locked = 0;}
  
! static void bng_reload(t_bng *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
      y->x_binbufindex = 4;
!     int isa=0;
      if (!pd_scanargs(argc,argv,"iiiiaaaiiiiccc",
! 	&y->x_w,&x->x_flashtime_hold,&x->x_flashtime_break,&isa,&y->x_snd,&y->x_rcv,&y->x_lab,
  	&y->x_ldx,&y->x_ldy,&y->x_font_style,&y->x_fontsize,
  	&y->x_bcol,&y->x_fcol,&y->x_lcol)) return;
***************
*** 135,143 ****
  
      y->x_h = y->x_w;
!     bng_check_minmax(x, ftbreak, fthold);
      y->x_snd_able = y->x_snd!=sym_empty;
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
      iemgui_constrain(y);
  }
  
--- 135,144 ----
  
      y->x_h = y->x_w;
!     bng_check_minmax(x, x->x_flashtime_break, x->x_flashtime_hold);
      y->x_snd_able = y->x_snd!=sym_empty;
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
      iemgui_constrain(y);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 146,150 ****
      t_iemgui *y = iemgui_new(bng_class);
      t_bng *x = (t_bng *)y;
!     bng_check_minmax(x, 250, 50);
      x->x_flashed = 0;
      y->x_draw = (t_iemfunptr)bng_draw;
--- 147,153 ----
      t_iemgui *y = iemgui_new(bng_class);
      t_bng *x = (t_bng *)y;
!     x->x_flashtime_break = 250;
!     x->x_flashtime_hold = 50;
!     bng_check_minmax(x, x->x_flashtime_break, x->x_flashtime_hold);
      x->x_flashed = 0;
      y->x_draw = (t_iemfunptr)bng_draw;
***************
*** 154,158 ****
      x->x_clock_lck = clock_new(x, (t_method)bng_tick_lck);
      outlet_new((t_text *)x, &s_bang);
!     bng_reload(x,argc,argv);
      return x;
  }
--- 157,161 ----
      x->x_clock_lck = clock_new(x, (t_method)bng_tick_lck);
      outlet_new((t_text *)x, &s_bang);
!     bng_reload(x,0,argc,argv);
      return x;
  }

Index: g_numbox.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v
retrieving revision 1.1.1.4.2.2.2.17
retrieving revision 1.1.1.4.2.2.2.18
diff -C2 -d -r1.1.1.4.2.2.2.17 -r1.1.1.4.2.2.2.18
*** g_numbox.c	3 May 2004 21:18:38 -0000	1.1.1.4.2.2.2.17
--- g_numbox.c	4 May 2004 07:15:49 -0000	1.1.1.4.2.2.2.18
***************
*** 322,326 ****
  }
  
! static void my_numbox_reload(t_my_numbox *x, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
--- 322,326 ----
  }
  
! static void my_numbox_reload(t_my_numbox *x, t_symbol *s, int argc, t_atom *argv)
  {
      t_iemgui *y = (t_iemgui *)x;
***************
*** 342,345 ****
--- 342,346 ----
      y->x_rcv_able = y->x_rcv!=sym_empty;
      if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv);
+     if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0);
  }
  
***************
*** 360,364 ****
      y->x_change = 0; CH
      outlet_new((t_text *)x, &s_float);
!     my_numbox_reload(x,argc,argv);
      return x;
  }
--- 361,365 ----
      y->x_change = 0; CH
      outlet_new((t_text *)x, &s_float);
!     my_numbox_reload(x,0,argc,argv);
      return x;
  }
***************
*** 400,404 ****
      wb.w_visfn =      iemgui_vis;
      wb.w_clickfn =    NULL;
-     wb.w_clickfn =    my_numbox_newclick;
      class_setwidget(c, &wb);
      class_sethelpsymbol(c, gensym("numbox2"));
--- 401,404 ----





More information about the Pd-cvs mailing list